Skip to content

Instantly share code, notes, and snippets.

(ns lpdashboard.compliqs
(:require [cljs.core.async :refer [go]]
[cljs.core.async.interop :refer-macros [<p!]]
[cljs-http.client :as http]
["ethers" :as ethers]
["@compound-finance/compound-js" :as compound]
[bignumber.core]
[bignumber.js :as BigNumber]
[clojure.string :as s]
[reagent.core :as reagent :refer [atom]]))
0x909b443761bbd7fbb876ecde71a37e1433f6af6f
0x189c2c1834b1414a6aee9eba5dc4b4d547c9a44c
0xb1adceddb2941033a090dd166a462fe1c2029484
0xb1adceddb2941033a090dd166a462fe1c2029484
0xb1adceddb2941033a090dd166a462fe1c2029484
0xb1adceddb2941033a090dd166a462fe1c2029484
0xed3c4c5d7a9abfd74f33c1042793dfd6a6daef42
0x39c09fdc4e5c5ab72f6319ddbc2cae40e67b2a60
0x889abdd2bc0f3a884e607279ba132501698fbcd5
0xb1adceddb2941033a090dd166a462fe1c2029484
(ns lpdashboard.compliqs
(:require [cljs.core.async :refer [go]]
[cljs.core.async.interop :refer-macros [<p!]]
[cljs-http.client :as http]
["ethers" :as ethers]
["@compound-finance/compound-js" :as compound]
[bignumber.core]
[bignumber.js :as BigNumber]
[clojure.string :as s]
[reagent.core :as reagent :refer [atom]]))
0x909b443761bbd7fbb876ecde71a37e1433f6af6f 46100000
0x189c2c1834b1414a6aee9eba5dc4b4d547c9a44c 5940000
0xb1adceddb2941033a090dd166a462fe1c2029484 4380000
0xb1adceddb2941033a090dd166a462fe1c2029484 4330000
0xb1adceddb2941033a090dd166a462fe1c2029484 3560000
0xb1adceddb2941033a090dd166a462fe1c2029484 2890000
0xed3c4c5d7a9abfd74f33c1042793dfd6a6daef42 1960000
0x39c09fdc4e5c5ab72f6319ddbc2cae40e67b2a60 1410000
0x889abdd2bc0f3a884e607279ba132501698fbcd5 1230000
0xb1adceddb2941033a090dd166a462fe1c2029484 1210000
{:address 0x641d24f1dd0c80f0b5ddd9ecf60d7a32f41020f4, :block_updated nil, :health {:value 1.0076007755425284456331268370340931786425371231165817283186691800672131912640}, :tokens [{:address 0x39aa39c021dfbae8fac545936693ac917d5e7563, :borrow_balance_underlying {:value 0}, :lifetime_borrow_interest_accrued {:value 0}, :lifetime_supply_interest_accrued {:value 409.56214782594}, :safe_withdraw_amount_underlying {:value 0}, :supply_balance_underlying {:value 77814.68425282594}, :symbol cUSDC} {:address 0xc11b1268c1a384e55c48c2391d8d480264a3a7f4, :borrow_balance_underlying {:value 0}, :lifetime_borrow_interest_accrued {:value 0}, :lifetime_supply_interest_accrued {:value 0.00003668833601317}, :safe_withdraw_amount_underlying {:value 0}, :supply_balance_underlying {:value 0.02369645833601317}, :symbol cWBTC} {:address 0x5d3a536e4d6dbd6114cc1ead35777bab948e3643, :borrow_balance_underlying {:value 173845.94146189856}, :lifetime_borrow_interest_accrued {:value 1421.07917910698}, :lifetime_supply_interest_accrued {:val
[
{
"address": "0x641d24f1dd0c80f0b5ddd9ecf60d7a32f41020f4",
"block_updated": null,
"health": {
"value": "1.0076007755425284456331268370340931786425371231165817283186691800672131912640"
},
"tokens": [
{
"address": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
(ns folio-deceso.muni
(:require [clj-time.format :as f]
[clj-time.core :as t]
[clojure.data.csv :as csv]
[clojure.edn :as edn]
[clojure.java.io :as io]
[oz.core :as oz]
[semantic-csv.core :as sc]))
@mariorz
mariorz / tickstest.py
Last active September 29, 2021 04:34
import requests
from brownie import *
## set vars
pool_address = "0x4e68ccd3e89f51c3074ca5072bbac773960dfa36"
tick = "-195660"
block_number = 13010089
query = """
query {
ticks(where:{pool_contains:"%s",tickIdx:%s}
from brownie import *
from web3._utils.filters import construct_event_filter_params
from web3 import Web3
import requests
import time
erc20_abi_url = 'https://unpkg.com/@uniswap/v2-core@1.0.1/build/IERC20.json'
_cache = dict()
[{"nft-id":138004,"deposit-value":125829.93632285213632923496499812309724333293996548364173,"rewards-value":461.93665383199172578293924676902133268094724457697909,"gas-value":320.386588346611938272608099696060898909719727151666,"withdrawal-value":124431.5870724781993373795436867111290648906498327978877,"exit-value":124111.2004841315873991069355870150681659809301056462217,"position-txs":[null,"0x1f59874c03e260a04fcf047424f99ee8a082e3c8f478cbe195fd72c93c08a427","0x960d5154096bddc5fbc2c7030d2a3f5d66b5fcfb7225c8481996cc64526b4283","0x510ffbfa4c30f88d264ccb812d94f0dc25e2b9e42299a987e04883880c57b055"]},{"nft-id":138028,"deposit-value":135436.967140869918485779933038270410732589730314163487466,"rewards-value":1370.218879932196856786325021089668076840333122554705367,"gas-value":456.23083389339353657692360674849489051882816996765,"withdrawal-value":136520.898903939602982808700236536061306996891393097174287,"exit-value":136412.588305618126252633180770004504304148321165320257609,"position-txs":[null,"0x15f37a33da150c8e8