Inlet

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

Fees and fills

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

Contracts

RouterOpening soon
Chainlink adapter0xe9bBcd46F9B0Df04B418e0207876984F9f8336cb
USDG0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168
Uniswap SwapRouter020xcaf681a66d020601342297493863e78c959e5cb2