The router strategy is the usual EOA path through the Enso router and may need token approvals. The delegate strategy runs in the fromAddress context and is required for some smart-wallet integrations and for actions such as harvest, borrow, and repay.
Definition
A routing strategy chooses which account executes the shortcut and where intermediate assets and protocol state live. It is not the token path itself. router and delegate are the two public strategies most integrations choose between; ensowallet-v2 is a third, for the EnsoWallet V2 smart-account client.
How it works
Choose
routerwhen an EOA should submit through the Enso router. This is the standard choice for token-based Route and Bundle flows. Submit any required approval first.Choose
delegatewhen the suppliedfromAddressmust be the execution context, including compatible smart-wallet integrations, or when protocol state must remain at that address. Do not send router approvals unless the response requires them.In both cases, submit the returned
tx.to,tx.data, andtx.valueunchanged.Request a new quote if you need to change strategy. Do not edit the returned transaction.
How Enso does this
Set routingStrategy to router or delegate on the Route or Bundle request. See Routing Strategies. Always use the spender and tx returned in the current response, not a hardcoded address. Legacy strategy values may still exist for older integrations but should not be selected for new implementations.
FAQ
Which strategy should I use for a normal token swap from an EOA?
Use router, and submit any approval returned in the quote before the shortcut transaction.
When is delegate required?
When execution must retain protocol state at fromAddress, when the integration needs delegate-call semantics, or when the action list includes actions such as borrow, harvest, or repay.
Related articles
What is a routing strategy?
How do I use Enso with a smart wallet?
How do I handle token approvals in a routing flow?
Should I hardcode Enso contract addresses?
What is an ERC-20 approval in a routing flow?
