Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add STETH to Aave V2 #267

Open
wants to merge 63 commits into
base: fat-deployment
Choose a base branch
from

Conversation

Psirex
Copy link

@Psirex Psirex commented Jan 19, 2022

Lido's stETH represents the user’s staked ETH balance of the beacon chain along with staking rewards accrued or penalties inflicted on validators in the beacon chain.

Due to the rebasing nature of stETH, the proposed listing implementation involves few changes to AAVE’s generic aToken.
The proposed aToken uses underlying stETH shares to store balances and implement the rebase ability. Thus, it has 2 private balances and 1 public balance.

  • The internal (fixed-supply) balance and total supply are used for book-keeping. The deposited balance is stored in stETH shares and converted into the amount of the tokens with functions from stETH. Users’ balances are book-kept with the underlying ERC20 token.
  • The internal (elastic-supply) balance and total supply correspond to the deposited balance without accrued interest. Rebasing of aSTETH according to stETH happens in this layer.
  • The external (elastic-supply) balance and total supply correspond to the deposited balance with interest.
    Externally, the aSTETH behaves similar to every other aToken. It always maintains a 1:1 peg with the underlying stETH.

The current implementation doesn’t support borrowing, neither with variable nor with stable interest rates. The stableDebtSTETH and variableDebtSTETH contracts extend default stableDebtToken and variableDebtToken contracts accordingly to make it impossible to use borrowing with aSTETH because default debt tokens are not compatible with the AStETH contract.

Implementation has been audited by MixBytes: https://github.com/lidofinance/audits/blob/main/MixBytes%20AAVE%20stETH%20integration%20Security%20Audit%20Report%2002-22.pdf

To deploy AStETH, VariableDebtStETH, StableDebtStETH, and DefaultReserveInterestRateStrategy used standalone deployment script https://github.com/lidofinance/aave-asteth-deployment .

Psirex added 28 commits January 19, 2022 16:25
stEthAddress,
treasuryAddress,
'Aave interest bearing stETH',
`astETH`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The final tokens have different name and symbols. Could you please update their scripts to reflect the final tokens' configurations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants