We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@aave/math-utils / 1.28.0
I discovered that the calculation of availableLiquidity in tokens (not in dollars) does not take into account the Borrow cap calculation.
availableLiquidity
Borrow cap
Just console log the data received from this function https://github.com/aave/aave-utilities/blob/master/packages/math-utils/src/formatters/reserve/index.ts#L417
You'll see that availableLiquidity param returned raw from the contract regardless of this calculation https://github.com/aave/aave-utilities/blob/master/packages/math-utils/src/formatters/reserve/index.ts#L138C9-L138C27
I believe that it should return processed from this function, taking into account the calculation (like the availableLiquidityUSD). I also think it makes sense to add these Math.max(availableLiquidity, 0) to availableLiquidity param as you already did in your UI:https://github.com/aave/interface/blob/main/src/modules/reserve-overview/ReserveTopDetails.tsx#L58 .
availableLiquidityUSD
Math.max(availableLiquidity, 0)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
Package name / version
@aave/math-utils / 1.28.0
Description
I discovered that the calculation of
availableLiquidity
in tokens (not in dollars) does not take into account theBorrow cap
calculation.Steps to reproduce
Just console log the data received from this function https://github.com/aave/aave-utilities/blob/master/packages/math-utils/src/formatters/reserve/index.ts#L417
You'll see that
availableLiquidity
param returned raw from the contract regardless of this calculation https://github.com/aave/aave-utilities/blob/master/packages/math-utils/src/formatters/reserve/index.ts#L138C9-L138C27Expected behavior
I believe that it should return processed from this function, taking into account the calculation (like the
availableLiquidityUSD
). I also think it makes sense to add theseMath.max(availableLiquidity, 0)
toavailableLiquidity
param as you already did in your UI:https://github.com/aave/interface/blob/main/src/modules/reserve-overview/ReserveTopDetails.tsx#L58 .The text was updated successfully, but these errors were encountered: