Gully Core

Build

Liquidity rewards

A project funds a stream of tokens. The pool pays it out every second to the liquidity that is in range, in proportion to how much each position provides.

How rewards are paid

Liquidity rewards live in the pool's own hook, GullyCoreLiquidityRewardsHook, attached when the pool is created. The hook measures in-range time the way the pool measures fees. Every second a stream runs, its rate is shared among the positions whose range holds the current price, by their liquidity. Nobody off chain decides who earned what.

  • Only in-range liquidity earns. A position out of range earns nothing until the price returns to it.
  • Up to 3 reward tokens per pool, each with one stream, in an ERC-20 or the native coin.
  • Narrow positions can be excluded. The pool's creator fixes a minimum width when the pool is created. A position narrower than it, or below the hook's minimum liquidity, is not counted.
  • CL pools only, created with this hook from birth. An existing pool or a launch pool cannot add it.
  • Your liquidity is untouched. The hook takes nothing from a swap, a position's tokens or its trading fees, and removing liquidity never waits on it.

Funding a stream

CallWhoRule
startStreamthe pool's owneran amount and a duration of 1 to 365 days, when no stream of that token is running
extendStreamthe pool's owneradds tokens and may push the end out. The rate can never fall and the end never moves in
topUpanyoneadds tokens to a running stream with at least 1 hour left. Raises the rate, never moves the end

Funded rewards are a promise. No function returns them to the funder while anyone can earn them, and nobody can lower a rate, shorten a stream or change the minimum width. Seconds with no eligible liquidity pay nobody, and the stream's end moves out by the same seconds, so that value is still paid to later providers.

Your share of a stream is your share of the in-range liquidity, second by second, of what is left after the protocol's share. Real earnings move with your share.

Claiming

  1. Open a pool's page from Pools. A rewards pool shows every stream, its rate per day, the time left and what is still undistributed, then a claim box for your position.
  2. Claim pays your position's earned rewards to your wallet. A position held by the CL position manager is claimed by the owner of its NFT, or an address it approved. Any other contract claims for itself.
  3. Closing a position? Claim first. A removal through the position manager may also name a recipient, and the earned rewards are credited there to claim later, so burning the NFT never loses them.

Recycle and reclaim

  • Recycle. A position with no liquidity left, untouched for the hook's recycle delay (90 days), has its unclaimed rewards returned to the pool's stream by anyone, so they are paid to providers again.
  • Reclaim. If a pool has had no eligible liquidity at all for the reclaim delay (30 days) without a break, or a stream finished that long ago, anyone may return the undistributed remainder to the refund address fixed when the stream started. Rewards can never be stuck, even in a dead pool.

Fees

The protocol takes a share of every amount funded into a stream, when it is funded. Providers are paid the rest. The share is set on the hook and read from the contract (protocolFeeBps()). It can never exceed 3% (each hook's own cap is fixed when it is deployed and read from maxProtocolFeeBps()). An increase takes effect only after a notice, a decrease at once. The share is paid only to the governance Safe. Claiming costs nothing but gas.

The recycle delay, the reclaim delay and the minimum eligible liquidity are the hook's own values, read from RECYCLE_DELAY(), RECLAIM_DELAY() and MIN_ELIGIBLE_LIQUIDITY().

What it does not do

  • Not for locked-forever liquidity. The hook runs when liquidity is removed, so GullyCoreLPLocker refuses positions in a rewards pool, and launch pools cannot use it. A time lock of a position is a different contract. See Locks.
  • No Bin pools. Bin shares in a bin are one position to the pool, so a hook cannot tell providers apart.
  • No dollar yield. Rewards are shown in the reward token's units. The app shows no APR it cannot price.
  • Narrow ranges still pay best. Per unit of capital, a position at the minimum width earns more than a wide one. That is how concentrated liquidity works.
  • Fee-on-transfer and rebasing reward tokens are not supported.

Where rewards are

The GullyCoreLiquidityRewardsHook address on each chain is in Contracts. A chain shows none until it is deployed there. See Chains.

Wrong or missing? Tell us at @Gully_Labs.