Platform: Code4rena
Start Date: 07/01/2022
Pot Size: $80,000 USDC
Total HM: 21
Participants: 37
Period: 7 days
Judge: 0xean
Total Solo HM: 14
Id: 71
League: ETH
Rank: 33/37
Findings: 1
Award: $2.60
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Dravee
Also found by: 0x1f8b, Jujic, TomFrenchBlockchain, csanuragjain, defsec, gzeon, loop, robee
2.9784 INSURE - $1.04
1.5637 USDC - $1.56
csanuragjain
Gas saving
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/Registry.sol ownership can be immutable getCDS: if (cds[_address] == address(0)) check not required since setCDS is checking require(_cds != address(0), "ERROR: ZERO_ADDRESS"); which make sure cds[_address] is never address(0)
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/Factory.sol registry & ownership can be immutable
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/Vault.sol registry, controller, ownership addValueBatch & addValue: valueAll(), no need to store value instead have it _attributions = (_amount * totalAttributions) /valueAll()
#0 - oishun1112
2022-01-13T14:27:52Z