Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
08ba3f2
Add USDC, WBTC, DAI to silicon_zk and new assets to sty
g1nt0ki Feb 13, 2025
201afd0
feat: support takara lend markets contract (#13494)
Carl-Takara Feb 13, 2025
273aec2
fix: remove unused StoryUSDC and StoryWETH entries from coreAssets.json
g1nt0ki Feb 13, 2025
025d313
binance new wallet (#13498)
Define101 Feb 13, 2025
337e0ac
add unichain
realdealshaman Feb 13, 2025
dd7913c
update comptroller
realdealshaman Feb 13, 2025
48b559c
Update corePools address and uncomment arbitrum configuration (#13506)
g1nt0ki Feb 13, 2025
f480b2e
fix storyhunt
g1nt0ki Feb 14, 2025
d9dd446
Add BitFi cedefi product(basis trading) TVL calculation (#13370)
BitFi-SKY Feb 14, 2025
f93e86a
add notes to adapter (#13513)
Define101 Feb 14, 2025
2e74424
Update Cosmos endpoints and add Milkyway chain support
g1nt0ki Feb 14, 2025
082c309
Fix Parasail helper contract address (#13507)
hcheng826 Feb 14, 2025
e8bdeeb
remove some new btc addresses (#13511)
chainupk Feb 14, 2025
279de3e
add doppler finance (#13510)
0xdevtrn Feb 14, 2025
12fa7f4
Feat stip meta pool (#13508)
augustofavrearg Feb 14, 2025
fcbe55e
new pools (#13505)
Zorag44 Feb 14, 2025
1950b71
Ring update (#13519)
g1nt0ki Feb 14, 2025
14b95c0
stride: include bera (#13504)
g1nt0ki Feb 14, 2025
c16dfdb
Add sonic tvl for eggs finance (#13520)
BLUEDERPY Feb 14, 2025
e5b8826
add unitBTC (#13522)
Define101 Feb 14, 2025
d22a262
remove borrowing from eggs
0xngmi Feb 14, 2025
a3f625c
Add kittypunch stable (#13514)
btspoony Feb 14, 2025
0ecbd72
Add Balancer V3 / Base. (#13501)
jubeira Feb 14, 2025
14dab84
King (#13525)
g1nt0ki Feb 14, 2025
a225ac2
Add new chain for rabbitx tvl adapter (#13518)
wen-git-acc Feb 14, 2025
bcd22db
add borrowed tvl (#13526)
BLUEDERPY Feb 14, 2025
493a1a6
added story protocol to zeno lend (#13503)
mememan-anon Feb 14, 2025
bc85a2a
Adding NOME protocol (#13517)
nome-protocol Feb 14, 2025
e5e8693
feat: add Ultron TVL calculation with placeholder due to RPC issues
g1nt0ki Feb 14, 2025
91a7a1d
add hallmark
realdealshaman Feb 14, 2025
3609aa6
zero out borrows due to hack
realdealshaman Feb 14, 2025
10d0e99
zero out borrowed after hack
realdealshaman Feb 14, 2025
8459507
flag misrepresentedTokens
realdealshaman Feb 15, 2025
b155478
track https://app.hyperunit.xyz
g1nt0ki Feb 15, 2025
87fd7eb
Revert "track https://app.hyperunit.xyz"
g1nt0ki Feb 15, 2025
4e5fd65
Update bucket (#13524)
g1nt0ki Feb 15, 2025
76114f3
Submit Unleash Protocol (#13528)
theunleashdev Feb 15, 2025
f1ea9d4
satori add plume\zircuit\story (#13529)
miler012 Feb 15, 2025
1fbfa28
feat: azex tvl (#13530)
Aliceonly Feb 15, 2025
15ae460
Add Unichain & Abstract ETH Pool (#13531)
stgLamps Feb 16, 2025
0fc61d7
sudoswap: track berachain
g1nt0ki Feb 16, 2025
90bf7e2
fix: fix comment tvl
Feb 17, 2025
77a12b9
Add Knightrade TVL (#13499)
knightSafeTeam Feb 17, 2025
744dbdd
FEAT: Add Beradrome (#13500)
t0rbik Feb 17, 2025
d8bdcd4
add sonic (#13537)
0xChupaCabra Feb 17, 2025
6d2cbfa
Modify - Snake Finance - Update Gsnake Reward Pool and Masonry addres…
chimpydev Feb 17, 2025
d3ceb6a
Sonic re-deployment for Amped Finance (#13536)
AmpedFinance Feb 17, 2025
8b79de8
FEAT: Summer.fi TVL, change the old summer.fi to summer.fi pro (#13538)
marcinciarka Feb 17, 2025
6691000
Modify - Snake Finance - Update way to fetch tvl from the updated con…
chimpydev Feb 17, 2025
094be13
bitget wallets (#13541)
Define101 Feb 17, 2025
047208f
fix marginZero query #13544
g1nt0ki Feb 17, 2025
d3a127c
feat: :sparkles: added liquidity house and the bankroll contract to p…
0xRLA Feb 17, 2025
9ab1d15
update rebalance #13546
g1nt0ki Feb 17, 2025
f139b99
feat: peppercoin tvl (#13549)
alexbalda Feb 17, 2025
0bde2e6
feat: add Cadabra yield aggregator #13547
g1nt0ki Feb 17, 2025
9a0ba23
added bob, bera, avax (#13551)
Feb 17, 2025
6770aab
Fix: Sommelier, populate blacklist (#13553)
0xpeluche Feb 17, 2025
17c2644
add beradrome treasury
realdealshaman Feb 17, 2025
50e8b42
gmx v2: add Solana TVL
g1nt0ki Feb 17, 2025
13ebb2f
Update Plutus DAO (#13532)
g1nt0ki Feb 18, 2025
876c5ff
Add GamingDex TVL in OAS (#13562)
phucuong1112 Feb 18, 2025
230e661
Feat: Arkis (#13564)
0xpeluche Feb 18, 2025
0e36060
stellaswap v4 support (#13557)
atticuzor Feb 18, 2025
0b12c0e
add ETH vault to lombard (#13567)
Define101 Feb 18, 2025
f1dfa2a
add ginsengswap (#13561)
intrepidcanadian Feb 18, 2025
57bfc7e
add backpack missing wallets (#13569)
Define101 Feb 18, 2025
13fc525
Add Chiliz fan token staking TVL calculation (#13570)
g1nt0ki Feb 18, 2025
cd1a529
fix: ithaca tvl update strategy addresses (#13568)
chaitanyasjoshi Feb 18, 2025
ab67ec5
update: pwn (#13566)
Vojtch159 Feb 18, 2025
f4905f8
added rplanet (#13559)
mdcryptonfts Feb 18, 2025
f9afd7f
add sonic TVL calculation to lombard-vault
g1nt0ki Feb 18, 2025
b11a9a6
feat(lorenzo): add new enzoBTC addresses (#13535)
0xajing Feb 18, 2025
dda8266
Fix: Umami og4626 avax (#13574)
0xpeluche Feb 18, 2025
d5491a8
Fix: mochifi (#13575)
0xpeluche Feb 18, 2025
91d2c0b
Added staking metrics to HLiquity adapter (#13571)
GlobeBit Feb 18, 2025
0350575
Fix ZothZeusd, (contract migration) (#13577)
0xpeluche Feb 18, 2025
b0fcafc
Update for Rosen Bridge connecting to Binance (#13573)
cannonQ Feb 18, 2025
1ddb86d
Add support for wrapped tokens in PEPPER staking contract
g1nt0ki Feb 18, 2025
0769625
Add misrepresentedTokens flag to getExport function in util.js
g1nt0ki Feb 18, 2025
28b060b
Mole (#13543)
g1nt0ki Feb 18, 2025
ba25887
add rsk
realdealshaman Feb 18, 2025
53b3d49
Feat mpsol metapool v2 (#13556)
augustofavrearg Feb 18, 2025
9e98370
Add coinbase btc (#13580)
Define101 Feb 18, 2025
1fc3ec4
add ekubo
0xngmi Feb 19, 2025
b720508
fix vicuna: Token mappings for Sonic in tokenMapping.js
g1nt0ki Feb 19, 2025
f2e002a
Update TVL (#13578)
pavlo-tolok Feb 19, 2025
b35573b
track gBera #13593
g1nt0ki Feb 19, 2025
4219812
update standard vaults #13592
g1nt0ki Feb 19, 2025
133e60e
update standard vaults #13592
g1nt0ki Feb 19, 2025
0358fa2
update snake #13591
g1nt0ki Feb 19, 2025
d8d9cbb
feat: add desk project (#13594)
john-xina-p88 Feb 19, 2025
de5644b
update standard vaults #13592
g1nt0ki Feb 19, 2025
9081517
Update Citrex Markets TVL calculation (#13590)
FedererKK Feb 19, 2025
9a4b1fe
feat: add a-dex project (#13589)
Avm07 Feb 19, 2025
1281561
add hallmark
realdealshaman Feb 19, 2025
744f9bd
feat: new rings collaterals (#13588)
0xtekgrinder Feb 19, 2025
8488e87
add vaults (#13587)
NeutralTrade Feb 19, 2025
60e7221
add picoSOL (#13586)
pico-sol Feb 19, 2025
2a6f44f
Add colors (#13585)
colorguys Feb 19, 2025
8220217
Stream V3: New Contracts (#13583)
0xDro Feb 19, 2025
1369e90
kai: add usdy and deep vaults (#13582)
kklas Feb 19, 2025
ecbe6d7
remove rings-scusd mapping from sonic token configuration
g1nt0ki Feb 19, 2025
8360aff
Add missing starknet assets and pools (#13558)
nbundi Feb 19, 2025
d3ca86a
ITrack electra #13381
g1nt0ki Feb 19, 2025
5bf945f
Add FOOM (#13502)
rdziubek Feb 19, 2025
fc5436e
Refactor Uniswap v4 configuration to use event logs and include hook tvl
g1nt0ki Feb 19, 2025
5d3a5f7
Remove unused imports in Uniswap v4 index file
g1nt0ki Feb 19, 2025
65ead50
fix: use ton api for token prices (#13606)
murka Feb 20, 2025
e6a2e88
Fix: Balus (#13612)
0xpeluche Feb 20, 2025
2f43bc3
Fix: Knightrade (BN) (#13614)
0xpeluche Feb 20, 2025
f2e0351
Fix: StoryHunt (#13615)
0xpeluche Feb 20, 2025
8d70e77
track lara #13608
g1nt0ki Feb 20, 2025
38ddbb6
Add Astake to project. (#13611)
xzsean666 Feb 20, 2025
891a600
Add token mapping for Tara in fixBalancesTokens
g1nt0ki Feb 20, 2025
0bc9ea4
Sake Finance add new pool (#13610)
ChunWang1998 Feb 20, 2025
46cbac6
Change Nolus API endpoint and add new ATOM lending pool (#13609)
metodi96 Feb 20, 2025
1e88305
add: memeswap tvl (#13604)
batudal Feb 20, 2025
4aa02f6
Update elocks tvl: add Sonic chain (#13603)
ftm1337 Feb 20, 2025
27a391e
satori add some LSD asset (#13601)
miler012 Feb 20, 2025
7d760eb
Add adapter for meme-wallet on worldchain (#13598)
kmanboii Feb 20, 2025
b7fe5e3
added chickdefi factory (#13600)
Chickendefi Feb 20, 2025
dd71154
Change borrows metric to not be cumulative. (#13616)
robotoer Feb 20, 2025
d6f0322
Hermetica USDh integration (#13422)
jakob-btc Feb 20, 2025
b314af0
minor fix
g1nt0ki Feb 20, 2025
13b4ebb
Add Steamm TVL (#13581)
DaSichuan Feb 20, 2025
8b26b41
Mellow add vaults (#13617)
0xsign Feb 20, 2025
01b1db4
Bamm, Borrow AMM (#13550)
tom2o17 Feb 20, 2025
0dc08f9
Veda protocol addition (#13423)
philipjames44 Feb 20, 2025
42ffcd1
Enhance BTC duplicate check script to support R2 storage and improve …
g1nt0ki Feb 20, 2025
948a9e3
Add console log for successful data write in BTC duplicate check script
g1nt0ki Feb 20, 2025
d6d07f4
Fix: Wonton (#13619)
0xpeluche Feb 21, 2025
4b88f6c
update solv #13620
g1nt0ki Feb 21, 2025
97610a9
add: staking tvl to bsx tvl (#13622)
hkhoa Feb 21, 2025
6f492ad
add beratlas - berachain (#13626)
BeratlasLabs Feb 21, 2025
cef49fb
add Base network to Amped Finance (#13625)
AmpedFinance Feb 21, 2025
53a049b
sumbiosis adds Unichain (#13624)
allush Feb 21, 2025
996af27
track canary #13623
g1nt0ki Feb 21, 2025
93b3cc3
update beraBorrow
g1nt0ki Feb 21, 2025
683533f
Create OneDollarDCAE (#13572)
xiaopao2025 Feb 21, 2025
7a63da9
curve: blacklist xy
g1nt0ki Feb 21, 2025
f3f52b0
Update hermetica USDh integration (#13629)
anch09 Feb 22, 2025
4ad2f32
feat(curves) add Curves project (#13632)
tmarwen Feb 23, 2025
74dee0d
Ethereal Adapter (#13638)
CheezeSam Feb 23, 2025
babbaf9
Addition of NEUY on Base (#13637)
NEUYTeam Feb 23, 2025
4f24b16
Update Knightrade TVL calculation (#13636)
knightSafeTeam Feb 23, 2025
d8edd23
track hyper evm apps #13635
g1nt0ki Feb 23, 2025
c41d596
fix(tokenMapping): update hyper_evm to hyperliquid and adjust exports…
g1nt0ki Feb 23, 2025
15d9c5e
update bybit
g1nt0ki Feb 24, 2025
ffc19b5
add new token mappings for formnetwork and hyperliquid
g1nt0ki Feb 24, 2025
967dbd3
Add Vingt.io project (#13597)
raghav02 Feb 24, 2025
cba7b1d
update beraborrow
g1nt0ki Feb 24, 2025
a0734d8
Fix: Archi-finance (#13649)
0xpeluche Feb 24, 2025
f0acd73
[Bedrock] fix all(uniETH/uniBTC/uniIOTX/brBTC) TVL start date (#13647)
Eggman00 Feb 24, 2025
2dfa0b9
update sonic chain support (#13644)
bit-reserve Feb 24, 2025
6d126ff
Fix: TermFinance add extraKey on logs (#13652)
0xpeluche Feb 24, 2025
374e53d
track roll-fun #13633
g1nt0ki Feb 24, 2025
049cb57
feat: submit Coin98 Power Pool (#13439)
waynebruce0x Feb 24, 2025
167d6f6
alexar -> axelar
g1nt0ki Feb 24, 2025
ee47d6d
Fix: Saucerswap (update Api) (#13654)
0xpeluche Feb 24, 2025
f301827
remove dup
g1nt0ki Feb 25, 2025
90c05a2
added hallmarks of tvl change events (#13664)
DEFI-Foundation Feb 25, 2025
a0ee5ce
Update coreAssets.json for LightLink (#13660)
danatpellar Feb 25, 2025
b3f5bc5
SIR Adapter (#13667)
Codonyat Feb 25, 2025
a205c40
feat: add TVL calculation for vault contract
g1nt0ki Feb 25, 2025
37bc5f6
add flex perp tvl adapter (#13666)
flexcoder17 Feb 25, 2025
5b6896c
refactor: replace hardcoded token addresses with references from core…
g1nt0ki Feb 25, 2025
cd67325
Add adapter for AquaBera project (#13662)
tstemko Feb 25, 2025
d349baa
feat: add additional SBTC address to stacksSBTC array
g1nt0ki Feb 25, 2025
a447690
Zoo fi (#13669)
g1nt0ki Feb 25, 2025
3605d65
update beetroot #13655
g1nt0ki Feb 25, 2025
48f112c
Updated TVL For Satoshi Protocol v2 (#13668)
imfeng Feb 25, 2025
a471c0a
Fix lease state query endpoint (#13663)
metodi96 Feb 25, 2025
9e47d76
Updated adapter to support Rain.fi v2 (#13634)
solwhitey Feb 25, 2025
a30bd00
lint fix
g1nt0ki Feb 26, 2025
442f1f3
Add movement vaults (#13671)
mihailo-maksa Feb 26, 2025
7d39709
feat: added clisBNB CDP Vault to Loop (#13676)
0xd4n1el Feb 26, 2025
80a7994
Ulysses Sonic Assets (#13673)
waynebruce0x Feb 26, 2025
f7e1cdf
feat: add canonical wstETH for Opus (#13679)
tserg Feb 26, 2025
2006848
Add WeBera Finance Adapter on Berachain (#13680)
webera-dev Feb 26, 2025
02d2ab6
Update: Neemo (Calculate TVL before CCIP) (#13681)
0xpeluche Feb 26, 2025
0da81f3
[Sturdy V2]: added flow evm network (#13674)
atozICT20 Feb 26, 2025
369a14a
Add Shield Protocol Adapter (#13675)
shieldprotocols Feb 26, 2025
3fc0fab
Add Hang Of God Protocol (#13672)
chimpytuts Feb 26, 2025
f1cd145
Add Heroes of Mavia adapter (#13653)
nhancv Feb 26, 2025
1c720f8
Sobax Zeta (#13682)
waynebruce0x Feb 26, 2025
c39a995
edit hallmarks for metalswap project (#13670)
DEFI-Foundation Feb 26, 2025
4258692
Add TVL calculation for Caviarnine Simple Pools
g1nt0ki Feb 27, 2025
1baa421
add more tokens cex helper (#13693)
Define101 Feb 27, 2025
b877fbd
Add more sofa automator vaults (#13618)
sofa-org Feb 27, 2025
93cae86
adjusted pholend adapter (#13683)
0xMarkuss Feb 27, 2025
30febec
Add Berachain to D8X project tvl (#13686)
m66260 Feb 27, 2025
a2dc227
adding cold wallet to tracking (#13688)
vlzhr Feb 27, 2025
729abb0
rumpel: add new symbiotic vaults (#13689)
jparklev Feb 27, 2025
064b826
add farm (#13690)
Feb 27, 2025
2fcd6ca
add a vault to lagoon protocol (#13694)
GuiDupont Feb 27, 2025
c4a575c
feat(morpho): adding mode, corn, sonic, unichain & hemi (#13691)
tomrpl Feb 27, 2025
d7750af
Add Hemi to chains (#13687)
jcvernaleo Feb 27, 2025
1d13e5f
fix adapter
realdealshaman Feb 27, 2025
6110716
fix corn chain id
realdealshaman Feb 27, 2025
c69aff0
include bouncebit
realdealshaman Feb 27, 2025
e735311
update Bitflow adapter (#13695)
rodrigoeduardo Feb 28, 2025
6002c92
Update: D2Finance (#13697)
dunglv-smartosc Feb 28, 2025
87019f2
Update Satoshi Protocol TVL for BSC chain (#13702)
imfeng Feb 28, 2025
915cc5b
SwissBorg: Add new wallets (#13692)
antoineborg Feb 28, 2025
dfcd447
Removed Retired Vaults (#13685)
0x-minato Feb 28, 2025
15ca4af
add sei chain (#13703)
zhangdav Feb 28, 2025
570fbab
update phemex
g1nt0ki Mar 3, 2025
3555ad6
unComment out Ultron TVL function due to RPC issues
g1nt0ki Mar 3, 2025
bd5d5d3
New Stargate V2 pools (#13717)
stgLamps Mar 3, 2025
49298a0
Fix: Maple (#13607)
0xpeluche Mar 3, 2025
0a5262e
track hemi.xyz bridge
g1nt0ki Mar 3, 2025
b6cf754
Add ORIGYN TVL (#13446)
ENJATZ Mar 3, 2025
715be76
LibreCapital include all products + smart contract with legal documen…
yehia67 Mar 3, 2025
4eccb93
Add DODO Hemi Mainnet pool data. (#13705)
yongjun925 Mar 3, 2025
5e25881
feat: add gearbox borrowed amount (#13708)
doomsower Mar 3, 2025
14e701c
add project jpow-ai (#13709)
dganhnhnh Mar 3, 2025
4c80cbc
[PENDLE] Fix Base & Add Sonic chain (#13712)
ngfam Mar 3, 2025
31bbeda
Add SDK Adapter with tvl (Degen-Express Launchpad project) (#13714)
Grin0502 Mar 3, 2025
db4e6aa
add Spice TVL (#13715)
kdhhhserddf Mar 3, 2025
906a305
Idle DAO: Added Polygon Bastion vault (#13718)
samster91 Mar 3, 2025
3a4e262
[Bucket] add Navi related assets (#13706)
Jarekkkkk Mar 3, 2025
a38d3c4
delist Margined vault till we get more info
g1nt0ki Mar 3, 2025
7660828
remove wallets bitget (#13726)
Define101 Mar 4, 2025
44637ad
moveflow (#13713)
rellyxx Mar 4, 2025
b4c21cd
Add Synnax TVL (#13711)
nguyenhoaibao Mar 4, 2025
26ec51e
Update/add chain (#13721)
MustafaBrandon Mar 4, 2025
3f4df39
add hemi to uniswap (#13722)
abs3ntdev Mar 4, 2025
9f9b52f
Added hyperyield (#13723)
hyperyieldevm Mar 4, 2025
6b30efd
add chain hemi (#13725)
Passdex Mar 4, 2025
3288d28
feat: add EKUBO to Opus TVL (#13729)
tserg Mar 4, 2025
70b7c12
bugfix
g1nt0ki Mar 4, 2025
09e7522
PRDT: add nibiru contract (#13728)
cmdevbc Mar 4, 2025
3945fb7
yel-finance: add new potions (#13730)
astroKo Mar 4, 2025
7988ef6
add hemi
realdealshaman Mar 4, 2025
077fa38
add sonic to aave
0xngmi Mar 4, 2025
020ba5f
term fi: support refill
g1nt0ki Mar 4, 2025
96f6c7f
Update Simple Staking Address (#13731)
MayankMittal1 Mar 5, 2025
d7edb94
feat: add velo unichain (#13744)
ethzoomer Mar 5, 2025
70157bd
add hemi chain config for tvl adapter (#13741)
LpcAries Mar 5, 2025
82e817d
Adding support for Hemi network (#13742)
mememan-anon Mar 5, 2025
859efe2
zino finance (#13740)
nickbit0 Mar 5, 2025
1a4db4e
Add Zeusnetwork TVL adaptor (#13732)
vwvwMM Mar 5, 2025
ad91e07
Spice TVL. Fix error (#13733)
kdhhhserddf Mar 5, 2025
b6180a3
feat: add lpUSD to Loop (#13734)
0xd4n1el Mar 5, 2025
ace8677
Rewrites borrowed calculation to use repoExposure graphql entities. (…
robotoer Mar 5, 2025
bc9e530
remove old bitget token
0xngmi Mar 5, 2025
63c438b
fix: use same TVL formula as front-end (#13684)
vicenteguedes Mar 5, 2025
c7834dd
Zeus Patch (#13750)
waynebruce0x Mar 5, 2025
8a5932a
track flrbank
g1nt0ki Mar 5, 2025
65ce9e6
feat: add ScrubVault DepositVault TVL to scrub project (Kava + Arbitrum)
Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
"env": {
"node": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest"
},
ignorePatterns: ['projects/test/*'],
"rules": {
"no-case-declarations": "off",
"no-unused-vars": "off",
"no-useless-escape": "warn",
"no-prototype-builtins": "off",
"no-unreachable": "off",
}
}
15 changes: 15 additions & 0 deletions .github/workflows/alert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Alert

on:
push:
branches: [ main ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update unlisted
run: curl https://born-to-llama.herokuapp.com/refresh
# - name: Deploy to server
# run: curl https://born-to-llama.herokuapp.com/rebuild-server
38 changes: 38 additions & 0 deletions .github/workflows/commentResult.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const { readFileSync } = require('fs');
const axios = require('axios');
const junk = 'rmicl\x1Eefn]JsfjoHoGRpWOt3_u@L_LpTUc_BLf0T/i/mXC';

async function main() {
const [, , log, author, repo, pr, path ] = process.argv;
const file = readFileSync(log, 'utf-8');


const errorString = '------ ERROR ------';
const summaryIndex = file.indexOf('------ TVL ------');
const errorIndex = file.indexOf(errorString);
let body;

if (summaryIndex != -1) {
body = `The adapter at ${path} exports TVL:
\n \n ${file.substring(summaryIndex + 17).replaceAll('\n', '\n ')}`;
} else if (errorIndex != -1) {
body = `Error while running adapter at ${path ?? ''}:
\n \n ${file.split(errorString)[1].replaceAll('\n', '\n ')}`;
} else
return;

await axios.post(
`https://api.github.com/repos/${author}/${repo}/issues/${pr}/comments`,
{ body }, {
headers: {
Authorization: scramble(junk),
Accept: 'application/vnd.github.v3+json'
}
});
};
function scramble(str) {
return str.split('').reduce((a, b) => {
return a + String.fromCharCode(b.charCodeAt(0) + 2);
}, '');
}
main();
15 changes: 15 additions & 0 deletions .github/workflows/getFileList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const MODIFIED = parse(process.env.MODIFIED)
const ADDED = parse(process.env.ADDED)
const fileSet = new Set();

[...MODIFIED, ...ADDED].forEach(file => {
const [root, dir] = file.split('/')
if (dir === 'treasury' || dir === 'entities') fileSet.add(file)
else if (root === 'projects' && dir !=='helper' && dir !== 'config') fileSet.add(root + '/' + dir)
})

console.log(JSON.stringify([...fileSet]))

function parse(data) {
return data.replace('[', '').replace(']', '').split(',')
}
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test_Change
on:
pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- id: file_changes
uses: trilom/file-changes-action@v1.2.4
with:
output: 'json'
fileOutput: 'json'
- name: Check out repository code
uses: actions/checkout@v2
- name: Run changes files through test script
env:
LLAMA_DEBUG_MODE: "true"
BSC_RPC: https://rpc.ankr.com/bsc,https://bsc-dataseed4.binance.org
run: |
RUN_FILES=$(
MODIFIED=${{ steps.file_changes.outputs.files_modified}} \
ADDED=${{ steps.file_changes.outputs.files_added}} \
node ${{ github.workspace }}/.github/workflows/getFileList.js
)

if [ "$RUN_FILES" = "[]" ]; then
echo "No adapter files were modified"
exit 0
fi

npm remove typescript @types/async-retry @types/bn.js ts-node @solendprotocol/solend-sdk @hover-labs/kolibri-js
# npm ci --omit=dev
npm ci
# npm update @defillama/sdk

# fail if package.json or package-lock.json is changed
FILES_MODIFIED=${{ steps.file_changes.outputs.files_modified }}
if [[ $FILES_MODIFIED == *"package.json"* || $FILES_MODIFIED == *"package-lock.json"* ]]; then
echo "------ ERROR ------ > Please revert changes to package.json / package-lock.json" > /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}"
exit 1
fi

for i in $(echo $RUN_FILES | tr -d '"[]' | tr "," "\n")
do
{
node ${{ github.workspace }}/test.js ${{ github.workspace }}/${i} 2>&1 | tee output.txt
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i}
if grep -q "\-\-\-\- ERROR \-\-\-\-" output.txt; then
exit 1;
fi
} || {
echo -n $i
echo ' doesnt run'
}
done

- name: Run ESLint
run: |
npm ci
npm run lint
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ node_modules
run.js
blocks.js
historical-data.js
/.idea
yarn.lock
.DS_Store
.vscode

*.log
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore all files
*
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,46 @@

Follow [this guide](https://docs.llama.fi/submit-a-project) to create an adapter and submit a PR with it.

Also, don't hesitate to send a message on [our discord](https://discord.gg/buPFYXzDDd) if we're late to merge your PR.
Also, don't hesitate to send a message on [our discord](https://discord.defillama.com/) if we're late to merge your PR.

> If you would like to add a `volume` adapter please submit the PR [here](https://github.com/DefiLlama/adapters)
> - If you would like to add a `liquidations` adapter, please refer to [this readme document](https://github.com/DefiLlama/DefiLlama-Adapters/tree/main/liquidations) for details.

1. PLEASE PLEASE **enable "Allow edits by maintainers" while putting up the PR.**
2. Once your adapter has been merged, it takes time to show on the UI. No need to notify us on Discord.
3. TVL must be computed from blockchain data (reason: https://github.com/DefiLlama/DefiLlama-Adapters/discussions/432), if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
4. **For updating listing info** It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
5. Do not edit/push `package-lock.json` file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

## Getting listed

Please send answers to questions there https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/pull_request_template.md when creating a PR.

## Work in progress

This is a work in progress. The goal is to eventually handle historical data. DefiLlama aims to be transparent, accurate and open source.
This is a work in progress. DefiLlama aims to be transparent, accurate and open source.

If you have any suggestions, want to contribute or want to chat, please join [our discord](https://discord.defillama.com/) and drop a message.

## Testing adapters
```bash
node test.js projects/pangolin/index.js
# Add a timestamp at the end to run the adapter at a historical timestamp
node test.js projects/aave/v3.js 1729080692
# or using YYYY-MM-DD
node test.js projects/aave/v3.js 2024-10-16
```

## Changing RPC providers
If you want to change RPC providers because you need archive node access or because the default ones don't work well enough you can do so by creating an `.env` file and filling it with the env variables to overwrite:
```
ETHEREUM_RPC="..."
BSC_RPC="..."
POLYGON_RPC="..."
```

If you have any suggestions, want to contribute or want to chat, please join [our discord](https://discord.gg/buPFYXzDDd) and drop a message.
The name of each rpc is `{CHAIN-NAME}_RPC`, and the name we use for each chain can be found [here](https://unpkg.com/@defillama/sdk@5.0.116/build/providers.json). If you run into issues with a chain make sure to update the sdk with `npm update @defillama/sdk`.

## Adapter rules
- Never add extra npm packages, if you need a chain-level package for your chain, ask us and we'll consider it, but we can't accept any npm package that is project-specific
Binary file added bun.lockb
Binary file not shown.
23 changes: 23 additions & 0 deletions env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ETHEREUM_RPC=https://eth-mainnet.gateway.pokt.network/v1/5f3453978e354ab992c4da79
CNDL_RPC=https://rpc.cndlchain.com
BSC_RPC=https://bsc-dataseed4.binance.org
POLYGON_RPC=https://rpc-mainnet.maticvigil.com/
HECO_RPC=https://http-mainnet.hecochain.com
FANTOM_RPC=https://rpcapi.fantom.network
RSK_RPC=https://public-node.rsk.co
TOMOCHAIN_RPC=https://rpc.tomochain.com
XDAI_RPC=https://xdai.poanetwork.dev
AVAX_RPC=https://api.avax.network/ext/bc/C/rpc
WAN_RPC=https://gwan-ssl.wandevs.org:56891
HARMONY_RPC=https://api.s0.t.hmny.io
THUNDERCORE_RPC=https://mainnet-rpc.thundercore.com/archived/DEFILLAMAaakTsRI6LnA
OKEXCHAIN_RPC=https://exchainrpc.okex.org
OPTIMISM_RPC=https://mainnet.optimism.io/
ARBITRUM_RPC=https://arb1.arbitrum.io/rpc
KCC_RPC=https://rpc-mainnet.kcc.network
CELO_RPC=https://forno.celo.org
POLIS_RPC=https://rpc.polis.tech
KLAYTN_RPC=https://public-node-api.klaytnapi.com/v1/cypress
FINDORA_RPC=https://prod-mainnet.prod.findora.org:8545
SOLANA_RPC=https://solana-api.projectserum.com
NOVA_RPC=http://dataseed-0.rpc.novanetwork.io:8545/
53 changes: 53 additions & 0 deletions liquidations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Liquidation Level Adapters

## How it works

A liquidation level adapter iterates through all open positions on a lending/CDP platform and calculates the liquidation prices of all those positions in regard of their collateral assets.

Each adapter is scoped to a protocol. The shape of the adapter's output `LiquidationAdapter` is:

```typescript
interface LiquidationAdapter {
// chain name
[chain: string]: {
liquidations: () => Promise<Liq[]>;
};
}

interface Liq {
owner: string; // owner of this liquidatable position
liqPrice: number; // liquidation price in USD
collateral: string; // collateral asset address with prefix, eg `ethereum:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`
collateralAmount: string; // native, non-decimal adjusted token amount, eg 1 ETH will be `"1000000000000000000"`
extra?: {
displayName?: string; // name of owner to be displayed on positions inspector
url: string; // link to "spy" inspector provided by the protocol, or blockchain explorer
};
}
```

## Examples and references

You may refer to the Aave V2 and Angle Protocol adapter for examples of how multi-chain protocols are handled.

For a complete onchain (non-subgraph) adapter, you may refer to the MakerDAO adapter.

For a hybrid approach using both onchain and indexer data, you may refer to the Compound V2 adapter.

## Caveat

Since all adapter are run in AWS Lambdas, it is essential to make sure your adapter does not take more than 15min to return the result as it's the hard limit set by AWS.

## Test an adapter

Run the following command in the repository root:

```bash
npx ts-node ./liquidations/test.ts ./liquidations/<protocol-name>/index.ts
```

## Note

Since the liquidations dashboard is mostly designed to showcase levels where huge liquidations might happen for people to better hedge their leveraged positions, we'd prefer to only list protocols with market moving potentials to reduce the noise on the UI.

We appreciate PRs for protocols of any size, and the liquidation levels data will all be tracked on the backend. However, smaller protocols may get aggregated into a series called `Others` in the chart on the frontend.
Loading