Platform: Code4rena
Start Date: 30/10/2021
Pot Size: $35,000 ETH
Total HM: 2
Participants: 16
Period: 3 days
Judge: alcueca
Total Solo HM: 1
Id: 48
League: ETH
Rank: 6/16
Findings: 2
Award: $2,103.76
π Selected for report: 3
π Solo Findings: 0
π Selected for report: ye0lde
1994.4252 USDC - $1,994.43
ye0lde
The comments above rescueTokensFromExecutioner were probably copied over from rescueTokens. They should be modified to refer to rescueTokensFromExecutioner.
Visual Studio Code, Remix
Correct the comments
#0 - alcueca
2021-11-06T06:03:35Z
Inaccurate comments are severity 1
33.9293 USDC - $33.93
ye0lde
Shortening revert strings to fit in 32 bytes will decrease deployment time gas and will decrease runtime gas when the revert condition has been met.
Revert strings that are longer than 32 bytes require at least one additional mstore, along with additional overhead for computing memory offset, etc.
Revert strings > 32 bytes are here: https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/Adminable.sol#L14 https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/ApprovalHandler.sol#L15 https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/Executioner.sol#L64 https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/Slingshot.sol#L74-L75 https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/Slingshot.sol#L93 https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/module/IUniswapModule.sol#L28
Visual Studio Code
Shorten the revert strings to fit in 32 bytes.
Or consider using Custom Errors.
#0 - tommyz7
2021-11-04T18:30:02Z
Duplicate of #64
π Selected for report: ye0lde
75.3985 USDC - $75.40
ye0lde
Removing unused named return variables can reduce gas usage and improve code clarity. Even pure functions still cost gas if they are called internally from another function like at least two of the functions below.
https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/lib/ConcatStrings.sol#L15 https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/lib/ConcatStrings.sol#L23 https://github.com/code-423n4/2021-10-slingshot/blob/9c0432cca2e43731d5a0ae9c151dacf7835b8719/contracts/lib/ConcatStrings.sol#L31
Visual Studio Code, Remix
Remove the unused named returns