Skip to content

Commit

Permalink
Add PSMs to TVL calculation in beraborrow
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Feb 7, 2025
1 parent 07eb32f commit 1641a78
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions projects/beraborrow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ const vaults = [
"0x849232E2144BD5118B5e4A070FE15035cC07b388",
]

const PSMs = [
'0xCaB847887a2d516Dfa690fa346638429415c089b',
'0x5623554eCe4E1fd78e8a4ce13D588A8e0053825D',
]

async function tvl(api) {
const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults })
const symbol = await api.multiCall({ abi: 'string:symbol', calls: vaults })
return api.sumTokens({ tokensAndOwners2: [tokens, vaults] })
const pTokens = await api.multiCall({ abi: 'address:stable', calls: PSMs})
return api.sumTokens({ tokensAndOwners2: [tokens.concat(pTokens), vaults.concat(PSMs)] })
}

module.exports = {
Expand Down

0 comments on commit 1641a78

Please # to comment.