Skip to content

Static aTokens for Aave v3, based on value increase (exchange rate based) instead of balance increase

License

Notifications You must be signed in to change notification settings

ERC4626-Alliance/static-a-token-v3

 
 

Repository files navigation

stataToken - Static aToken vault/wrapper

Disclaimer

About

This repository contains an EIP-4626 generic token vault/wrapper for all Aave v3 pools.

Features

  • Full EIP-4626 compatibility.
  • Accounting for any potential liquidity mining rewards. Let’s say some team of the Aave ecosystem (or the Aave community itself) decides to incentivize deposits of USDC on Aave v3 Ethereum. By holding stataUSDC, the user will still be eligible for those incentives. It is important to highlight that while currently the wrapper supports infinite reward tokens by design (e.g. AAVE incentivizing stETH & Lido incentivizing stETH as well), each reward needs to be permissionlessly registered which bears some ⁽¹⁾.
  • Meta-transactions support. To enable interfaces to offer gas-less transactions to deposit/withdraw on the wrapper/Aave protocol (also supported on Aave v3). Including permit() for transfers of the stataAToken itself.
  • Upgradable by the Aave governance. Similar to other contracts of the Aave ecosystem, the Level 1 executor (short executor) will be able to add new features to the deployed instances of the stataTokens.
  • Powered by a stataToken Factory. Whenever a token will be listed on Aave v3, anybody will be able to call the stataToken Factory to deploy an instance for the new asset, permissionless, but still assuring the code used and permissions are properly configured without any extra headache.

See IStaticATokenLM.sol for detailed method documentation.

Deployed Addresses

The staticATokenFactory is deployed for all major Aave v3 pools. An up to date address can be fetched from the respective address-book pool library.

Limitations

The stataToken is not natively integrated into the aave protocol and therefore cannot hook into the emissionManager. This means a reward added after statToken creation needs to be registered manually on the token via the permissionless refreshRewardTokens() method. As this process is not currently automated users might be missing out on rewards until the method is called.

Security procedures

For this project, the security procedures applied/being finished are:

  • The test suite of the codebase itself.
  • Certora audit/property checking for all the dynamics of the stataToken, including respecting all the specs of EIP-4626.

Development

This project uses Foundry. See the book for detailed instructions on how to install and use Foundry. The template ships with sensible default so you can use default foundry commands without resorting to MakeFile.

Setup

cp .env.example .env
forge install

Test

forge test

About

Static aTokens for Aave v3, based on value increase (exchange rate based) instead of balance increase

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 98.6%
  • Makefile 1.4%