From fc490e8bf4e4593e7d682b7ae6ef7ab075b2d97b Mon Sep 17 00:00:00 2001 From: John Mizz Date: Tue, 2 Dec 2025 10:42:58 -0500 Subject: [PATCH 1/2] Add Haystack Staking TVL --- projects/haystack/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/haystack/index.js diff --git a/projects/haystack/index.js b/projects/haystack/index.js new file mode 100644 index 0000000000..1de31bff92 --- /dev/null +++ b/projects/haystack/index.js @@ -0,0 +1,23 @@ +const { sumTokens } = require('../helper/chain/algorand') + +// HAY ASA on Algorand +const HAY_ASA_ID = '3160000000' + +// Single staking escrow account that holds all staked HAY +const STAKING_ESCROW = 'OLSICPA5V6IPWORUVWQKCJTSFKLP7P5JORZBICKU6CH7W7EVMDALLWD7SQ' + +async function tvl() { + return sumTokens({ + owner: STAKING_ESCROW, + tokens: [HAY_ASA_ID], + }) +} + +module.exports = { + timetravel: false, + methodology: 'Counts the total HAY tokens held in the Haystack staking escrow account on Algorand.', + algorand: { + tvl, + }, +} + From 2b748359ce5e3c9c3baec806f62b4d1fe14155d4 Mon Sep 17 00:00:00 2001 From: John Mizz Date: Wed, 3 Dec 2025 14:28:48 -0500 Subject: [PATCH 2/2] refactor(haystack): move HAY token tracking to staking --- projects/haystack/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/haystack/index.js b/projects/haystack/index.js index 1de31bff92..2701022511 100644 --- a/projects/haystack/index.js +++ b/projects/haystack/index.js @@ -6,7 +6,7 @@ const HAY_ASA_ID = '3160000000' // Single staking escrow account that holds all staked HAY const STAKING_ESCROW = 'OLSICPA5V6IPWORUVWQKCJTSFKLP7P5JORZBICKU6CH7W7EVMDALLWD7SQ' -async function tvl() { +async function staking() { return sumTokens({ owner: STAKING_ESCROW, tokens: [HAY_ASA_ID], @@ -17,7 +17,8 @@ module.exports = { timetravel: false, methodology: 'Counts the total HAY tokens held in the Haystack staking escrow account on Algorand.', algorand: { - tvl, + tvl: () => ({}), + staking, }, }