Testnet on Base Sepolia: 1 ZRO here is 0.0001 test ETH.
Docs · Buyback and burn

Docs · For traders

Buyback and burn

Two different burns happen here. A token's own burn share buys that token back inside every trade, if its creator chose one. Separately, Submarine's treasury can only ever spend its fees two ways: buying one token and burning it, and paying the stakers of that token.

A token's own burn

At launch, a creator who adds a fee of their own on top of the 1% base can send a share of it to a burn. The share is of the own fee only: the base always goes 0.4% to Submarine and 0.6% to the creator. On the curve, and on a pool for every trade made through Submarine, it happens inside the same transaction as the trade that paid it, so there is nothing to wait for and nobody to trust.

Where the token tradesHow the burn works
On its curveThe burn share buys tokens on the curve with no fee, and they go to the dead address. This adds to the ZRO raised, so it also moves the token toward its pool
On its poolThe pool's hook collects the fee during the trade. Right after the trader's own swap, the burn share buys tokens from the pool, so it never changes what the trader gets, and sends them to the dead address

One burn on a pool moves the price at most about 5%. What it can't spend within that goes to the token's holders and creator with the rest of the fee. A trade made on the pool around Submarine pays the same fee, and its burn runs when anyone calls distribute; Submarine's own trades call it every time.

Burned tokens leave circulation for good. The supply on the token itself stays the same, because nothing can be destroyed in it, but what sits at the dead address can never move again.

A worked example

A token with a 2% own fee, half of it going to the burn. Traders pay 3% in all. Each 400 ZRO traded on the curve sends 4 ZRO to the burn (50% of 8 ZRO). If the token trades 40,000 ZRO in a day, 400 ZRO of its own tokens is bought and burned that day, on top of what traders bought.

On a pool the same token burns 4 ZRO per 400 ZRO traded, the same as on the curve: the pool has no LP fee, and the hook takes the same fee from the same side of the trade. The token page shows how much ZRO has gone to its burn so far and how many tokens that bought.

A burn on the curve stops at the end of the curve. A burn never buys past the 6,000 ZRO that moves a token to its pool. If there is no room left, that part goes to the creator instead, so nothing is left stranded.

The treasury

Every fee Submarine itself takes lands in one contract, the BuybackVault: the 0.4% of each trade, less any rank discount and the shares partners and referrals take, the copy vault's copy fee, and the launch fee. It has no withdraw function, for the owner or anyone else. It can do two things with ZRO: buy one token through the router and send it straight to the dead address, and send ZRO to the staking contract, which streams it to that token's stakers over seven days.

  • That token is the Submarine token. It is set once and can never change, so nobody can point the treasury at a token they control and take the ZRO.
  • The staking contract is set once too, at deployment. See Staking.
  • Until the token is set, fees simply accumulate in the treasury.
  • The Stats page shows the treasury's balance and everything it has bought and burned, and the Staking page what it has sent to stakers.

What limits the treasury

RuleValue
Who may run a buyback or fund stakersThe keeper the owner names, or the owner
Most per buyback10% of the balance
Most per funding of stakers10% of the balance
How oftenEach at most once an hour, counted apart
What it buysOne token, set once
Where it goesBought tokens to the dead address, in the same transaction. Funding to the staking contract, set once

Why there is a cap

A keeper could still pick a bad moment and a low minimum. The 10% an hour cap is what limits how much a bad or compromised keeper can waste: at most a tenth of the balance in any hour on buybacks. Funding can only reach the staking contract, which pays it out to stakers and nowhere else.

Example: with 4,000 ZRO in the treasury, one buyback may spend up to 400 ZRO. The next can come an hour later, up to 10% of the 3,600 ZRO left.

The hourly round

Submarine's keeper runs the treasury once an hour, once the Submarine token is set. Each round:

  • Pushes the launchpad's collected fees into the treasury with collectProtocolFees.
  • Spends a twentieth of the treasury, 5%, on the Submarine token, and refuses less than 97% of the tokens the router quotes for it.
  • Then sends a twentieth of what is left to the stakers.

Example: with 4,000 ZRO in the treasury, a round buys back and burns with 200 ZRO, then sends 190 ZRO to stakers, a twentieth of the 3,800 ZRO left. That is half of what the contract would allow in each case. The keeper only picks the moment; the caps are in the contract.

Watching it happen

Every buyback emits a Buyback event with the ZRO spent and the tokens burned, every funding of stakers a StakingFunded, and every token burn emits EarnersPaid on the curve or Burned on a pool. The API's /api/v1/buyback has the balance, the totals, when the next round can run and every round so far. See Events to index.