Skip to content

Commit

Permalink
Merge pull request #2288 from DefiLlama/volboost
Browse files Browse the repository at this point in the history
add volboost
  • Loading branch information
dtmkeng authored Jan 8, 2025
2 parents 35e4c05 + da313c8 commit 3ab2f1f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions fees/volboost.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { FetchOptions, SimpleAdapter } from "../adapters/types";
import { CHAIN } from "../helpers/chains"
import { addTokensReceived } from "../helpers/token";

const contracts: any = {
[CHAIN.ETHEREUM]: '0x3b18167886fc10dc1FDE2e5dD9d5afD36f40f538',
[CHAIN.BSC]: '0x3b18167886fc10dc1FDE2e5dD9d5afD36f40f538',
[CHAIN.BASE]: '0x3b18167886fc10dc1FDE2e5dD9d5afD36f40f538',
}

const chains = [
CHAIN.ETHEREUM,
CHAIN.BASE,
CHAIN.BSC,
];

const fetchFees = async (options: FetchOptions) => {
const dailyFees = await addTokensReceived({
options,
target: contracts[options.chain],
});
dailyFees.resizeBy(0.5)
return {
dailyFees,
dailyRevenue: dailyFees,
};
};

const adapter: SimpleAdapter = {
version: 2,
adapter: chains.reduce((acc, chain) => {
return {
...acc,
[chain]: {
fetch: fetchFees,
},
};
}, {}),
};

export default adapter;

0 comments on commit 3ab2f1f

Please sign in to comment.