How Swivel works
Swivel is one contract on Robinhood Chain, the SwivelBook. You park a Stock Token in it with a target: rotate into another Stock Token once the ratio of their Chainlink prices reaches a number you choose.
The order
- From: the Stock Token you park, any of the 27 listed.
- To: the Stock Token you want instead.
- Target: price(from) / price(to), with 8 decimals. Set above today's ratio, it fires when the ratio rises to it; set below, when it falls to it.
- Minimum size: $5 worth. Opening an order carries 0.0001 ETH, forwarded at once to the keeper for gas.
The rotation
Once the Chainlink ratio has reached the target, anyone may call rotate(id). The book then:
- sells the parked token for USDG on Uniswap, receiving at least 98% of its Chainlink value;
- pays the caller 0.10 USDG and the treasury 0.1% of the USDG;
- buys the target token with the rest, at least 98% of the Chainlink amount, and sends it straight to your wallet.
If either leg would fill worse than that, the whole call reverts and the order stays open, to be tried again.
The keeper
A keeper checks the book every two minutes with the due() view and runs what is due. Its gas comes from the 0.10 USDG fees, swapped to ETH when it runs low. Anyone else may run a due order too and earn the same fee.
Your control
move(id, ratio, above): a new target or direction, any time.cancel(ids): the parked tokens come back, any time.- The owner can list tokens, set routes and tune fees within hard limits (fee at most 1 USDG, cut at most 1%, slippage at most 5%). There is no function that moves parked tokens.
Prices
The Chainlink adapter already used on Robinhood Chain by other order books: tokenized-equity feeds, 8 decimals, rejected when stale or when the token's own oracle is paused. Stock feeds stop between sessions; a rotation on the weekend uses Friday's close and the 2% check keeps the fill near it.
Risks
- A ratio can overshoot your target; the rotation runs at the ratio when it is called.
- Thin pools can keep an order waiting.
- The contract is unaudited. It is tested on a fork of Robinhood Chain mainnet against the live pools and feeds.
Contracts
| SwivelBook | deploys at launch |
| Chainlink price adapter |