Skip to content

Commit

Permalink
feat(abracadabra): Add support for compounded ARB reward distribution…
Browse files Browse the repository at this point in the history
… for GM strategies
  • Loading branch information
0xmDreamy committed Dec 13, 2023
1 parent 1c1b188 commit 7c2e2d4
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions src/adaptors/abracadabra/cauldrons.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,26 @@ const BASE_STARGATE_LP_STRATEGIES = {
};

const FEE_COLLECTABLE_STRATEGIES = {
arbitrum: [
'0x39c54bd10261d42ee1838d5fc71dd307dcb39001',
'0xb4fc7be1fc0a6d7b6d5d509c622f56d719cd1373',
'0xf53a003e863ba83424048d729460fba056c06b80',
'0x25ac30195f5b7653ddd7eb93cae6ff5d924cdaf4',
'0x9f026f9edc92150076bb8a0ac44c14a8412c1639',
],
kava: [
'0x30D525cbB79D2baaE7637eA748631a6360Ce7c16'
]
'0x30d525cbb79d2baae7637ea748631a6360ce7c16',
],
}

const STRATEGY_CONFIGURATIONS = {
arbitrum: {
'0x39c54bd10261d42ee1838d5fc71dd307dcb39001': { ignoreTargetPercentage: true }, // All rewards will be yielded regardless of targetPercentage
'0xb4fc7be1fc0a6d7b6d5d509c622f56d719cd1373': { ignoreTargetPercentage: true }, // All rewards will be yielded regardless of targetPercentage
'0xf53a003e863ba83424048d729460fba056c06b80': { ignoreTargetPercentage: true }, // All rewards will be yielded regardless of targetPercentage
'0x25ac30195f5b7653ddd7eb93cae6ff5d924cdaf4': { ignoreTargetPercentage: true }, // All rewards will be yielded regardless of targetPercentage
'0x9f026f9edc92150076bb8a0ac44c14a8412c1639': { ignoreTargetPercentage: true }, // All rewards will be yielded regardless of targetPercentage
}
}

const getMarketLensDetailsForCauldrons = (
Expand Down Expand Up @@ -679,7 +696,12 @@ const getApy = async () => {
}
if (strategyDetails !== undefined) {
const strategy = strategyDetails.address.toLowerCase();
const targetPercentage = strategyDetails.strategyData.targetPercentage;
const strategyConfiguration = _.get(
STRATEGY_CONFIGURATIONS,
[chain, strategy]
);
const ignoreTargetPercentage = strategyConfiguration?.ignoreTargetPercentage === true;
const targetPercentage = ignoreTargetPercentage ? 100 : strategyDetails.strategyData.targetPercentage;
const negativeInterestStrategyApy = _.get(
negativeInterestStrategyApys,
[chain, strategy]
Expand Down

0 comments on commit 7c2e2d4

Please sign in to comment.