A basket is a claim on a book.
Fivex never buys a stock. Every basket is a set of synthetic positions marked against Uniswap v4 pools and settled in USDG against one shared vault. This is the mechanism, in the order it matters.
What a basket is
A basket is five legs and one leverage. Each leg is an official Robinhood stock token and a signed weight in basis points; the absolute weights sum to 10,000. Leverage is in basis points too, so 20,000 is 2×. The basket ships as an ERC-20 whose supply is minted and burned only by the Fivex contract.
What the basket holds is a set of positions: for each leg, a number of token units and the USDG notional they were entered at. Its net asset value is its USDG collateral plus the unrealised profit or loss on those units at the current mark, less any funding owed. One share is worth NAV divided by supply.
Mint and redeem
Mint puts USDG in. On a basket's first mint the legs are opened at the target weights and leverage. On every later mint each existing position is scaled up by the same fraction the new money is of NAV, so a mint never changes anyone else's exposure: if the basket had drifted to 2.3×, the new money is entered at 2.3×. The open fee is charged on the notional added.
Minters are entered on each leg at the worse of mark and spot for their direction, and whatever that costs against the mark comes off their own share count. A lagging anchor is therefore nobody's discount and nobody else's loss.
Redeem burns shares and scales every position down by the same fraction, realising that fraction of the PnL against the vault and paying out USDG. It is never barred. While a leg is unstable the redeemer is exited on that leg at the worse of mark and spot, so a stale anchor cannot be an exit either.
The oracle
Each stock's price is read from its deepest USDG pool on the v4 singleton, straight out of storage. That spot is not the mark: a flash loan can move a pool a long way for the price of the fees. The mark is an anchor that anyone may step toward spot by at most 1% every five minutes. Moving an anchor 30% takes hours of holding a pool off its price while handing everyone else a standing arbitrage.
A leg is unstable when spot sits more than 10% from its anchor, or when nobody has poked the anchor for an hour. While any of a basket's legs is unstable nothing that adds risk to it is allowed: no mint, no rebalance, no liquidation. Redeem still works. Anyone may poke; the desk shows a button when a basket's anchors have gone quiet.
These are ERC-8056 tokens. Dividends are reinvested into the token's own multiplier, so the pool price is a total-return price and the mark carries dividends without anyone paying them by hand.
Keeping it on target
Prices move, so a basket drifts off its weights and off its leverage. rebalance marks every position at the anchor, realises the PnL into collateral, and reopens every leg at target. The fee is charged on turnover only: what would actually have traded.
- The manager may call it at any time, at most once an hour.
- Anyone may call it once any leg, or the leverage itself, is 10% off target, or once a proposal has landed.
- A basket that has been closed to cash is only re-levered by its manager.
This is what keeps a losing basket from creeping toward liquidation on its own: as equity falls and live leverage rises past 110% of target, the public rebalance sells it down.
Liquidation
If a basket's equity falls through 7.5% of its gross notional, anyone may liquidate it. Every anchor moves at most 1% in five minutes, so a 3× basket's equity moves at most 3% of notional in that time: the buffer is about twelve minutes of worst-case adverse drift. A liquidation closes every leg to cash and pays the liquidator half the maintenance buffer out of what is left. The shares survive and now hold that cash; the manager may re-lever.
A gap beyond the collateral is the vault's loss and is written off in public (writtenOff).
The two promises
Leverage cannot be raised
MAX_LEVERAGE_BPS = 30_000 is a constant in the bytecode. Below it, each basket carries a levCapBps chosen at launch. Every proposal is checked against it, lowerCap is the only function that touches it, and it only goes down. If a cap is lowered under the target, the target is clamped and the basket flagged for a public rebalance.
Every change lands a day later
The manager cannot set anything directly. Legs, weights, leverage and fee go through propose, wait TIMELOCK = 24 hours, and land through execute, which anyone may call for the week after. Handing the basket to a new manager is the same shape. The proposal is public state and the desk shows the countdown. Redeeming is never barred, so a holder who dislikes what is coming leaves before it arrives.
The vault
USDG in the vault is the counterparty. Longs and shorts across all baskets net against each other per stock, and only the residual skew is the vault's book. skewCapBps bounds that skew against vault assets, so a depositor lends against a stated worst case, and a withdrawal that would leave the book bigger than the pot is refused.
Funding is the skew fee alone. Per stock, the heavy side pays and the light side receives at one rate proportional to how one-sided that stock is, 1.2% a day at full skew. The vault keeps the difference, which is the rate on exactly the skew it carries. There is no interest term because both sides are financed in the same USDG, and no dividend term because the mark already has it.
The vault also earns the open, close and rebalance fees, less the treasury's share.
Parameters
| Name | Value | Set by |
|---|---|---|
| Legs per basket | 5 | constant |
| Leverage ceiling | 3× | constant |
| Leverage floor | 0.1× | constant |
| Maintenance | 7.5% of gross | constant |
| Public rebalance drift | 10% | constant |
| Timelock | 24h, lapses after 7d | constant |
| Manager fee ceiling | 2% a year | constant |
| Anchor step | 1% per 5 min | constant |
| Instability band | 10% of anchor, or 1h stale | constant |
| Open, close, rebalance fee | 10 bps of notional | owner, capped at 100 |
| Funding at full skew | 0.05% an hour | owner, capped at 0.15% |
| Treasury share of fees | 20% | owner, capped at 50% |
| Skew cap | 100% of vault | owner, capped at 200% |
What is still trusted
- The oracle's curator chooses which pool each stock is read from, until freeze() ends that permanently.
- The owner of Fivex lists stocks, sets the fee and funding parameters inside their caps, and can pause a stock, which blocks new risk into it but never a redeem.
- None of it is audited. Leverage loses money faster than it makes it.
Addresses
Robinhood Chain, chain id 4663.