Skip to content
Draft
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions fees/WarpFinance/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { FetchOptions, SimpleAdapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";

const FeeCollectedEvent = "event FeesCollected(address indexed _token, address indexed _integrator, uint256 _integratorFee, uint256 _lifiFee)"

const WARPFeeCollector = '0x86A74536f7C5548EFE9e935863eA7bE333380288';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no event named FeesCollected in the FeeCollector contract


const fetch = async (options: FetchOptions) => {
const dailyFees = options.createBalances();
const data: any[] = await options.getLogs({
target: WARPFeeCollector,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's Incorrect way to track the fees for Li.Fi wrappers. _integratorFee is the Fee for Li.FI so please fix that, or does Li.Fi charge same fee as integrator?

eventAbi: FeeCollectedEvent,
});
data.forEach((log: any) => {
dailyFees.add(log._token, log._integratorFee);
});
return { dailyFees, dailyRevenue: dailyFees, dailyProtocolRevenue: dailyFees };
};

const methodology = {
Fees: 'There is no fees in creating tokens. Creators pay Network fees only.',
Revenue: 'Revenue is generated via V3 Uniswap buy/sell 50% creators & 50% to Warp Finance.',
ProtocolRevenue: 'V3 Trading Fees are distributed to Warp Finance.',
}

const adapter: SimpleAdapter = {
version: 2,
fetch,
chains: [CHAIN.ETHEREUM],
start: '2023-07-27',
methodology
}

export default adapter;