Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approve x IncreaseAllowance #54

Open
gabrielsdev opened this issue Sep 29, 2023 · 0 comments
Open

Approve x IncreaseAllowance #54

gabrielsdev opened this issue Sep 29, 2023 · 0 comments
Labels
question Further information is requested

Comments

@gabrielsdev
Copy link
Contributor

De acordo com a documentação sobre os contratos de swap é sugerido a utilização do método approve (tanto do real tokenizado quanto do real digital) antes da chamada do método que executa o swap, no entanto, pela especificação do método approve e na vulnerabilidade que esse método apresenta (também encontrada aqui), o método increaseAllowance parece ser o mais adequado para esse fim, uma vez que o approve redefine o valor permitido a ser gasto por outro endereço, enquanto o increaseAllowance apenas incrementa o allowance, o que (de certa forma) isola o respectivo allowance para uma determinada transação.

Utilizar o approve poderia invalidar a execução de transações simultâneas, não só de swap, mas de outras transações que envolvam o allowance.

@aldenio aldenio added question Further information is requested answered This question was answered, waiting for user to close it. and removed answered This question was answered, waiting for user to close it. labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants