Summary
Vulnerability Details
Missing checks for address(0)
when assigning values to address state variables
File: contracts/bridges/BridgeReth.sol
22: diamond = diamondAddr;
Link to code
File: contracts/bridges/BridgeSteth.sol
24: diamond = diamondAddr;
Link to code
File: contracts/facets/BridgeRouterFacet.sol
28: rethBridge = _rethBridge;
29: stethBridge = _stethBridge;
Link to code
File: contracts/facets/ExitShortFacet.sol
30: cusd = _cusd;
Link to code
File: contracts/facets/MarginCallPrimaryFacet.sol
30: cusd = _cusd;
Link to code
File: contracts/facets/ShortRecordFacet.sol
26: cusd = _cusd;
Link to code
File: contracts/facets/VaultFacet.sol
27: carbonZeth = _zeth;
Link to code
File: contracts/tokens/Asset.sol
14: diamond = diamondAddr;
Link to code
File: contracts/tokens/Ditto.sol
16: diamond = diamondAddr;
Link to code
Impact
This could lead to financial losses as the contract would have to be deployed again or leads to token being lost when sent to address(0)
Tools Used
Manual
Recommendations
Check for address(0) before setting critical variables