code-423n4 / 2022-04-backd-findings

6 stars 4 forks source link

QA Report #182

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Vulnerability details:

Low Risk Issues

1. The first withdrawal for each vault from the vault reserve has no delay

_lastWithdrawal[vault] will always be zero for new vaults, so the check is for 0 + minWithdrawalDelay which will always be less than block.timestamp

File: backd/contracts/vault/VaultReserve.sol   #1

102    function canWithdraw(address vault) public view returns (bool) {
103        return block.timestamp >= _lastWithdrawal[vault] + minWithdrawalDelay;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/VaultReserve.sol#L102-L103

2. AaveHandler does not extend BaseHandler

Unlike CompoundHandler, AaveHandler does not extend BaseHandler, which will cause storage problems in future versions

File: backd/contracts/actions/topup/handlers/AaveHandler.sol   #1

15 contract AaveHandler is ITopUpHandler {

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/AaveHandler.sol#L15

3. Unused receive() function will lock Ether in contract

If the intention is for the Ether to be used, the function should call another function, otherwise it should revert

File: contracts/actions/topup/TopUpAction.sol   #1

176     receive() external payable {
177         // solhint-disable-previous-line no-empty-blocks
178     }

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L176-L178

File: contracts/pool/EthPool.sol   #2

10     receive() external payable {}

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/EthPool.sol#L10

File: contracts/strategies/BkdEthCvx.sol   #3

46     receive() external payable {}

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L46

File: contracts/strategies/StrategySwapper.sol   #4

45     receive() external payable {}

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L45

File: contracts/vault/EthVault.sol   #5

13     receive() external payable {}

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/EthVault.sol#L13

4. _prepareDeadline(), _setConfig(), and _executeDeadline() should be private

These functions have the ability to bypass the timelocks of every setting. No contract besides the Preparable contract itself should need to call these functions, and having them available will lead to exploits. The contracts that currently call _setConfig() in their constructors should be given a new function _initConfig() for this purpose. The Vault calls some of these functions as well, and should be changed to manually inspect the deadline rather than mucking with the internals, which is error-prone. The mappings should also be made private, and there should be public getters to read their values

File: backd/contracts/utils/Preparable.sol   #1

115    /**
116     * @notice Execute uint256 config update (with time delay enforced).
117     * @dev Needs to be called after the update was prepared. Fails if called before time delay is met.
118     * @return New value.
119     */
120    function _executeUInt256(bytes32 key) internal returns (uint256) {
121        _executeDeadline(key);
122        uint256 newValue = pendingUInts256[key];
123        _setConfig(key, newValue);
124        return newValue;
125    }
126
127    /**
128     * @notice Execute address config update (with time delay enforced).
129     * @dev Needs to be called after the update was prepared. Fails if called before time delay is met.
130     * @return New value.
131     */
132    function _executeAddress(bytes32 key) internal returns (address) {
133        _executeDeadline(key);
134        address newValue = pendingAddresses[key];
135        _setConfig(key, newValue);
136        return newValue;
137    }

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L115-L137

5. Front-runable initializer

If the initializer is not executed in the same transaction as the constructor, a malicious user can front-run the initialize() call, forcing the contract to be redeployed. Most other initializers in this project are protected, but this one appears not to be.

File: backd/contracts/AddressProvider.sol   #1

53    function initialize(address roleManager) external initializer {
54        AddressProviderMeta.Meta memory meta = AddressProviderMeta.Meta(true, true);
55        _addressKeyMetas.set(AddressProviderKeys._ROLE_MANAGER_KEY, meta.toUInt());
56        _setConfig(AddressProviderKeys._ROLE_MANAGER_KEY, roleManager);
57    }

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L53-L57

6. safeApprove() is deprecated

Deprecated in favor of safeIncreaseAllowance() and safeDecreaseAllowance()

File: contracts/actions/topup/handlers/AaveHandler.sol   #1

53         IERC20(underlying).safeApprove(address(lendingPool), amount);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/AaveHandler.sol#L53

File: contracts/actions/topup/handlers/CompoundHandler.sol   #2

71             IERC20(underlying).safeApprove(address(ctoken), amount);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L71

File: contracts/actions/topup/handlers/CompoundHandler.sol   #3

120             IERC20(underlying).safeApprove(address(ctoken), debt);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L120

File: contracts/actions/topup/TopUpAction.sol   #4

50             IERC20(token).safeApprove(stakerVaultAddress, depositAmount);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L50

File: contracts/actions/topup/TopUpAction.sol   #5

847         IERC20(depositToken).safeApprove(feeHandler, feeAmount);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L847

File: contracts/actions/topup/TopUpAction.sol   #6

908         IERC20(token).safeApprove(spender, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L908

File: contracts/CvxCrvRewardsLocker.sol   #7

53         IERC20(CRV).safeApprove(CRV_DEPOSITOR, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L53

File: contracts/CvxCrvRewardsLocker.sol   #8

56         IERC20(CVX_CRV).safeApprove(CVX_CRV_STAKING, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L56

File: contracts/CvxCrvRewardsLocker.sol   #9

59         IERC20(CRV).safeApprove(CVX_CRV_CRV_CURVE_POOL, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L59

File: contracts/CvxCrvRewardsLocker.sol   #10

62         IERC20(CVX).safeApprove(CVX_LOCKER, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L62

File: contracts/pool/LiquidityPool.sol   #11

721         IERC20(lpToken_).safeApprove(staker_, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L721

File: contracts/strategies/BkdEthCvx.sol   #12

43         IERC20(lp_).safeApprove(address(_BOOSTER), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L43

File: contracts/strategies/BkdTriHopCvx.sol   #13

71         IERC20(underlying_).safeApprove(curveHopPool_, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L71

File: contracts/strategies/BkdTriHopCvx.sol   #14

72         IERC20(hopLp_).safeApprove(curvePool_, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L72

File: contracts/strategies/BkdTriHopCvx.sol   #15

73         IERC20(lp_).safeApprove(address(_BOOSTER), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L73

File: contracts/strategies/BkdTriHopCvx.sol   #16

129         IERC20(hopLp).safeApprove(curvePool_, 0);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L129

File: contracts/strategies/BkdTriHopCvx.sol   #17

130         IERC20(hopLp).safeApprove(curvePool_, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L130

File: contracts/strategies/BkdTriHopCvx.sol   #18

131         IERC20(lp_).safeApprove(address(_BOOSTER), 0);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L131

File: contracts/strategies/BkdTriHopCvx.sol   #19

132         IERC20(lp_).safeApprove(address(_BOOSTER), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L132

File: contracts/strategies/ConvexStrategyBase.sol   #20

107         _CRV.safeApprove(address(_strategySwapper), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L107

File: contracts/strategies/ConvexStrategyBase.sol   #21

108         _CVX.safeApprove(address(_strategySwapper), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L108

File: contracts/strategies/ConvexStrategyBase.sol   #22

109         _WETH.safeApprove(address(_strategySwapper), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L109

File: contracts/strategies/ConvexStrategyBase.sol   #23

279         IERC20(token_).safeApprove(address(_strategySwapper), 0);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L279

File: contracts/strategies/ConvexStrategyBase.sol   #24

280         IERC20(token_).safeApprove(address(_strategySwapper), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L280

File: contracts/strategies/StrategySwapper.sol   #25

209         IERC20(token_).safeApprove(spender_, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L209

File: contracts/vault/Erc20Vault.sol   #26

21         IERC20(underlying_).safeApprove(address(reserve), type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Erc20Vault.sol#L21

File: contracts/vault/Erc20Vault.sol   #27

22         IERC20(underlying_).safeApprove(_pool, type(uint256).max);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Erc20Vault.sol#L22

7. Missing checks for address(0x0) when assigning values to address state variables

File: contracts/actions/topup/TopUpActionFeeHandler.sol   #1

55         actionContract = _actionContract;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpActionFeeHandler.sol#L55

File: contracts/CvxCrvRewardsLocker.sol   #2

151         treasury = _treasury;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L151

File: contracts/StakerVault.sol   #3

66         token = _token;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/StakerVault.sol#L66

File: contracts/strategies/ConvexStrategyBase.sol   #4

100         vault = vault_;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L100

File: contracts/strategies/ConvexStrategyBase.sol   #5

101         _strategist = strategist_;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L101

File: contracts/strategies/ConvexStrategyBase.sol   #6

182         communityReserve = _communityReserve;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L182

File: contracts/strategies/ConvexStrategyBase.sol   #7

261         _strategist = strategist_;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L261

8. abi.encodePacked() should not be used with dynamic types when passing the result to a hash function such as keccak256()

Use abi.encode() instead which will pad items to 32 bytes, which will prevent hash collisions (e.g. abi.encodePacked(0x123,0x456) => 0x123456 => abi.encodePacked(0x1,0x23456), but abi.encode(0x123,0x456) => 0x0...1230...456). "Unless there is a compelling reason, abi.encode should be preferred". If there is only one argument to abi.encodePacked() it can often be cast to bytes() or bytes32() instead.

File: contracts/actions/topup/handlers/CTokenRegistry.sol   #1

67                 keccak256(abi.encodePacked(ctoken.symbol())) == keccak256(abi.encodePacked("cETH"))

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CTokenRegistry.sol#L67

9. Open TODOs

Code architecture, incentives, and error handling/reporting questions/issues should be resolved before deployment

File: contracts/actions/topup/TopUpAction.sol   #1

713         // TODO: add constant gas consumed for transfer and tx prologue

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L713

File: contracts/strategies/ConvexStrategyBase.sol   #2

4 // TODO Add validation of curve pools

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L4

File: contracts/strategies/ConvexStrategyBase.sol   #3

5 // TODO Test validation

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L5

10. address.call{value:x}() should be used instead of payable.transfer()

The use of payable.transfer() is heavily frowned upon because it can lead to the locking of funds. The transfer() call requires that the recipient has a payable callback, only provides 2300 gas for its operation. This means the following cases can cause the transfer to fail:

File: backd/contracts/vault/VaultReserve.sol   #1

81            payable(msg.sender).transfer(amount);

uses the onlyVault modifier, and vaults currently have empty payable callbacks, so they don't currently revert https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/VaultReserve.sol#L81

File: backd/contracts/vault/EthVault.sol   #2

29        payable(to).transfer(amount);

uses the onlyPoolOrGovernance modifier, and pools currently have an empty payable callback, so they don't currently rever. Governance is currently deployed and not seeing issues, so presumably it also has an empty payable callback https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/EthVault.sol#L29

File: backd/contracts/vault/EthVault.sol   #3

37        payable(addressProvider.getTreasury()).transfer(amount);

the treasury is currently deployed and not seeing issues, so presumably it also has an empty payable callback https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/EthVault.sol#L37

File: backd/contracts/strategies/BkdEthCvx.sol   #4

77            payable(vault).transfer(amount);

vaults currently have an empty payable callback https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L77

File: backd/contracts/strategies/BkdEthCvx.sol   #5

93        payable(vault).transfer(amount);

vaults currently have an empty payable callback https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L93

File: backd/contracts/strategies/BkdEthCvx.sol   #6

117        payable(vault).transfer(underlyingBalance);

vaults currently have an empty payable callback https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L117

11. Upgradeable contract is missing a __gap[50] storage variable to allow for new storage variables in later versions

See this link for a description of this storage variable. While some contracts may not currently be sub-classed, adding the variable now protects against forgetting to add it in the future.

File: contracts/LpToken.sol   #1

10 contract LpToken is ILpToken, ERC20Upgradeable {

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/LpToken.sol#L10

12. Math library unnecessarily overflows during some operations

In the example below, a + b may overflow even though the division that comes later would prevent it. This particular case can be prevented by doing (a & b) + (a ^ b) / b. There are other functions with similar issues. See this library for ways of doing math without this sort of issue.

File: backd/libraries/ScaledMath.sol   #1

40    function divRoundUp(uint256 a, uint256 b) internal pure returns (uint256) {
41        return (a + b - 1) / b;
42    }

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/ScaledMath.sol#L40-L42

Non-critical Issues

1. payable function does not reject payments to ERC20 tokens

File: backd/contracts/vault/VaultReserve.sol   #1

50        if (token == address(0)) {
51            require(msg.value == amount, Error.INVALID_AMOUNT);
52            _balances[msg.sender][token] += msg.value;
53            return true;
54        }
55        uint256 balance = IERC20(token).balanceOf(address(this));

After the if-statement there should be a require(0 == msg.value) to ensure no Ether is being used when updating ERC20 balances. This is non-critical since the function has the onlyVault modifier, and presumably vaults would be coded never to deposit Ether to ERC20 tokens https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/VaultReserve.sol#L50-L55

2. Adding a return statement when the function defines a named return variable, is redundant

File: contracts/pool/PoolFactory.sol   #1

216         return addrs;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L216

3. public functions not called by the contract should be declared external instead

Contracts are allowed to override their parents' functions and change the visibility from external to public.

File: contracts/actions/topup/TopUpAction.sol   #1

742     function prepareTopUpHandler(bytes32 protocol, address newHandler)
743         public
744         onlyGovernance
745         returns (bool)

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L742-L745

File: contracts/CvxCrvRewardsLocker.sol   #2

222     function withdraw(address token, uint256 amount) public onlyGovernance returns (bool) {

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L222

4. constants should be defined rather than using magic numbers

File: contracts/oracles/ChainlinkOracleProvider.sol   #1

47         return (getPriceUSD(asset) * 1e18) / getPriceUSD(address(0));

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/oracles/ChainlinkOracleProvider.sol#L47

File: contracts/oracles/ChainlinkUsdWrapper.sol   #2

56         return (roundId_, (answer_ * _ethPrice()) / 1e8, startedAt_, updatedAt_, answeredInRound_);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/oracles/ChainlinkUsdWrapper.sol#L56

File: contracts/pool/LiquidityPool.sol   #3

208         require(newRatio <= (ScaledMath.DECIMAL_SCALE * 50) / 100, Error.INVALID_AMOUNT);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L208

File: contracts/pool/LiquidityPool.sol   #4

208         require(newRatio <= (ScaledMath.DECIMAL_SCALE * 50) / 100, Error.INVALID_AMOUNT);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L208

File: contracts/pool/PoolFactory.sol   #5

184             require(lpTokenArgs.decimals == 18, Error.INVALID_DECIMALS);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L184

File: contracts/strategies/BkdEthCvx.sol   #6

38         imbalanceToleranceIn = 0.0007e18;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L38

File: contracts/strategies/BkdEthCvx.sol   #7

39         imbalanceToleranceOut = 0.0104e18;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L39

File: contracts/strategies/BkdTriHopCvx.sol   #8

59         decimalMultiplier = 10**(18 - IERC20Full(underlying_).decimals());

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L59

File: contracts/strategies/BkdTriHopCvx.sol   #9

65         imbalanceToleranceIn = 0.001e18;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L65

File: contracts/strategies/BkdTriHopCvx.sol   #10

66         imbalanceToleranceOut = 0.048e18;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L66

File: contracts/strategies/BkdTriHopCvx.sol   #11

67         hopImbalanceToleranceIn = 0.001e18;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L67

File: contracts/strategies/BkdTriHopCvx.sol   #12

68         hopImbalanceToleranceOut = 0.0015e18;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L68

File: contracts/strategies/BkdTriHopCvx.sol   #13

152             uint256[3] memory hopAmounts;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L152

File: contracts/strategies/BkdTriHopCvx.sol   #14

196         uint256[3] memory hopAmounts;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L196

File: contracts/strategies/StrategySwapper.sol   #15

111         require(slippageTolerance_ > 0.8e18, Error.INVALID_SLIPPAGE_TOLERANCE);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L111

File: contracts/strategies/StrategySwapper.sol   #16

288         return 10**(18 - IERC20Full(token_).decimals());

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L288

5. Large multiples of ten should use scientific notation (e.g. 1e6) rather than decimal literals (e.g. 1000000), for readability

File: contracts/utils/CvxMintAmount.sol   #1

7     uint256 private constant _CLIFF_SIZE = 100000 * 1e18; //new cliff every 100,000 tokens

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/CvxMintAmount.sol#L7

File: contracts/utils/CvxMintAmount.sol   #2

9     uint256 private constant _MAX_SUPPLY = 100000000 * 1e18; //100 mil max supply

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/CvxMintAmount.sol#L9

6. Use a more recent version of solidity

Use a solidity version of at least 0.8.12 to get string.concat() to be used instead of abi.encodePacked(,)

File: contracts/actions/topup/handlers/CTokenRegistry.sol   #1

2 pragma solidity 0.8.9;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CTokenRegistry.sol#L2

File: contracts/actions/topup/TopUpActionFeeHandler.sol   #2

2 pragma solidity 0.8.9;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpActionFeeHandler.sol#L2

File: contracts/actions/topup/TopUpAction.sol   #3

2 pragma solidity 0.8.9;

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L2

7. Constant redefined elsewhere

Consider defining in only one contract so that values cannot become out of sync when only one location is updated. A cheap way to store constants in a single location is to create an internal constant in a library. If the variable is a local cache of another contract's value, consider making the cache variable internal or private, which will require external users to query the contract with the source of truth, so that callers don't get out of sync.

File: contracts/actions/topup/handlers/CTokenRegistry.sol   #1

9     Comptroller public immutable comptroller;

seen in contracts/actions/topup/handlers/CompoundHandler.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CTokenRegistry.sol#L9

File: contracts/actions/topup/TopUpAction.sol   #2

157     IAddressProvider public immutable addressProvider;

seen in contracts/access/RoleManager.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L157

File: contracts/actions/topup/TopUpAction.sol   #3

156     IController public immutable controller;

seen in contracts/actions/topup/TopUpActionFeeHandler.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L156

File: contracts/Controller.sol   #4

19     IAddressProvider public immutable override addressProvider;

seen in contracts/actions/topup/TopUpAction.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/Controller.sol#L19

File: contracts/GasBank.sol   #5

9     IController public immutable controller;

seen in contracts/actions/topup/TopUpAction.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/GasBank.sol#L9

File: contracts/GasBank.sol   #6

10     IAddressProvider public immutable addressProvider;

seen in contracts/Controller.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/GasBank.sol#L10

File: contracts/pool/LiquidityPool.sol   #7

65     IController public immutable controller;

seen in contracts/GasBank.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L65

File: contracts/pool/LiquidityPool.sol   #8

66     IAddressProvider public immutable addressProvider;

seen in contracts/GasBank.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L66

File: contracts/pool/PoolFactory.sol   #9

64     IController public immutable controller;

seen in contracts/pool/LiquidityPool.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L64

File: contracts/pool/PoolFactory.sol   #10

65     IAddressProvider public immutable addressProvider;

seen in contracts/pool/LiquidityPool.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L65

File: contracts/StakerVault.sol   #11

43     IController public immutable controller;

seen in contracts/pool/PoolFactory.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/StakerVault.sol#L43

File: contracts/vault/Vault.sol   #12

48     IController public immutable controller;

seen in contracts/StakerVault.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L48

File: contracts/vault/Vault.sol   #13

49     IAddressProvider public immutable addressProvider;

seen in contracts/pool/PoolFactory.sol https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L49

Inconsistent spacing in comments

Some lines use // x and some use //x. The instances below point out the usages that don't follow the majority, within each file

File: contracts/utils/CvxMintAmount.sol   #1

8     uint256 private constant _CLIFF_COUNT = 1000; // 1,000 cliffs

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/CvxMintAmount.sol#L8

File: contracts/utils/CvxMintAmount.sol   #2

11         IERC20(address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B)); // CVX Token

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/CvxMintAmount.sol#L11

9. Typos

File: contracts/actions/topup/handlers/CompoundHandler.sol   #1

85      * @notice Returns the collaterization ratio of the user.

collaterization https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L85

File: contracts/actions/topup/handlers/CompoundHandler.sol   #2

86      *         A result of 1.5 (x1e18) means that the user has a 150% collaterization ratio.

collaterization https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L86

File: contracts/actions/topup/handlers/CompoundHandler.sol   #3

103      * @return The amount of debt that was repayed in the underlying.

repayed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L103

File: contracts/actions/topup/TopUpActionFeeHandler.sol   #4

157      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpActionFeeHandler.sol#L157

File: contracts/actions/topup/TopUpActionFeeHandler.sol   #5

202      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpActionFeeHandler.sol#L202

File: contracts/actions/topup/TopUpAction.sol   #6

396      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L396

File: contracts/actions/topup/TopUpAction.sol   #7

737      * @dev Setting the addres to 0 means that the protocol will no longer be supported.

addres https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L737

File: contracts/actions/topup/TopUpAction.sol   #8

859      *                      If this is greater than `requiredAmount` more tokens will be locked.

requiredAmount - no such variable https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L859

File: contracts/actions/topup/TopUpKeeperHelper.sol   #9

156      * @param length The length to trucate the list of topups to.

trucate https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpKeeperHelper.sol#L156

File: contracts/AddressProvider.sol   #10

297      * @dev Does not revert if the pool deos not exist

deos https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L297

File: contracts/AddressProvider.sol   #11

308      * @dev Reverts if the pool deos not exist

deos https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L308

File: contracts/CvxCrvRewardsLocker.sol   #12

131      * @notice Processes exipred locks.

exipred https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L131

File: contracts/CvxCrvRewardsLocker.sol   #13

254                 // Swap CRV for cxvCRV and stake

cxvCRV - should be cvxCRV https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L254

File: contracts/LpToken.sol   #14

62      * @return Aamount of tokens burned.

Aamount https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/LpToken.sol#L62

File: contracts/LpToken.sol   #15

79      * @dev We notify that LP tokens have been transfered

transfered https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/LpToken.sol#L79

File: contracts/pool/LiquidityPool.sol   #16

185      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L185

File: contracts/pool/LiquidityPool.sol   #17

214      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L214

File: contracts/pool/LiquidityPool.sol   #18

243      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L243

File: contracts/pool/LiquidityPool.sol   #19

272      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L272

File: contracts/pool/LiquidityPool.sol   #20

304      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L304

File: contracts/pool/LiquidityPool.sol   #21

352      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L352

File: contracts/pool/LiquidityPool.sol   #22

644      * @notice Retuns if the pool has an active deposit limit

Retuns https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L644

File: contracts/pool/LiquidityPool.sol   #23

804      * @dev Overriden for testing

Overriden https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/LiquidityPool.sol#L804

File: contracts/strategies/BkdEthCvx.sol   #24

136      * @param _underlyingAmount Amount of underlying that is being widthdrawn from Curve Pool.

widthdrawn https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L136

File: contracts/strategies/BkdEthCvx.sol   #25

154      * @dev Uses get_virtual_price which is less suceptible to manipulation.

suceptible https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L154

File: contracts/strategies/BkdEthCvx.sol   #26

165      * @dev Uses get_virtual_price which is less suceptible to manipulation.

suceptible https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdEthCvx.sol#L165

File: contracts/strategies/BkdTriHopCvx.sol   #27

27     event SetHopImbalanceToleranceIn(uint256 value); // Emitted after a succuessful setting of hop imbalance tolerance in

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L27

File: contracts/strategies/BkdTriHopCvx.sol   #28

28     event SetHopImbalanceToleranceOut(uint256 value); // Emitted after a succuessful setting of hop imbalance tolerance out

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L28

File: contracts/strategies/BkdTriHopCvx.sol   #29

79      * @param _hopImbalanceToleranceIn New hop imbalance tolarance in.

tolarance https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L79

File: contracts/strategies/BkdTriHopCvx.sol   #30

95      * @param _hopImbalanceToleranceOut New hop imbalance tolarance out.

tolarance https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L95

File: contracts/strategies/BkdTriHopCvx.sol   #31

248      * @param _hopLpAmount Amount of Hop LP that is being widthdrawn from Curve Pool.

widthdrawn https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L248

File: contracts/strategies/BkdTriHopCvx.sol   #32

258      * @return The mininum Hop LP balance to accept.

mininum https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L258

File: contracts/strategies/BkdTriHopCvx.sol   #33

282      * @param _underlyingAmount Amount of underlying that is being widthdrawn from Curve Hop Pool.

widthdrawn https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L282

File: contracts/strategies/BkdTriHopCvx.sol   #34

295      * @return The mininum underlying balance to accept.

mininum https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L295

File: contracts/strategies/BkdTriHopCvx.sol   #35

304      * @dev Uses get_virtual_price which is less suceptible to manipulation.

suceptible https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L304

File: contracts/strategies/BkdTriHopCvx.sol   #36

315      * @dev Uses get_virtual_price which is less suceptible to manipulation.

suceptible https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L315

File: contracts/strategies/BkdTriHopCvx.sol   #37

326      * @dev Uses get_virtual_price which is less suceptible to manipulation.

suceptible https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L326

File: contracts/strategies/BkdTriHopCvx.sol   #38

340      * @dev Uses get_virtual_price which is less suceptible to manipulation.

suceptible https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L340

File: contracts/strategies/ConvexStrategyBase.sol   #39

61     event Deposit(); // Emitted after a successfull deposit

successfull https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L61

File: contracts/strategies/ConvexStrategyBase.sol   #40

63     event WithdrawAll(uint256 amount); // Emitted after successfully withdrwaing all

withdrwaing https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L63

File: contracts/strategies/ConvexStrategyBase.sol   #41

65     event SetCommunityReserve(address reserve); // Emitted after a succuessful setting of reserve

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L65

File: contracts/strategies/ConvexStrategyBase.sol   #42

66     event SetCrvCommunityReserveShare(uint256 value); // Emitted after a succuessful setting of CRV Community Reserve Share

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L66

File: contracts/strategies/ConvexStrategyBase.sol   #43

67     event SetCvxCommunityReserveShare(uint256 value); // Emitted after a succuessful setting of CVX Community Reserve Share

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L67

File: contracts/strategies/ConvexStrategyBase.sol   #44

68     event SetImbalanceToleranceIn(uint256 value); // Emitted after a succuessful setting of imbalance tolerance in

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L68

File: contracts/strategies/ConvexStrategyBase.sol   #45

69     event SetImbalanceToleranceOut(uint256 value); // Emitted after a succuessful setting of imbalance tolerance out

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L69

File: contracts/strategies/ConvexStrategyBase.sol   #46

70     event SetStrategist(address strategist); // Emitted after a succuessful setting of strategist

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L70

File: contracts/strategies/ConvexStrategyBase.sol   #47

175      * @notice Set the address of the communit reserve.

communit https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L175

File: contracts/strategies/ConvexStrategyBase.sol   #48

224      * @param imbalanceToleranceIn_ New imbalance tolarance in.

tolarance https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L224

File: contracts/strategies/ConvexStrategyBase.sol   #49

240      * @param imbalanceToleranceOut_ New imbalance tolarance out.

tolarance https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L240

File: contracts/strategies/StrategySwapper.sol   #50

34     event SetSlippageTolerance(uint256 value); // Emitted after a succuessful setting of slippage tolerance

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L34

File: contracts/strategies/StrategySwapper.sol   #51

35     event SetCurvePool(address token, address curvePool); // Emitted after a succuessful setting of a Curve Pool

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L35

File: contracts/strategies/StrategySwapper.sol   #52

36     event SetSwapViaUniswap(address token, bool swapViaUniswap); // Emitted after a succuessful setting of swap via Uniswap

succuessful https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L36

File: contracts/strategies/StrategySwapper.sol   #53

292      * @dev Returns the Curve Pool coin indicies for a given Token.

indicies https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L292

File: contracts/strategies/StrategySwapper.sol   #54

293      * @param curvePool_ The Curve Pool to return the indicies for.

indicies https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L293

File: contracts/strategies/StrategySwapper.sol   #55

294      * @param token_ The Token to get the indicies for.

indicies https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L294

File: contracts/strategies/StrategySwapper.sol   #56

307      * @dev Returns the minimum amount of Token to recieve from swap.

recieve https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L307

File: contracts/strategies/StrategySwapper.sol   #57

310      * @return minAmountOut The minimum amount of Token to recieve from swap.

recieve https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L310

File: contracts/strategies/StrategySwapper.sol   #58

324      * @dev Returns the minimum amount of WETH to recieve from swap.

recieve https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L324

File: contracts/strategies/StrategySwapper.sol   #59

327      * @return minAmountOut The minimum amount of WETH to recieve from swap.

recieve https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L327

File: contracts/utils/Preparable.sol   #60

10  * callers should make sure to have the proper checks in palce

palce https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L10

File: contracts/utils/Preparable.sol   #61

34      * @notice Prepares an uint256 that should be commited to the contract

commited https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L34

File: contracts/utils/Preparable.sol   #62

58      * @notice Prepares an address that should be commited to the contract

commited https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L58

File: contracts/vault/Vault.sol   #63

218      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L218

File: contracts/vault/Vault.sol   #64

270      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L270

File: contracts/vault/Vault.sol   #65

293      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L293

File: contracts/vault/Vault.sol   #66

317      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L317

File: contracts/vault/Vault.sol   #67

348      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L348

File: contracts/vault/Vault.sol   #68

373      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L373

File: contracts/vault/Vault.sol   #69

398      * @dev Needs to be called after the update was prepraed. Fails if called before time delay is met.

prepraed https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Vault.sol#L398

10. File is missing NatSpec

File: contracts/access/Authorization.sol (various lines)   #1

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/access/Authorization.sol

File: contracts/access/RoleManager.sol (various lines)   #2

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/access/RoleManager.sol

File: contracts/oracles/ChainlinkUsdWrapper.sol (various lines)   #3

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/oracles/ChainlinkUsdWrapper.sol

File: contracts/oracles/OracleProviderExtensions.sol (various lines)   #4

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/oracles/OracleProviderExtensions.sol

File: contracts/pool/Erc20Pool.sol (various lines)   #5

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/Erc20Pool.sol

File: contracts/pool/EthPool.sol (various lines)   #6

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/EthPool.sol

File: contracts/utils/CvxMintAmount.sol (various lines)   #7

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/CvxMintAmount.sol

File: contracts/vault/Erc20Vault.sol (various lines)   #8

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/Erc20Vault.sol

File: contracts/vault/EthVault.sol (various lines)   #9

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/EthVault.sol

File: libraries/AddressProviderMeta.sol (various lines)   #10

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderMeta.sol

File: libraries/Errors.sol (various lines)   #11

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/Errors.sol

11. NatSpec is incomplete

File: contracts/actions/topup/handlers/AaveHandler.sol   #1

29     /**
30      * @notice Executes the top-up of a position.
31      * @param account Account holding the position.
32      * @param underlying Underlying for tup-up.
33      * @param amount Amount to top-up by.
34      * @return `true` if successful.
35      */
36     function topUp(
37         bytes32 account,
38         address underlying,
39         uint256 amount,
40         bytes memory extra
41     ) external override returns (bool) {

Missing: @param extra https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/AaveHandler.sol#L29-L41

File: contracts/actions/topup/handlers/CompoundHandler.sol   #2

43     /**
44      * @notice Executes the top-up of a position.
45      * @param account Account holding the position.
46      * @param underlying Underlying for tup-up.
47      * @param amount Amount to top-up by.
48      * @return `true` if successful.
49      */
50     function topUp(
51         bytes32 account,
52         address underlying,
53         uint256 amount,
54         bytes memory extra
55     ) external override returns (bool) {

Missing: @param extra https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L43-L55

File: contracts/actions/topup/handlers/CompoundHandler.sol   #3

84     /**
85      * @notice Returns the collaterization ratio of the user.
86      *         A result of 1.5 (x1e18) means that the user has a 150% collaterization ratio.
87      * @param account account for which to check the factor.
88      * @return User factor.
89      */
90     function getUserFactor(bytes32 account, bytes memory) external view override returns (uint256) {

Missing: @param null https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L84-L90

File: contracts/actions/topup/handlers/CompoundHandler.sol   #4

98     /**
99      * @notice Repays any existing debt for the given underlying.
100      * @param account Account for which to repay the debt.
101      * @param underlying The underlying token to repay the debt for.
102      * @param maximum The maximum amount of debt to repay.
103      * @return The amount of debt that was repayed in the underlying.
104      */
105     function _repayAnyDebt(
106         address account,
107         address underlying,
108         uint256 maximum,
109         CToken ctoken
110     ) internal returns (uint256) {

Missing: @param ctoken https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/handlers/CompoundHandler.sol#L98-L110

File: contracts/actions/topup/TopUpAction.sol   #5

201      * @param record containing the data for the position to register
202      */
203     function register(
204         bytes32 account,
205         bytes32 protocol,
206         uint128 depositAmount,
207         Record memory record
208     ) external payable returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L201-L208

File: contracts/actions/topup/TopUpAction.sol   #6

440      * @param token Address of deposit token that can be used by the action.
441      */
442     function addUsableToken(address token) external override onlyGovernance returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L440-L442

File: contracts/actions/topup/TopUpAction.sol   #7

802      * @param protocol Protocol where the position is held.
803      */
804     function getPosition(
805         address payer,
806         bytes32 account,
807         bytes32 protocol
808     ) public view override returns (Record memory) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpAction.sol#L802-L808

File: contracts/AddressProvider.sol   #8

77      * @param action Address of action to add.
78      */
79     function addAction(address action) external onlyGovernance returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L77-L79

File: contracts/AddressProvider.sol   #9

196     /**
197      * @notice Initializes an address
198      * @param key Key to initialize
199      * @param initialAddress Address for `key`
200      */
201     function initializeAddress(
202         bytes32 key,
203         address initialAddress,
204         bool freezable
205     ) public override onlyGovernance {

Missing: @param freezable https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L196-L205

File: contracts/AddressProvider.sol   #10

253     /**
254      * @notice Execute update of `key`
255      * @return New address.
256      */
257     function executeAddress(bytes32 key) external override returns (address) {

Missing: @param key https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L253-L257

File: contracts/AddressProvider.sol   #11

263     /**
264      * @notice Reset `key`
265      * @return true if it was reset
266      */
267     function resetAddress(bytes32 key) external onlyGovernance returns (bool) {

Missing: @param key https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L263-L267

File: contracts/AddressProvider.sol   #12

385     /**
386      * @notice Tries to get the staker vault for a given token but does not throw if it does not exist
387      * @return A boolean set to true if the vault exists and the vault address.
388      */
389     function tryGetStakerVault(address token) external view override returns (bool, address) {

Missing: @param token https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/AddressProvider.sol#L385-L389

File: contracts/Controller.sol   #13

108     /**
109      * @return the total amount of ETH require by `payer` to cover the fees for
110      * positions registered in all actions
111      */
112     function getTotalEthRequiredForGas(address payer) external view override returns (uint256) {

Missing: @param payer https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/Controller.sol#L108-L112

File: contracts/CvxCrvRewardsLocker.sol   #14

80      * @param _spendRatio New spend ratio to be used.
81      */
82     function setSpendRatio(uint256 _spendRatio) external onlyGovernance returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L80-L82

File: contracts/CvxCrvRewardsLocker.sol   #15

95      * @param lockAndStake If true, claimed reward tokens (CRV) will be locked and staked (CRV for cvxCRV and CVX for vlCVX).
96      */
97     function claimRewards(bool lockAndStake) external override returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L95-L97

File: contracts/CvxCrvRewardsLocker.sol   #16

158      * @param token Token to withdraw entire balance of.
159      */
160     function withdraw(address token) external onlyGovernance returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L158-L160

File: contracts/CvxCrvRewardsLocker.sol   #17

220      * @param amount Amount of token to withdraw.
221      */
222     function withdraw(address token, uint256 amount) public onlyGovernance returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L220-L222

File: contracts/GasBank.sol   #18

52     /**
53      * @return the balance of `account`
54      */
55     function balanceOf(address account) external view override returns (uint256) {

Missing: @param account https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/GasBank.sol#L52-L55

File: contracts/pool/PoolFactory.sol   #19

88      * @param implementation of pool implementation to add.
89      */
90     function addPoolImplementation(bytes32 name, address implementation)
91         external
92         onlyGovernance
93         returns (bool)

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L88-L93

File: contracts/pool/PoolFactory.sol   #20

101      * @param implementation of lp token implementation to add.
102      */
103     function addLpTokenImplementation(bytes32 name, address implementation)
104         external
105         onlyGovernance
106         returns (bool)

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L101-L106

File: contracts/pool/PoolFactory.sol   #21

114      * @param implementation of vault implementation to add.
115      */
116     function addVaultImplementation(bytes32 name, address implementation)
117         external
118         onlyGovernance
119         returns (bool)

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L114-L119

File: contracts/pool/PoolFactory.sol   #22

127      * @param implementation of staker vault implementation to add.
128      */
129     function addStakerVaultImplementation(bytes32 name, address implementation)
130         external
131         onlyGovernance
132         returns (bool)

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L127-L132

File: contracts/pool/PoolFactory.sol   #23

137     /**
138      * @notice Deploys a new pool and LP token.
139      * @dev Decimals is an argument as not all ERC20 tokens implement the ERC20Detailed interface.
140      *      An implementation where `getUnderlying()` returns the zero address is for ETH pools.
141      * @param poolName Name of the pool.
142      * @param underlying Address of the pool's underlying.
143      * @param lpTokenArgs Arguments to create the LP token for the pool
144      * @param vaultArgs Arguments to create the vault
145      * @param implementationNames Name of the implementations to use
146      * @return addrs Address of the deployed pool, address of the pool's deployed LP token.
147      */
148     function deployPool(
149         string calldata poolName,
150         uint256 depositCap,
151         address underlying,
152         LpTokenArgs calldata lpTokenArgs,
153         VaultArgs calldata vaultArgs,
154         ImplementationNames calldata implementationNames
155     ) external onlyGovernance returns (Addresses memory addrs) {

Missing: @param depositCap https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L137-L155

File: contracts/pool/PoolFactory.sol   #24

223      * @param implementation of lp token implementation to add.
224      */
225     function _addImplementation(
226         bytes32 key,
227         bytes32 name,
228         address implementation
229     ) internal returns (bool) {

Missing: @return https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L223-L229

File: contracts/StakerVault.sol   #25

87     /**
88      * @notice Registers an address as a strategy to be excluded from token accumulation.
89      * @dev This should be used is a strategy deposits into a stakerVault and should not get gov. tokens.
90      * @return `true` if success.
91      */
92     function addStrategy(address strategy) external override returns (bool) {

Missing: @param strategy https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/StakerVault.sol#L87-L92

File: contracts/utils/Preparable.sol   #26

33     /**
34      * @notice Prepares an uint256 that should be commited to the contract
35      * after `_MIN_DELAY` elapsed
36      * @param value The value to prepare
37      * @return `true` if success.
38      */
39     function _prepare(
40         bytes32 key,
41         uint256 value,
42         uint256 delay
43     ) internal returns (bool) {

Missing: @param key @param delay https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L33-L43

File: contracts/utils/Preparable.sol   #27

57     /**
58      * @notice Prepares an address that should be commited to the contract
59      * after `_MIN_DELAY` elapsed
60      * @param value The value to prepare
61      * @return `true` if success.
62      */
63     function _prepare(
64         bytes32 key,
65         address value,
66         uint256 delay
67     ) internal returns (bool) {

Missing: @param key @param delay https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L57-L67

File: contracts/utils/Preparable.sol   #28

81     /**
82      * @notice Reset a uint256 key
83      * @return `true` if success.
84      */
85     function _resetUInt256Config(bytes32 key) internal returns (bool) {

Missing: @param key https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L81-L85

File: contracts/utils/Preparable.sol   #29

93     /**
94      * @notice Reset an address key
95      * @return `true` if success.
96      */
97     function _resetAddressConfig(bytes32 key) internal returns (bool) {

Missing: @param key https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L93-L97

File: contracts/utils/Preparable.sol   #30

115     /**
116      * @notice Execute uint256 config update (with time delay enforced).
117      * @dev Needs to be called after the update was prepared. Fails if called before time delay is met.
118      * @return New value.
119      */
120     function _executeUInt256(bytes32 key) internal returns (uint256) {

Missing: @param key https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L115-L120

File: contracts/utils/Preparable.sol   #31

127     /**
128      * @notice Execute address config update (with time delay enforced).
129      * @dev Needs to be called after the update was prepared. Fails if called before time delay is met.
130      * @return New value.
131      */
132     function _executeAddress(bytes32 key) internal returns (address) {

Missing: @param key https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/utils/Preparable.sol#L127-L132

File: libraries/AddressProviderHelpers.sol   #32

15     /**
16      * @return The address of the treasury.
17      */
18     function getTreasury(IAddressProvider provider) internal view returns (address) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L15-L18

File: libraries/AddressProviderHelpers.sol   #33

22     /**
23      * @return The gas bank.
24      */
25     function getGasBank(IAddressProvider provider) internal view returns (IGasBank) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L22-L25

File: libraries/AddressProviderHelpers.sol   #34

29     /**
30      * @return The address of the vault reserve.
31      */
32     function getVaultReserve(IAddressProvider provider) internal view returns (IVaultReserve) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L29-L32

File: libraries/AddressProviderHelpers.sol   #35

36     /**
37      * @return The address of the swapperRegistry.
38      */
39     function getSwapperRegistry(IAddressProvider provider) internal view returns (address) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L36-L39

File: libraries/AddressProviderHelpers.sol   #36

43     /**
44      * @return The oracleProvider.
45      */
46     function getOracleProvider(IAddressProvider provider) internal view returns (IOracleProvider) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L43-L46

File: libraries/AddressProviderHelpers.sol   #37

50     /**
51      * @return the address of the BKD locker
52      */
53     function getBKDLocker(IAddressProvider provider) internal view returns (address) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L50-L53

File: libraries/AddressProviderHelpers.sol   #38

57     /**
58      * @return the address of the BKD locker
59      */
60     function getRoleManager(IAddressProvider provider) internal view returns (IRoleManager) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L57-L60

File: libraries/AddressProviderHelpers.sol   #39

64     /**
65      * @return the controller
66      */
67     function getController(IAddressProvider provider) internal view returns (IController) {

Missing: @param provider https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/libraries/AddressProviderHelpers.sol#L64-L67

12. Event is missing indexed fields

Each event should use three indexed fields if there are three or more fields

File: contracts/actions/topup/TopUpActionFeeHandler.sol   #1

37     event KeeperFeesClaimed(address indexed keeper, address token, uint256 totalClaimed);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpActionFeeHandler.sol#L37

File: contracts/actions/topup/TopUpActionFeeHandler.sol   #2

39     event FeesPayed(
40         address indexed payer,
41         address indexed keeper,
42         address token,
43         uint256 amount,
44         uint256 keeperAmount,
45         uint256 lpAmount
46     );

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/actions/topup/TopUpActionFeeHandler.sol#L39-L46

File: contracts/CvxCrvRewardsLocker.sol   #3

46     event NewSpendRatio(uint256 newSpendRatio);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L46

File: contracts/CvxCrvRewardsLocker.sol   #4

47     event NewTreasury(address newTreasury);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/CvxCrvRewardsLocker.sol#L47

File: contracts/pool/PoolFactory.sol   #5

75     event NewPool(address pool, address vault, address lpToken, address stakerVault);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L75

File: contracts/pool/PoolFactory.sol   #6

76     event NewImplementation(bytes32 key, bytes32 name, address implementation);

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/pool/PoolFactory.sol#L76

File: contracts/strategies/BkdTriHopCvx.sol   #7

27     event SetHopImbalanceToleranceIn(uint256 value); // Emitted after a succuessful setting of hop imbalance tolerance in

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L27

File: contracts/strategies/BkdTriHopCvx.sol   #8

28     event SetHopImbalanceToleranceOut(uint256 value); // Emitted after a succuessful setting of hop imbalance tolerance out

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/BkdTriHopCvx.sol#L28

File: contracts/strategies/ConvexStrategyBase.sol   #9

62     event Withdraw(uint256 amount); // Emitted after a successful withdrawal

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L62

File: contracts/strategies/ConvexStrategyBase.sol   #10

63     event WithdrawAll(uint256 amount); // Emitted after successfully withdrwaing all

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L63

File: contracts/strategies/ConvexStrategyBase.sol   #11

65     event SetCommunityReserve(address reserve); // Emitted after a succuessful setting of reserve

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L65

File: contracts/strategies/ConvexStrategyBase.sol   #12

66     event SetCrvCommunityReserveShare(uint256 value); // Emitted after a succuessful setting of CRV Community Reserve Share

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L66

File: contracts/strategies/ConvexStrategyBase.sol   #13

67     event SetCvxCommunityReserveShare(uint256 value); // Emitted after a succuessful setting of CVX Community Reserve Share

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L67

File: contracts/strategies/ConvexStrategyBase.sol   #14

68     event SetImbalanceToleranceIn(uint256 value); // Emitted after a succuessful setting of imbalance tolerance in

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L68

File: contracts/strategies/ConvexStrategyBase.sol   #15

69     event SetImbalanceToleranceOut(uint256 value); // Emitted after a succuessful setting of imbalance tolerance out

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L69

File: contracts/strategies/ConvexStrategyBase.sol   #16

70     event SetStrategist(address strategist); // Emitted after a succuessful setting of strategist

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L70

File: contracts/strategies/ConvexStrategyBase.sol   #17

71     event AddRewardToken(address token); // Emitted after successfully adding a new reward token

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L71

File: contracts/strategies/ConvexStrategyBase.sol   #18

72     event RemoveRewardToken(address token); // Emitted after successfully removing a reward token

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L72

File: contracts/strategies/ConvexStrategyBase.sol   #19

73     event Harvest(uint256 amount); // Emitted after a successful harvest

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/ConvexStrategyBase.sol#L73

File: contracts/strategies/StrategySwapper.sol   #20

34     event SetSlippageTolerance(uint256 value); // Emitted after a succuessful setting of slippage tolerance

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L34

File: contracts/strategies/StrategySwapper.sol   #21

35     event SetCurvePool(address token, address curvePool); // Emitted after a succuessful setting of a Curve Pool

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L35

File: contracts/strategies/StrategySwapper.sol   #22

36     event SetSwapViaUniswap(address token, bool swapViaUniswap); // Emitted after a succuessful setting of swap via Uniswap

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/strategies/StrategySwapper.sol#L36

liveactionllama commented 2 years ago

Warden created this issue as a placeholder, because their submission was too large for the contest form. They then emailed their md file to our team and we received at 22:47 UTC on 04/27/2022 (prior to contest close). I've updated this issue with their md file content.

chase-manning commented 2 years ago

I consider this report to be of particularly high quality

liveactionllama commented 2 years ago

Note: my original copy/paste did not capture all of the warden's content. I've updated this issue to now contain the entirety from the original submission. I've also notified the sponsor and judge.

gzeoneth commented 2 years ago

NIce submission, warden covered basically all the low risk and non-critical issues. Would be nice if there is an index.

Low Risk Issues

  1. The first withdrawal for each vault from the vault reserve has no delay
  2. AaveHandler does not extend BaseHandler
  3. Unused receive() function will lock Ether in contract
  4. _prepareDeadline(), _setConfig(), and _executeDeadline() should be private Should be non-critical
  5. Front-runable initializer
  6. safeApprove() is deprecated
  7. Missing checks for address(0x0) when assigning values to address state variables
  8. abi.encodePacked() should not be used with dynamic types when passing the result to a hash function such as keccak256()
  9. Open TODOs Should be non-critical
  10. address.call{value:x}() should be used instead of payable.transfer()
  11. Upgradeable contract is missing a __gap[50] storage variable to allow for new storage variables in later versions
  12. Math library unnecessarily overflows during some operations

    Non-critical Issues

  13. payable function does not reject payments to ERC20 tokens
  14. Adding a return statement when the function defines a named return variable, is redundant
  15. public functions not called by the contract should be declared external instead
  16. constants should be defined rather than using magic numbers
  17. Large multiples of ten should use scientific notation (e.g. 1e6) rather than decimal literals (e.g. 1000000), for readability
  18. Use a more recent version of solidity
  19. Constant redefined elsewhere
  20. Inconsistent spacing in comments
  21. Typos
  22. File is missing NatSpec
  23. NatSpec is incomplete
  24. Event is missing indexed fields