forked from DefiLlama/DefiLlama-Adapters
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/waynebruce0x/DefiLlama-Adap…
- Loading branch information
Showing
214 changed files
with
2,864 additions
and
1,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
const { usdCompoundExports } = require("../helper/compound"); | ||
module.exports = { | ||
kcc: usdCompoundExports("0x337d8719f70D514367aBe780F7c1eAd1c0113Bc7", "kcc", "0x309f1639018e8B272126C4B99af442AA25Dcd1F2") | ||
} | ||
const { compoundExports2 } = require('../helper/compound') | ||
|
||
const config = { | ||
kcc: { comptroller: '0x337d8719f70D514367aBe780F7c1eAd1c0113Bc7', cether: '0x309f1639018e8b272126c4b99af442aa25dcd1f2' }, | ||
era: { comptroller: '0x599bb9202EE2D2F95EDe9f88F622854f7ef2c371', cether: '0x9dae6c8c431ffc6d21b836e0d8d113e8365defb9' }, | ||
blast: { comptroller: '0x1DD821C9E27fB2399DAb75AedB113c80C755DCa6', cether: '0xd9fcbd7b60966d013a28ff87925f75bb49e9b5ee' }, | ||
} | ||
|
||
Object.keys(config).forEach(chain => { | ||
module.exports[chain] = compoundExports2(config[chain]) | ||
}) | ||
|
||
module.exports.kcc.borrowed = () => ({}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const { uniV3Export } = require("../helper/uniswapV3"); | ||
const { mergeExports } = require('../helper/utils') | ||
|
||
module.exports = mergeExports([ | ||
uniV3Export({ blast: { factory: "0x9792FaeA53Af241bCE57C7C8D6622d5DaAD0D4Fc", fromBlock: 693561, }, }), | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const { getUniTVL, } = require('../helper/unknownTokens') | ||
|
||
module.exports = { | ||
misrepresentedTokens: true, | ||
bsc: { | ||
tvl: getUniTVL({ factory: '0x8ae5527706446943cBA8589313EC217a4a7288a4', useDefaultCoreAssets: true, fetchBalances: true, }), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { getUniTVL } = require('../helper/unknownTokens') | ||
|
||
module.exports = { | ||
misrepresentedTokens: true, | ||
blast: { | ||
tvl: getUniTVL({ | ||
fetchBalances: true, | ||
useDefaultCoreAssets: true, | ||
factory: '0xF55dE36072beCebF162d2d54C49964f3b0683711', | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
const { sumTokensExport, } = require("../helper/chain/cardano"); | ||
const { sumTokensExport } = require("../helper/chain/cardano"); | ||
|
||
const scriptAdresses = [ | ||
'addr1zy9940grv28qxz9k82l9gmqd80vfd8a2734e35yzsz9cqktfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9smq5w00', //request.hs -- Request created. Lender to fund | ||
'addr1zykhtew0z93z6hmgu2ew7kl9puqz0wmafp0f3jypuejkwmrfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9skq4p22', //collateral.hs -- Loan funded. Borrower to repay | ||
'addr1zxfgvtfgp9476dhmq8fkm3x8wg20v33s6c9unyxmnpm0y5rfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st8q78h', //interest.hs -- Borrower repaid -- Lender to claim | ||
'addr1zxcjtxuc7mj8w6v9l3dfxvm30kxf78nzw387mqjqvszxr4mfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sp92046', //liquidation.hs -- Funds were liquidated. Borrower to claim | ||
'addr1zytwe3qhc0kf5k8yaur60cnhcxjg9zvfdnftp0rfu2czprtfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sgzwepc', //debt_request.hs -- Funds locked as liquidity deposits 'addr1z8tjrqy2dj5uk6her4ksltyxy2flzykktxkahzlahm9nwctfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st86ewu', //request.hs v2 -- Funds locked as liquidity deposits | ||
'addr1zyc7w5n699ews00yujnhw59g4nuzykuzgl5x6nzqp49zv5tfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sdyxnxc', //collateral.hs v2-- Funds locked as liquidity deposits | ||
'addr1zy6v8c7xdhftln7zk5uvt9h6jaknaxlx6hz5nkw63mpgwamfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sw9snf6', //debt_request.hs v2-- Funds locked as liquidity deposits | ||
"addr1zy9940grv28qxz9k82l9gmqd80vfd8a2734e35yzsz9cqktfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9smq5w00", //request.hs -- Request created. Lender to fund | ||
"addr1zykhtew0z93z6hmgu2ew7kl9puqz0wmafp0f3jypuejkwmrfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9skq4p22", //collateral.hs -- Loan funded. Borrower to repay | ||
"addr1zxfgvtfgp9476dhmq8fkm3x8wg20v33s6c9unyxmnpm0y5rfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st8q78h", //interest.hs -- Borrower repaid -- Lender to claim | ||
"addr1zxcjtxuc7mj8w6v9l3dfxvm30kxf78nzw387mqjqvszxr4mfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sp92046", //liquidation.hs -- Funds were liquidated. Borrower to claim | ||
"addr1zytwe3qhc0kf5k8yaur60cnhcxjg9zvfdnftp0rfu2czprtfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sgzwepc", //debt_request.hs -- Funds locked as liquidity deposits 'addr1z8tjrqy2dj5uk6her4ksltyxy2flzykktxkahzlahm9nwctfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st86ewu', //request.hs v2 -- Funds locked as liquidity deposits | ||
"addr1zyc7w5n699ews00yujnhw59g4nuzykuzgl5x6nzqp49zv5tfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sdyxnxc", //collateral.hs v2-- Funds locked as liquidity deposits | ||
"addr1zy6v8c7xdhftln7zk5uvt9h6jaknaxlx6hz5nkw63mpgwamfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sw9snf6", //debt_request.hs v2-- Funds locked as liquidity deposits | ||
"script1xt5vpt33fm6tu3fvz65enpnlvmg6z7gle9evktmuwn3c6gjfc7p", // Pool contract | ||
"script1nwvlaa0wnf43wzjp3xv738k6myam74dlrlh027mq20trg3ng772", // Collateral contract | ||
"script1sqscxzh7mkzlmgf98k3tuadkds8xt3yzzj8t3jnfpypukld9xck", // Leftovers contract | ||
]; | ||
|
||
module.exports = { | ||
methodology: 'Counts amount of AADA staked; by a price of ADA sitting in the orderbook.', | ||
methodology: | ||
"Calculates the total of idle tokens held in pool contracts or collateral tokens secured in the collateral contract.", | ||
timetravel: false, | ||
cardano: { | ||
staking: sumTokensExport({ owner: 'addr1wyvej5rmcrhfpcwrwmnqsjtwvf8gv3dn64vwy3xzekp95wqqhdkwa' , tokens: ['8fef2d34078659493ce161a6c7fba4b56afefa8535296a5743f6958741414441']}), | ||
tvl: sumTokensExport({ scripts: scriptAdresses, }) | ||
} | ||
staking: sumTokensExport({ | ||
owner: "addr1wyvej5rmcrhfpcwrwmnqsjtwvf8gv3dn64vwy3xzekp95wqqhdkwa", | ||
tokens: [ | ||
"8fef2d34078659493ce161a6c7fba4b56afefa8535296a5743f6958741414441", | ||
], | ||
}), | ||
tvl: sumTokensExport({ scripts: scriptAdresses }), | ||
}, | ||
hallmarks: [[1708560053, "V2 Launch"]], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { sumTokensExport } = require("../helper/unwrapLPs") | ||
const ADDRESSES = require('../helper/coreAssets.json') | ||
|
||
const owner = "0x50454acC07bf8fC78100619a1b68e9E8d28cE022" | ||
|
||
module.exports = { | ||
blast: { | ||
tvl: sumTokensExport({ owner, tokens: [ADDRESSES.blast.USDB, ADDRESSES.blast.WETH]}), | ||
}, | ||
start: 1709630412, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
const sdk = require("@defillama/sdk"); | ||
const { sumTokensExport } = require("../helper/unwrapLPs"); | ||
const { sumTokens2 } = require("../helper/unwrapLPs") | ||
const ADDRESSES = require('../helper/coreAssets.json') | ||
|
||
const INDEX = "0xF17A3fE536F8F7847F1385ec1bC967b2Ca9caE8D"; | ||
async function tvl(_, block, _cb, { api }) { | ||
const aSTETH = "0x27C2B9fd547EAd2c05C305BeE2399A55811257c2" | ||
const vault = "0xf3bCeDaB2998933c6AAD1cB31430D8bAb329dD8C" | ||
const astBal = await api.call({ abi: 'erc20:balanceOf', target: aSTETH, params: vault }) | ||
const stethBal = await api.call({ abi: 'erc20:balanceOf', target: ADDRESSES.ethereum.STETH, params: aSTETH }) | ||
const astethSupply = await api.call({ abi: 'erc20:totalSupply', target: aSTETH }) | ||
api.add(ADDRESSES.ethereum.STETH, stethBal * astBal / astethSupply) | ||
|
||
async function tvl(_, block, _cb) { | ||
const balances = {} | ||
const supply = await sdk.api2.abi.call({ abi: 'uint256:totalSupply', target: INDEX, block }) | ||
sdk.util.sumSingleBalance(balances, INDEX, supply, 'ethereum') | ||
return balances | ||
return sumTokens2({ api, owner: vault, fetchCoValentTokens: true, blacklistedTokens: [aSTETH] }) | ||
} | ||
|
||
module.exports = { | ||
methodology: | ||
"Data is retrieved from calculation of market price and total supply", | ||
ethereum: { | ||
tvl: sumTokensExport({ owner: '0xf3bCeDaB2998933c6AAD1cB31430D8bAb329dD8C', fetchCoValentTokens: true }), | ||
tvl, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
methodology: "Sums the amount of funded real-world assets on ALTA Finance as borrowed. Tokens left in the countract are counted towards tvl", | ||
} | ||
|
||
const config = { | ||
polygon: { investments: ['0xcf152E9f60E197A44FAdce961c6B822Dcb6c9dcc'], debts: ['0xE92F580C930dd24aACB38Ab0EA18F6c1dEf31369','0x64D6583b81716a4d141f07E264805CaCd3f484bB'], token: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174' }, | ||
} | ||
|
||
Object.keys(config).forEach(chain => { | ||
const { investments, debts, token } = config[chain] | ||
module.exports[chain] = { | ||
tvl: async (_, _b, _cb, { api, }) => { | ||
return api.sumTokens({ owners: investments.concat(debts), tokens: [token] }) | ||
}, | ||
borrowed: async (_, _b, _cb, { api, }) => { | ||
const nftCount = (await api.multiCall({ abi: 'uint256:_tokenIdCounter', calls: investments, permitFailure: true })).map(i => i ?? 0) | ||
const amount = (await api.multiCall({ abi: 'uint256:amountPerNft', calls: investments, permitFailure: true })).map(i => i ?? 0) | ||
api.add(token, nftCount.map((v, i) => v * amount[i])) | ||
|
||
const bals = (await api.multiCall({ abi: 'uint256:amount', calls: debts, permitFailure: true })).map(i => i ?? 0) | ||
api.add(token, bals) | ||
return api.getBalances() | ||
}, | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.