Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
5307 commits
Select commit Hold shift + click to select a range
f1d8f92
impermax fix
slasher125 Sep 22, 2025
8daa969
fixes
slasher125 Sep 22, 2025
fde0c25
Merge pull request #2109 from 0xMasayoshi/feat/sushi-v3-merkl
slasher125 Sep 22, 2025
3546aba
Merge pull request #2107 from Pochetes/gammaswap/yield-tokens-adaptor
slasher125 Sep 22, 2025
668268b
add etherex-cl yields
0xShad0w Sep 22, 2025
f151850
echelon market fix: remove susde yield from apyReward
slasher125 Sep 23, 2025
62c8455
feat/vault-rewards
AndonMitev Sep 23, 2025
86bb354
fix/add-empty-line
AndonMitev Sep 23, 2025
11e2d8e
Merge pull request #2 from yoprotocol/feat/vault-rewards
kraikov Sep 23, 2025
0db7cd8
Merge pull request #2101 from holdstation/feat/add-apy-bsc
slasher125 Sep 23, 2025
2d56424
Merge pull request #2105 from teller-protocol/teller-add-pools-v2
slasher125 Sep 23, 2025
2b574ed
fix
0xShad0w Sep 23, 2025
682ca1c
fix
0xShad0w Sep 23, 2025
5dcde31
feat: update worldchain apy
holdstation Sep 23, 2025
0712c42
Merge pull request #2113 from holdstation/feat/add-apy-worldchain
slasher125 Sep 23, 2025
7b1a298
Merge pull request #2110 from 0xShad0w/master
slasher125 Sep 23, 2025
0a25429
fix: yield token symbol + poolMeta
Pochetes Sep 23, 2025
0dc569d
Merge pull request #2114 from Pochetes/gammaswap/yield-tokens-symbol
slasher125 Sep 23, 2025
67bc0de
refactor: yieldtoken strategy APY using proportional fees algo
Pochetes Sep 23, 2025
b040ea3
add shadow-exchange-clmm yields
0xShad0w Sep 24, 2025
3f1c58f
chore: move yo services inside yo-protocol adapter
AndonMitev Sep 24, 2025
1e67962
Merge pull request #3 from yoprotocol/chore/move-yo-services-in-yo-ad…
kraikov Sep 24, 2025
198238d
Merge pull request #2112 from yoprotocol/master
slasher125 Sep 24, 2025
abfe03b
MidasRWA: on-chain APY calculations
dmytro-horbatenko Sep 24, 2025
9d01180
fix
0xShad0w Sep 24, 2025
0196b27
Added Loopscale APY
luke-truitt Sep 25, 2025
2433612
Merge pull request #2116 from 0xShad0w/master
slasher125 Sep 26, 2025
aa7c49f
Merge pull request #2117 from midas-apps/master
slasher125 Sep 26, 2025
27285c2
Merge pull request #2118 from Pochetes/feat/overlap-based-strategy-ap…
slasher125 Sep 26, 2025
0894221
add sendit to yield-server
devsolandra Sep 26, 2025
bc2468e
sendit: fix tvl, add borrowed amount, fix sol price, vault naming
devsolandra Sep 26, 2025
da84963
added reward tokens
luke-truitt Sep 26, 2025
13f5a57
remove unneeded import
luke-truitt Sep 26, 2025
e31dcaf
adds plasma protocol data provider
mattw09 Sep 27, 2025
b245185
upgrade sdk
slasher125 Sep 27, 2025
c596c0d
feat: Add Kinetic FXRP isolated market
EdgarRBL Sep 28, 2025
b2369c3
add tokemak plasma and arbitrum
codenutt Sep 28, 2025
26c9d54
fix
slasher125 Sep 28, 2025
e677cc1
Merge pull request #2122 from mattw09/adds-aave-plasma-markets
slasher125 Sep 28, 2025
35c305b
Merge pull request #2119 from LoopscaleLabs/master
slasher125 Sep 28, 2025
b84474c
Merge pull request #2123 from kinetic-market/kineticFXRPIsoMarket
slasher125 Sep 28, 2025
cedf330
Merge pull request #2124 from codenutt/add-tokemak-arb-plasma
slasher125 Sep 29, 2025
dc78cba
Merge pull request #2121 from devsolandra/master
slasher125 Sep 29, 2025
96f1d48
fix
slasher125 Sep 29, 2025
20ccafb
remove pools
slasher125 Sep 29, 2025
afdeaa5
remove adapter
slasher125 Sep 29, 2025
6bfb005
[endur/index] added BTC variant support
Sep 30, 2025
a399628
minor refac
Sep 30, 2025
43ccd19
refac
Sep 30, 2025
3d37765
refac
Sep 30, 2025
03fb899
todo fix
Sep 30, 2025
8b04e62
todo pool id
Sep 30, 2025
b0c6b84
feat: eurc, teth, tavax
palace22 Sep 30, 2025
571a911
Merge pull request #2126 from palace22/folks-finance/eurc-teth-tavax
slasher125 Sep 30, 2025
65cf258
todo fix
Oct 1, 2025
0a48aab
Merge pull request #2125 from 0x-minato/master
slasher125 Oct 1, 2025
d54710c
Merge branch 'DefiLlama:master' into affluent-vaults
bhjiwonoh Oct 1, 2025
a2ae494
rename: tokemak -> autofinance
slasher125 Oct 1, 2025
dfb01b4
euler-v2 set timeout for logs
slasher125 Oct 1, 2025
2d2e5c1
feat: add spectra on katana
Ulydev Oct 1, 2025
c5e5ebc
ipor fix
slasher125 Oct 1, 2025
c64baf4
Merge pull request #2127 from Ulydev/master
slasher125 Oct 1, 2025
b9421e3
update BetSwirl yields
Kinco-dev Oct 1, 2025
5383c50
Merge branch 'DefiLlama:master' into affluent-vaults
bhjiwonoh Oct 2, 2025
55e6514
fix gammaswap-yield-tokens
slasher125 Oct 2, 2025
419a0c2
feat(snowbl-capital): register erc4626 vault yield
estebgonza Oct 2, 2025
1206a85
add v2 and v3 beets dex yield
franzns Oct 3, 2025
9366980
splitting v2 and v3
franzns Oct 3, 2025
fc8bf9d
🥕 add carrot stablecoin yield
jsblair9 Oct 3, 2025
ead0657
add aibtc and ssuz
snow-farmer Oct 4, 2025
ef4a17e
gearbox: add plasma chain support
alex0xhodler Oct 5, 2025
75d3ae9
gearbox: add borrowing metrics for plasma pools
alex0xhodler Oct 5, 2025
75383e5
gearbox: add multi-chain support (etherlink, lisk, hemi)
alex0xhodler Oct 5, 2025
7b3589c
fix: Enable Etherlink support by using correct chain identifier 'etlk'
alex0xhodler Oct 5, 2025
b49a056
feat: Enable Merkl rewards for Ethereum pools
alex0xhodler Oct 5, 2025
04fbd70
Merge pull request #2129 from snowbl-capital/master
slasher125 Oct 6, 2025
6f8a39c
balancer v3 add plasma
slasher125 Oct 6, 2025
b482045
remove v3
franzns Oct 6, 2025
804ca3f
Merge pull request #2134 from snow-farmer/yield-yak-milk-vaults
slasher125 Oct 6, 2025
e36e114
refactor: Remove poolMeta field from pool objects
alex0xhodler Oct 6, 2025
5082023
Merge pull request #2135 from alex0xhodler/feature/gearbox-plasma-len…
slasher125 Oct 6, 2025
ccd728f
fix crvusd stable filter
slasher125 Oct 6, 2025
972b7c2
🐛 store apy as percent not decimal
jsblair9 Oct 6, 2025
11f942d
using utils
franzns Oct 6, 2025
7ce4468
Merge pull request #2130 from franzns/fix-beets-dex-yield
slasher125 Oct 6, 2025
6d771bd
Merge pull request #2133 from DeFi-Carrot/add-carrot-crt-yield
slasher125 Oct 6, 2025
c06aa68
beets-dex-v3 as utils
franzns Oct 6, 2025
12956f1
Merge pull request #2137 from franzns/beets-dex-v3-utils
slasher125 Oct 7, 2025
d77cf0b
adaptors/singularity-finance: update script to use new vault registry…
a-k-l-sdao Oct 7, 2025
d6db3b9
adaptors/singularity-finance: remove comments and unused variable
a-k-l-sdao Oct 7, 2025
8bc85c3
adaptors/singularity-finance: decrease call batch size
a-k-l-sdao Oct 7, 2025
4d9df3f
morpho rename adapters
slasher125 Oct 7, 2025
b9e1c76
fix: add balancer v3 correct type for base APR
Oct 7, 2025
716f52c
fix vaultcraft
slasher125 Oct 8, 2025
3fda8a6
Merge pull request #2131 from BetSwirl/feat/betswirl-update-stakings
slasher125 Oct 8, 2025
86e874c
Merge pull request #2139 from gustavobftorres/fix/balancer-v3-fees
slasher125 Oct 8, 2025
ed71a1a
Merge pull request #2051 from KPHEMRAJ/superstate-uscc
slasher125 Oct 8, 2025
a9b1678
adaptors/singularity-finance: write refactor of getERC4626Info to use…
a-k-l-sdao Oct 8, 2025
569d05f
adaptors/singularity-finance: only get tvlUsd when not USDC
a-k-l-sdao Oct 8, 2025
7edd255
feat(network): adding 6 chains supported on the api
tomrpl Oct 9, 2025
71d7900
Merge pull request #2142 from tomrpl/feat/morpho-new-chains
slasher125 Oct 9, 2025
124fb1f
Add koalaswap adapter
Klyaus Oct 9, 2025
09dffdc
Updated yETH and vyETH address for base and arb chains
neelra8n Oct 9, 2025
df51be8
fix: set symbol information based on tokens composing the vault
bhjiwonoh Oct 10, 2025
4a2ecb2
Merge branch 'affluent-vaults' of github.com:factorial-finance/yield-…
bhjiwonoh Oct 10, 2025
e3345aa
Merge branch 'DefiLlama:master' into affluent-vaults
bhjiwonoh Oct 10, 2025
9efe918
Merge pull request #2128 from factorial-finance/affluent-vaults
slasher125 Oct 10, 2025
96a5a50
Merge pull request #2144 from neelra8n/master
slasher125 Oct 10, 2025
6697804
Merge branch 'master' into enhance-hyperwave
darvinrio Oct 10, 2025
f837dd4
add hwUSD
darvinrio Oct 10, 2025
3a84764
version bump
darvinrio Oct 10, 2025
7827faf
Add Oxium vaults adapter
Screpuh Oct 10, 2025
0495289
add lagoon yield source
GuiDupont Oct 10, 2025
615f4f6
fix query
GuiDupont Oct 10, 2025
42365b5
Merge pull request #2145 from darvinrio/enhance-hyperwave
slasher125 Oct 10, 2025
6fefa0c
Merge pull request #2146 from hopperlabsxyz/master
slasher125 Oct 10, 2025
f705911
adaptors/singularity-finance: add multicall refactor of getERC4626Inf…
a-k-l-sdao Oct 13, 2025
00ff7ed
feat(snowbl-capital): update yield symbol for USDC
estebgonza Oct 13, 2025
96cf273
Merge branch 'DefiLlama:master' into master
estebgonza Oct 13, 2025
2bfa156
Merge pull request #2138 from Singularity-DAO/master
slasher125 Oct 13, 2025
e1bbd60
Merge pull request #2149 from snowbl-capital/master
slasher125 Oct 13, 2025
d36f61c
falcon-finance
montyp0x Oct 14, 2025
abfee97
upd
montyp0x Oct 14, 2025
d394fe6
add ff
montyp0x Oct 14, 2025
e4c29df
cleanup
montyp0x Oct 14, 2025
b674aa6
fix import
slasher125 Oct 14, 2025
a7a312d
feat: update MORE Markets rewards APY
1tupac Oct 14, 2025
1635290
Merge pull request #2147 from Screpuh/add-oxium-adapter
slasher125 Oct 14, 2025
34ed553
Merge pull request #2151 from 1tupac/master
slasher125 Oct 14, 2025
90d473b
fix joe url
pecio222 Oct 14, 2025
5a5ef44
remove mantle
pecio222 Oct 14, 2025
3fa585d
Merge pull request #2152 from pecio222/fix-joe-v21
slasher125 Oct 14, 2025
27eafdc
fix
slasher125 Oct 15, 2025
c17406f
Merge pull request #2150 from montyp0x/master
slasher125 Oct 15, 2025
b74d760
add enclabs yields
Numerikat Oct 15, 2025
f1a7b1b
fix: add url field
Numerikat Oct 15, 2025
f34fed0
add: apyBaseBorrow and ltv info
Numerikat Oct 16, 2025
081699c
1inch rename
slasher125 Oct 16, 2025
a9e07b3
change round to Number for APYs
Numerikat Oct 16, 2025
5cbb3bb
feat: add yield adapter for DAOLama protocol
mp0wer Oct 16, 2025
8b8c63f
aura adapter fix
0xRichter Oct 15, 2025
ab94bb7
Merge pull request #2153 from Numerikat/enclabs-yields
slasher125 Oct 17, 2025
2159a7d
Merge pull request #2156 from aurafinance/aura-adapter
slasher125 Oct 17, 2025
6a76004
Revert "fix: Aura adaptor"
slasher125 Oct 17, 2025
011c631
yusd and vyusd updated plasma ana inea updated
neelra8n Oct 17, 2025
83cdcc4
Merge branch 'DefiLlama:master' into master
neelra8n Oct 17, 2025
b56391a
add pharaoh-v3 yields
0xShad0w Oct 17, 2025
547f8dd
supervaults yield adapter
clydedevv Oct 17, 2025
a1cc450
Merge pull request #2154 from daolama/master
slasher125 Oct 17, 2025
bc34cff
Merge pull request #2157 from DefiLlama/revert-2156-aura-adapter
slasher125 Oct 17, 2025
63463ac
Merge pull request #2158 from neelra8n/master
slasher125 Oct 17, 2025
616a2b9
Merge pull request #2159 from 0xShad0w/master
slasher125 Oct 17, 2025
789dab4
MidasRWA: mFARM on Ethereum
dmytro-horbatenko Oct 20, 2025
0137234
Merge pull request #2160 from midas-apps/master
slasher125 Oct 20, 2025
84dffb7
feat(termmax): Refactor vault handling and add event interfaces for V…
tkspring-henry Oct 8, 2025
f974df9
feat(termmax): Refactor pool retrieval functions for improved readabi…
tkspring-henry Oct 9, 2025
0e40cc7
refactor(termmax): Simplify pool retrieval tasks in getPoolsOnChain f…
tkspring-henry Oct 9, 2025
49220bf
feat(termmax): Rename pool-related functions and variables to vault f…
tkspring-henry Oct 9, 2025
91ef8f7
refactor(termmax): Simplify ABI definitions in multiCall functions fo…
tkspring-henry Oct 9, 2025
c7c2579
feat(termmax): Add Aave vault APY calculations and improve vault retr…
tkspring-henry Oct 9, 2025
80bd24d
MidasRWA: mTBILL, mHYPER, mFONE, mRe7YIELD addresses
dmytro-horbatenko Oct 21, 2025
204420f
Merge pull request #2161 from midas-apps/master
slasher125 Oct 21, 2025
5729cf2
delete not necessary parameter for APY calculate
Oct 21, 2025
38d4f11
Merge pull request #2162 from trxadm/master
slasher125 Oct 21, 2025
e92cffe
APY adapter for avUSD, avBTC and avETH
spider-g Oct 21, 2025
600961e
Bracket vaults adaptor
wirew0lf Oct 22, 2025
903e57e
fix(termmax): Update ABI calls from 'name' to 'symbol' and rename get…
tkspring-henry Oct 22, 2025
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
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
c0373f2
add bsc pools
nvduc91 Nov 7, 2025
edbcd72
Merge pull request #2191 from nvduc91/feat/kyber-add-arbitrum
slasher125 Nov 7, 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(',');
}
36 changes: 26 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,34 @@ 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 }}
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