- Symbol: COMP
- Address: https://etherscan.io/address/0xc00e94cb662c3520282e6f5717214004a7f26888#code
- Deployment Date: March 4, 2020
- Total supply: 10,000,000
- Developers allotment: 5,770,051 (reservoir distribution contract initially had 4,229,949)
- Project website: https://compound.finance/
- Github repository: https://github.com/compound-finance/
- Can use existing MCD collateral type adapter? Yes, the GemJoin adapter
- Does the contract implement the ERC20 token standards?
Yes, the contract implements all the required ERC20 functions.
- Risk analysis: Low
- Compiler version: v0.5.16+commit.9c3226ce
- Decimals: 18
- Overflow checks: Yes, the contract has custom safe Integer and add functions
- Mitigation against allowance race-condition: No, the approve function has a race condition
- Upgradeable contract patterns: No
- Access control or restriction lists: No
- Non-standard features or behaviors: voting, and vote delegation related functions
Formal Verification Considerations:
- Does transfer have simple semantics? Yes
- Does transferFrom have simple semantics? Yes
- Can balances be arbitrarily modified by some actor? No
- Are there any external calls? Yes, voting functions and erc20 functions are external.
Rinkeby testnet address: 0xd6801a1dffcd0a410336ef88def4320d6df1883e
compound networks deployment information: https://compound.finance/docs#networks
Contract Logic Summary
At its core the implementation is a standard erc20 contract which uses the custom safe integer and add functions.
The contract also implements various voting, and vote delegation functions.
Below is a list of addresses related to token management:
delegation typehash: 0xe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf
domain typehash: 0x8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866
Contract Risk Summary
This is a low risk contract. The ERC20 functions are implemented to the industry standard, although approve does have a race condition. The contract makes use of custom functions to prevent integer underflow and overflow. A number of voting functions are also implemented as COMP is a governance token.
Contracts Description Table
|Function can modify state|
|Function is payable|