code-423n4 / 2022-05-bunker-findings

1 stars 0 forks source link

QA Report #121

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Typos

https://github.com/bunkerfinance/bunker-protocol/blob/752126094691e7457d08fc62a6a5006df59bd2fe/contracts/CErc20.sol#L143

     * @param addAmount The amount fo underlying token to add as reserves

Change fo to to

https://github.com/bunkerfinance/bunker-protocol/blob/752126094691e7457d08fc62a6a5006df59bd2fe/contracts/PriceOracleImplementation.sol#L34

        // Checck for overflow.

Change Checck to Check

Issue: Missing require message Explanation: Require message should be included to enable users to understand reason for failure

https://github.com/bunkerfinance/bunker-protocol/blob/752126094691e7457d08fc62a6a5006df59bd2fe/contracts/CEther.sol#L146-L150

    function getCashPrior() internal view returns (uint) {
        (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);
        require(err == MathError.NO_ERROR);
        return startingBalance;
    }

Recommendation: Add a brief (<= 32 char) message to explain require failure