Closed sherlock-admin2 closed 8 months ago
bareli
medium
Data Validation: The contract should validate input data to prevent setting incorrect or malicious values.
function init(address owner, address pool, uint256 maxInterval) external { initOwner(owner); POOL = pool; state.heartBeat.maxInterval = maxInterval; }
POOL, state.heartBeat can be initialize to 0.
https://github.com/sherlock-audit/2023-12-dodo/blob/main/dodo-v3/contracts/DODOV3MM/D3Pool/D3Maker.sol#L29
Manual Review
use require statement
Invalid, admin input error, deployer trusted to set appropriate parameters that is not zero.
bareli
medium
Input Validation
Summary
Data Validation: The contract should validate input data to prevent setting incorrect or malicious values.
Vulnerability Detail
function init(address owner, address pool, uint256 maxInterval) external { initOwner(owner); POOL = pool; state.heartBeat.maxInterval = maxInterval; }
Impact
POOL, state.heartBeat can be initialize to 0.
Code Snippet
https://github.com/sherlock-audit/2023-12-dodo/blob/main/dodo-v3/contracts/DODOV3MM/D3Pool/D3Maker.sol#L29
Tool used
Manual Review
Recommendation
use require statement