Skip to main content

Why is approval required again?

Allowance may be below this input, the spender may differ by strategy or chain, or a previous approval was for a different token. Follow the response’s approval instructions.

J
Written by Javier Diaz

Allowance may be below this input, the spender may differ by strategy or chain, or a previous approval was for a different token. Follow the approval instructions in the current response.

Definition

An earlier approval does not automatically cover every later route. The spender, token, chain, and amount all have to match what this quote needs.

How it works

  • Compare the current allowance for the returned spender with this amountIn.

  • If the response includes preTransactions or an approve transaction, submit those first. The spender can change with routing strategy or chain.

  • A previous approval for a different token, or for a smaller amount, will not satisfy this spend.

  • After a successful approval, submit the route or bundle tx from the same quote, unchanged.

How Enso does this

Core Concepts and Routing Strategies say to approve the spender returned for the request, and to skip router-style approvals on delegate unless the response requires them. See What if token allowance is too low? and How do I handle token approvals in a routing flow?

FAQ

Can I reuse an approval from yesterday’s quote?

Only if it is still the same token, spender, chain, and a sufficient amount. Always check the current response.

Does delegate still need approvals?

Often it does not need router approvals, but you should still follow any preTransactions the response returns.

Related articles

  • What if token allowance is too low?

  • How do I skip approval when allowance is already enough?

  • What is a preTransaction?

  • How do I handle token approvals in a routing flow?

  • What is an ERC-20 approval in a routing flow?

Sources

Did this answer your question?