Routing Logic
The Routing Logic determines how capital is allocated across vaults and lending markets. It answers: given the user’s policies and current market conditions, where should funds be?Decision Inputs
The Router evaluates:| Input | Source |
|---|---|
| Current APY per vault | Indexer (block-level) |
| Current APY per Aave market | Indexer (block-level) |
| Post-deposit APY | Indexer (impact simulation) |
| Available liquidity | Indexer |
| User’s enabled vaults and protocols | Policies |
| Current allocation | Smart account state |
| Chain context | Selected chain (HyperEVM or Base) |
Signal Generation
Based on these inputs, the Router generates allocation signals:- Deposit signal: Which vault or market should receive new deposits
- Rebalance signal: Whether current allocation should shift to a different vault or protocol
- Hold signal: Current allocation remains optimal
Cross-Protocol Evaluation
The Router compares yields across protocol boundaries. An Aave supply market yielding 6% will be preferred over a Morpho vault yielding 5%, assuming both are enabled in user policies. The Router treats all enabled destinations as a single opportunity set.Execution
When a signal is generated:- Router validates action against user’s policies
- Transaction is submitted to user’s smart account on the appropriate chain
- Smart account executes on-chain (Morpho vault deposit or Aave supply)
- Rosetta sponsors gas costs