> For the complete documentation index, see [llms.txt](https://docs.nectarliquid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nectarliquid.com/referrals.md).

# Referrals

#### How it Works

The Nectar Liquid referral program lets you earn rewards when traders you refer open or close positions on the platform. To participate as an affiliate, create a referral code and share your referral link.

To create a referral code:

* Go to the Referrals page.
* Select the Affiliates tab.
* Enter a referral code using letters, digits, or underscores. Codes are case sensitive and can be up to 20 characters long.
* Submit the transaction to register the code on chain via Asset Chain.

> Network Rule
>
> You must create your referral code separately on each network environment (Mainnet and Beta Testnet) to earn rewards and grant discounts on that specific network.

Once your code is registered, copy your referral link from the Referrals page. The link formats for each active environment are:

* Nectar Liquid Mainnet Link: `https://app.nectarliquid.com/#/trade/?ref=your-code`
* Nectar Liquid Beta Testnet Link: `https://testnet.nectarliquid.com/#/trade/?ref=your-code` (or `https://nectar-liquid.netlify.app/#/trade/?ref=your-code`)

Share this link on any platform. When a trader opens the link, your referral code is stored in their browser. The code is written permanently to the contract the first time they create an order. From that point on, the trader receives a fee discount and you earn rewards. Both are applied automatically.

The referral program is subject to change as determined by NECTAR token holders and protocol governance.

#### Claiming Rewards

Rewards in the referral program work differently depending on whether you are a trader receiving discounts or an affiliate earning rewards.

Traders

Traders receive fee discounts automatically. The discount is deducted from the position fee directly at trade execution.

Affiliates

Affiliates accumulate rewards on every leverage trade made by their referred traders. Rewards accrue per market in the specific collateral token of each market. You can claim them at any time from the Referrals page using the Claimable rebates card.

#### Tiers

The referral program uses a tier system to prevent gaming through self referrals. This ensures affiliates receive proper rewards for the active traders they bring to the platform.

| **Tier** | **Trader Discount** | **Affiliate Reward** |
| -------- | ------------------- | -------------------- |
| 1        | 5%                  | 5%                   |
| 2        | 10%                 | 10%                  |
| 3        | 10%                 | 19%                  |

Anyone can create a Tier 1 code. To upgrade to Tier 2 or Tier 3, your account must meet specific weekly thresholds.

| **Tier** | **Active Users** | **Combined Volume** |
| -------- | ---------------- | ------------------- |
| 2        | 15+              | $5,000,000+         |
| 3        | 30+              | $25,000,000+        |

If your account meets these criteria, you can request an upgrade through the official Nectar Liquid community channels. Wallet providers and other DeFi protocols integrating Nectar Liquid are also eligible for Tier 2 and Tier 3 rewards.

Rewards and discounts apply to opening and closing fees for leverage trading. They do not apply to borrow fees, funding fees, or swap fees. Tier 3 affiliates receive their 19% reward directly in the collateral token of the traded market.

#### Transferring a Referral Code

To transfer ownership of a referral code to a new address, you must interact directly with the ReferralStorage contract through the Asset Chain block explorer. There is currently no frontend user interface for this action.

> Warning Notice
>
> Transferring a referral code is permanent. Once transferred, you lose ownership and only the new owner can transfer it further. There is no way to reclaim the code without the cooperation of the new owner. Verify the destination address carefully before submitting the transaction.

Because Nectar Liquid operates parallel environments, make sure you look up the correct contract address corresponding to the network where your code is registered.

Contract Configurations

* Mainnet ReferralStorage Contract: `0x04b6002A58f5295641602240D6890a959a348f51`
* Beta Testnet ReferralStorage Contract: `0xB8dCA59DB431197bBe6A7ce6C202972A8E846464`

To transfer a code:

1. Convert your referral code to its bytes32 encoding using a hex converter tool with the append zeros option checked. For example, the word "code" encodes to `0x636f646500000000000000000000000000000000000000000000000000000000`.
2. Open the matching ReferralStorage contract link on the active Asset Chain block explorer (Mainnet or Testnet explorer).
3. Go to the Write Contract tab.
4. Connect the wallet that currently owns the referral code.
5. Expand the `govSetCodeOwner` function.
6. Enter the bytes32 value from the first step in the `_code` field and the destination wallet address in the `_newAccount` field.
7. Submit the transaction by clicking Write.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nectarliquid.com/referrals.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
