I just discovered that we give a crazy amount of approval to DEXs when we approve to swap tokens. What is that?

enter image description here

Doesn't that mean their contract can take all the balance? The contract probably doesn't do that but technically can it do that? If someone can explain it to me, I would be grateful. Is the purpose of this amount to avoid approval transactions for each swap?

1 Answer 1


No, their contract cannot take all the balance. It can only take the amount that is approved by the allowance() function. However, if the contract doesn't comply with the written, immutable, and transparent rules of blockchain, it can technically take all the balance. By interacting with the contract, you trust the contract that it won't steal from you. The allowance process is a request process that requires express permission of the user. If the contract requested unsolicited access to your balance, you must reject that malicious access.

See: https://academy.bit2me.com/en/que-es-token-allowance/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.