# How to get referral fees from swaps?

[STON.fi](https://ston.fi/) offers a referral program that encourages users to share referral links and earn commissions. The structure of referral commissions varies between V1 and V2 pools.

#### Key Referral Commission Differences Between V1 and V2 Pools

| **Parameter**                      | **V1**                                                                    | **V2**                                                                   |
| ---------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Default referral percentage        | 0.1%                                                                      | Customizable (0.0% – 1.0%)                                               |
| Commission distribution            | Automatic to wallet                                                       | Accumulates in vaults                                                    |
| Manual withdrawal required         | No                                                                        | Yes                                                                      |
| Flexibility in referral percentage | No                                                                        | Yes                                                                      |
| Transaction cost                   | Higher (referral fee is sent immediately to the referrer during the swap) | Lower (referral fee accrues in a vault; not transferred during the swap) |

### V1 referral commission

**Default referral commission**\
In V1, users can share a referral link to receive a default commission of 0.1% from any swaps made through their link.\
\
**Example referral link:** <https://app.ston.fi/swap?chartVisible=false\\&ft=TON\\&tt=STON\\&referral\\_address=\\>\<referral\_address>

1. Automatic distribution\
   The commission is automatically credited to the wallet that owns the referral\_address. No extra action is required.<br>
2. Simplified workflow\
   The commission is transferred immediately, which offers instant rewards for referrers. However, the swapping user pays a slightly higher gas/processing cost because the referral token transfer occurs within the swap transaction.

### V2 referral commission

**Customizable referral percentage**\
In V2, the referral commission can be set by adding the referral\_percent parameter to the link. The value can range from 0% (0 bps) to 1% (100 bps).\
Note: referral\_percent is a decimal (e.g., 0.1 = 0.1%).\
\
**Example referral link (custom commission):** <https://app.ston.fi/swap?chartVisible=false\\&ft=TON\\&tt=STON\\&referral\\_address=\\>\<referral\_address>\&referral\_percent=0.1

1. Accrued commission in vaults\
   Commissions do not distribute automatically. Instead, they accumulate in vault contracts associated with the pools. As a result, the swapping user pays less because no immediate referral transfer is made.
2. Manual withdrawal, how to claim:

Open:[ https://sdk-demo-app.ston.fi/vault](https://sdk-demo-app.ston.fi/vault)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfzA9rxKUvaUFgZ0JbjpBT2S75oxvIOwQ5pOPOqYUfhwDEhgs7YLbtPhFgcWTEEyY9uPdv_qGi-0QfLH8a3XaYebGvBvKr_L38QdwM3E2eX0erKRMKfuERWNcm_aqNH0QxgshnqJQ?key=STuDSp5_1IJXT_GYc1PK7g" alt=""><figcaption></figcaption></figure>

Connect your wallet and review available referral fees for your address and click Claim on the ones you want.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeP-jZv008oQAk6W_ywvvAW4z3Iz1Ape5qklznsyzE8Ha65fUsnFxsNH7I0Ug2VgcLq-iIW-HmNoq4QZjQjRwV_pAJpx1dr8YyOJyJNCVQMHY9KNAc_d74wFCtUc0Yhhu3gW2Bu?key=STuDSp5_1IJXT_GYc1PK7g" alt=""><figcaption></figcaption></figure>

Approve the transaction in your wallet.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc6nqjC9vsfUcCjE1bSsf4NyhbjxzcT1bH1Vx8JqUHUnBm4mCqJzzJ4grqG6wlY7D6-5wxSVauo3LBykXOlXfOMBOctD8qwvdx0lLruqQszGMqPQHfq8y-xDhVvMNRCGbbvRoJn?key=STuDSp5_1IJXT_GYc1PK7g" alt=""><figcaption></figcaption></figure>

After confirmation, the claimed fees will appear in your wallet.

3. Withdrawal

Referrers must manually request the accumulated commission from the vault.

This is done by sending a withdrawal request to the vault contract.

*Docs:* [*https://docs.ston.fi/developer-section/omniston/omniston-referral-fees#id-2-withdrawing-your-fees*](https://docs.ston.fi/developer-section/omniston/omniston-referral-fees#id-2-withdrawing-your-fees)

4. Increased flexibility\
   Referrers can set the commission to match their strategy (e.g., 0% for growth, 0.05%–0.2% for light incentives, up to 1% for high‑touch campaigns).

### Applicability of referral program

* The referral program applies to all swaps performed after opening the DEX through the referral link.
* The referral context resets if the page is refreshed, the app is closed, or the user operates in another tab/session.

### FAQ

* **Does the 0.1% referral commission add extra cost or is it paid from the protocol fee?**\
  Referral commissions are always added on top, making the exchange more expensive for the user by the amount of the referral commission.
* **What happens if the \&referral\_percent= parameter is used for V1 pools?**\
  It is ignored. For V1 pools, the referral percentage is always 0.1% if a referral\_address is specified.
* **In which token is the referral commission accrued?**\
  In the input token.\
  Example: for USDT → STON, the input token is USDT, so the commission accrues in USDT.
* **Does the referral commission apply to one swap or multiple swaps?**\
  It applies to all swaps performed after opening the DEX via the referral link, until the referral context resets (page refresh, app closure, another tab/session).
* **What happens if a value greater than 1% is set for referral\_percent?**\
  The system automatically applies the maximum allowed value of 1%.
* **What happens if \&referral\_percent= is not specified?**\
  The default value of 0.1% is applied.
* **Can anyone request the referral commission withdrawal?**\
  Anyone can send a withdrawal request, but only the vault owner receives the rewards. The claim message simply triggers distribution to the vault owner.
* **What happens if a non‑owner requests a withdrawal?**\
  The non‑owner receives nothing. All rewards are sent to the vault owner.

#### At‑a‑glance: building links

* Minimum V1 link\
  <https://app.ston.fi/swap?ft=\\><FROM>\&tt=\<TO>\&referral\_address=\<WALLET>
* Minimum V2 link with custom rate\
  <https://app.ston.fi/swap?ft=\\><FROM>\&tt=\<TO>\&referral\_address=\<WALLET>\&referral\_percent=<0.0–1.0>
* Reminder: If you need a visual walkthrough or screenshots for claiming V2 rewards, use the tutorial.


---

# 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://guide.ston.fi/en/swapping-on-ston.fi/how-to-get-referral-fees-from-swaps.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.
