Docs
Inlet is one router contract on Robinhood Chain plus one small contract per inlet. An inlet is an address that only the router can empty, and only into its owner's mix of Stock Tokens.
What it is
create(recipient, tokens, weights) deploys a new inlet (an EIP-1167 clone) for up to 8 listed Stock Tokens with weights in basis points that add up to 10,000. The recipient receives the stocks; it defaults to the creator.
The inlet address
The inlet has one function, pull(token, to), callable only by the router. The router calls it in flush (USDG into the mix) and in sweep (any token to the owner, as is).
The flush
flush(id) needs at least 2 USDG in the inlet. It pulls all of it, takes the run fee and the cut, and buys each Stock Token with its weight of the rest, sending the stocks straight to the recipient. Anyone can call it. due(from, count) lists inlets ready to flush.
For the owner
setMix(id, tokens, weights)changes the mix for the next flush.setRecipient(id, recipient).sweep(id, token)sends any token in the inlet to the owner, USDG included, without swapping.
Fees and fills
- 0.05 USDG per flush to whoever runs it (hard cap 0.50).
- 0.1% of each flush to Inlet (hard cap 1%).
- The Uniswap pool fee, inside each fill.
Every swap has a minimum out at the Chainlink price less 1.5% (owner cap 5%). If any stock's pool is further away, the whole flush reverts and the USDG waits. COIN, MSTR and SPY route through WETH. Stock feeds pause between sessions.
The keeper
A Cloudflare worker checks every few minutes for inlets holding at least 2 USDG and flushes them.
Router owner limits
The router owner can set the price adapter, the router, the routes, the slippage (up to 5%), the treasury, the run fee, the cut and the minimum flush inside the caps. There is no function that sends an inlet's tokens anywhere except into its owner's mix or to its owner.
Risks
- Unaudited software. Size accordingly.
- USDG sent to an inlet is bought into stocks automatically. To stop that, sweep it out first.
- Thin pools can make a flush wait.
- Stock Tokens track their stocks through Robinhood; their own risks apply.
Contracts
| Router | Opening soon |
| Chainlink adapter | 0xe9bBcd46F9B0Df04B418e0207876984F9f8336cb |
| USDG | 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 |
| Uniswap SwapRouter02 | 0xcaf681a66d020601342297493863e78c959e5cb2 |