Skip to content

Commit

Permalink
sushi
Browse files Browse the repository at this point in the history
  • Loading branch information
waynebruce0x committed Mar 6, 2024
1 parent 08a37be commit 9a57798
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
2 changes: 0 additions & 2 deletions dexs/sushiswap/classic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,4 @@ classic[CHAIN.FANTOM] = {
start: 0
}

classic.version = 2

export default classic
1 change: 1 addition & 0 deletions dexs/sushiswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import classic from './classic'
import v3 from './v3'

const adapter: BreakdownAdapter = {
version: 2,
breakdown: {
classic: classic,
trident: trident,
Expand Down
36 changes: 19 additions & 17 deletions dexs/sushiswap/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,25 @@ const startTimeV3: {[key: string]: number} = {
[CHAIN.BASE]: 1691020800,
}

const v3: SimpleAdapter = { adapter: {}, version: 2 }

Object.keys(endpointsV3).map((chain: string) => {
v3.adapter[chain] = {
fetch: v3Graphs(chain as Chain),
start: startTimeV3[chain],
meta: {
methodology: {
Fees: "Each pool charge between 0.01% to 1% fee",
UserFees: "Users pay between 0.01% to 1% fee",
Revenue: "0 to 1/4 of the fee goes to treasury",
HoldersRevenue: "None",
ProtocolRevenue: "Treasury receives a share of the fees",
SupplySideRevenue: "Liquidity providers get most of the fees of all trades in their pools"
const v3 = Object.keys(endpointsV3).reduce(
(acc, chain) => ({
...acc,
[chain]: {
fetch: v3Graphs(chain as Chain),
start: startTimeV3[chain],
meta: {
methodology: {
Fees: "Each pool charge between 0.01% to 1% fee",
UserFees: "Users pay between 0.01% to 1% fee",
Revenue: "0 to 1/4 of the fee goes to treasury",
HoldersRevenue: "None",
ProtocolRevenue: "Treasury receives a share of the fees",
SupplySideRevenue: "Liquidity providers get most of the fees of all trades in their pools"
}
}
}
}
})
},
}),
{}
);

export default v3

0 comments on commit 9a57798

Please sign in to comment.