ETH$3,420
Trading/referrals

Referrals

Referrers earn a share of the platform fee on every trade they bring in, claimable as ETH at any time.

When someone trades with your referral attached, a share of the platform fee accrues to you as ETH inside ReferralManager. You claim it whenever you like. Nothing vests, nothing expires, and there is no minimum.

#The economics

Your share
10% of the 1% platform fee — 0.1% of the trade’s ETH side
Hard cap
50% of the fee (MAX_REFERRAL_BPS), enforced in bytecode
Paid in
ETH, on both buys and sells
Levels
One. Payouts are single-level only
Self-referral
Earns nothing — the contract skips it when the referrer is the trader
Referrals never make a trade more expensive
Your share is carved out of the platform fee, not added on top. A 1 ETH buy pays 0.01 ETH in fees either way; with a referral attached, 0.009 goes to the protocol and 0.001 to you. Nobody pays more for using your link.

Concretely: 10 ETH of volume routed through your link earns you 0.01 ETH. It is a volume-scaled stream, not a bounty — which is why it accrues per trade rather than per signup.

Referrals and cash back stack
They come out of the same 1% and never collide. The referral share is carved out first and paid to you; the rest reaches the fee receiver, which credits cash back to the person who traded. Referring someone does not cost them their cash back — it only slightly reduces the base it is figured on. If you trade through your own link, the self-referral earns nothing but the cash back still accrues.

#Claiming

solidityReferralManager
mapping(address => uint256) public pending;         // claimable now
mapping(address => uint256) public lifetimeEarned;  // lifetime, for analytics
mapping(address => address) public referrerOf;      // first-touch attribution

function claim(address to) external returns (uint256 amount);

claim(to) pays out everything pending for msg.sender to the address you name. It zeroes the balance before sending (checks-effects-interactions) and is reentrancy-guarded. There is no admin claim, no clawback, and no expiry on an unclaimed balance.

Claim from the wallet that earned
Earnings accrue to whichever address was passed as ref. That address must be the msg.sender of the claim — you can direct the payout anywhere with to, but you cannot claim someone else’s balance.

#How attribution works

The ref address is supplied by the caller of the trade, and the contract trusts it. That is a deliberate design decision, and it is worth being blunt about what it does and does not guarantee:

  • Payout follows the ref on the trade. Whoever is named on a transaction is paid for that transaction. Full stop.
  • referrerOf is analytics, not authority. It records the first referrer ever seen for a trader and never overrides who gets paid on a later trade. Read it for display; do not build accounting on it.
  • The rules live off-chain. One-referrer-per-user, no self-referral, campaign eligibility — the app enforces those when it vends the ref value. Encoding them on-chain would have meant a trade manager redeploy every time a rule changed.
  • Multi-level trees are reconstructed off-chain from the events below. The contract pays exactly one level.

#Events

solidity
event ReferralAttributed(address indexed trader, address indexed referrer);
event ReferralFeeAccrued(address indexed referrer, address indexed trader,
                         address indexed token, uint256 amount);
event ReferralClaimed(address indexed referrer, address indexed to, uint256 amount);

The subgraph indexes all three into Referrer, Referral, ReferralEarning and ReferralClaim entities, which is where the in-app referral dashboard gets its numbers.

#Custody

Every wei of ETH in the contract is owed to a referrer, so there is deliberately no ETH rescue path — not for the owner, not for anyone. The owner can authorise or de-authorise trade managers (that is how a manager upgrade keeps the same referral balances) and recover stray ERC-20s, which are always accidents. It cannot touch pending.

The manager instance is shared across every generation of the trade manager, so a referral balance earned under an older terminal is still claimable today at the same address.

chain 4663·on-chain values read 2026-07-29·Blockscout