Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pindexer(dex_ex): fix volume calculation in
Candle::flip
(#4981)
## Describe your changes This fixes two bugs in pindexer: 1. Volumes in aggregate and per pair summary were far too high. 2. The different windows of the aggregate summary all reported the same value. Bug 1. stemmed from multiplying by a price rather than dividing by it when mixing two directions of a candle. Bug 2. was just a missing filter in an SQL query. To test, run pindexer again, and do some sanity checks on the aggregate summary, and pair summaries for pairs like USDC / UM. ## Checklist before requesting a review - [x] I have added guiding text to explain how a reviewer should test these changes. - [x] 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 --------- Co-authored-by: Erwan Or <erwanor@penumbralabs.xyz>
- Loading branch information