Skip to content

Commit

Permalink
add swell-swbtc (DefiLlama#11297)
Browse files Browse the repository at this point in the history
  • Loading branch information
darvinrio authored and tlatkdgus1 committed Nov 25, 2024
1 parent 6e96561 commit 28bcc4b
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 28bcc4b

Please sign in to comment.