From 71c256fcab7f4fcaef718cedb4de082b6343d8c6 Mon Sep 17 00:00:00 2001 From: amadiaflare Date: Tue, 9 Dec 2025 13:26:58 -0500 Subject: [PATCH] add: firelight lockedxrpl --- projects/firelight-fxrp/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 projects/firelight-fxrp/index.js diff --git a/projects/firelight-fxrp/index.js b/projects/firelight-fxrp/index.js new file mode 100644 index 00000000000..a18227c435a --- /dev/null +++ b/projects/firelight-fxrp/index.js @@ -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.", +};