You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently require balances for quote verification. This adds additional overhead to clients that need to decide what kind of quote to make to the API. This is an issue for external integrations (for example DeFi Llama) where implementing quoting logic changes is more difficult and partially outside of our control.
Details
In the interim, however, we can change the trade simulation Solidity code to first check the trader has sufficient balance and:
If it does, then simulate as we do now
If it does not, return early and pretend the simulation passed and use the indicative amounts and gas usage for the quote
This would allow quotes to work from accounts without balance (for example, CoW Swap UI with a disconnected account) while still keeping the full benefit for
Note that there could be some abuse where a client could get a quote with an account without balance in order to "lock in" a fee using indicative (and not real) gas amounts, but I don't believe that this will be abused extensively in practice.
The text was updated successfully, but these errors were encountered:
nlordell
changed the title
chore:
improvement: Balance Check for Quote Verification
Oct 13, 2023
Background
We currently require balances for quote verification. This adds additional overhead to clients that need to decide what kind of quote to make to the API. This is an issue for external integrations (for example DeFi Llama) where implementing quoting logic changes is more difficult and partially outside of our control.
Details
In the interim, however, we can change the trade simulation Solidity code to first check the trader has sufficient balance and:
This would allow quotes to work from accounts without balance (for example, CoW Swap UI with a disconnected account) while still keeping the full benefit for
Note that there could be some abuse where a client could get a quote with an account without balance in order to "lock in" a fee using indicative (and not real) gas amounts, but I don't believe that this will be abused extensively in practice.
The text was updated successfully, but these errors were encountered: