Duos Docs

Reserves and the backstop

Each Pair token pool holds its own HYPE reserve, how the asset's price moves what it owes, and how the shared backstop tops it up.

Every Pair token pool holds an HYPE reserve: the HYPE buyers paid in, plus the 1.5% fee on every trade. Sellers are paid from it in the same swap.

What goes in and out

InOut
HYPE from every buy of the Pair tokenHYPE to every seller, at the sell price
The 1.5% fee on every buy and sellTreasury sweeps, above 150% of what holders are owed
Top-ups from the backstop and deposits

How the asset's price moves it

The reserve holds HYPE, while the tokens in circulation are worth their asset's price. When SOL falls against HYPE, the pSOL in circulation is worth less than the reserve and the difference stays in the pool until it is swept. When SOL rises, it is worth more, and the reserve pays it from fees and earlier falls.

An example with 10 HYPE of pSOL bought:

SOL against HYPEpSOL in circulation is worthThe reserve holdsCoverage
Flat10 HYPE10 HYPE plus feesOver 100%
Down 20%8 HYPE10 HYPE plus fees125%
Up 20%12 HYPE10 HYPE plus feesAbout 86%, until the backstop tops it up

Every pool shows its reserve and coverage on Pairs. Coverage is the reserve divided by the value of every token in circulation at the oracle price.

The circulation limits

A Pair token pool owes its holders the asset's price in HYPE. If the asset rises against HYPE, it owes more than buyers paid in, and what the reserve cannot cover, the last sellers cannot get. The limits keep what a pool owes within what stands behind it:

LimitpSOL
In circulation50 HYPE worth, plus 2 HYPE for every 1 HYPE the reserve holds above what it owes
New tokens per hour25 HYPE worth

The circulation limit grows on its own. Fees and deposits through deposit() go into the reserve. Every HYPE of that surplus lets 2 HYPE more circulate, and that extra part stays fully covered through a 50% rise of the asset against HYPE. A pool with 5 HYPE of surplus allows 60 HYPE worth in circulation.

When a limit is reached, buys of the Pair token pause until sells, time or a larger reserve make room; the next swap checks again. Sells have no limit of their own.

The treasury sweep

Duos's treasury can take HYPE from a pool's reserve with sweep, down to 150% of what the pool's holders are owed. That HYPE comes from fees, deposits and falls of the asset against HYPE. Duos can use it for buybacks, to support other pools, or for anything else the treasury decides.

The contract sets the limits:

  • The treasury address is the one address that can call sweep, and the HYPE can only go to it. The address is fixed when a pool is deployed.
  • What holders are owed is every token in circulation, valued at the higher of the live price with its confidence band and the 30 minute average. A fall counts only as the average follows it, in full after about two hours.
  • At least 150% of that amount stays in the reserve. A pool with no holders can be swept to zero, and it keeps working for new buyers.
  • A sweep needs a live price: when the price stops, sells and sweeps both stop.

An example with 2 HYPE of pSOL bought:

SituationThe treasury can take
SOL flat, the buyer still holdsNothing: the reserve is under 150% of what is owed
SOL down 50% for two hours, the buyer still holdsAbout 0.5 HYPE
The buyer has soldThe whole reserve, which is the fees

A sweep leaves less behind a pool if its asset rises later. In the second case, SOL returning to its old price leaves coverage near 75%, and the last sellers cannot be paid in full until the treasury or the backstop adds HYPE. Every sweep emits a Swept event on chain.

The backstop

The backstop is one contract funded by Duos's treasury. When an approved pool's coverage is below 100%, anyone can call topUp(pool) and the backstop sends that pool the HYPE it is short, within a daily limit. The HYPE goes into the pool's reserve through deposit(). The treasury can approve pools and withdraw HYPE the backstop still holds.

Fork tests on mainnet run the backstop against a 50% rise of the asset: one topUp brings coverage back to full.

The backstop is live at 0x45c754e46993f77e0a2ddb0f81b086d2f375bdb5 with a daily limit of 2 HYPE and a target of 100% coverage. Its balance shows on Elysium's explorer.