-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Warp Finance Fees #3932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Warp Finance Fees #3932
Changes from 5 commits
fa8f39d
897ee12
a397deb
ac40553
2d64a0e
f2de92a
43ffadf
c694655
aecd50a
557fc4d
3988785
089a839
ae0b4e1
97839ff
d3984f3
0d6a193
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 = '0x312a6be6bD9850D6a2F793b8425c39eFC01C3585'; | ||
|
||
const fetch = async (options: FetchOptions) => { | ||
const dailyFees = options.createBalances(); | ||
const data: any[] = await options.getLogs({ | ||
target: WARPFeeCollector, | ||
eventAbi: FeeCollectedEvent, | ||
}); | ||
data.forEach((log: any) => { | ||
dailyFees.add(log._token, log._integratorFee); | ||
}); | ||
return { dailyFees, dailyRevenue: dailyFees, dailyProtocolRevenue: dailyFees }; | ||
}; | ||
|
||
const methodology = { | ||
Fees: 'All fees paid by users for swap and bridge tokens via LI.FI.', | ||
Revenue: 'Fees are distributed to Warp Finance and creators', | ||
ProtocolRevenue: 'Fees are distributed to Warp Finance.', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as per the one of your tweet, it says 50% revenue will go to token creator and 50% to protocol, is that correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some reason my VScode didnt save the changes. I have updated the repo with import { FetchOptions, SimpleAdapter } from "../../adapters/types"; const FeeCollectedEvent = "event FeesCollected(address indexed _token, address indexed _integrator, uint256 _integratorFee, uint256 _lifiFee)" const WARPFeeCollector = '0x312a6be6bD9850D6a2F793b8425c39eFC01C3585'; const fetch = async (options: FetchOptions) => { const methodology = { const adapter: SimpleAdapter = { export default adapter; |
||
} | ||
|
||
const adapter: SimpleAdapter = { | ||
version: 2, | ||
fetch, | ||
chains: [CHAIN.ETHEREUM], | ||
start: '2023-07-27', | ||
methodology | ||
} | ||
|
||
export default adapter; |
There was a problem hiding this comment.
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?