Skip to content
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

Peter/fix dex volumes query #1608

Merged
merged 38 commits into from
Nov 22, 2023
Merged

Peter/fix dex volumes query #1608

merged 38 commits into from
Nov 22, 2023

Conversation

peterslany
Copy link
Contributor

This PR fixes incorrect query and calculation of pool volumes. Before this fix, volume of pools was calculated using total trading volume of 2 assets that are in the pool, which resulted in counting volume from other LPs in which the assets are pooled. Therefore, the displayed volume was incorrectly higher.

With this fix, trading volume is counted on per-pool basis. It has shortcoming of not being able to calculate volume for trades where more than one pool is utilized. To account for this edge case, squid data model would have to be refactored.

Copy link

vercel bot commented Nov 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
interbtc-ui-interlay ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2023 2:23pm
interbtc-ui-interlay-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2023 2:23pm
interbtc-ui-kintsugi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2023 2:23pm
interbtc-ui-kintsugi-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2023 2:23pm

Copy link

Running Lighthouse audit...

@peterslany peterslany merged commit 9d98dd5 into master Nov 22, 2023
9 of 10 checks passed
@peterslany peterslany deleted the peter/fix-dex-volumes-query branch November 22, 2023 14:44
tomjeatt added a commit that referenced this pull request Feb 5, 2024
* master: (221 commits)
  chore: release v2.41.5
  chore: bump bridge (#1631)
  chore: release v2.41.4
  api: rewrite python functions in javascript (#1630)
  chore: release v2.41.3
  Switch Bifrost RPC node (#1627)
  chore: release v2.41.2
  api: add dia fair price feed (#1619)
  chore: release v2.41.1
  Tom/update parallel xcm nodes (#1621)
  Tom/hotfix/disable parallel xcm channel (#1620)
  chore: release v2.41.0
  Feat: expose TVLs fetched via lib as part of api endpoints (#1605)
  [release] Interlay 2.40.2 (#1611)
  chore: release v2.40.2
  update staking labels and format valuers (#1609)
  fix: add rewards alert and remove insights (#1607)
  fix: subwallet logo (#1606)
  Peter/fix dex volumes query (#1608)
  [release] Interlay 2.40.1 (#1603)
  ...

# Conflicts:
#	package.json
#	yarn.lock
tomjeatt added a commit that referenced this pull request Feb 5, 2024
* master: (221 commits)
  chore: release v2.41.5
  chore: bump bridge (#1631)
  chore: release v2.41.4
  api: rewrite python functions in javascript (#1630)
  chore: release v2.41.3
  Switch Bifrost RPC node (#1627)
  chore: release v2.41.2
  api: add dia fair price feed (#1619)
  chore: release v2.41.1
  Tom/update parallel xcm nodes (#1621)
  Tom/hotfix/disable parallel xcm channel (#1620)
  chore: release v2.41.0
  Feat: expose TVLs fetched via lib as part of api endpoints (#1605)
  [release] Interlay 2.40.2 (#1611)
  chore: release v2.40.2
  update staking labels and format valuers (#1609)
  fix: add rewards alert and remove insights (#1607)
  fix: subwallet logo (#1606)
  Peter/fix dex volumes query (#1608)
  [release] Interlay 2.40.1 (#1603)
  ...

# Conflicts:
#	package.json
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants