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

ERC4626 for Borrowable Assets - USDC to Aave on Polygon #546

Open
NikMidas opened this issue Jan 17, 2023 · 0 comments
Open

ERC4626 for Borrowable Assets - USDC to Aave on Polygon #546

NikMidas opened this issue Jan 17, 2023 · 0 comments

Comments

@NikMidas
Copy link
Collaborator

NikMidas commented Jan 17, 2023

We should create an integration of AaveV3-4626 for an USDC market on Polygon.
In order to display the supply apy of the aaveV3 4626 we need to call getReserveData on the Pool contract which is https://polygonscan.com/address/0x794a61358D6845594F94dc1DB02A252b5b4814aD#readProxyContract on polygon.
It returns the ReserveData struct which can be found here: https://github.com/aave/aave-v3-core/blob/master/contracts/protocol/libraries/types/DataTypes.sol
In that we want to pull the currentVariableBorrowRate.

This will than give us the borrow apy which we can multiply with all the assets that we deployed into the 4626.
This we can than add to the borrow apy of our market and divide it by the total supply of assets in the market to get the total supply apy.

@NikMidas NikMidas changed the title RESEARCH: 4626 for borrowable assets 4626 for borrowable assets Jan 24, 2023
@peetzweg peetzweg assigned peetzweg and RedVeil and unassigned RedVeil and peetzweg Jan 25, 2023
@peetzweg peetzweg changed the title 4626 for borrowable assets ERC4626 for Borrowable Assets - USDC to Aave on Polygon Jan 25, 2023
@peetzweg peetzweg assigned peetzweg and unassigned RedVeil Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants