From d7e531928448470f0608e05e1744b55c3fe30219 Mon Sep 17 00:00:00 2001 From: Erwan Or Date: Sat, 11 Jan 2025 16:44:03 -0500 Subject: [PATCH] pindexer(dex_ex): note about volume tracking --- crates/bin/pindexer/src/dex_ex/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/bin/pindexer/src/dex_ex/mod.rs b/crates/bin/pindexer/src/dex_ex/mod.rs index 932cd305ea..4bbe4c6233 100644 --- a/crates/bin/pindexer/src/dex_ex/mod.rs +++ b/crates/bin/pindexer/src/dex_ex/mod.rs @@ -50,8 +50,9 @@ mod candle { impl Candle { pub fn from_candlestick_data(data: &CandlestickData) -> Self { - // We want the direct volume in the other direction, and we consistently - // use the closing price as a conversion for that. + // The volume is tracked in terms of input asset. + // We can use the closing price (aka. the common clearing price) to convert + // the volume to the other direction i.e, the batch swap output. Self { open: data.open, close: data.close,