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: 28/28
Findings: 1
Award: $5.56
🌟 Selected for report: 1
🚀 Solo Findings: 0
3.4079 USDC - $3.41
jah
If a variable is not set/initialized, it is assumed to have the default value (0, false, 0x0 etc depending on the data type). If you explicitly initialize it with its default value, you are just wasting gas.
https://github.com/code-423n4/2021-11-bootfinance/blob/7c457b2b5ba6b2c887dafdf7428fd577e405d652/core-contracts/contracts/sol/BTCPoolDelegator.sol#L77 https://github.com/code-423n4/2021-11-bootfinance/blob/7c457b2b5ba6b2c887dafdf7428fd577e405d652/core-contracts/contracts/sol/ETHPoolDelegator.sol#L77 https://github.com/code-423n4/2021-11-bootfinance/blob/7c457b2b5ba6b2c887dafdf7428fd577e405d652/core-contracts/contracts/sol/USDPoolDelegator.sol#L66
Manual analysis
🌟 Selected for report: TomFrenchBlockchain
Also found by: PranavG, Reigada, WatchPug, jah, nathaniel, pants, pauliax, pmerkleplant
2.147 USDC - $2.15
jah
Variables { initial_A future_A fee admin_fee owner kill_deadline is_killed token } are only declared in the construction so that by changing them as a immutable we can save gas https://github.com/code-423n4/2021-11-bootfinance/blob/main/core-contracts/contracts/sol/ETHPoolDelegator.sol https://github.com/code-423n4/2021-11-bootfinance/blob/main/core-contracts/contracts/sol/BTCPoolDelegator.sol https://github.com/code-423n4/2021-11-bootfinance/blob/main/core-contracts/contracts/sol/USDPoolDelegator.sol
Manual Analysis
Declare the variables as immutable
#0 - 0xean
2022-01-08T23:08:07Z
duplicate of #1