Who earns
Only S that is staked from a trading account earns.stake_rebate moves S from the account’s token account into a vault owned by the account’s rebate position, and only unstake_rebate moves it back. Both settle what the position has earned first.
This means S earns exactly while it is staked. The same S can’t be counted in two places, because it leaves the first account’s token account when it is staked. A rebate that only read a balance could be gamed by moving tokens between accounts around a snapshot.
The CLP’s own inventory is never in a trading account, so it never earns.
How much
The rebate accrues continuously on the value of the staked S, at an annual rate:The cap: twice the collateral yield
cap is twice the market’s realised collateral yield. The program measures that yield itself, from mint-redeem’s total_yield_harvested, over windows of at least a day, and averages it with a 30-day time constant. Nothing a keeper reports sets it.
Funding the pot does not count as yield. That cUSDC is yield the market had already harvested, and counting it again would let funding raise the cap.
The ceiling is twice the yield because a held pair is flat under the γ ratchet. At equal value, one L and one S together are unchanged by each γ charge (see Solvency). Anyone can mint a pair without limit, so a rebate on S above twice what the pair’s cash earns would pay people to hold both legs. At the ceiling, a pair holder’s rebate is at most what lending the same cash would have earned.
A pair still carries path and drift effects over a year, so this is a ceiling on what the rebate can be farmed for, not a claim that a pair is risk free.
The ramp: only when traders are net long
oi_cap is the market’s exposure cap. The ramp is a 14-day average of E as a share of the cap, scaled so that half the cap gives a ramp of 1.
- It is 0 while the market is uncapped, balanced or short-heavy.
- It is full once traders’ net long has averaged half the cap.
- The average moves at most once every 900 seconds, so cranking it every second can neither freeze it nor speed it up.
Nobody sets the rate
refresh_rebate recomputes the average, the realised yield and the rate. Anyone can call it. The keeper runs it about every 16 minutes (see Short rebate in the keeper), but if it stops, anyone else can crank it. No key can set the rate, the cap or the ramp.
A pot, not a promise
Rebates are paid from a per-market pot of cUSDC, an account owned by the rebate PDA. The keeper funds it from the treasury. Two rules bound it:- Cumulative funding can’t exceed the collateral yield the market has harvested since the rebate opened. A larger
fund_rebatefails withRebateFundingAboveYield(6020). - The reward index never allocates more than the pot has received. If the pot runs short, accrual slows to what the pot holds instead of creating a liability.
Reading it from chain
TheRebateMarket account at ["rebate", market] holds rate_bps, cap_bps, yield_bps, ema_x, total_units, funded_total, allocated_total and claimed_total. Each refresh_rebate also emits RebateRefreshed, with the exposure, the cap and the pot’s unallocated balance. Fields and seeds are on the trading program page. Don’t copy a rate from a document, because the yield and the exposure both move.
See also
Staking and claiming
The steps from a trading account.
trading program
The seven rebate instructions, accounts, events and errors.
Exposure cap
The cap the ramp is measured against.
Keeper
The crank and the pot funding.

