Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging updates from defillama #3

Open
wants to merge 3,743 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3743 commits
Select commit Hold shift + click to select a range
54920b1
scallop fix
slasher125 Oct 3, 2024
8e30d83
meso fix
slasher125 Oct 3, 2024
1ad6a84
update sdk
slasher125 Oct 3, 2024
ac1d60d
Added ethereum pools (#1530)
jenelyn0214 Oct 3, 2024
3ec7c0a
Add Compound USDT v3 (Ethereum) (#1531)
JuampiRombola Oct 3, 2024
61a7c09
fix usd0++ symbol
slasher125 Oct 4, 2024
e40f6cc
add usd0++ to stablecoin list
slasher125 Oct 4, 2024
a2a9795
feat: add Spectra adapter (#1529)
Ulydev Oct 4, 2024
fab8b55
curve omit apyreward for 0x7f90122BF0700F9E7e1F688fe926940E8839F353-xdai
slasher125 Oct 4, 2024
772bbaf
feat: add bakerfi arbitrum apy yield (#1534)
ickas Oct 7, 2024
0d9b0ae
feat: add k9-finance-dao (#1536)
KiryaFT Oct 7, 2024
cd6e97d
add base pool (#1537)
YellowSnnowmann Oct 7, 2024
dd89f15
D2Finance: Add adapter (#1520)
dunglv-smartosc Oct 7, 2024
e4d766d
update exclusion list
slasher125 Oct 8, 2024
d876ef7
morpho blue add tvl filter
slasher125 Oct 8, 2024
644af8f
curve add registry-type to optimism
slasher125 Oct 9, 2024
582e98f
storm trade fix
slasher125 Oct 9, 2024
048a6a6
aave v3 fix pooldataprovider addresses
slasher125 Oct 9, 2024
87731c3
aave-v3 add zksync market
slasher125 Oct 9, 2024
ca0b4ff
feat: polynomial apy for pools (#1518)
Aniket965 Oct 9, 2024
a1843a5
add alienbase v3 yields (#1540)
darkalienlord Oct 9, 2024
6c0d92f
tvl and apy support for sceptre liquid sflr staking pool (#1528)
hitchhooker Oct 10, 2024
55ea23b
rename alien-base-amm
slasher125 Oct 10, 2024
f4c2720
Move risk rating to yield server (#1541)
vrtnd Oct 10, 2024
ba91f1c
risk -> POST route
slasher125 Oct 10, 2024
bac3f2a
switch to GET method (#1542)
slasher125 Oct 10, 2024
ff0307e
log
slasher125 Oct 10, 2024
08bbe12
risk route check for required fields
slasher125 Oct 10, 2024
fb24bf7
Add xBTC pool from CrossCurve (#1543)
spiehdid Oct 10, 2024
2d96133
remove log
slasher125 Oct 10, 2024
6f6243c
apy and tvl calculation for defi-money (#1544)
0x33dm Oct 11, 2024
ff64a87
fix: rho markets apy query process (#1545)
CarlWiles Oct 11, 2024
774ad78
add apxeth yield values to /lsd
slasher125 Oct 11, 2024
71d9974
remove file
slasher125 Oct 11, 2024
cb39cac
temp remove fluid
slasher125 Oct 14, 2024
7688e36
Create index.js (#1548)
OxC0 Oct 14, 2024
456a673
fix: rho market apy (#1549)
CarlWiles Oct 14, 2024
dcbb598
Ironclad - added lending pool reward data (#1547)
Deantoshi Oct 15, 2024
e1fe783
Update D2Finance (#1552)
dunglv-smartosc Oct 15, 2024
90a1977
fix arb++ symbol
slasher125 Oct 15, 2024
22d7949
Fix Fluid lending rates (#1554)
bergben Oct 15, 2024
dd405c5
reenable fluid
slasher125 Oct 15, 2024
729a65d
✨ Arcadia - add cbBTC pool yield (#1553)
j-vp Oct 16, 2024
3cea6e8
Added reward APYs to lore-finance (#1555)
Deantoshi Oct 16, 2024
303a674
Update beanstalk silo yield for arbitrum (#1556)
soilking Oct 16, 2024
b364e70
balancer fix arbitrum graph url, gnosis bug
slasher125 Oct 16, 2024
7e0c914
balancer change urls
slasher125 Oct 16, 2024
84568d3
balancer fix tvl calculation
slasher125 Oct 16, 2024
d1b792d
resolv adapter. add RLP pool (#1557)
fextr Oct 17, 2024
50850c4
add maha.xyz (#1546)
YellowSnnowmann Oct 17, 2024
e686d01
IPOR liquidity mining power up from contracts (#1559)
kris-ipor Oct 17, 2024
dfec914
yeltoken rename
slasher125 Oct 17, 2024
3881945
update exclusion list
slasher125 Oct 17, 2024
71e720a
yel finance fix slug
slasher125 Oct 18, 2024
735ba2c
add RWA pools (#1561)
YellowSnnowmann Oct 18, 2024
492dcc9
kepl-dao rename
slasher125 Oct 18, 2024
b3dfec8
extra finance fix rpcs
slasher125 Oct 18, 2024
b7060a1
origin dollar fix
slasher125 Oct 18, 2024
a05c5d0
metastreet v2 fix
slasher125 Oct 18, 2024
fe97bf5
YEL FINANCE - Move calculations to YEL FINANCE API calls + Base chain…
able1f Oct 21, 2024
e4d487e
remove horizondex
slasher125 Oct 21, 2024
5d64151
update exclusion
slasher125 Oct 21, 2024
540c7a3
liqwid fix
slasher125 Oct 21, 2024
ec4b3ec
added harbor-market reward yields (#1558)
Deantoshi Oct 22, 2024
8774c69
feat: add metrom (#1564)
luzzif Oct 22, 2024
f79cb1a
lsd fix dinero name
slasher125 Oct 22, 2024
59426f8
PCS update (#1563)
waynebruce0x Oct 22, 2024
855ca32
Add SparkDEX V3.1 yields on Flare (#1562)
0xrmvdao Oct 23, 2024
5ee8c84
radiant add base pools
slasher125 Oct 23, 2024
792427b
stellaswap fix
slasher125 Oct 23, 2024
6fda793
spookyswap -> spookyswap-v2 rename#
slasher125 Oct 23, 2024
f2db35c
Fix master data layout for EVAA pools (#1566)
shuva10v Oct 24, 2024
84e41b0
added yield on aurelius lending market. Includes WMNT rewards (#1568)
Deantoshi Oct 24, 2024
8ad6fe5
Added Aerodrome protocol (#1569)
Joro-Popov Oct 24, 2024
73ed711
ionic-protocol adaptor (#1567)
amish777 Oct 24, 2024
f214a24
Update lstbtc colend (#1535)
tobyColend Oct 24, 2024
bc4227c
colend-protocol fix address
slasher125 Oct 24, 2024
3d5ca67
adding swell earnETH (#1551)
darvinrio Oct 24, 2024
f6ceba6
swell-eth-earn-vault fix folder name
slasher125 Oct 24, 2024
60666ae
add base chain deployment (#1570)
0xCrumb Oct 24, 2024
e675b4d
feat: add bakerfi ethereum apy yield (#1571)
ickas Oct 25, 2024
d56fe80
deltaprime
slasher125 Oct 25, 2024
2574de3
Add WOOFi Mantle Pool (#1573)
0xmer1in Oct 25, 2024
ab9f2a8
Add Origin ARM Yield (#1572)
apexearth Oct 27, 2024
592a84c
curve fix double counted OP rewards
slasher125 Oct 29, 2024
7db90ba
Add pearl on real network (#1574)
swan-of-bodom Oct 29, 2024
091fcc8
Ionic-protocol Reward apy correction (#1576)
amish777 Oct 29, 2024
3305289
remove deprecated projects
slasher125 Oct 29, 2024
173a900
aura remove finished rewards
slasher125 Oct 29, 2024
529fda5
curve fix 2
slasher125 Oct 29, 2024
65c8513
feat: add base, op, arb chains (#1580)
Ulydev Oct 31, 2024
17f2ada
benqi fix tvl
slasher125 Oct 31, 2024
7b0ceb1
account for totalReserves in tvl calculation (#1581)
slasher125 Oct 31, 2024
31189d3
camelot change subgraph id
slasher125 Nov 1, 2024
5c8d161
ramses-cl change graph id
slasher125 Nov 1, 2024
e87904c
premia-v2 fix
slasher125 Nov 1, 2024
80e0ce5
steer protocol fix
slasher125 Nov 1, 2024
1fe58f9
arbidex v2 fix
slasher125 Nov 1, 2024
7739539
alien-base-v2 change graph url
slasher125 Nov 1, 2024
c2d671b
feat: add lending vault aggregators (#1582)
swan-of-bodom Nov 4, 2024
a1e3c18
Add Zest Protocol Yields, and common Stacks packages (#1586)
y0s0n Nov 4, 2024
d5d2094
add stacks packages to root package
slasher125 Nov 4, 2024
3b2058b
fluid rename
slasher125 Nov 4, 2024
d2599d6
add base configs (#1588)
LeeRyanj Nov 5, 2024
f2395cc
Add more convex data (#1583)
philippe-git Nov 5, 2024
8ce026e
convex add missing import
slasher125 Nov 5, 2024
c7a89fc
Lynex-fusion symbol fix (#1579)
Vasuveda Nov 6, 2024
8565de8
Update arbitrum pools addresses (#1591)
kavsky02 Nov 6, 2024
2355afa
tokemak min fee even when zero (#1589)
codenutt Nov 7, 2024
e43c5bc
Nabla Finance (#1590)
yellowBirdy Nov 7, 2024
b5e4271
added maxapy (#1587)
fepvenancio Nov 7, 2024
5bc0782
fix morpho blue (#1594)
slasher125 Nov 8, 2024
4da0871
Add rewards APY on Avalanche (#1593)
kavsky02 Nov 8, 2024
54c6739
aave v3 add lido and etherfi markets
slasher125 Nov 8, 2024
0e6cb42
aave v3 poolmeta fix
slasher125 Nov 8, 2024
05123c6
update exclusion list
slasher125 Nov 9, 2024
d51d4b8
feat: add bakerfi new base (w/morpho) apy yield (#1595)
ickas Nov 10, 2024
b970b93
Update Impermax blacklist (#1596)
swan-of-bodom Nov 10, 2024
accfe5e
Add Fantom Chain Assets (#1598)
able1f Nov 12, 2024
2a7f10f
vaultka fix
slasher125 Nov 13, 2024
6e7de31
disable deltaprime
slasher125 Nov 13, 2024
00bd725
add USTB and MORE to stablecoin list
slasher125 Nov 13, 2024
f52e8ba
better instructions
0xngmi Nov 13, 2024
df783b0
add srcUSD+ (#1603)
0xngmi Nov 14, 2024
d5f5bca
crvusd update pool field
slasher125 Nov 14, 2024
83b4d07
fix thalaswap yields (#1604)
LawsonGraham Nov 14, 2024
7075e2d
Add Base to IPOR Derivatives (#1602)
rav-ipor Nov 14, 2024
4904ddd
add tokemak base pools (#1607)
codenutt Nov 15, 2024
c9c19d5
aave v3 remove frozen markets
slasher125 Nov 18, 2024
1b0ed3e
1inch: add base (#1609)
grkhr Nov 18, 2024
ce88ca7
Adds sensi SY pool (#1610)
B-aublys Nov 18, 2024
8dea9eb
Add IPOR Fusion vaults (#1608)
rav-ipor Nov 18, 2024
a456270
IPOR Fusion: remove wrong apyReward and rewardTokens from ipor-fusion…
rav-ipor Nov 18, 2024
1c57bcb
sensi fix chain
slasher125 Nov 19, 2024
94c0bdf
Add DSF.Finance Adapter (#1606)
dsf-cto Nov 19, 2024
4a1daf9
Add CompX yield farms (#1605)
garrett-vorce-compx Nov 19, 2024
989eb7e
Fix polynomial apy (#1601)
ArpitShukIa Nov 20, 2024
559132f
Feat/quasar vaults adaptor (#1592)
magiodev Nov 21, 2024
bee0f64
zkswap-v2 rename
slasher125 Nov 22, 2024
c124484
add restaking rewards apy (#1613)
vvalecha519 Nov 22, 2024
5e463b4
uni v3 change base graph url
slasher125 Nov 22, 2024
1e40eec
remove dead pool
slasher125 Nov 22, 2024
6efcc61
Update index.js DSF.Finance ( Update symbol & poolMeta ) (#1615)
dsf-cto Nov 23, 2024
83ef4d8
zerolend fix
slasher125 Nov 25, 2024
e74aeac
mantle staked eth rename
slasher125 Nov 25, 2024
7b7f779
zkswap fix
slasher125 Nov 26, 2024
5afa690
Aqua Patina APY adapter (#1597)
sponnet Nov 26, 2024
c2ed1ef
Feat: integrate morfi yield (#1614)
gWhy-j Nov 26, 2024
40dca74
Add xSTABLE2 pool (#1617)
spiehdid Nov 26, 2024
d6ca6af
Yel-Finance: Update potion addresses (#1618)
astroKo Nov 26, 2024
aeb2b67
Added endur to yield server (#1621)
0x-minato Nov 27, 2024
144fa2e
update exclusion
slasher125 Nov 27, 2024
8d64f03
Inverse: add sDOLA & sINV (#1620)
webmass Nov 28, 2024
36b29d0
compx rename
slasher125 Nov 29, 2024
21d126a
Osmosis fix (#1623)
slasher125 Nov 29, 2024
2979f8a
Added usdx-money to yield server (#1624)
brucelsoon Dec 3, 2024
60614d8
Corrected APY calculation (#1629)
Divljo31 Dec 3, 2024
00564a8
Add Kinetix Derivatives (#1625)
0xrmvdao Dec 3, 2024
5bae0f6
chore: Add Usual USD0++ in defillama yield server (#1627)
Magicking Dec 3, 2024
24634d1
Fix IPOR Fusion APY on 29.11.2024 (#1626)
rav-ipor Dec 3, 2024
7c54148
xexchange fix
slasher125 Dec 3, 2024
fa10a39
add pluto-so earn (#1622)
verzth Dec 3, 2024
72922ea
Fix Goat Protocol yields (#1630)
reikodoteth Dec 3, 2024
b240fd2
better headers
0xngmi Dec 3, 2024
695db16
revised avantis apy (#1631)
skords Dec 3, 2024
30f4bb0
Fix: base apy to reward apy (#1632)
Magicking Dec 3, 2024
93eea08
fix: list arbitrum vaults (#1633)
swan-of-bodom Dec 3, 2024
02b015c
resolv rename
slasher125 Dec 4, 2024
00aeeee
persistence fix
slasher125 Dec 4, 2024
d41dbbc
Added Ethena protocol (#1636)
Joro-Popov Dec 5, 2024
fc47233
Fix issues and add base, polygon, avalanche and fraxtal tracking (#1635)
Andreadinenno Dec 5, 2024
19eb639
add hyperdrive (#1637)
wakamex Dec 6, 2024
79faabf
feat(smardex): adds sUSDN staking pool (#1639)
estebgonza Dec 6, 2024
455f4b8
feat: kinetic yields (#1646)
EdgarRBL Dec 9, 2024
3149890
feat: added superlend for yield server (#1647)
priyam-anand Dec 9, 2024
ee3093e
spardex fix
slasher125 Dec 9, 2024
b67ac8f
zerolend fix
slasher125 Dec 9, 2024
786ba84
usdx money fix
slasher125 Dec 9, 2024
d26a5f1
update exclude list
slasher125 Dec 9, 2024
f3886cd
update exclusion list
slasher125 Dec 9, 2024
325cd30
remove pool
slasher125 Dec 10, 2024
5c615d0
Add xWETH2 (#1648)
spiehdid Dec 10, 2024
0b88a24
compound add missing market
slasher125 Dec 10, 2024
4ec00e2
superlend fix chain name
slasher125 Dec 11, 2024
d88849b
add bagful info (#1649)
bagfulcrew Dec 11, 2024
087056a
iotaevm chain name
slasher125 Dec 12, 2024
2bc1829
Add Kinetix AMM V3 (#1638)
0xrmvdao Dec 13, 2024
54918ec
add Renzo ezETH yield (#1650)
vokkantthakkar Dec 13, 2024
34cf657
Add Nolus lending pools for USDC, BTC and SOL (#1651)
metodi96 Dec 13, 2024
c26de2f
Add Mars Protocol Perps Counter Party Vault (#1654)
linkielink Dec 16, 2024
0145f0b
Generalize the adaptor and add arbitrum data (#1655)
dlgnbu Dec 16, 2024
8afc0b9
update rlpPriceStorage address in rlp-resolv adapter (#1656)
fextr Dec 16, 2024
56cf635
rename usual-money
slasher125 Dec 16, 2024
1fcf03b
rename mars-protocol
slasher125 Dec 16, 2024
89c1d5b
rename ethena#
slasher125 Dec 16, 2024
515342e
add balancer v3 (#1652)
mendesfabio Dec 16, 2024
b2e3648
add blend pool yields (#1600)
Ryang-21 Dec 17, 2024
1d8455c
add missing blend-sdk to root package
slasher125 Dec 17, 2024
d920dec
ramses fix
slasher125 Dec 18, 2024
9a9d786
impermax fix
slasher125 Dec 18, 2024
0746fd4
remove stack
slasher125 Dec 18, 2024
8e8b768
fix: add risk profile to cbbtc vault (#1660)
swan-of-bodom Dec 19, 2024
6c0f1a4
Re-introduce deltaprime yields from saving pools (#1661)
kavsky02 Dec 19, 2024
01ac823
Add more blend pool yields (#1662)
ElliotFriend Dec 19, 2024
3b22a52
aave-v3 fix
slasher125 Dec 20, 2024
485b662
Adding Harmonix yield pools (#1657)
baonguyen1904 Dec 20, 2024
ecab4ec
added the ironclad base deployment (#1663)
Deantoshi Dec 20, 2024
b778799
beets rename
slasher125 Dec 23, 2024
643442b
remove project
slasher125 Dec 23, 2024
991cca5
update exclusion list
slasher125 Dec 23, 2024
bfe41dd
feat: nucleus vault yields (#1664)
DashanMcCain Dec 23, 2024
a9dc9d8
update orca
slasher125 Dec 24, 2024
c0c7d90
rename extra-finance
slasher125 Dec 25, 2024
9eaa30f
update extra-finance adapter (#1666)
KarmanMax Dec 27, 2024
313e082
update rlpPriceStorage address in rlp-resolv adapter (#1667)
fextr Dec 27, 2024
b441084
Scallop: add borrow reward apy (#1668)
nicetomeetyou1 Dec 27, 2024
4902918
feat(abracadabra-spell): Add single-sided GM cauldrons (#1670)
0xmDreamy Dec 28, 2024
a4a05f7
cetus add tvl filter cause wrong values
slasher125 Dec 28, 2024
8c1abb8
added fluid-vaults (#1659)
0xprinc Dec 30, 2024
953e937
Feat/fenix standard pools (#1672)
starketh25 Dec 31, 2024
411c014
Feat: add fenix v3 and v2 pools (#1671)
starketh25 Dec 31, 2024
a7e8aaf
feat: add merkeProof oracles getPrices and rewardApy/rewardTokens for…
murka Dec 31, 2024
ffee1fc
fix: dinero pxeth peg rate (#1669)
0xhafa Dec 31, 2024
e10ac14
add base to uni-v2
slasher125 Jan 4, 2025
25f51d4
add kai-finance (#1673)
kklas Jan 5, 2025
51f77c0
genesislrt fix
slasher125 Jan 6, 2025
55aa03e
prismalst fix
slasher125 Jan 6, 2025
c67097f
remove metastree-v2
slasher125 Jan 6, 2025
2b5f631
add extrafi xlend adapter (#1676)
KarmanMax Jan 7, 2025
7d57224
spectra-v2 fix symbols
slasher125 Jan 7, 2025
6bb3041
fluid-lending fix 1
slasher125 Jan 7, 2025
ea8112c
fluid lending fix 2
slasher125 Jan 8, 2025
948a114
feat: add LP and Alts pools, add borrowApyReward, add retrying system…
murka Jan 9, 2025
6159381
impermax-finance: Add new base, blast and sonic subgraphs (#1684)
swan-of-bodom Jan 9, 2025
cfb5e80
evaa fix symbol
slasher125 Jan 9, 2025
22813ee
fix and update RWA market (#1680)
YellowSnnowmann Jan 9, 2025
7cabb48
feat: latch yield (#1681)
stanli1231 Jan 9, 2025
3e3b9da
Upd/prim 6971 update primex adapter (#1679)
pavlo-tolok Jan 9, 2025
8d360c1
silo rename
slasher125 Jan 10, 2025
1999e93
Refac STRKFarm domain (#1685)
0x-minato Jan 10, 2025
ea31b81
fix scream
slasher125 Jan 13, 2025
ef1c0df
update node runtime version
slasher125 Jan 13, 2025
dba6645
added url for lending and vault protocol (#1686)
0xprinc Jan 13, 2025
85fd906
fix: add sbrates for rewardingsAssetsAmount (#1687)
murka Jan 13, 2025
c133e57
Add Size Credit (#1675)
aviggiano Jan 13, 2025
44794fa
Add new CrossCurve pools (#1688)
spiehdid Jan 15, 2025
8621fa7
stablecoin bug fix
slasher125 Jan 15, 2025
4f1c88f
swell-earn rename
slasher125 Jan 16, 2025
f50d5c4
feat: add zksync era chain for Harvest Finance yields (#1690)
CryptJS13 Jan 17, 2025
ce9fb26
check for neg volume values, set to null
slasher125 Jan 17, 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(',');
}
33 changes: 23 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,31 @@ 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}}
21 changes: 13 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Test_Change
on:
pull_request
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -13,6 +12,10 @@ jobs:
- 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
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,17 @@ ccImages
.webpack
.idea/
*output.json
*.csv
scripts/*.json
src/adaptors/list.js
Untitled.ipynb
.ipynb_checkpoints/
yarn-error.log
test.sql
yarn.lock


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