Elyra has one use for its protocol revenue: buying $ELYRA and burning it. A FeeCollector swaps fees to HYPE, and BuybackV2 spends the HYPE on $ELYRA and sends it to 0x…dEaD. Every call on the way is open to anyone, and the Protocol page has a button for each.
- Elyra pools send 20 % of each swap fee to the FeeCollector. Other fees pass through the FeeRouter, which first credits 20 % to the payer's referrer, if any.
- Every step is a public call:
flush,convert, the collector's unwrap and forward calls,buyback,poke. - One
buyback()spends at mostmaxNativePerCallof HYPE, runs at most once a minute (minInterval, owner-set between 30 s and a day; ten blocks a second would otherwise mean ten buybacks a second) and pays its caller 0.5 %. - A buyback will not buy while $ELYRA trades above a 10 % band over a slow reference price. A falling price never blocks it.
- $ELYRA is launched by its owner. Until BuybackV2 is configured with the token's pool,
buyback()andpoke()revert and converted HYPE waits in BuybackV2.
The path of one fee
A fee reaches the FeeCollector by one of two roads. An Elyra pool swap pays its protocol share straight in; every other fee is booked in the FeeRouter until someone calls flush(token) (see Fees and referrals). The FeeCollector turns what it holds into HYPE for BuybackV2, and buyback() spends that HYPE on $ELYRA in the HYPE/ELYRA Uniswap v4 pool, which pays the tokens directly to 0x…dEaD.
The protocol share of pool fees
LPs keep most of an Elyra pool's swap fee. ProtocolConfig.protocolFeeShareBps (2000, so 20 % of the fee, at most 50 %) goes to the FeeCollector, always in the token you pay with.
- DAMM and stock pools are Uniswap v4 hooks and send it with
poolManager.take. If the PoolManager is short of that token mid-swap, the hook mints itself an ERC-6909 claim, and anyone can call the hook'ssweep(currency)to pay it out to the FeeCollector. - DLMM pairs transfer it on every swap, and on the composition fee a deposit into the active bin pays.
How each pool sets its fee is in Elyra pools.
Converting fees to HYPE
The owner gives each fee token a route: Router hops ending in native HYPE, a cap per call, and the oracle price floor for every token the AssetRegistry prices (setRoute refuses such a route without it; only an unpriced token converts with none). Then anyone can convert.
convert(token, 0)converts the balance up to the cap. An explicit amount above the cap revertsOverCap.- With the floor on,
minNativeOutprices the input from theAssetRegistryfeed against the HYPE/USD feed, both Elyra's keeper-updated price feeds, and accepts at mostmaxSlippageBps(3 %) less. A stale feed revertsStaleOracle. - WHYPE needs no route: it is unwrapped 1:1. HYPE fees are forwarded to BuybackV2 as they are.
A production deploy has no routes until the owner adds them, so a token without one waits in the FeeCollector. A local deploy seeds routes for USDC and its seeded stock token.
Buying and burning
buyback() takes BuybackV2's HYPE balance, including any HYPE sent with the call, up to maxNativePerCall. It keeps callerRewardBps (0.5 %) of that budget for the caller and spends the rest; a partial fill pays a proportional reward. Unspent HYPE waits for the next call.
The price guard
$ELYRA has no external price feed, so BuybackV2 checks the pool against a reference price that follows it slowly.
- The reference moves at most
driftBpsPerHour(30 %) per hour since its last update, and at mostmaxDeviationBps(10 %) per update. With no time elapsed it cannot move, so a pump inside one block does not shift it. buyback()catches the reference up, then revertsPriceAboveBandif $ELYRA is above the band: 10 % on the pool price ($ELYRA per HYPE), about 11.1 % on $ELYRA's HYPE price.- A cheaper $ELYRA never blocks a buyback, however old the reference.
- The swap stops at the tighter of the reference band edge and 10 % above its own starting price.
A reverted buyback also undoes its catch-up, so poke() exists to move the reference on its own. It pays nothing. The API's optional buybackPoker bot pokes when the reference is at least 1 % off the pool price and 600 s old. After PriceAboveBand: poke, wait, retry.
Burned and circulating supply
A burn is a transfer to 0x…dEaD, so circulating supply is totalSupply() − balanceOf(0x…dEaD), checkable by anyone on the explorer. BuybackV2 also counts totalNativeSpent (in HYPE) and totalBurned. The indexer keeps every Converted and BoughtBack event for GET /protocol, and the Protocol page reads the live state on chain every 20 s.
What the owner controls
One cold key owns ProtocolConfig, FeeCollector and BuybackV2; ownership changes in two steps, propose then accept.
| Contract | The owner can | Limit |
|---|---|---|
| ProtocolConfig | set the protocol share; name another FeeCollector | share at most 50 % |
| ProtocolConfig | pause | stops swaps and new liquidity, never withdrawals |
| FeeCollector | set or clear routes; set maxSlippageBps; name another buyback | slippage at most 20 % |
| FeeCollector | sweep a token | only a token with no route, never HYPE or $ELYRA |
| BuybackV2 | configure the pool | once |
| BuybackV2 | set maxNativePerCall, callerRewardBps, minInterval, the guard; resetReference() | reward at most 5 %, interval 30 s to 1 day, band 1 to 2000 bps, drift at most 10 000 bps per hour |
So the owner can redirect revenue that has not reached BuybackV2: by naming another collector or buyback, or by clearing a token's route and sweeping it. It cannot take HYPE from BuybackV2, and none of these contracts reaches a user's position or deposit. The other keys are in Security model.
Reference
Calls and reverts
| Call | Can revert with |
|---|---|
FeeRouter.flush(token) | NothingToClaim |
sweep(currency) on a hook | NothingToSweep |
FeeCollector.convert(token, amount) | NoRoute, OverCap, StaleOracle, ZeroAmount, or the Router's TooLittleReceived on a dust amount |
| The collector's unwrap and forward calls | ZeroAmount |
BuybackV2.buyback() | NotConfigured, TooSoon, NothingToSpend (no HYPE, or nothing the band allows), PriceAboveBand |
BuybackV2.poke() | NotConfigured |
Parameters
| Name | Allowed | Default | Effect |
|---|---|---|---|
protocolFeeShareBps | 0 to 5000 bps of the fee | 2000 | ProtocolConfig: Elyra pool fee share sent to the FeeCollector |
maxSlippageBps | 0 to 2000 bps | 300 | FeeCollector: the price floor on convert |
maxNativePerCall | any HYPE | No default | BuybackV2: spend per buyback, set at deploy |
callerRewardBps | 0 to 500 bps | 50 | BuybackV2: the caller reward |
minInterval | 30 to 86 400 seconds | 60 | BuybackV2: the smallest gap between two buybacks |
maxDeviationBps | 1 to 2000 bps | 1000 | BuybackV2: the band, and the largest step the reference takes |
driftBpsPerHour | 0 to 10 000 bps per hour | 3000 | BuybackV2: how fast the reference follows the pool |
- FeeCollectorroutes, the price floor, convert, sweep
- BuybackV2buyback, poke, the reference and the band
- ProtocolConfigthe protocol share and pause
Elyra