binhachonAlgofi Decentralized Lending - goETH
Updated 2022-02-14
999
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 provide_liquidity_group_id as (
select
distinct tx_group_id
from algorand.application_call_transaction
where try_base64_decode_string(tx_message:txn:note::string) = 'Market: mt'
),
provide_liquidity_transaction as (
select
block_timestamp,
sender,
asset_amount/1e6 as amount,
asset_transferred as assetID
from algorand.asset_transfer_transaction
where tx_group_id in (select tx_group_id from provide_liquidity_group_id)
union all
select
block_timestamp,
sender,
amount,
0 as assetID
from algorand.payment_transaction
where tx_group_id in (select tx_group_id from provide_liquidity_group_id)
),
provide_liquidity_over_time as (
select
date_trunc('day', block_timestamp) as blocktime,
assetID,
sum(amount) as volume,
count(distinct sender) as providers
from provide_liquidity_transaction
group by blocktime, assetID
order by volume desc
),
withdraw_liquidity_transaction as (
select
block_timestamp,
Run a query to Download Data