diff --git a/projects/hemi-locked/index.js b/projects/hemi-locked/index.js new file mode 100644 index 0000000000..118b597f39 --- /dev/null +++ b/projects/hemi-locked/index.js @@ -0,0 +1,18 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + ethereum: { + tvl: (api) => + sumTokens2({ + api, + owners: [ + "0x5eaa10F99e7e6D177eF9F74E519E319aa49f191e", + "0x39a0005415256B9863aFE2d55Edcf75ECc3A4D7e", + ], + fetchCoValentTokens: true, + blacklistedTokens: [ + '0xeb964a1a6fab73b8c72a0d15c7337fa4804f484d', // project HEMI token + ], + }), + }, +}; diff --git a/projects/hemi-locking/index.js b/projects/hemi-locking/index.js new file mode 100644 index 0000000000..203fa274a7 --- /dev/null +++ b/projects/hemi-locking/index.js @@ -0,0 +1,26 @@ +const { sumTokens2 } = require('@defillama/sdk/build/generalUtil') + + +const CHAIN = 'hemi' +const HEMI_TOKEN = '0x99e3dE3817F6081B2568208337ef83295b7f591D' +const VE_ESCROW = '0x371d3718D5b7F75EAb050FAe6Da7DF3092031c89' + +async function staking(_timestamp, _ethBlock, _chainBlocks, { api }) { + // Sum the HEMI balance(s) custodied by the ve escrow + return sumTokens2({ + api, + owner: VE_ESCROW, + tokens: [HEMI_TOKEN], + }) +} + +module.exports = { + methodology: + "Staking TVL = amount of HEMI locked in veHEMI (VotingEscrow). We sum the escrow’s HEMI balance.", + misrepresentedTokens: false, + timetravel: true, + hallmarks: [ + // [unixTimestamp, "Event description"], + ], + [CHAIN]: { staking }, +} \ No newline at end of file