GULLY CHAINDocs

Referrals

On this page

Live

Live on testnet. The referral registry and the rewards distributor are deployed. Referral links work in Gully Street at https://app.gullychain.xyz/r/<name> or /r/0x….

Referrals on Gully Chain are on chain: who referred whom is recorded in a registry, and rewards are paid from the platform fees the referred users actually generate.

Contract Address
GullyReferrals (registry) 0x42B46EA814024683B346cCEAc2124A054F4544b7
GullyRewardsDistributor (rewards) 0x1F299b4EDecf58749f6f51Fab663a2509C6D11C6

#The deal

Reward 20% of the platform fees paid by the users you referred
Which fees Launchpad trade fees and Gully Swap interface fees
For how long 180 days after each referral
Paid in WETH (claim as ETH if you like), every 7-day epoch
Points Shown in the app as a running score. No token is promised for points.

Rewards on the testnet are testnet ETH with no value.

#Registry rules

  • One referrer per user, set once and never changed (setReferrer(address)).
  • No self-referral and no two-way loops (A refers B while B referred A).
  • A referrer must be registered: it has sent at least one transaction to the registry (register(), or its own setReferrer). The app does this when you open "Activate my link". Referred users are registered automatically.
  • setReferrerFor(user, referrer, deadline, signature) lets a relayer or the paymaster pay the gas: the user signs an EIP-712 message (smart accounts sign through ERC-1271).
  • The registry has no owner, no pause and no upgrade path.

A referral code is a .gully name or an address. The app resolves the name through the .gully resolver and calls setReferrer.

#How rewards are paid

  1. Every epoch, an off-chain job reads the chain's fee events, works out each referrer's share and builds a Merkle tree of cumulative rewards per address.
  2. The root is posted to the distributor with a delay (currently one day) before it becomes active, so a bad root can be cancelled before anyone claims from it.
  3. Referrers call claim (or claimTo to receive ETH) with their proof. Because amounts are cumulative, one claim always collects everything owed so far.

The distributor is funded by the treasury in WETH. The owner can pause claims, change the poster and sweep surplus only, never what is owed under the active root.

#Sybil and minimum activity

Rewards are only one level deep, so chains of referrals earn nothing extra. Minimum activity and sybil checks run off chain in the epoch job; addresses that fail them are left out of the tree.