From f3a7bd6b2a01a2995ca2f633ff0a5835429a4ec5 Mon Sep 17 00:00:00 2001 From: harisang Date: Tue, 12 Nov 2024 00:21:28 +0200 Subject: [PATCH] add comments --- .../price_feed/raw_price_feed_query_4252674.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cowprotocol/accounting/price_feed/raw_price_feed_query_4252674.sql b/cowprotocol/accounting/price_feed/raw_price_feed_query_4252674.sql index df693efa..6117c01f 100644 --- a/cowprotocol/accounting/price_feed/raw_price_feed_query_4252674.sql +++ b/cowprotocol/accounting/price_feed/raw_price_feed_query_4252674.sql @@ -1,3 +1,18 @@ +-- This query parses the raw price_feed table that we sync on Dune, +-- and returns a view that is based on hourly prices, similar to +-- how the Dune price feed is used for slippage accounting +-- +-- Parameters: +-- {{blockchain}} - network to run the analysis on; currently it only works for mainnet +-- +-- The columns of the result are +-- - token_address: a token +-- - hour: the hour for which a price is computed +-- - decimals: the decimals of the token +-- - source: the source from which this price was computed, +-- price_unit: the price, in USD, of one unit of the token +-- - price_atom: the price, in USD, of one atom of the token + with imported_prices as ( select token_address,