# Cross-chain Integration for Lifetime NFTs and Referral Program

When designing **CryptoLegacy**, we needed a way to avoid repeating contract setup and periodic payments on every blockchain.

CryptoLegacy contracts are sustained through transparent DAO donations. A fixed donation is required when a contract is created and periodically to keep it active. Without a pass, this donation applies separately on each blockchain where a contract is deployed.

The **Unlimited NFT Pass** solves this by allowing users to pay once and reuse that right across all supported blockchains. Instead of making recurring donations for every contract on every chain, the pass can be locked cross-chain and used to create and update contracts without additional payments on those networks.

The **Referral Program** is an optional protocol mechanism for trusted introductions. Referral codes are created on Arbitrum to minimize costs and are then propagated to other supported blockchains. When a referral code is used, the invitee receives a discount, and a portion of the donation is allocated to the code holder. Referral codes are intended for private use in trusted contexts, not for public promotion or growth campaigns.

Both mechanisms rely on the **deBridge protocol** to synchronize state across blockchains. deBridge is used strictly as a messaging layer to propagate NFT lock status, NFT ownership updates, and referral code data across networks. deBridge does not hold assets, does not execute protocol logic, and does not make discretionary decisions.

#### Cross-chain Lifetime NFT (Unlimited Pass)

A **Lifetime NFT** (Unlimited Pass) can be used to waive DAO donation payments on chains where its lock status is active. The typical flow is:

**1. Mint on Ethereum Mainnet**

Lifetime NFTs are minted on **Ethereum Mainnet**. Ethereum acts as the originating chain from which lock and ownership updates are propagated to other supported networks.

**2. Lock and propagate to other chains (deBridge)**

To use the NFT on a target network, the lock state is propagated cross-chain:

* Submit a transaction on Ethereum to send the lock data to the target chain.
* deBridge delivers the cross-chain message.
* On the target chain, the lock state is confirmed automatically upon successful message delivery.\
  If automatic confirmation does not occur, the lock can be confirmed through an explicit on-chain confirmation transaction.

Once confirmed, the same Unlimited NFT Pass permissions apply on that chain (for example, contract creation and updates without additional DAO donations).

**3. Unlocking**

Unlocking is constrained by protocol-defined timing and cross-chain lock state:

* The **lock period** is a protocol parameter enforced on-chain.\
  **Current lock period: 150 days.**
* An NFT cannot be unlocked on any chain while it is still recorded as locked on other chains.
* Unlocking requires removing remote locks first via cross-chain unlock messages, and then confirming the final unlock on the originating chain.

Lock timing parameters (including the lock period) are enforced by the LockChainGate logic and may be adjusted through protocol administration or governance over time.

**4. Transferring a locked NFT**

A Lifetime NFT behaves like a standard ERC-721 when it is not locked. When it is locked, transfers are constrained:

* Transfers of a locked NFT are subject to a protocol-defined **transfer timeout** (cooldown).\
  **Current transfer timeout: 14 days.**
* If the NFT lock status exists on multiple chains, ownership changes on the originating chain are propagated to the other chains where the lock is active via protocol-defined cross-chain owner update messages.

The transfer timeout is enforced by the LockChainGate logic and may be adjusted through protocol administration or governance over time.

#### Cross-chain Referral Program

Referral codes are a protocol mechanism used for DAO donation discounts and reward routing.

**1. Create a code (typically on Arbitrum)**

To reduce costs, referral codes are typically created on **Arbitrum**, which currently acts as the canonical chain for the referral program, and then propagated to other supported chains.

Each code has:

* an **owner** (admin address),
* a **payout address** (where referral rewards are sent),
* **discount** and **referral share** values.

Discount and referral share are defined on the canonical chain and may be propagated to other supported chains as part of referral code synchronization.\
If a referral code has explicit discount/share values, those values override local defaults on destination chains.\
If no explicit values are propagated for a given field, destination chains apply their locally configured defaults for that field.

A key constraint is that a referral code owner cannot already own another referral code (one-code-per-owner).

**2. Activate / propagate to other chains**

Referral code data is propagated using deBridge:

* Submit a transaction on the source chain specifying destination chains.
* deBridge delivers the cross-chain messages.
* On destination chains, referral codes are activated automatically once the messages are confirmed.\
  If automatic activation does not occur, activation can be completed via an explicit on-chain confirmation transaction.

Once activated, the same referral code, owner, payout address, and any propagated discount/share values apply on those networks.

**3. Updating owner / payout address**

Referral code configuration can be updated on the canonical source chain.

Updates to the referral code owner and/or payout address are performed by submitting an on-chain update on that chain. As part of the same operation, the updated referral code data can be propagated to other supported chains by specifying the target networks and covering the required cross-chain messaging fees.

On destination chains, the updated fields are applied through a protocol-defined cross-chain update delivered by deBridge.

If propagation to a specific chain is not finalized automatically, the update can be completed by confirming it on that target chain.

**4. Updating discount and referral share**

In addition to ownership and payout address, referral discount and referral share can be changed.

This is a two-step process:

1. **Change the values on the canonical chain**\
   Discount/share values are stored on-chain and can be updated through the canonical chain configuration. This updates the values used on the canonical chain.
2. **Propagate updated values to other chains**\
   To apply updated discount/share values on other supported networks, the referral code data must be propagated cross-chain via a protocol-defined deBridge update. On destination chains, only the fields included in the update are modified; any fields not included remain unchanged.

As with other referral code updates, if propagation to a specific chain is not finalized automatically, the update can be completed by confirming it on that target chain.

#### Cross-chain Asset Transfer

CryptoLegacy does not currently support direct cross-chain transfers for assets held inside a personal contract. Asset execution (transfer, claim, recovery) is always performed on the chain where the personal contract is deployed.

If cross-chain asset transfer is introduced in the future, it would be implemented via a dedicated execution plugin and would only be available if explicitly enabled under protocol-defined execution rules.

#### Cross-chain Contract Copy

CryptoLegacy supports a contract copy flow across networks in the interface. The goal is to deploy a contract on another network while preserving the same beneficiary configuration and execution assumptions, and then re-add assets and encrypted backups on the target chain.

Each copied contract is an independent on-chain instance on its respective network and follows the same protocol-defined execution model.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptolegacy.app/protocol-mechanics/cross-chain-integration-for-lifetime-nfts-and-referral-program.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
