Unsafe token approval in ParaSwap's swap function
In the ParaSwapUtils.sol token swaps can fail due to improper handling of ERC20 token approvals.
The swap function in ParaSwapUtils.sol handles token approvals not properly.
The implementation sets new approval values without first resetting existing ones to zero. Certain tokens including USDT and BNB have strict requirements where they reject any approval changes when a non-zero value already exists. Once approvals become stuck in this state, there is no mechanism built into the system to fix or reset them.
Failed token approvals cause swap operations become permanently blocked for the affected token.
Manual Review
The approval process needs to first reset existing approvals to zero and implement a more robust approval pattern that ensures compatibility across all token types.
USDT or other unusual ERC20 tokens: out of scope. For the other reports: No proof that the allowance won't be consumed by the receiver.
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.