Skip to content

Commit

Permalink
feat(factor-v2): add olive strategy-adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasriat committed Nov 29, 2023
1 parent 1e37741 commit 91d65d9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/adaptors/factor-v2/strategy-adapter/olive-adapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { getAprFromDefillamaPool } = require('./utils');
const { apy } = require('../../beefy');

async function getOliveApr() {
const beefyApr = await getAprFromDefillamaPool(
apy,
'0x9dbbbaecacedf53d5caa295b8293c1def2055adc'
);

const ampFactor = 1.33;
const weeksPerYear = 365 / 7;
const oliveBoost = 0.05;
const apr =
(1 + (beefyApr * ampFactor) / weeksPerYear) ** weeksPerYear -
1 +
oliveBoost;

return apr * 100;
}

module.exports = { getOliveApr };

0 comments on commit 91d65d9

Please sign in to comment.