welcome.
rift is a constant product amm for tokenized equities that refuses to trade while its price is stale. when it has been quiet long enough that the real market has almost certainly moved, it halts and auctions the right to trade first. the winning bid is paid in eth, four fifths lands in the pool's reserves, and the last fifth buys rift and burns it.
what is rift
a tokenized equity tracks something that trades on an exchange with opening hours. that exchange is shut for about seventeen hours of every weekday and the whole weekend. for all of that time an ordinary amm holding that asset is quoting a price from the last session, and it will keep quoting it right up until somebody takes the other side.
the first trade after a long silence is not really arbitrage. it is a scheduled withdrawal from the liquidity providers, and everybody can see it coming. rift's whole design is the observation that something so predictable should be sold rather than suffered.
the lvr problem, and where it actually lives here
loss versus rebalancing is usually framed per block. a pool holds a stale price for a few seconds, an arbitrageur corrects it, and the difference leaves. most attempts to fix it therefore auction the first swap of every block.
that framing does not survive contact with this chain. blocks here are about a tenth of a second. lvr accrues with time, so a single block is worth roughly a hundredth of what an ethereum block is worth, and after latency and gas there is close to nothing left to auction. you would be building a whole auction system to capture noise.
the money is somewhere else entirely. between friday's close and monday's open there are sixty five hours in which the pool cannot reprice and the underlying can move as much as it likes. one weekend gap is worth more than every block of the trading week combined, and no per block mechanism touches it.
how it works
the pool never learns what time any market opens. no oracle, no calendar, no timezone to get wrong. silence is the signal.
- the quiet clock. the pool records the timestamp of every trade. eight hours without one and it treats its own price as unreliable.
- the halt. while stale, every swap reverts. this is what stops the classic dodge of a one wei trade to reset the clock before the real one: nothing trades, so nothing resets.
- the rift opens. anyone calls
open(), which starts a ten minute bidding window. in practice the searcher does it, because the pool will not deal with them otherwise. - the settle. after the window, anyone calls
settle(). the top bid is split, and the winner gets ninety seconds of exclusive access. - reopen. the exclusive window lapses and the pool trades normally again, clock reset.
the round lifecycle
trading quiet < 8h anyone may swap
stale quiet >= 8h every swap reverts
ringing open() called bidding, no swaps, no deposits
exclusive settle() called only the winner may swap, 90s
trading 90s elapsed back to normal
note that deposits and withdrawals are also frozen while bidding is open. otherwise an lp could watch the bids come in, learn what the gap is worth, and withdraw before the winner trades against it.
the auction
an open ascending auction, ten minutes, highest bid wins. bids are held by the contract and outbid money is pulled rather than pushed: a bidder whose fallback reverts can refuse their own refund forever without freezing the auction for anybody else.
the bid is not a deposit and it is not refundable. if the winner never trades, they have simply bought an option and let it expire, and the liquidity providers keep the money.
there is no reserve price. if nobody bids, the auction settles at zero and the pool reopens. rift cannot invent competition that is not there, and pretending otherwise with a minimum bid would only stop the pool reopening at all.
the split
eighty percent of the winning bid is added directly to the pool's eth reserve. no shares are minted, so the same shares are simply worth more. the other twenty percent is sent to the burner, which buys rift on the open market and destroys it.
if the burner's swap fails, the eth stays in the burner until somebody calls it again. it deliberately does not revert inside the settlement, because a failed buyback should never be able to jam an auction that had nothing to do with it.
parameters
all of these are constant. there is no owner, no setter and no upgrade path,
so this table cannot go out of date without a new deployment.
STALE_AFTER 8 hours
BID_WINDOW 10 minutes
EXCLUSIVE 90 seconds
LP_CUT_BPS 8000 (80% of the winning bid)
SWAP_FEE_BPS 30 (0.30%)
providing liquidity
deposit the equity and eth together and you receive shares of the pool. you earn the 0.30% swap fee on ordinary trading, plus eighty percent of every auction the pool holds. withdrawing returns your proportional slice of both reserves.
the first deposit permanently burns a small amount of shares, so the supply can never return to zero and be re-seeded at a price of somebody's choosing.
what you are exposed to
rift reduces one specific loss. it does not remove the others, and anybody telling you otherwise is selling something:
- impermanent loss is unchanged. you are still a constant product lp.
- constant product is less capital efficient than a concentrated range. that is the price of being able to halt at all. you cannot stop the world trading against a pool you do not control.
- a thin auction captures little. with one bidder the gap is bought for barely more than nothing. the mechanism is only as good as the competition for it.
- the contract is unaudited. it is a few hundred lines with 21 tests. read it.
bidding on a rift
watch for RiftOpened, or poll isStale(). if the pool is stale
and no auction is running, call open() yourself and start the clock.
- price the gap: compare the pool's implied price against wherever the asset actually trades now.
bid()with eth, strictly above the current top.- after
bidsCloseAt, anyone may callsettle(). - if you won, you have ninety seconds of exclusive access. if you lost, call
claimRefund().
supply and burn
fixed supply, no mint function, no owner. the only thing that ever happens to the supply after deployment is that it gets smaller, funded by a fifth of every auction on every pool. there is no emission anywhere to offset it.
addresses
nothing is deployed yet. this page will carry the verified addresses when it is, and until then it would rather say nothing than show a placeholder somebody could paste into a wallet.