Platform: Code4rena
Start Date: 04/11/2021
Pot Size: $50,000 USDC
Total HM: 20
Participants: 28
Period: 7 days
Judge: 0xean
Total Solo HM: 11
Id: 51
League: ETH
Rank: 26/28
Findings: 1
Award: $8.57
🌟 Selected for report: 1
🚀 Solo Findings: 0
5.8901 USDC - $5.89
0x0x0x
Gas optimization
On Swap.sol at L190 and L191, it is checked that whether _a and _a2 is bigger equal to 0. Since they are both uint256, this condition is always satisfied. Therefore, those conditions are not required.
Manual analysis
0x0x0x
On Swap.sol, the requirement at L151-L154 is not needed.
Before this require statement, it is checked, whether it holds _pooledTokens.length == 2
and decimals.length == 2
.
When _pooledTokens.length = 2
and decimals.length =2
, they also have to be equal, therefore in case the statements at L149 and L150 hold, the requirement at L151-L154 is always true.
manual analysis
#0 - chickenpie347
2022-01-03T22:52:00Z
Duplicate of #20