Skip to content
Socket

Catalog / module / Socket plug-ins

Buyback bid

v1

Sellers in your socket pool get more ETH than on pons, paid from a budget you fund, and the tokens you buy are burned.

Runs on every swapWatches tradesBuys from sellers
  • Watches trades: Is told about each trade after it settles. It cannot change or block it.
  • Buys from sellers: Buys part of a sell from a budget you fund, at a better price than pons pays. It can only ever add to what a seller gets.

What it does

Buyback bid (buyback-bid v1)

A socket hooklet that makes your socket pool the best place to sell your token. Sellers get more ETH than selling on pons directly, paid from a budget you fund, and the tokens you buy are burned.

What it does

- **It bids on sells.** On every sell through your socket pool (exact amount of tokens in), the bid buys part of the seller's tokens from your budget. The rest goes through pons as usual. The seller receives both amounts. - **It pays more than pons.** The price is the lower of the pons price and a lagging reference price, minus a spread that is smaller than the pons fee. Sellers keep part of the pons fee they would otherwise pay (25% of it with the standard profile). - **The socket checks every bid.** It refuses a bid that buys more than is sold, spends more than your budget, or pays less than pons would at the price before the sale after its fee. So a seller is never worse off for the bid. - **A pump earns nothing.** The reference price only follows prices from earlier seconds, slowly (at most the deviation limit per update). Within the same transaction it cannot move. When pons is further from the reference than the deviation limit, the bid does not bid at all. - **Caps.** Per fill: half the deviation limit of the pons pool's ETH depth. Per window (an hour by default): the lower of a share of your budget and a share of what moving the price would cost a manipulator in pons fees. Per second: a share of the window cap. - **Bought tokens.** They wait on the socket until anyone calls `collectBidTokens`. Then they are burned with the token's own `burn()`, verified against its total supply (or sent to a wallet or a BurnSink, if you chose that).

Setting it up

1. Deploy it from the form (pick a profile: careful, standard or eager). 2. Add it to your socket pool's stack with both the BID and OBSERVE classes. Adding a hooklet waits the pool delay. 3. Call `initReference` with a price range you trust. The bid waits out its warmup. 4. Fund it with `fundBid` on the socket. Anyone can add to it.

Roles

- **Owner:** seeds the reference, pauses and resumes the bid, and withdraws the budget from the socket at any time (`withdrawBid`). Cannot change any setting. - **Anyone:** can fund the budget, `poke` the price, collect bought tokens, and retry a refused route with `flush`. - **The socket:** the only address that tells the bid about swaps.

Risks in plain English

- It spends your ETH. The bid pays more than the market (that is the point), within its caps. You buy your token back at a small premium to pons. - It only helps sellers who use your socket pool, not pons directly. - It pauses itself when the price moves too fast, when nobody has traded or poked for a while, or when the pons pool is thin. Sellers then get the pons price. - The reference price is seeded by you. Seed it inside a tight range: a reference seeded too high overpays sellers until it catches up (the socket still never lets a seller do worse than pons).

Fee lanes

| Lane | When | Default | |---|---|---| | SwapFee | on the bought tokens, once, when they are collected | 0.50% of the tokens |

Funding the budget is not charged.

What if

- **I want my ETH back?** Call `withdrawBid` on the socket from the owner wallet. It always works, paused or not. - **Someone pumps the price to sell into my bid?** They pay pons fees on the pump and the bid pays at most its reference price. Beyond the deviation limit it does not bid at all. - **The burn fails?** A token whose `burn()` does not verifiably reduce its supply is sent to the dead address instead. A refused wallet or BurnSink route waits here; anyone can call `flush`. - **The guardian switches it off?** Sells continue at the pons price, and the budget stays withdrawable.

Risks in plain English

  • You fund the bid with your own ETH (fundBid on the socket). Sellers through your socket pool are paid from it. You can withdraw what is left at any time.
  • The bid never pays above its lagging reference price and never below what pons pays at the price before the sale. A pump in the same transaction earns nothing.
  • It only helps sellers who trade through your socket pool, not on pons directly. It pauses itself when the price moves too fast, goes stale or the pool is thin.
  • The guardian can switch the hooklet off; selling then works at the pons price and your budget stays withdrawable.

What if…

What if I want my ETH back?
Call withdrawBid on the socket from the owner wallet. It works at any time, paused or not.
What if someone pumps the price to sell into my bid?
The bid pays at most its reference price, which only follows prices from earlier seconds, slowly. Above the deviation limit it does not bid at all, so the pump only costs them pons fees.
What if the burn fails?
Tokens the token's own burn() cannot verifiably destroy go to the dead address instead. With a wallet or BurnSink route, a refused transfer waits here and anyone can call flush.
What if nobody trades for a while?
The price goes stale and the bid pauses until a trade or anyone's poke records a fresh price.

Fees

Protocol fee per lane
LaneFee
Socket hooklet incomeon the tokens the bid bought, once, when they are collected (0.50%)0.5%

Fees are fixed into each contract at deploy and can never change for it. Claims, withdrawals and refunds are never charged. Hard cap 1%, written into the code.

Evidence

Form check
Built from the source files
Implementation
—
Code hash
—

Settings you choose at deploy

  • Largest price move the bid followsThe reference price moves at most this far per update, and the bid pauses when pons is further away than this.Locked forever
  • How fast the reference follows the priceLonger is harder to manipulate and slower to follow a real move.Locked forever
  • Pause when the price is older thanAnyone can call poke to keep the bid fresh between trades.Locked forever
  • Wait after setting the referenceLocked forever
  • Hourly cap, as a share of what moving the price would costKeeps the bid smaller than the fees a manipulator would pay on pons.Locked forever
  • The cap refills overLocked forever
  • Most of the budget spent per windowAt most 50%.Locked forever
  • Most of the window cap spent in one secondLocked forever
  • Pause when the pons pool holds less ETH thanLocked forever
  • Smallest fill (ETH)Locked forever
  • Share of the pons fee given back to sellers25% means a seller nets about a quarter of the pons fee more than on pons.Locked forever
  • Smallest discount to the reference (pips)Locked forever
  • What happens to the tokens you buyLocked forever
  • Wallet or BurnSinkLeave empty to burn.Locked forever