[AAVE] ERC20 Token Smart Contract Domain Community Assessment
General Information
- Symbol: AAVE
-
Address(es):
- InitializableAdminUpgradeabilityProxy (Token Proxy): 0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9
- AaveToken (Implementation): 0xea86074fdac85e6a605cd418668c63d2716cdfbc
- InitializableAdminUpgradeabilityProxy (Migrator Proxy): 0x317625234562B1526Ea2FaC4030Ea499C5291de4
- LendToAaveMigrator (Implementation): 0x86241b6c526998582556F7C0342D8863b604B17b
-
Deployment Date:
- AaveToken Proxy: Sep-24-2020 06:06:28 PM +UTC
- AaveToken Implementation: Sep-24-2020 06:05:36 PM +UTC
- LendToAaveMigrator Proxy: Sep-24-2020 06:07:36 PM +UTC
- LendToAaveMigrator Implementation: Sep-24-2020 06:07:12 PM +UTC
- Total supply: 16,000,000 AAVE
- Developers allotment: 3,000,000 AAVE (Aave Ecosystem Reserve)
- Project website: https://aave.com/
- Github repository: https://github.com/aave/aave-token
- Can use existing MCD collateral type adapter? No, it needs a custom adapter
Risk Summary
-
Does the contract implement the ERC20 token standards?
Yes, the contract implements all the required ERC20 functions. - Risk analysis: MEDIUM
Technical Information
- Compiler version: v0.6.10+commit.00c0fcaf
- Decimals: 18
- Overflow checks: Yes, the contract inherits SafeMath uint256 Library from OpenZeppelin
- Mitigation against allowance race-condition: Yes, via increaseAllowance and decreaseAllowance functions.
- Upgradeable contract patterns: Yes, the contract is upgradable.
- Access control or restriction lists: No
- Non-standard features or behaviors: permit function, snapshot hook on _transfer, _mint and _burn functions, ability to upgrade the contract.
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, aaveGovernance.onTransfer inside the snapshot hook
Testnet Information
Ropsten: 0x73317bcCDD6186B705c07F8306d5121011F84698
Rinkeby: 0xf8e64B6A75b2508f8d9F7C6643D314440111fB81
AAVE networks deployment information: https://github.com/aave/aave-token#development-deployment
Contract Logic Summary
At its core the implementation is a standard erc20 contract which uses SafeMath module form OpenZeppelin.
The contract also implements permit function and snapshot hook on _transfer, _mint and _burn functions that includes an external call, onTransfer, to Aave Governance contract.
Administrative Addresses
Below is a list of addresses related to token management:
domain separator: 0x2901a982e363189e3f2e4db2e5c3291fa1067b815a3ac9890ac6573e51bf33b0
permit typehash: 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9
Governance:
- AaveProtoGovernance: 0x8a2Efd9A790199F4c94c6effE210fce0B4724f52
- AssetVotingWeightProvider: 0x5aC493b8C2cEf1F02F117B9BA2797e7DA95574aa
- AavePropositionPower: 0x72BbcFC20d355Fc3E8aC4Ce8FcAF63874F746631
- GovernanceParamsProvider: 0xF7Ff0aee0c2D6fBdeA3A85742443e284B62fd0b2
Contract Risk Summary
This is a medium risk contract. The ERC20 functions are implemented to the industry standard, although approve does have a race condition that can be mitigated via increaseAllowance and decreaseAllowance functions. The contract makes use of SafeMath Library from OpenZeppelin to prevent integer underflow and overflow. AAVE is a governance token that includes a migrator for LEND token.
Supporting Materials
https://docs.aave.com/aavenomics/flashpaper
Tests
Architecture Diagram
Inheritance Diagram
Sūrya’s Description Report
Files Description Table
File Name | SHA-1 Hash |
---|---|
AaveToken.sol | e4da71e2ded330e1ac6707b184643fdcd9f32d98 |
LendToAaveMigrator.sol | b23cf6990c1788bf50df036640556b3fe144de27 |
Contracts Description Table
Contract | Type | Bases | ||
---|---|---|---|---|
└ | Function Name | Visibility | Mutability | Modifiers |
AaveToken | Implementation | ERC20, VersionedInitializable | ||
└ | Public ![]() |
![]() |
ERC20 | |
└ | initialize | External ![]() |
![]() |
initializer |
└ | permit | External ![]() |
![]() |
NO❗️ |
└ | getRevision | Internal ![]() |
||
└ | _writeSnapshot | Internal ![]() |
![]() |
|
└ | _beforeTokenTransfer | Internal ![]() |
![]() |
|
LendToAaveMigrator | Implementation | VersionedInitializable | ||
└ | Public ![]() |
![]() |
NO❗️ | |
└ | initialize | Public ![]() |
![]() |
initializer |
└ | migrationStarted | External ![]() |
NO❗️ | |
└ | migrateFromLEND | External ![]() |
![]() |
NO❗️ |
└ | getRevision | Internal ![]() |
Legend
Symbol | Meaning |
---|---|
![]() |
Function can modify state |
![]() |
Function is payable |