The current implementation of the approve
function in the VaultRouterBranch.sol contract overwrites the existing allowance instead of increasing it. This can lead to potential issues when multiple transactions are performed in quick succession, causing the allowance to be reset and potentially blocking further transactions.
The issue is located in the following code snippet:
The approve
function is used to set the allowance for the vault to transfer tokens. However, instead of increasing the existing allowance, it overwrites it with the new value. This can cause issues if there are pending transactions that rely on the previous allowance.
The impact of this issue is that it can block further transactions if the allowance is reset while there are pending transactions. This can lead to a denial of service for users attempting to perform multiple transactions in quick succession.
Manual code review
increaseAllowance
function instead of approve
to ensure that the existing allowance is increased rather than overwritten. This can be achieved by implementing the following changes:Use the increaseAllowance
function to increase the existing allowance.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.