Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions projects/firelight-fxrp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { ChainApi } = require('@defillama/sdk');
const ADDRESSES = require('../helper/coreAssets.json');

const STXRP = '0x4C18Ff3C89632c3Dd62E796c0aFA5c07c4c1B2b3';

async function lockedXRPL(api) {
const flareApi = new ChainApi({ chain: 'flare', timestamp: api.timestamp });
await flareApi.getBlock();

// Firelight: stXRP totalSupply (backed 1:1 by FXRP)
const stxrpSupply = await flareApi.call({ abi: 'uint256:totalSupply', target: STXRP });

api.add(ADDRESSES.ripple.XRP, stxrpSupply);
return api.getBalances();
}

module.exports = {
ripple: {
tvl: lockedXRPL,
},
methodology: "Counts stXRP total supply from Firelight staking on Flare. stXRP is backed 1:1 by FXRP, which is 1:1 backed by XRP.",
};
Loading