hessPolygon Vs Ethereum (Repay)
Updated 2022-07-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with deposit as ( select date(block_timestamp) as date ,LENDING_POOL ,DEPOSITOR , amount_usd , (amount_usd*0.024647)/100 as fee
from polygon.sushi.ez_lending
where action = 'Deposit'
)
,
withdraw as ( select date(block_timestamp) as date ,LENDING_POOL ,DEPOSITOR , amount_usd , (amount_usd*0.024647)/100 as fee
from polygon.sushi.ez_lending
where action = 'Withdraw')
,
borrow as ( select date(block_timestamp) as date , LENDING_POOL ,borrower , amount_usd , (amount_usd*0.25)/100 as fee
from polygon.sushi.ez_borrowing
where action = 'Borrow')
,
repay as ( select date(block_timestamp) as date ,LENDING_POOL ,borrower , amount_usd , (amount_usd*0.25)/100 as fee
from polygon.sushi.ez_borrowing
where action = 'Repay')
,
eth_deposit as ( select date(block_timestamp) as date , blockchain ,LENDING_POOL ,DEPOSITOR , amount_usd , (amount_usd*0.024647)/100 as fee
from flipside_prod_db.crosschain.ez_lending
where action = 'Deposit'
)
,
eth_withdraw as ( select date(block_timestamp) as date , blockchain ,LENDING_POOL ,DEPOSITOR , amount_usd , (amount_usd*0.024647)/100 as fee
from flipside_prod_db.crosschain.ez_lending
where action = 'Withdraw')
,
eth_borrow as ( select date(block_timestamp) as date , blockchain ,LENDING_POOL ,borrower , amount_usd , (amount_usd*0.25)/100 as fee
from flipside_prod_db.crosschain.ez_borrowing
where action = 'Borrow')
,
eth_repay as ( select date(block_timestamp) as date , blockchain ,LENDING_POOL ,borrower , amount_usd , (amount_usd*0.25)/100 as fee
from flipside_prod_db.crosschain.ez_borrowing
where action = 'Repay')
select 'Polygon' as type , sum(fee) as total_fee , avg(fee) as avg_fee
from repay
Run a query to Download Data