How orders run
What happens when an order is due: the keeper, routing across DEXs, the minimum output and why an order can revert.
- Order due
- Keeper
- Best route
- Fee and swap
- Minimum check
- Your wallet
- Order due: Buy NVDA with 25 USDG
- 1The order is dueThe keeper picks it up within about a minute.
- 2Best routeIt requests the best route across the DEXs on Robinhood Chain (via KyberSwap) for your order size.
- 3Fee and swapThe vault takes the 0.30% fee, swaps the rest and checks how much reached your wallet.
- 4Delivered, or nothing happensIf you received less than the minimum, or the price is above your max price, the whole order reverts and nothing is spent.
Every order has a minimum output. The keeper sets one from a fresh quote, and the vault uses the higher of that and the one your max price allows. The vault never swaps without a minimum.
After the swap, the vault checks how many tokens reached your wallet. If fewer than the minimum arrived, the whole order reverts: nothing is spent, Left in plan is unchanged and the plan waits for its next order.
Robinhood Chain orders transactions first come, first served, so orders are not exposed to sandwiching through a public mempool.
The keeper is the bot that runs due orders. The vault contract limits what it can do:
- Run an order once it is due
- Choose the route, among routers the vault allows
- Skip a due order when the price is above your max price or there is no route
- Withdraw your balance
- Send tokens anywhere but your wallet
- Fill below your max price or the minimum
- Take more than the fee set in the contract
Orders become due at the plan's start time, then one interval apart. If an order runs late, it runs once and the schedule keeps its rhythm: the slots it missed are not stacked up.
