mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 16:53:02 +08:00
* use tvl function v2 * refactor addFundsInMasterChef * replace usage of timestamp field * more refactoring * more refactoring
21 lines
585 B
JavaScript
21 lines
585 B
JavaScript
const { nullAddress } = require("../helper/tokenMapping");
|
|
|
|
async function tvl(api) {
|
|
const orderBook = '0x044d9b2c4d8a696fe83fbb723f6006bd2d7a0e7e'
|
|
const aaveModule = await api.call({ abi: 'address:aaveModule', target: orderBook })
|
|
const aaveToken = await api.call({ abi: 'address:aToken', target: aaveModule })
|
|
return api.sumTokens({
|
|
tokensAndOwners: [
|
|
[aaveToken, aaveModule],
|
|
[nullAddress, orderBook],
|
|
]
|
|
})
|
|
}
|
|
|
|
module.exports = {
|
|
methodology: "Counts assets ETH collateral deposited + USDC deposited and available to borrow",
|
|
base: {
|
|
tvl
|
|
}
|
|
}
|