Platform: Code4rena
Start Date: 24/06/2021
Pot Size: $80,000 USDC
Total HM: 18
Participants: 12
Period: 7 days
Judge: cemozer
Total Solo HM: 11
Id: 16
League: ETH
Rank: 12/12
Findings: 1
Award: $152.83
๐ Selected for report: 0
๐ Solo Findings: 0
Lucius
The functions transerFrom()/transer() do not revert on failure and instead simply return false. Without checks on the return values, the transfers could potentially fail silently allowing unexpected issues with certain token pools. E.G. If a user calls deposit() function on a swap pool or insurance pool which uses a non-reverting token, the transferFrom() could fail and the user balance would still be updated resulting in the user getting free tokens. If a user calls the withdraw() function on a swap or insurance pool the same failure could occur resulting in the user not receiving their tokens.
Insurance.sol: https://github.com/code-423n4/2021-06-tracer/blob/74e720ee100fd027c592ea44f272231ad4dfa2ab/src/contracts/Insurance.sol#L51
TracerPerpetualSwaps.sol: https://github.com/code-423n4/2021-06-tracer/blob/74e720ee100fd027c592ea44f272231ad4dfa2ab/src/contracts/TracerPerpetualSwaps.sol#L151
Use openzeppelins safeERC20 library safeTransfer()/safeTransferFrom() instead to revert on failure. Alternatively, manually use require() to check return value and revert if return value is false.
#0 - raymogg
2021-07-05T03:25:37Z
Duplicate of #115