RamaharSolend SOL Lending/Borrowing
Updated 2022-02-16
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 borrow as (select
date(block_timestamp) as dayz,
sum(instruction:parsed:info:lamports::float) / POW(10,9) as borrowing_amount
from solana.events
where
event_type = 'transfer' AND
posttokenbalances[0]:mint = 'So11111111111111111111111111111111111111112' AND
posttokenbalances[0]:owner = 'DdZR6zRFiUt4S5mg7AV1uKB2z1f1WzcNYCaTEEWPAuby' AND
posttokenbalances[0]:accountIndex = '5' AND
--posttokenbalances[1]:mint = 'So11111111111111111111111111111111111111112' AND
--posttokenbalances[1]:owner = '9RuqAN42PTUi9ya59k9suGATrkqzvb9gk2QABJtQzGP5' AND
dayz >= '2022-02-05'
group by dayz),
lend as (select
date(block_timestamp) as dayz,
sum(instruction:parsed:info:lamports::float) / POW(10,9) as lending_amount
from solana.events
where
event_type = 'transfer' AND
posttokenbalances[2]:mint = '5h6ssFpeDeRbzsEHDbTQNH7nVGgsKrZydxdSTnLm6QdV' AND
posttokenbalances[2]:owner = 'DdZR6zRFiUt4S5mg7AV1uKB2z1f1WzcNYCaTEEWPAuby' AND
posttokenbalances[2]:accountIndex = '7' AND
dayz >= '2022-02-05'
group by dayz),
withdraw as (select
date(block_timestamp) as dayz,
sum(instruction:parsed:info:lamports::float) / POW(10,9) as withdrawn_amount
from solana.events
where
event_type = 'transfer' AND
posttokenbalances[0]:mint = 'So11111111111111111111111111111111111111112' AND
posttokenbalances[0]:owner = 'DdZR6zRFiUt4S5mg7AV1uKB2z1f1WzcNYCaTEEWPAuby' AND
posttokenbalances[0]:accountIndex = '2' AND
dayz >= '2022-02-05'
Run a query to Download Data