- Document potential edge cases for hook receiver contracts
- Document token behavior restrictions
- Full test suite is recommended
- Kyber getRates code is unclear
- Return value is not used for
TokenUtils.withdrawTokens
- Missing access control for
DefiSaverLogger.Log
- Remove stale comments
- Discrepancy between code and comments
- Remove unnecessary call to
DAOfiV1Factory.formula()
- Deeper validation of curve math
GovernorAlpha
proposals may be canceled by the proposer, even after they have been accepted and queued- Require a delay period before granting
KYC_ADMIN_ROLE
Acknowledged - Improve inline documentation and test coverage
- Unspecific compiler version pragma
- Use of hardcoded gas limits can be problematic
- Anyone can steal all the funds that belong to
ReferralFeeReceiver
- Unpredictable behavior for users due to admin front running or general bad timing
- Improve system documentation and create a complete technical specification
- Ensure system states, roles, and permissions are sufficiently restrictive
- Evaluate all tokens prior to inclusion in the system
- Use descriptive names for contracts and libraries
- Prevent contracts from being used before they are entirely initialized
- Potential resource exhaustion by external calls performed within an unbounded loop
- Owners can never be removed
- Potential manipulation of stable interest rates using flash loans
- Only whitelist validated assets
- Underflow if
TOKEN_DECIMALS
are greater than 18 - Chainlink's performance at times of price volatility
- Consider an iterative approach to launching. Be aware of and prepare for worst-case scenarios
- Use of modifiers for repeated checks
- Switch modifier order
- Address codebase fragility
- Reentrancy could lead to incorrect order of emitted events
- Variable shadowing from OUSD to ERC20
- VaultCore.rebase functions have no return statements
- Multiple contracts are missing inheritances
- Solidity compiler optimizations can be dangerous
- Permission-granting is too simplistic and not flexible enough
- Lack of validation when setting the maturity value
- Delegates can be added or removed repeatedly to bloat logs
- Lack of events for critical operations
_assertStakingPoolExists
never returns truemin*
andmax*
have unorthodox semanticsCurveFactory.newCurve
returns existing curves without provided arguments- Missing zero-address checks in
Curve.transferOwnership
andRouter.constructor
safeApprove
does not check return values for approve call- ERC20 token Curve does not implement symbol, name, or decimals
- Insufficient use of
SafeMath
setFrozen
can be front-run to deny deposits-swaps- Account creation spam
- Using empty functions instead of interfaces leaves contract error-prone
cancelTransaction
can be called on non-queued transaction- Contracts used as dependencies do not track upstream changes
- Expected behavior regarding authorization for adding tokens is unclear
- Contract name duplication leaves codebase error-prone
- Use of hard-coded addresses may cause errors
- Borrow rate depends on approximation of blocks per year
- Flash loan rate lacks bounds and can be set arbitrarily
- Logic duplicated across code
- Insufficient testing
- Project dependencies contain vulnerabilities
- Lack of contract documentation makes codebase difficult to understand
- ABIEncoderV2 is not production-ready
- Contract owner has too many privileges
- Poor error-handling practices in test suite
- Redundant and Unused Code
- Single Account Can Capture All Supply
- Insufficient Input Validation
- Unused Event Logs
- Possible Unintended Token Burning in
transferFrom()
Function - Denial of Service Vector from Unbound List
- ERC20 Implementation Vulnerable to Front-Running
- Unnecessary
require
Statement - Rounding to Zero if Duration is Greater Than Reward
- Withdrawn Event Log Poisoning
- Insufficient incentives to liquidator
- Markets can become insolvent
- Not using OpenZeppelin contracts
- Lack of indexed parameters in events
- Named return variables
- block.timestamp Unreliable
- Assignment in
require
statement - Commented code
- Misleading
revert
messages - Multiple outdated Solidity versions in use
- Test and production constants in the same codebase
- Unnecessarily small integer sizes
- Use of
uint
instead ofuint256
- Functions with unexpected side-effects
- Unsafe casting
- Unsafe division in
rdivide
andwdivide
functions - Uncommented assembly block
- Unnecessary
require
statements - Unnecessary event emission
oToken
can be created with a non-whitelisted collateral asset- Mismatches between contracts and interfaces
- Actions not executed atomically might lead to inconsistent state
- Chainlink pricer is using a deprecated API
- Funds can be lost
- Use
delete
to clear variables