Skip to content

Commit 7ea0fdf

Browse files
committed
arm rates are already decimal
1 parent 05fb0b9 commit 7ea0fdf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ const upsertProtocolDailyStatDetails = async (ctx: Context, fromDate: string) =>
7676
'${product.product}' as product,
7777
(a.date::date + interval '1 day' - interval '1 second')::timestamp as timestamp,
7878
COALESCE(a.rate_usd, 0) as rate_usd,
79-
COALESCE(a.total_assets * a.rate_eth::numeric / 1e18, 0) as earning_tvl,
80-
COALESCE(a.total_assets * a.rate_eth::numeric / 1e18, 0) as tvl,
81-
COALESCE(a.total_supply * a.rate_eth::numeric / 1e18, 0) as supply,
82-
COALESCE((a.yield + a.fees) * a.rate_eth::numeric / 1e18, 0) as yield,
83-
COALESCE(a.fees * a.rate_eth::numeric / 1e18, 0) as revenue,
79+
COALESCE(a.total_assets * a.rate_eth, 0) as earning_tvl,
80+
COALESCE(a.total_assets * a.rate_eth, 0) as tvl,
81+
COALESCE(a.total_supply * a.rate_eth, 0) as supply,
82+
COALESCE((a.yield + a.fees) * a.rate_eth, 0) as yield,
83+
COALESCE(a.fees * a.rate_eth, 0) as revenue,
8484
COALESCE(a.apy, 0) as apy,
8585
0 as inherited_tvl,
8686
0 as inherited_yield,

0 commit comments

Comments
 (0)