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

pindexer: dex_ex: calculate USDC volume continuously #4987

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

cronokirby
Copy link
Contributor

This adds a field to the low level snapshot used to derive other metrics, which captures the current price of a given asset relative to USDC (configurable to an arbitrary indexing denom).

This then allows a pair summary to have a more accurate view of the volume in USDC terms, and for the aggregate summary to thus have a more accurate view.

As a side-effect, this also gets rid of liquidity minimums for considering denoms in the aggregate summary.

To test, run pindexer again, compare the aggregate summary, and then check that the converted volume is about the same.

Checklist before requesting a review

  • I have added guiding text to explain how a reviewer should test these changes.

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    indexing only

This adds a field to the low level snapshot used to derive other
metrics, which captures the current price of a given asset relative to
USDC (configurable to an arbitrary indexing denom).

This then allows a pair summary to have a more accurate view of the
volume in USDC terms, and for the aggregate summary to thus have a more
accurate view.

As a side-effect, this also gets rid of liquidity minimums for
considering denoms in the aggregate summary.
@conorsch
Copy link
Contributor

To test, run pindexer again, compare the aggregate summary, and then check that the converted volume is about the same.

I haven't done this, I'm merging optimistically, and will reindex when other pindexer changes (e.g. #4990) land.

@conorsch conorsch merged commit 639c799 into main Jan 16, 2025
15 checks passed
@conorsch conorsch deleted the volume-indexing branch January 16, 2025 17:30
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.

3 participants