Skip to content

Commit

Permalink
fix: surplus APR calculation (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmbronco authored Jul 31, 2024
1 parent a72b08f commit 07fcf6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-plants-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

fixed surplus APR calculation
2 changes: 1 addition & 1 deletion modules/actions/cow-amm/update-surplus-aprs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const updateSurplusAPRs = async () => {
chain: pool.chain,
poolId: pool.id,
apr:
pool.dynamicData.surplus24h === 0
pool.dynamicData.surplus24h <= 0 || pool.dynamicData.totalLiquidity === 0
? 0
: (pool.dynamicData.surplus24h * 365) / pool.dynamicData.totalLiquidity / 100,
}));
Expand Down

0 comments on commit 07fcf6a

Please sign in to comment.