Aave.

Пост

Поделитесь своими знаниями.

Aaveator.
Feb 07, 2023
Экспертные Вопросы и Ответы

Which ABI to call to get the APY from the supply and borrow?

Hey!

Which ABI to call to get the APY from the supply and borrow?

  • Aave Protocol
1
2
Поделиться
Комментарии
.

Ответы

2
0x8744...6532.
Feb 8 2023, 20:38

You can call getReservesData or getReserveData on the aaveProtocolDataProvider contract, on the pool, or on the UiPoolDataProvider.

These will return a lot of data including:

  • currentLiquidityRate: current supply rate. Expressed in ray
  • currentVariableBorrowRate: current variable borrow rate. Expressed in ray
  • currentStableBorrowRate: current stable borrow rate. Expressed in ray

A ray is a unit with 27 decimals of precision. All the rates (liquidity/borrow/utilisation rates) as well as the cumulative indexes and the aTokens exchange rates are expressed in Ray.

0
Лучший ответ
Комментарии
.
Aaveator.
Feb 14 2023, 11:46

You can call getReserveData on the Pool contract to get rates for a single asset or getReservesData on the UiPoolDataProvider contract to fetch rates for all assets at once. More details here;

0
Комментарии
.

Знаете ответ?

Пожалуйста, войдите в систему и поделитесь им.

Мы используем файлы cookie, чтобы гарантировать вам лучший опыт на нашем сайте.
Подробнее