Skip to content
Merged
Changes from 1 commit
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
23 changes: 23 additions & 0 deletions projects/haystack/index.js
Original file line number Diff line number Diff line change
@@ -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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use tvl: () => ({}) and export the current tvl function to staking as HAY is your own token

},
}

Loading