Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
5474 commits
Select commit Hold shift + click to select a range
cc057ed
Merge pull request #2141 from tkspring-henry/feature/termmax-v2
slasher125 Oct 22, 2025
c136449
Merge pull request #2164 from bracket-fi/master
slasher125 Oct 22, 2025
d73f827
fix
slasher125 Oct 22, 2025
641b8d3
fix
slasher125 Oct 22, 2025
94aabb0
fix
slasher125 Oct 22, 2025
a68f34c
fix project slugs
spider-g Oct 22, 2025
2920491
added coinhain project
lukajevremovic Oct 22, 2025
b228119
aura adapter fix
0xRichter Oct 15, 2025
a41fabe
fix
slasher125 Oct 23, 2025
2c6dd3d
rename
slasher125 Oct 23, 2025
a27be22
fix: match pool IDs with previous values to preserve historic data
0xRichter Oct 22, 2025
add6efe
split adapters according to protocol slug
spider-g Oct 23, 2025
390cdd1
fix: get koala token price on-chain
Klyaus Oct 23, 2025
64ff766
Merge pull request #2143 from Klyaus/master
slasher125 Oct 24, 2025
9399d76
Merge pull request #2166 from aurafinance/aura-adapter-v2
slasher125 Oct 24, 2025
4b5928a
feat(ploutos): add Aave V3 fork integration for APY and TVL
bogdoslavik Oct 24, 2025
5543792
refactor(ploutos): optimize adapter for Aave V3 integration, improve …
bogdoslavik Oct 24, 2025
a3c0d1b
v3 url
waynebruce0x Oct 24, 2025
0f4a0e4
feat(ploutos): integrate Merkl support for rewards, optimize APY logic
bogdoslavik Oct 24, 2025
b75ee9d
refactor(ploutos): deduplicate opportunities, improve Merkl reward in…
bogdoslavik Oct 24, 2025
6bee16f
refactor(ploutos): remove unused ABI modules to clean up codebase
bogdoslavik Oct 24, 2025
8a3f25c
Merge pull request #2167 from DefiLlama/yearn-url
slasher125 Oct 24, 2025
9cfdc95
Merge pull request #2168 from ploutusFi/master
slasher125 Oct 24, 2025
841cd9e
gearbox: add kpk and more plasma pools
alex0xhodler Oct 24, 2025
ac1f9ba
update pool names for clarity
alex0xhodler Oct 24, 2025
f29afc4
refactor: simplify pool symbols by removing 'kpk' prefix
alex0xhodler Oct 24, 2025
4fddc45
feat: add merkl rewards for kpk and new plasma pools
alex0xhodler Oct 24, 2025
58515e8
Merge pull request #2163 from Avant-Protocol/master
slasher125 Oct 24, 2025
dbe63fb
Merge pull request #2169 from alex0xhodler/gearbox/add-kpk-and-more-p…
slasher125 Oct 24, 2025
3ab2f72
Add gloop protocol and uniswap v3 dependancy abis
timrolsh Oct 26, 2025
6af8415
Add utility functions for gloop adapter, constants
timrolsh Oct 26, 2025
9aaca38
Add gloop adapter
timrolsh Oct 26, 2025
90c4fe5
replace endpoint
swan-of-bodom Oct 27, 2025
44f20fc
Merge pull request #2173 from swan-of-bodom/master
slasher125 Oct 27, 2025
e6ea6dc
add supervaults apy server
clydedevv Oct 27, 2025
9478c62
add Molecular info
molecularfinance Oct 28, 2025
873ef58
Merge pull request #2176 from molecularfinance/master
slasher125 Oct 28, 2025
885b875
rename gammaswap
slasher125 Oct 28, 2025
4ec9781
add zealous swap pools
louissaadgo Oct 28, 2025
d95e7d4
fix
slasher125 Oct 28, 2025
f3aa799
removed pool meta & filtering
louissaadgo Oct 28, 2025
8a18a80
add support for V1Plus vault creation events and update vault factories
tkspring-henry Oct 29, 2025
f6fe9d5
Merge pull request #2178 from tkspring-henry/feature/termmax-v1-plus
slasher125 Oct 29, 2025
ec7b832
calculate reserves on-chain & TVL using Defillama's Price feeds
louissaadgo Oct 29, 2025
355498d
Add Bluefin CLMM Pools APY tracking
abdullahabro Oct 29, 2025
a680365
fikter out pools with only >10k tvl
abdullahabro Oct 29, 2025
2643ad4
Change project name
abdullahabro Oct 29, 2025
6f01283
enable
slasher125 Oct 29, 2025
692c168
Change folder name
abdullahabro Oct 29, 2025
079013d
remove old folder
abdullahabro Oct 29, 2025
d84ae5a
Merge pull request #2177 from louissaadgo/feat/add-zealous-swap-pools
slasher125 Oct 29, 2025
ea67b51
Merge pull request #2179 from abdullahabro/master
slasher125 Oct 30, 2025
711182f
saga chain added
neelra8n Oct 30, 2025
f1ea343
Merge pull request #2180 from neelra8n/master
slasher125 Oct 30, 2025
bcf8f52
Change koalaswap pools data source on subgraph
Klyaus Oct 30, 2025
4ea0bf9
Merge pull request #2181 from Klyaus/master
slasher125 Oct 31, 2025
212975a
Remove poolMeta field per reviewer feedback
clydedevv Oct 31, 2025
8ccecbc
Merge pull request #2175 from clydedevv/master
slasher125 Oct 31, 2025
128555f
Merge branch 'DefiLlama:master' into master
skords Oct 31, 2025
8420ff3
update avantis vault
skords Oct 31, 2025
181e4d3
update avantis vault
skords Oct 31, 2025
e6cc66f
Merge branch 'master' of https://github.com/Avantis-Labs/yield-server
skords Oct 31, 2025
eb4994a
Merge branch 'master' of https://github.com/Avantis-Labs/yield-server
skords Oct 31, 2025
305d062
Merge branch 'master' of https://github.com/Avantis-Labs/yield-server
skords Oct 31, 2025
b5539ba
Merge pull request #2182 from Avantis-Labs/master
slasher125 Oct 31, 2025
11ae8a3
Add Yield Adaptor for Plasma
Numerikat Nov 1, 2025
8e4274e
Merge pull request #2183 from Numerikat/enclabs-yields
slasher125 Nov 2, 2025
7424c1a
Scale apy base and apy reward fields to percent values
timrolsh Nov 3, 2025
d3f601e
Merge pull request #2170 from GloopFinance/master
slasher125 Nov 3, 2025
90eceb5
add (Strata) Junior and Senior USDe Tranches
alxstrata Nov 3, 2025
a99d8e4
track 40-acres blackhole yield
KPHEMRAJ Nov 4, 2025
75180ee
feat(metrom): adapt to new api structure
luzzif Nov 4, 2025
85a1cf3
Merge pull request #2184 from Strata-Money/master
slasher125 Nov 4, 2025
9388669
Merge pull request #2185 from KPHEMRAJ/40-acres-bh
slasher125 Nov 4, 2025
993e489
Merge pull request #2186 from metrom-xyz/master
slasher125 Nov 4, 2025
46f3649
feat: intro frankencoin lending integration
samclassix Nov 4, 2025
3c5b087
feat: removed unused props, token address to lower case
samclassix Nov 4, 2025
f4791d5
feat: integrated borrowPools via borrow position v2
samclassix Nov 4, 2025
56a5546
feat: remove debuging console.log
samclassix Nov 4, 2025
2af4ac2
feat: url to actual borrow position
samclassix Nov 4, 2025
cac0880
update rpc env
slasher125 Nov 5, 2025
1726b29
Merge pull request #2188 from Frankencoin-ZCHF/add-frankencoin-yield-…
slasher125 Nov 5, 2025
798c90d
feat: add rocky sUSDr
FabienCoutant Nov 5, 2025
fd04606
Merge branch 'DefiLlama:master' into feat/add-rocky
FabienCoutant Nov 5, 2025
c0373f2
add bsc pools
nvduc91 Nov 7, 2025
edbcd72
Merge pull request #2191 from nvduc91/feat/kyber-add-arbitrum
slasher125 Nov 7, 2025
4f20592
fix starknet rpc
slasher125 Nov 11, 2025
f481c37
bex fix
slasher125 Nov 11, 2025
8789d1b
fix velodrome v3 sugar
noateden Nov 11, 2025
8b50aa6
added saga vyusd
neelra8n Nov 11, 2025
fd69967
Fix nest-credit adaptor: add APY logic and required fields
kristinatub Nov 11, 2025
5b8da40
Merge branch 'DefiLlama:master' into fix/nest-credit-apy-simple
kristinatub Nov 11, 2025
5bd68b1
feat: Add Isle Finance adapter
Jung0x12 Nov 12, 2025
abc6d20
Merge pull request #2195 from neelra8n/master
slasher125 Nov 12, 2025
f4ae12b
Merge pull request #2197 from isle-labs/isle-finance
slasher125 Nov 12, 2025
e3626a1
exclude
slasher125 Nov 12, 2025
7a6bd3c
Add yieldBearingTokens (#1)
AnshcSigma Nov 12, 2025
0b87f3a
fix velo v3
slasher125 Nov 12, 2025
0afaaa2
chore: update reserve protocol apys
JuampiRombola Nov 12, 2025
86a25d7
morpho-v1, show OP rewards
slasher125 Nov 13, 2025
cd95993
Merge pull request #2198 from AnshcSigma/master
slasher125 Nov 13, 2025
c4ad084
Merge pull request #2199 from JuampiRombola/master
slasher125 Nov 13, 2025
ee50d64
Merge pull request #2189 from rocky-protocol/feat/add-rocky
slasher125 Nov 13, 2025
fc36cc5
chore(silo-v2): exclude stream-impacted markets and vaults
JayWelsh Nov 14, 2025
6b9205d
adding kaspacom-dex yields
giladm11 Nov 13, 2025
01d1963
fix polynomial-liquidit
slasher125 Nov 18, 2025
6f24ceb
Merge pull request #2200 from giladm11/adding-kaspacom-dex-yields
slasher125 Nov 18, 2025
af15ec9
notional-v3 fix
slasher125 Nov 18, 2025
44c31ab
fix stakedao
slasher125 Nov 18, 2025
e28476a
feat: wstlink
palace22 Nov 18, 2025
0a7f62c
add btcfi project
tlatkdgus1 Nov 20, 2025
bbaaa48
Merge pull request #2201 from silo-finance/feat/silo-v2-vault-support
slasher125 Nov 20, 2025
5e287d0
Merge pull request #2202 from palace22/feat/wstlink
slasher125 Nov 20, 2025
412d89e
rename btcfi to btcfi-cdp, update adaptors logic
tlatkdgus1 Nov 21, 2025
f7d1c46
Fix orca-dex
calintje Nov 21, 2025
d5908af
try fix velodrome v3 missing pools
noateden Nov 21, 2025
429c3a7
remove addresses from exclusion
slasher125 Nov 22, 2025
cef4bb8
fix
slasher125 Nov 22, 2025
c959880
add yuzu-money
lucasgleba Nov 24, 2025
68bd91d
adding yield for iaero
iaeroProtocol Nov 24, 2025
7b1a178
feat: monad chain and tokens
palace22 Nov 24, 2025
77d3ffd
Merge branch 'DefiLlama:master' into fix/nest-credit-apy-simple
kristinatub Nov 24, 2025
3335ccd
update sdk
slasher125 Nov 25, 2025
87ce5c3
Merge pull request #2208 from palace22/folks-finance/monad-tokens
slasher125 Nov 25, 2025
7609cff
Merge pull request #2196 from kristinatub/fix/nest-credit-apy-simple
slasher125 Nov 25, 2025
034fd5c
nest-credit fix urls
slasher125 Nov 25, 2025
d6f19cc
Merge pull request #2206 from Telos-Consilium/yuzu-money
slasher125 Nov 25, 2025
c582ed8
add rpc
slasher125 Nov 25, 2025
5836458
update axios
tlatkdgus1 Nov 25, 2025
b782b22
rename project to iaero-protocol as requested
iaeroProtocol Nov 25, 2025
11238f2
revert package-lock.json
iaeroProtocol Nov 25, 2025
e1da180
feat: add Monad chain support to Gearbox protocol adapter
alex0xhodler Nov 25, 2025
8f14f7d
Merge pull request #2207 from alex0xhodler/feature/gearbox-on-monad
slasher125 Nov 25, 2025
45821bd
Merge pull request #2203 from tlatkdgus1/master
slasher125 Nov 25, 2025
8e33a7b
Merge pull request #2209 from iaeroProtocol/master
slasher125 Nov 25, 2025
d445791
add hyperliquid graph URL to the graphUrls configuration
Dakavon Nov 25, 2025
0e7c720
Add nabla indexer pool metrics fetching for Monad
Dakavon Nov 25, 2025
6dccbc1
Merge pull request #2204 from calintje/fix/orca-dex
slasher125 Nov 26, 2025
2c4e485
Merge pull request #2210 from NablaFinance/update-nablaFinance-hyperE…
slasher125 Nov 26, 2025
9a86ebf
feat: add native-credit-pool yields
June-native Nov 27, 2025
fe4e706
Update Size Credit API
aviggiano Nov 28, 2025
6f14d4d
Rename size-credit to rheo adaptor
aviggiano Nov 28, 2025
75f25a6
Create index.js
Codonyat Nov 28, 2025
e46d879
feat:gmon
palace22 Dec 1, 2025
c7edc0d
fix and update pendle
noateden Dec 1, 2025
86bf87c
add llama indexer secrets
0xngmi Dec 1, 2025
18e37ca
feat(gearbox): add AUSD pool on Monad with MON rewards (#2215)
alex0xhodler Dec 2, 2025
aa053ac
feat(Vaults-V2): adding contribution of vaults-v2 into morpho-v1 (#2217)
tomrpl Dec 2, 2025
635247e
Shmonad pr (#2218)
noateden Dec 2, 2025
af3ec0a
add ramses-hl yields
0xShad0w Dec 3, 2025
6ef642e
fix phar-v3 yields
0xShad0w Dec 3, 2025
6effa0b
fix
0xShad0w Dec 3, 2025
2cee326
fix(yo-protocol): streamline URL formatting and add support for yoGOL…
kraikov Dec 3, 2025
8056e27
update from alchemy to goldsky
frontier159 Dec 4, 2025
db7ded4
- Added 32 isolated RIZ lending pools across Arbitrum, BSC, and Base
0xKonstantin Dec 4, 2025
c5b2b6e
Merge pull request #2223 from 0xKonstantin/master
g1nt0ki Dec 4, 2025
1be0dc0
Add Monad for Morpho v1
iamvukasin Dec 4, 2025
5bfbcd4
Merge pull request #2211 from June-native/feat/native
slasher125 Dec 8, 2025
96c6d7c
Merge pull request #2212 from aviggiano/update-endpoint-rheo
slasher125 Dec 8, 2025
748cfd4
Merge pull request #2216 from palace22/folks-finance/gmon
slasher125 Dec 8, 2025
f9b03f7
Merge pull request #2221 from yoprotocol/master
slasher125 Dec 8, 2025
19b5c9c
Merge pull request #2222 from frontier159/origami-goldsky
slasher125 Dec 8, 2025
82d5f7e
Merge pull request #2224 from iamvukasin/monad-morpho-v1
slasher125 Dec 8, 2025
325a1f7
Merge pull request #2220 from 0xShad0w/phar-v3
slasher125 Dec 8, 2025
3564463
uniswap-v2 fix url
slasher125 Dec 8, 2025
78cd676
uni v3 fix url
slasher125 Dec 8, 2025
1bdcaf1
fix: fixed symbol and added poolmeta
Codonyat Dec 8, 2025
a5483cd
Merge pull request #2213 from Codonyat/master
slasher125 Dec 8, 2025
fe8f181
Add Monad for PancakeSwap AMM
iamvukasin Dec 8, 2025
3c1be85
feat: add Flare, Monad on Spectra
Ulydev Dec 8, 2025
3c94518
feat adding yeild to magma protocol
diyahir Dec 8, 2025
46b6174
Update index.js
diyahir Dec 8, 2025
c61d62c
Update index.js
diyahir Dec 8, 2025
832a028
moving ´magma-protocol´ to ´magma-staking´
diyahir Dec 8, 2025
23671cf
Merge pull request #2225 from iamvukasin/monad-pancakeswap-amm
slasher125 Dec 8, 2025
08709a1
Update API URL for Ekubo to Starknet mainnet
Define101 Dec 8, 2025
ada3243
Add Accountable integration for loan vaults and yield calculations
pawell24 Dec 9, 2025
da0f034
remove stream-finance
slasher125 Dec 10, 2025
10ea47a
add additional exclusion checks
slasher125 Dec 10, 2025
b1a088a
add ramses-hl-cl yields
0xShad0w Dec 10, 2025
c548209
fix protocol
0xShad0w Dec 10, 2025
1750a60
Enhance Accountable integration by adding Merkl rewards fetching and …
pawell24 Dec 10, 2025
9b1359c
update exclusion list
slasher125 Dec 11, 2025
3e7b51c
Merge pull request #2227 from diyahir/master
slasher125 Dec 11, 2025
9f4a2e4
Merge pull request #2230 from pawell24/feat/accountable
slasher125 Dec 11, 2025
7839dd8
Merge pull request #2231 from 0xShad0w/master
slasher125 Dec 11, 2025
d50bab6
fix
slasher125 Dec 11, 2025
c8ec6c2
aura update graphs
slasher125 Dec 11, 2025
0014b45
init thesauros provider
PillarDevelopment Dec 11, 2025
4151541
arb
PillarDevelopment Dec 11, 2025
1df2ad5
Update index.js
PillarDevelopment Dec 11, 2025
1e8b049
Add Kintsu for Monad
iamvukasin Dec 12, 2025
4caff4a
Merge pull request #2233 from iamvukasin/master
slasher125 Dec 15, 2025
37bec75
Merge pull request #2232 from Thesauros/master
slasher125 Dec 15, 2025
a2accae
Refactor Accountable integration to remove Merkl rewards fetching and…
pawell24 Dec 15, 2025
dbc9a81
Incorporate liquidation gains into apy calcs
RickGriff Dec 15, 2025
04bdd89
update exclusion
slasher125 Dec 15, 2025
373daa0
fix
slasher125 Dec 15, 2025
6f27dd4
update exclusion
slasher125 Dec 15, 2025
f72d1d6
add lombard-lbtc
slasher125 Dec 15, 2025
a6ad261
gmx v2 swap graph, fix
slasher125 Dec 15, 2025
3f2f4fb
Merge pull request #2234 from pawell24/feat/accountable
slasher125 Dec 16, 2025
c2c6e91
Merge pull request #2235 from RickGriff/liquity_v2_yield_adaptor
slasher125 Dec 16, 2025
32803d8
add hermes-v2 adapter and implement gauge staking APR tracking
0xBugsy Dec 17, 2025
bcb58b3
Add spark savings vaults
b-tarczynski Dec 17, 2025
7267b92
updated asset and provider names
PillarDevelopment Dec 17, 2025
fe7acf4
update exclusion
slasher125 Dec 17, 2025
aa73e35
fix: usual api apr key
slasher125 Dec 17, 2025
c4548e0
usual fix
slasher125 Dec 17, 2025
093e894
feat: shmon
palace22 Dec 17, 2025
8decce5
Refactor APY calculation logic in Accountable integration to utilize …
pawell24 Dec 17, 2025
73dceaa
Merge pull request #2237 from b-tarczynski/spark-savings
slasher125 Dec 18, 2025
22d7d42
Merge pull request #2238 from Thesauros/master
slasher125 Dec 18, 2025
e928faa
Merge pull request #2239 from palace22/folks-finance/shmon
slasher125 Dec 18, 2025
4397240
Merge pull request #2240 from pawell24/feat/accountable
slasher125 Dec 18, 2025
e4c6be9
fix: update incentive timing logic, incentive data queries and epoch …
0xBugsy Dec 18, 2025
7e670cf
feat: add APY calculation for Clober pools integration
graykode Dec 19, 2025
9b4062f
fix: simplify data structure for APY calculation
graykode Dec 19, 2025
1d7b3cc
fix: update APY calculation to handle merkleApy correctly
graykode Dec 19, 2025
1033c6c
fix avax urls
slasher125 Dec 20, 2025
b1accf7
Merge pull request #2242 from clober-dex/master
slasher125 Dec 20, 2025
f22938c
feat: add MuDigital protocol adapter
louis-mudigital Dec 22, 2025
2c860dd
Merge pull request #2243 from Mu-Digital/add/mu-digital-adapter
slasher125 Dec 22, 2025
ccec5f2
fix
slasher125 Dec 22, 2025
402425c
spark savings fix
slasher125 Dec 22, 2025
9e55dee
fix: update efficiency calculation to always use 'WIDE' preset width
0xBugsy Dec 22, 2025
0490adc
feat: add Neverland lending base & incentives APY
0xCatalyst Dec 22, 2025
92cb58c
feat: add veDUST pool with revenue rewards APY
0xCatalyst Dec 23, 2025
e8581d7
refactor: extract reward APY calculation into reusable function
0xCatalyst Dec 23, 2025
a4cf166
Merge pull request #2236 from 0xBugsy/master
slasher125 Dec 23, 2025
90fa5c2
fix: properly distinguish 0 from undefined rewards
0xCatalyst Dec 23, 2025
9a2bf37
updated provider address
PillarDevelopment Dec 24, 2025
d28431c
fix: fix veDUST pool APY calculation; replace apyReward to apyBase
0xCatalyst Dec 25, 2025
31c950c
Merge pull request #2245 from 0xCatalyst/feat/neverland-yields
slasher125 Dec 25, 2025
a483ed8
Merge pull request #2247 from Thesauros/master
slasher125 Dec 25, 2025
f23bed2
fix: revert APY from apyBase to apyReward - VEDUST
0xCatalyst Dec 26, 2025
1e12711
Project migrated to Ethereum
shakal187 Dec 27, 2025
1740990
Merge pull request #2248 from 0xCatalyst/fix/neverland-apyBase-apyReward
slasher125 Dec 27, 2025
c7a112f
Merge pull request #2249 from shakal187/master
slasher125 Dec 29, 2025
4a0792c
Merge pull request #2165 from lukajevremovic/master
slasher125 Dec 29, 2025
8689cde
fix
slasher125 Dec 29, 2025
0c3aa42
Merge pull request #2226 from Ulydev/master
slasher125 Dec 29, 2025
d7d8f51
bbSOL fix api
slasher125 Dec 29, 2025
945a2d2
kelp fix api
slasher125 Dec 29, 2025
1ca522a
uniswap v4
slasher125 Dec 29, 2025
870cef1
feat: add seamless-v2, remove seamless-v1 (#1)
chad-js Dec 29, 2025
1f60ce3
Merge pull request #2250 from chad-js/master
slasher125 Dec 30, 2025
bac0779
inverse-finance-firm fix
slasher125 Dec 30, 2025
3ac7e6d
uni v4 fix
slasher125 Dec 30, 2025
a041416
fix
slasher125 Dec 30, 2025
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
  •  
  •  
  •  
59 changes: 30 additions & 29 deletions .github/workflows/commentResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,37 @@ const fetch = require('node-fetch');
const junk = 'VPTOH1X0B7rf8od7BGNsQ1z0BJk8iMNLxqrD';

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

const jestError = 'FAIL src/adaptors/test.js';
const jestSuccess = 'PASS src/adaptors/test.js';
const summaryIndex = file.indexOf('Test Suites:');
const jestSuccessIndex = file.indexOf(jestSuccess);
const jestErrorIndex = file.indexOf(jestError);
let body;

const errorString = '------ ERROR ------';
const summaryIndex = file.indexOf('------ TVL ------');
const errorIndex = file.indexOf(errorString);
let body;
if (jestErrorIndex === -1 && jestSuccessIndex !== -1) {
body = `The ${adapter} adapter exports pools:
\n \n ${file.substring(summaryIndex).replaceAll('\n', '\n ')}`;
} else if (jestErrorIndex !== -1) {
body = `Error while running ${adapter} adapter:
\n \n ${file.substring(summaryIndex).replaceAll('\n', '\n ')}}`;
} else return;

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 fetch(
`https://api.github.com/repos/${author}/${repo}/issues/${pr}/comments`,
{
body,
method: "POST",
headers: {
Authorization: `token ghp_${translate(junk)}`,
Accept: 'application/vnd.github.v3+json'
}
});
};
await fetch(
`https://api.github.com/repos/${author}/${repo}/issues/${pr}/comments`,
{
body: JSON.stringify({ body }),
method: 'POST',
headers: {
Authorization: `token ghp_${translate(junk)}`,
Accept: 'application/vnd.github.v3+json',
},
}
);
}
function translate(input) {
return input ? translate(input.substring(1)) + input[0] : input;
};
main();
return input ? translate(input.substring(1)) + input[0] : input;
}
main();
24 changes: 16 additions & 8 deletions .github/workflows/getFileList.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
const MODIFIED = parse(process.env.MODIFIED)
const ADDED = parse(process.env.ADDED)
const MODIFIED = parse(process.env.MODIFIED);
const ADDED = parse(process.env.ADDED);
const fileSet = new Set();

[...MODIFIED, ...ADDED].forEach(file => {
const [root0, root1, dir] = file.split('/')
if (root0 === 'src' && root1 === 'adaptors' && dir !=='test.js' && dir !== 'utils.js') fileSet.add(file)
})
[...MODIFIED, ...ADDED].forEach((file) => {
const [root0, root1, dir] = file.split('/');
if (
root0 === 'src' &&
root1 === 'adaptors' &&
dir !== 'test.js' &&
dir !== 'utils.js' &&
dir !== 'package.json' &&
dir !== 'package-lock.json'
)
fileSet.add(dir);
});

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

function parse(data) {
return data.replace('[', '').replace(']', '').split(',')
return data.replace('[', '').replace(']', '').split(',');
}
40 changes: 30 additions & 10 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
deploy:
strategy:
matrix:
node-version: [14.x]
node-version: [16.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -17,18 +17,38 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: node scripts/createAdapterList.js
- name: Deploy infrastructure stack
run: npm run deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ETHERSCAN: ${{ secrets.ETHERSCAN}}
FANTOMSCAN: ${{ secrets.FANTOMSCAN }}
POLYGONSCAN: ${{ secrets.POLYGONSCAN }}
SNOWTRACE: ${{ secrets.SNOWTRACE }}
ARBISCAN: ${{ secrets.ARBISCAN }}
OPTIMISM: ${{ secrets.OPTIMISM }}
INFURA_CONNECTION: ${{ secrets.INFURA_CONNECTION }}
ALCHEMY_CONNECTION_POLYGON: ${{ secrets.ALCHEMY_CONNECTION_POLYGON }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
ALCHEMY_CONNECTION_ARBITRUM: ${{ secrets.ALCHEMY_CONNECTION_ARBITRUM }}
XDAI: ${{ secrets.XDAI }}
ALCHEMY_CONNECTION_ETHEREUM: ${{ secrets.ALCHEMY_CONNECTION_ETHEREUM }}
ALCHEMY_CONNECTION_POLYGON: ${{ secrets.ALCHEMY_CONNECTION_POLYGON }}
ETHEREUM_RPC: ${{ secrets.ETHEREUM_RPC }}
XDAI_RPC: ${{ secrets.XDAI_RPC }}
CRONOS_RPC: ${{ secrets.CRONOS_RPC }}
FANTOM_RPC: ${{ secrets.FANTOM_RPC }}
OPTIMISM_RPC: ${{ secrets.OPTIMISM_RPC }}
AVAX_RPC: ${{ secrets.AVAX_RPC }}
ARBITRUM_RPC: ${{ secrets.ARBITRUM_RPC }}
TRON_RPC: ${{ secrets.TRON_RPC }}
BASE_RPC: ${{ secrets.BASE_RPC }}
TVL_SPIKE_WEBHOOK: ${{ secrets.TVL_SPIKE_WEBHOOK }}
NEW_YIELDS_WEBHOOK: ${{ secrets.NEW_YIELDS_WEBHOOK }}
STALE_PROJECTS_WEBHOOK: ${{ secrets.STALE_PROJECTS_WEBHOOK }}
ZEROX_API: ${{ secrets.ZEROX_API }}
SMARDEX_SUBGRAPH_API_KEY: ${{ secrets.SMARDEX_SUBGRAPH_API_KEY }}
VENDOR_FINANCE: ${{ secrets.VENDOR_FINANCE }}
TRADERJOE: ${{ secrets.TRADERJOE }}
GRAPH_API_KEY: ${{ secrets.GRAPH_API_KEY }}
OSMOSIS_API_KEY: ${{ secrets.OSMOSIS_API_KEY}}
DUNE_API_KEY: ${{ secrets.DUNE_API_KEY}}
HYPERLIQUID_RPC: ${{ secrets.HYPERLIQUID_RPC }}
PLASMA_RPC: ${{ secrets.PLASMA_RPC }}
STARKNET_RPC: ${{ secrets.STARKNET_RPC }}
MONAD_RPC: ${{ secrets.MONAD_RPC }}
LLAMA_INDEXER_V2_ENDPOINT: ${{ secrets.LLAMA_INDEXER_V2_ENDPOINT }}
LLAMA_INDEXER_V2_API_KEY: ${{ secrets.LLAMA_INDEXER_V2_API_KEY }}
23 changes: 14 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
name: Test_Change
on:
pull_request
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- id: file_changes
uses: trilom/file-changes-action@v1.2.3
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272
with:
output: 'json'
fileOutput: 'json'
- name: Check out repository code
uses: actions/checkout@v2
- name: Run changes files through test script
env:
ALCHEMY_CONNECTION_ARBITRUM: ${{ secrets.ALCHEMY_CONNECTION_ARBITRUM }}
ALCHEMY_CONNECTION_ETHEREUM: ${{ secrets.ALCHEMY_CONNECTION_ETHEREUM }}
ALCHEMY_CONNECTION_POLYGON: ${{ secrets.ALCHEMY_CONNECTION_POLYGON }}
run: |
RUN_FILES=$(
MODIFIED=${{ steps.file_changes.outputs.files_modified}} \
Expand All @@ -25,17 +28,19 @@ jobs:
exit 0
fi

npm ci --production --only=prod
npm ci

for i in $(echo $RUN_FILES | tr -d '"[]' | tr "," "\n")
do
{
node ${{ github.workspace }}/src/adaptors/test.js ${{ github.workspace }}/${i} 2>&1 | tee output.txt
do
{
npm run test --adapter=${i} 2>&1 | tee output.txt
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/yield-server/yield-server/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i}
if grep -q "\-\-\-\- ERROR \-\-\-\-" output.txt; then
if grep -q "PASS src/adaptors/test.js" output.txt; then
exit 0;
else
exit 1;
fi
} || {
} || {
echo -n $i
echo ' doesnt run'
}
Expand Down
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,18 @@ ccImages
.webpack
.idea/
*output.json
*.csv
scripts/*.json
src/adaptors/list.js
Untitled.ipynb
.ipynb_checkpoints/
yarn-error.log
test.sql
yarn.lock
.test-adapter-output/


src/adaptors/maverick-protocol/
src/adaptors/metavault-v3/
src/adaptors/muuu-finance/navi-lending/
src/adaptors/syncswap/
Empty file modified .prettierrc
100755 → 100644
Empty file.
114 changes: 87 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,102 @@

## How to list a new protocol

1. Fork this repository
2. Create a new folder within [src/adaptors/](src/adaptors/) with your protocol name (use your project `slug` from `https://api.llama.fi/protocols`)
3. Write an adaptor for your protocol (tutorial below)
4. Test your adaptor by running `node src/adaptors/test.js src/adaptors/YOUR_ADAPTOR/index.js` (remember to install dependencies with `npm i` first!)
5. Submit a PR
1. Make sure you are listed on defillama's TVL page (see https://github.com/DefiLlama/DefiLlama-Adapters)
2. Fork this repository
3. Create a new folder within [src/adaptors/](src/adaptors/) with your protocol name (use your project `slug` from `https://api.llama.fi/protocols`)
4. Write an adaptor for your protocol (tutorial below)
5. `cd src/adaptors` and run `npm i`
6. Test your adaptor by running `npm run test --adapter=YOUR_ADAPTER`
7. Submit a PR

### Data sources

The data must be fetched from on-chain calls or from subgraphs. Centralised api calls are only accepted if there is no other way of obtaining that data (eg off-chain gauge weights).

### APY Methodology

Our goal is to display minimum attainable yield values for all listed projects:

- Omit any pre-mined rewards
- Use unboosted (lower bound) apy values
- If rewards are slashed when exiting a pool early, then set the apy value to that lower bound.
- Omit any yield which requires an additional token aside from the LP token (eg veCRV to boost reward yields)
- Omit any locked rewards
- Fee based APY values should be calculated over a 24h window

### Adaptors

An adaptor is just a javascript file that exports an async function that returns an array of objects that represent pools of a protocol. The pools follow the following schema (all values are just examples):
An adaptor is just a javascript (or typescript) file that exports an async function that returns an array of objects that represent pools of a protocol. The pools follow the following schema (all values are just examples):

```typescript
interface Pool {
pool: string;
chain: string;
project: string;
symbol: string;
tvlUsd: number; // for lending protocols: tvlUsd = totalSupplyUsd - totalBorrowUsd
apyBase?: number;
apyReward?: number;
rewardTokens?: Array<string>;
underlyingTokens?: Array<string>;
poolMeta?: string;
url?: string;
// optional lending protocol specific fields:
apyBaseBorrow?: number;
apyRewardBorrow?: number;
totalSupplyUsd?: number;
totalBorrowUsd?: number;
ltv?: number; // btw [0, 1]
}
```

```js
```typescript
{
pool: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae90xb53c1a33016b2dc2ff3653530bff1848a515c8c5", // unique identifier for the pool
chain: "Ethereum", // chain where the pool is
pool: "0x3ed3b47dd13ec9a98b44e6204a523e766b225811-ethereum", // unique identifier for the pool in the form of: `${ReceivedTokenAddress}-${chain}`.toLowerCase()
chain: "Ethereum", // chain where the pool is (needs to match the `name` field in here https://api.llama.fi/chains)
project: 'aave', // protocol (using the slug again)
symbol: "USDT", // symbol of the tokens in pool, can be a single symbol if pool is single-sided or multiple symbols (eg: USDT-ETH) if it's an LP
tvlUsd: 1000.1, // number representing current USD TVL in pool
apy: 1.2, // current APY of the pool in %
apyBase: 0.5, // APY from pool fees/supplying in %
apyReward: 0.7, // APY from pool LM rewards in %
rewardTokens: ['0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9'], // Array of reward token addresses (you can omit this field if a pool doesn't have rewards)
underlyingTokens: ['0xdAC17F958D2ee523a2206206994597C13D831ec7'], // Array of underlying token addresses from a pool, eg here USDT address on ethereum
poolMeta: "V3 market", // A string value which can stand for any specific details of a pool position, market, fee tier, lock duration, specific strategy etc
};
```

```
A note on how to set apy related fields:

- if a pool's apy only consists of a base component, provide `apyBase` and omit `apyReward` (or set to null) [and vice versa]
- if a pool's apy consists of both, provide both fields
- if you are unsure/your data source doesn't contain a detailed breakdown, then provide an `apy` field indicating the total apy and omit the `apyBase` and `apyReward` fields (or set to null)
```

### FAQ

#### Why are some pools missing on DefiLlama which appear on my adapter?

DefiLlama only displays pools with >10k TVL, so pools with less TVL than that will appear on the adapter but not on defillama

#### I'm getting errors when running `npm install`

Make sure you're running the command inside the `src/adaptors` folder, not in the project root folder.

#### Why is X pool missing from https://defillama.com/yields/stablecoins ?

That page has stricter filters than other pages, only pools with >1M TVL and on audited protocols are included there.

### Adapter module structure

```js
module.exports = {
timetravel: false,
apy: apy, // Main function, returns pools
url: 'https://example.com/pools', // Link to page with pools (Only required if you do not provide url's for each pool)
};
```

An example of the most basic adaptor is the following for Anchor on terra:

```js
Expand Down Expand Up @@ -51,23 +126,8 @@ const poolsFunction = async () => {
module.exports = {
timetravel: false,
apy: poolsFunction,
url: 'https://app.anchorprotocol.com/#/earn',
};
```

You can find examples for a bunch of other protocols in the [src/adaptors/](src/adaptors/) folder, and if you have any questions feel free to ask them on [our discord](https://discord.gg/defillama).

## Running the server

This is not needed if you just want to contribute an a new protocol through an adapter, only needed if you want to fork defillama.

### set api keys in config.env

```
ETHERSCAN=
FANTOMSCAN=
POLYGONSCAN=
SNOWTRACE=
ARBISCAN=
OPTIMISM=
INFURA_CONNECTION=
```
You can find examples for a bunch of other protocols in the [src/adaptors/](src/adaptors/) folder, and if you have any questions feel free to ask them on [our discord](https://discord.defillama.com/).
11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = function (api) {
api.cache(true);

return {
"presets": ["@babel/preset-typescript"],
"plugins": [
["@babel/plugin-transform-runtime"]
],
"sourceType": "unambiguous"
};
}
Loading