Skip to content

Commit b252b86

Browse files
committed
tweak eth/usd rate pull for protocol stats
1 parent 9879f74 commit b252b86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mainnet/processors/protocol/protocol-sql-simple.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const upsertProtocolDailyStats = async (ctx: Context, fromDate: string) => {
205205
COALESCE((
206206
SELECT rate
207207
FROM exchange_rate
208-
WHERE pair = 'ETH_USD'
208+
WHERE pair = 'OETH_USD' -- use OETH/USD which is same as ETH/USD but has end-of-day resolution
209209
AND chain_id = 1
210210
AND timestamp <= (date::date + interval '1 day')::timestamp
211211
ORDER BY timestamp DESC

0 commit comments

Comments
 (0)