From 78f06f87c55ef40dc78cdb19e3e7a04c6bead0cc Mon Sep 17 00:00:00 2001 From: AbhinawRatan Date: Tue, 5 Aug 2025 23:51:44 +0530 Subject: [PATCH 1/3] Add Adrastea LST adapter for Solana liquid staking - Track SOL staked in Adrastea's liquid staking pool - Uses getSolBalanceFromStakePool helper function - Stake pool address: 2XhsHdwf4ZDpp2JhpTqPovoVy3L2Atfp1XkLqFMwGP4Y - Current TVL: ~8.63M SOL --- projects/adrastea-lst/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/adrastea-lst/index.js diff --git a/projects/adrastea-lst/index.js b/projects/adrastea-lst/index.js new file mode 100644 index 0000000000..456dbe438d --- /dev/null +++ b/projects/adrastea-lst/index.js @@ -0,0 +1,11 @@ +const { getSolBalanceFromStakePool } = require('../helper/solana') + +async function tvl(api) { + await getSolBalanceFromStakePool('2XhsHdwf4ZDpp2JhpTqPovoVy3L2Atfp1XkLqFMwGP4Y', api) +} + +module.exports = { + timetravel: false, + solana: { tvl }, + methodology: "TVL represents the total amount of SOL staked in Adrastea's liquid staking pool" +}; From bc51fc8d19774d4bc006ae53b6b52c4a123640e2 Mon Sep 17 00:00:00 2001 From: AbhinawRatan Date: Mon, 18 Aug 2025 22:47:04 +0530 Subject: [PATCH 2/3] adraste-validator --- projects/adrastea-validator/index.js | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 projects/adrastea-validator/index.js diff --git a/projects/adrastea-validator/index.js b/projects/adrastea-validator/index.js new file mode 100644 index 0000000000..e8adf1cf8c --- /dev/null +++ b/projects/adrastea-validator/index.js @@ -0,0 +1,41 @@ +const { getConnection } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js"); + +// Adrastea validator accounts +const VOTE_ACCOUNT = "adraBKLNY3DL3pg6SJRDYiMA8BsznaWpUdE42X41gbP"; +const IDENTITY_ACCOUNT = "adramSYKBv1yHoZTub4kepcmF5LybPxwyJcsz4fpfi7"; + +async function tvl() { + const connection = getConnection(); + + try { + // Get all vote accounts from the network + const voteAccounts = await connection.getVoteAccounts(); + + // Find Adrastea validator in current or delinquent validators + const adrasteaValidator = voteAccounts.current.find(va => va.votePubkey === VOTE_ACCOUNT) || + voteAccounts.delinquent.find(va => va.votePubkey === VOTE_ACCOUNT); + + if (adrasteaValidator) { + // Convert lamports to SOL + const totalStake = adrasteaValidator.activatedStake / 1e9; + return { + solana: totalStake, + }; + } else { + console.log("Adrastea validator not found in vote accounts"); + return { solana: 0 }; + } + } catch (error) { + console.error("Error fetching Adrastea validator stake:", error); + return { solana: 0 }; + } +} + +module.exports = { + timetravel: false, + methodology: "Sums all SOL staked to Adrastea validator vote account: " + VOTE_ACCOUNT, + solana: { + tvl, + }, +}; \ No newline at end of file From 73760956f8d3f172fea2af1b7208c912771be61e Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 9 Sep 2025 22:47:43 +0200 Subject: [PATCH 3/3] refactor --- projects/adrastea-validator/index.js | 37 +++++++++------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/projects/adrastea-validator/index.js b/projects/adrastea-validator/index.js index e8adf1cf8c..9d9e93b862 100644 --- a/projects/adrastea-validator/index.js +++ b/projects/adrastea-validator/index.js @@ -1,35 +1,20 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { getConnection } = require("../helper/solana"); -const { PublicKey } = require("@solana/web3.js"); // Adrastea validator accounts const VOTE_ACCOUNT = "adraBKLNY3DL3pg6SJRDYiMA8BsznaWpUdE42X41gbP"; -const IDENTITY_ACCOUNT = "adramSYKBv1yHoZTub4kepcmF5LybPxwyJcsz4fpfi7"; -async function tvl() { +async function tvl(api) { const connection = getConnection(); - - try { - // Get all vote accounts from the network - const voteAccounts = await connection.getVoteAccounts(); - - // Find Adrastea validator in current or delinquent validators - const adrasteaValidator = voteAccounts.current.find(va => va.votePubkey === VOTE_ACCOUNT) || - voteAccounts.delinquent.find(va => va.votePubkey === VOTE_ACCOUNT); - - if (adrasteaValidator) { - // Convert lamports to SOL - const totalStake = adrasteaValidator.activatedStake / 1e9; - return { - solana: totalStake, - }; - } else { - console.log("Adrastea validator not found in vote accounts"); - return { solana: 0 }; - } - } catch (error) { - console.error("Error fetching Adrastea validator stake:", error); - return { solana: 0 }; - } + + // Get all vote accounts from the network + const voteAccounts = await connection.getVoteAccounts(); + + // Find Adrastea validator in current or delinquent validators + const adrasteaValidator = voteAccounts.current.find(va => va.votePubkey === VOTE_ACCOUNT) || + voteAccounts.delinquent.find(va => va.votePubkey === VOTE_ACCOUNT); + + api.add(ADDRESSES.solana.SOL, adrasteaValidator.activatedStake) } module.exports = {