Protocol mechanics
Allocation rewards
The allocation reward share of each sale, Bribe streams, and extra reward tokens.
Loading…
Browse documentation
Protocol mechanics
The allocation reward share of each sale, Bribe streams, and extra reward tokens.
Loading…
Protocol mechanics
The allocation reward share of each sale, Bribe streams, and extra reward tokens.
Allocators are paid from what their strategy sells for. Each strategy has a Bribe, a reward contract that streams tokens to that strategy's allocators in proportion to their weight, and a BribeRouter that buffers the strategy's allocation reward share until a stream can start.
When a strategy's auction is filled, up to 20% of the payment, in the strategy's asset, goes to its BribeRouter and the remainder to the treasury. The share is the Resonance's bribeBps, snapshotted at the start of each fill:
| Mode | Range | Initial value |
|---|---|---|
| Community | 0 to 2,000 basis points (0 to 20%) | Chosen at launch |
| Manager-directed | 0 to 2,000 basis points (0 to 20%) | Chosen at launch |
Launchpad launches set the share inside the launch transaction; the app's default is 0%. A Resonance created outside the Launchpad starts at 1,000 (10%) in community mode and 0 in manager-directed mode.
The controller owner sets it with setBribeBps. Because each fill snapshots the value before any token interaction, completed purchases and running reward streams are unaffected. A pending transaction can use a changed share if that change executes first.
Anyone can call BribeRouter.route(). It forwards the router's complete balance of the payment token into the Bribe when three gates are met: the balance is nonzero, it is at least 604,800 raw units (seven days at one raw unit per second), and it is at least the Bribe's currently remaining reward for that token. Otherwise it returns zero and keeps accumulating. On success it grants the Bribe an exact temporary allowance and calls notifyReward.
The Bribe has a monotonic lifetime cap per token of (2^256 - 1) / 1e36 raw units. Exhausting it permanently prevents further routing of that token; completed purchases are unaffected.
Bribe.notifyReward(token, amount) pulls the tokens and restarts that token's seven-day stream:
budget = amount + remainingReward + savedRemainder
rate = floor(budget / 604,800)
savedRemainder = budget % 604,800The period restarts from the current timestamp and the division remainder is saved for the next qualifying notification; it stays pending if no further funding qualifies. Remaining reward is zero after a stream ends. Other accumulator and account conversions also round down. Each allocator of the strategy earns rate × weight / totalWeight per second. Weight changes checkpoint the account first, so rewards only accrue for time actually held.
A running reward stream does not pause when its total allocation becomes zero. Elapsed rewards from that interval cannot be captured by accounts that allocate later.
Funding is permissionless: anyone can call notifyReward on any registered token to reward a strategy's allocators, which is how a third party can pay holders to allocate to a particular strategy.
Every Bribe starts with one registered reward token: its strategy's payment token. The controller owner can register more with addBribeRewardToken(strategy, token); the registry is append-only and holds at most 16 tokens. sCoin cannot be a reward token. Registration does not start a reward stream; someone must still call notifyReward.
Resonance.claimBribeRewards([strategies]) claims every reward token from each listed strategy's Bribe for the caller. Strategies may be live or killed. Each Bribe loops over at most 16 tokens, so very large batches should be split.Bribe.claimReward(account, token) claims one token for one account, callable by that account or the bound Resonance. It is the fallback when a single reward token is broken or gas is tight, because a failed transfer in a batch reverts the whole batch.Reward claims are pull-based and remain available for the lifetime of the launch. Rates are not guaranteed: if a strategy's auction is never filled, its allocators earn nothing from it.