Skip to content

Commit

Permalink
add swell-swbtc
Browse files Browse the repository at this point in the history
  • Loading branch information
darvinrio committed Aug 14, 2024
1 parent f835448 commit 68d58f4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions projects/swell-swbtc/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const ADDRESSES = require('../helper/coreAssets.json')

const WBTC = ADDRESSES.ethereum.WBTC;
const swBTC = '0x8DB2350D78aBc13f5673A411D4700BCF87864dDE'

async function tvl(api) {
const totalSupply = await api.call({ target: swBTC, abi: 'uint256:totalSupply'});
const rate = await api.call({ target: swBTC, abi: 'uint256:pricePerShare'});

return {
[WBTC]: (totalSupply * rate)/1e8
};
}

module.exports = {
doublecounted: true,
ethereum: {
tvl,
},
}

0 comments on commit 68d58f4

Please sign in to comment.