Alpha Homora v2 on Avalanche #OE-10#67
Conversation
|
|
|
And constants please in all upper case (with underscores). |
|
|
uwe
left a comment
There was a problem hiding this comment.
On the Lend pools it is unclear how we could calculate the APY. For example "AVAX" shows 3.81% Earn APY, 1.60% Avax APR and 1.83 ALPHA.e APR.
Can you please explain that for one pool and current data from the web site?
| ] | ||
| */ | ||
|
|
||
| export const poolRegistry: Array<string[]> = [ |
There was a problem hiding this comment.
Where is this coming from? Can't we get this via web3 calls (or by listening to some events)?
The web site lists 18 pools, but here are only 16.
There was a problem hiding this comment.
will commit change to this static list soon, going to make it dynamic
| chef: String! | ||
| } | ||
|
|
||
| type AlphaHomoraV2FarmData @entity { |
There was a problem hiding this comment.
How can we get the TVL for a farm?
There was a problem hiding this comment.
TVL for farm data be obtained by multiplying the LP tokens locked value by the usd value of the lp token
There was a problem hiding this comment.
@d-fda is this a problem? I think we can get prices for "real" tokens (like "AVAX"), but not for LP tokens.
e40c24a to
bedb813
Compare
| chef: String! | ||
| } | ||
|
|
||
| type AlphaHomoraV2FarmData @entity { |
There was a problem hiding this comment.
@d-fda is this a problem? I think we can get prices for "real" tokens (like "AVAX"), but not for LP tokens.
| } else { | ||
| decimals = decimalsResult.value; | ||
| } | ||
| decimals = BigInt.fromI32(decimals).toI32(); |
There was a problem hiding this comment.
Why is this needed? What does it do?
There was a problem hiding this comment.
accidentally left line 45 in, is not needed.
make sure multiplication is done before subtracting reward debt
Fixes #OE-10
PR Checklist