Skip to content

Commit

Permalink
Merge pull request #1934 from whichghost/add-polter-base
Browse files Browse the repository at this point in the history
add polter base
  • Loading branch information
dtmkeng committed Sep 21, 2024
2 parents 7c3bc71 + c4d4585 commit d1892cc
Showing 1 changed file with 71 additions and 40 deletions.
111 changes: 71 additions & 40 deletions fees/polter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,70 @@ const headers: THeader = {
const RECORDS_PER_PAGE = 1000
const endpoints: any = {
[CHAIN.FANTOM]: "https://api.studio.thegraph.com/query/71811/polter/version/latest",
[CHAIN.BASE]: "https://api.studio.thegraph.com/query/71811/polter-base/version/latest",
};

const tokens: any = {
'0x5c725631fd299703d0a74c23f89a55c6b9a0c52f': {
gecko: 'polter-finance',
decimals: 18
},
'0xbbce4b1513d4285bd7a59c2c63835535151c8e7c': {
gecko: 'fantom',
decimals: 18
},
'0x5a75a5f3a637cc9394816efc553d102302d4cfcd': {
gecko: 'usd-coin',
decimals: 6
},
'0xa826b29d81caef8c9aa212f172ab3ef00566e91e': {
gecko: 'magic-internet-money',
decimals: 18
},
'0x4bf6f3210488091a0111daf7ab7cf840a3af8022': {
gecko: 'stader-sftmx',
decimals: 18
},
'0x0299553df0fa396c0f6f3456d293608e189c3cf3': {
gecko: 'solana',
decimals: 18
},
'0xb49da25f726451ba0e7c7e1c0b273322d2656514': {
gecko: 'layerzero-usdc',
decimals: 6
},
'0xc60f08059586849810d9c19c67919d2d99174ecf': {
gecko: 'axlusdc',
decimals: 6
},
'0xa37e0d5590436bd9abd2803c18c328a650b236ee': {
gecko: 'bitcoin',
decimals: 8
fantom: {
'0x5c725631fd299703d0a74c23f89a55c6b9a0c52f': {
gecko: 'polter-finance',
decimals: 18
},
'0xbbce4b1513d4285bd7a59c2c63835535151c8e7c': {
gecko: 'fantom',
decimals: 18
},
'0x5a75a5f3a637cc9394816efc553d102302d4cfcd': {
gecko: 'usd-coin',
decimals: 6
},
'0xa826b29d81caef8c9aa212f172ab3ef00566e91e': {
gecko: 'magic-internet-money',
decimals: 18
},
'0x4bf6f3210488091a0111daf7ab7cf840a3af8022': {
gecko: 'stader-sftmx',
decimals: 18
},
'0x0299553df0fa396c0f6f3456d293608e189c3cf3': {
gecko: 'solana',
decimals: 18
},
'0xb49da25f726451ba0e7c7e1c0b273322d2656514': {
gecko: 'layerzero-usdc',
decimals: 6
},
'0xc60f08059586849810d9c19c67919d2d99174ecf': {
gecko: 'axlusdc',
decimals: 6
},
'0xa37e0d5590436bd9abd2803c18c328a650b236ee': {
gecko: 'bitcoin',
decimals: 8
},
'0x328c7a684f160c089ebff07ff1b5a417f024979e': {
gecko: 'bridged-wrapped-ether-stargate',
decimals: 18
}
},
'0x328c7a684f160c089ebff07ff1b5a417f024979e': {
gecko: 'bridged-wrapped-ether-stargate',
decimals: 18
}
base: {
'0xa0820613976b441e2c6a90e4877e2fb5f7d72552': {
gecko: 'polter-finance',
decimals: 18
},
'0xca4e076c6d8a84a990986a3c405093087991a8fe': {
gecko: 'ethereum',
decimals: 18
},
'0x2a96e27e204ef366671232df28f147fa30e735ce': {
gecko: 'coinbase-wrapped-btc',
decimals: 8
},
'0x1ddaeebbd69dccc92f5cf76593104976b9c62434': {
gecko: 'usd-coin',
decimals: 6
}
}
}


Expand Down Expand Up @@ -99,7 +120,7 @@ const fetch: FetchV2 = async ({ chain, startTimestamp, endTimestamp, createBalan
rewardsPaids.push(...rewardsPaid)
}
rewardsPaids.forEach((reward: RewardsPaid) => {
const {gecko, decimals} = tokens[reward.rewardsToken]
const {gecko, decimals} = tokens[chain][reward.rewardsToken]
if (!gecko) {
return
}
Expand All @@ -126,6 +147,16 @@ const adapter: Adapter = {
}
}
},
[CHAIN.BASE]: {
fetch: fetch,
start: 19746482, // Sep-14-2024 02:51:51 AM +UTC
meta: {
methodology: {
Fees: "lockers' revenue = stakers' revenue + 50% penalty from early exit",
Revenue: "depositors' revenue from borrow interests",
}
}
},
},
}

Expand Down

0 comments on commit d1892cc

Please sign in to comment.