Skip to content

Commit

Permalink
Merge pull request #64 from harvestfi/update-merkle-apy
Browse files Browse the repository at this point in the history
fix: update merkle apy calculation
  • Loading branch information
CryptJS13 authored Sep 18, 2024
2 parents 9e99454 + bc58eef commit 500cd63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vaults/apys/implementations/merkl.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const getApy = async (underlying, poolAddress, chainId, reduction) => {

try {
response = await axios.get(`${MERKL_ENDPOINT}?chainIds[]=${chainId}`)
apy = get(response, `data.${chainId}.pools.${poolAddress}.alm.${underlying}.almAPR`, 0)
const aprLabel = `Gamma ${underlying}`
apy = get(response, `data.${chainId}.pools.${poolAddress}.aprs.${aprLabel}`, 0)
apy = parseFloat(apy) * parseFloat(reduction)
} catch (err) {
console.error('MERKL API error: ', err)
Expand Down

0 comments on commit 500cd63

Please sign in to comment.