> For the complete documentation index, see [llms.txt](https://layer3xyz.gitbook.io/layer3-updated-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://layer3xyz.gitbook.io/layer3-updated-docs/builder/guides/guides--token-reward-configuration.md).

# Token Reward Configuration

### Important Notes

* Each Activation with Token Rewards will have its own escrow (rewards) contract deployed
* Users claim tokens from this contract alongside their CUBE mint (single transaction)
* For budgeting, you will need to have decided the following:
  * **Token**: What token you will reward (e.g. USDC)
  * **Amount**: How many tokens you will reward (e.g. 0.5 USDC)
  * **Participant Cap**: How many users can complete your Activation and claim the reward (e.g. 10,000 Users)
    * *For this example, you would need to fund your escrow with 5,000 USDC*
* You do not need to spend any gas distributing token rewards through Layer3
  * Layer3 covers the gas for escrow contract deployment and initialization
  * Users pay gas for claiming their token rewards
* The UI will take you through this process

***

### Setup Process

#### 1. Enable Token Rewards

* Navigate to the Rewards tab
* Toggle on "Token Reward" using the switch
* Note: Your token rewards must be on the same chain as your CUBE credential

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FtlPQ8VETXLDs6EZkG7Fq%2FScreenshot%202025-06-10%20at%2016.40.12.png?alt=media&#x26;token=c8f8ec01-cd5c-4d0c-b982-e1c86e94fbd0" alt=""><figcaption></figcaption></figure>

#### 2. Deploy Activation Escrow

* Every Activation needs its own escrow (rewards) contract
* Click "Deploy" to create this Activation's escrow contract
* Wait for deployment confirmation

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FjHhCPT9UFvbsr6WXjjnw%2FScreenshot%202025-06-10%20at%2016.41.36.png?alt=media&#x26;token=bcda4686-4616-47bf-8382-03cc48b768a1" alt=""><figcaption></figcaption></figure>

#### 3. Initialize Escrow

* After deployment, click "Initialize"
* This prepares your contract for rewards distribution and is required for each new Activation's escrow
* **Note** - you don't need to worry about selecting a token or participant caps before you've initialized the escrow

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FC35K3Gf3lDVlhmMDW3xc%2FScreenshot%202025-06-10%20at%2016.43.55.png?alt=media&#x26;token=1a64759f-f687-447b-a719-e38037195eb9" alt=""><figcaption></figcaption></figure>

Once initialized, you will see the address for your escrow. This is where you will send the funds you want to use for reward distribution.

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2Foixd0FyqiVQC9xgAgFjO%2FScreenshot%202025-06-10%20at%2016.45.12.png?alt=media&#x26;token=1c339a5f-3d13-4550-a8d6-fdf8aa530fd6" alt=""><figcaption></figcaption></figure>

#### 4. Select Reward Token

* Click "Select token" to choose your reward token

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FTu8P2sSRhpzexhAOVozy%2FScreenshot%202025-06-10%20at%2016.45.59.png?alt=media&#x26;token=5223560f-a0ab-4ce2-86ab-067e625a6cd7" alt=""><figcaption></figcaption></figure>

* You can:
  * Paste a token contract address
  * Choose from/search for common tokens (ETH, USDC, etc.)

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FH0b7Ri3gr4TgIGVTntgW%2FScreenshot%202025-06-10%20at%2016.47.25.png?alt=media&#x26;token=9d04884a-1d60-492c-ab38-db213b6f7793" alt=""><figcaption></figcaption></figure>

#### 5. Whitelist Your Token

* For security, you will allowlist the token you'll be rewarding in your Activation.
* This essentially authorizes your token for rewards by the escrow contract.
* Click "Add token to allowlist"

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FqWyZBZjUWfD4q4bwfbb4%2FScreenshot%202025-06-10%20at%2016.48.18.png?alt=media&#x26;token=340e4246-e68e-4cf9-85da-65b0e4111276" alt=""><figcaption></figcaption></figure>

* This will trigger an onchain transaction to allowlist your chosen token.
* The UI will update to confirm that your selected token is approved for rewards

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FwnbakwucBh2LdRdQtCQk%2FScreenshot%202025-06-10%20at%2016.49.51.png?alt=media&#x26;token=01cc4b43-6a07-4cfc-b2cc-6b9ed65a0835" alt=""><figcaption></figcaption></figure>

#### 6. Configure your Token Distribution

**Set Participant Cap**

* Enter the maximum number of unique participants who can complete your Activation and claim the token reward
* Example: inputting 1,000 here means 1,000 users can complete your Activation
* The Activation will be capped at that number of participants
* This is used to calculate total funding needed (# of participants \* Token Reward Per User)

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2FNIHO2sBjdRSvmCNAxbId%2FScreenshot%202025-06-10%20at%2016.51.17.png?alt=media&#x26;token=018f046a-04a5-4c37-ae56-71096355346c" alt=""><figcaption></figcaption></figure>

**Set the Per User Reward Amount**

* Enter how many tokens each participant who completes your Activation receives
* E.g. in the below example, we are rewarding 42 DEGEN tokens to a max of 1,000 participants
* This means you would need to fund your escrow with 42,000 DEGEN
* This escrow is not yet funded so the UI shows the balance would be exceeded

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2Fu5M1FC9IqKXWmsq9cHqc%2FScreenshot%202025-06-10%20at%2016.52.32.png?alt=media&#x26;token=a5ef4aa7-f4b9-45e8-a638-0337e269735c" alt=""><figcaption></figcaption></figure>

#### 7. Fund Your Activation Escrow

* Copy this Activation's escrow contract address from UI (or the block explorer link)
* Send enough tokens to cover total rewards **(make sure to do so on the right blockchain)**
* UI will show your current balance
* You can send a test transaction of 1 token first to be sure

<figure><img src="https://752488452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhSilmqBx7U8CtP2hlByI%2Fuploads%2Fqoo6VBQtgAnKwUe0X2o2%2FScreenshot%202025-06-10%20at%2016.53.31.png?alt=media&#x26;token=24d19888-7d27-4309-af88-01be70693b0f" alt=""><figcaption></figcaption></figure>

Save your configuration once it's ready.
