File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ import { FetchOptions , SimpleAdapter } from "../adapters/types" ;
2+ import { CHAIN } from "../helpers/chains" ;
3+
4+ const ClaimedEvent = "event Claimed(uint256 indexed amount)" ;
5+ // BridgeInterestReceiver Contract
6+ const contract = "0x670daeaf0f1a5e336090504c68179670b5059088" ;
7+
8+ const fetch = async ( options : FetchOptions ) => {
9+ const dailyFees = options . createBalances ( ) ;
10+
11+ const data : any [ ] = await options . getLogs ( {
12+ target : contract ,
13+ eventAbi : ClaimedEvent ,
14+ } ) ;
15+ data . forEach ( ( log : any ) => {
16+ dailyFees . addGasToken ( log . amount ) ;
17+ } ) ;
18+
19+ return {
20+ dailyFees : dailyFees ,
21+ dailyRevenue : 0 ,
22+ dailySupplySideRevenue : dailyFees ,
23+
24+ } ;
25+ } ;
26+
27+ const adapter : SimpleAdapter = {
28+ version : 2 ,
29+ methodology : {
30+ Fees : 'Yield generated from MakerDAO DSR on bridged assets' ,
31+ Revenue : 'No revenue' ,
32+ SupplySideRevenue : 'Total yield is distributed to sDAI holders' ,
33+ } ,
34+ fetch,
35+ adapter : {
36+ [ CHAIN . XDAI ] : {
37+ start : "2023-09-28" ,
38+ } ,
39+ } ,
40+ } ;
41+
42+ export default adapter ;
You can’t perform that action at this time.
0 commit comments