Skip to content

Commit

Permalink
Add TVL adapter for rivusdao (#10122)
Browse files Browse the repository at this point in the history
* Add TVL adapter for rivusdao

* code refactor

---------

Co-authored-by: crypto moon <[email protected]>
Co-authored-by: g1nt0ki <[email protected]>
  • Loading branch information
3 people authored May 8, 2024
1 parent 6ff4553 commit 4b14bd6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions projects/rivusdao/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const rTokens = [
'0xdad3d3c5cac4f2c8eca2b483aba9e928a4b88783', // rsTAO
'0xae173ac44c0041cda87907f52a1e531934e49610' // rsCOMAI
]

async function tvl(api) {
const tokens = await api.multiCall({ abi: 'address:wrappedToken', calls: rTokens})
const supplies = await api.multiCall({ abi: 'erc20:totalSupply', calls: rTokens})
api.add(tokens, supplies)
}

module.exports = {
methodology: "TVL is calculated as the sum of the total supplies of rsTAO and rsCOMAI tokens.",
ethereum: {
tvl,
}
};

0 comments on commit 4b14bd6

Please sign in to comment.