Skip to content

Commit

Permalink
fix spike volume
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Apr 13, 2024
1 parent cc3c1d9 commit 27a1c72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dexs/ipor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ const fetch: any = async (timestamp: number, _: any, { chain, getLogs, createBal
const logsStables = await getLogs({ targets: stables, topic: OpenSwapStablesTopic, eventAbi: openSwapStablesEventAbi });
const logsStETHs = await getLogs({ targets: stETHs, topic: OpenSwapStEthTopic, eventAbi: openSwapStETHEventAbi });
const logs = logsStables.concat(logsStETHs)

logs.forEach(log => {
let balance = Number(log.money?.notional || log.amounts?.notional)
if (log.asset.toLowerCase() === '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'.toLowerCase()) {
balance = balance / 1e18
balance = balance / 1e12
}
if (log.asset.toLowerCase() === '0xdAC17F958D2ee523a2206206994597C13D831ec7'.toLowerCase()) {
balance = balance / 1e10
}
dailyNotionalVolume.add(log.asset, balance)
})
Expand Down

0 comments on commit 27a1c72

Please sign in to comment.