From e92bbfdd7a7935905c8f2250e18aa6ac55d73c72 Mon Sep 17 00:00:00 2001 From: Patrick Bennett Date: Fri, 24 Jan 2025 04:11:36 -0500 Subject: [PATCH] =?UTF-8?q?Add=20R=C3=A9ti=20open=20pooling=20protocol=20T?= =?UTF-8?q?VL=20calculation=20(#13226)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/reti-openpooling/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/reti-openpooling/index.js diff --git a/projects/reti-openpooling/index.js b/projects/reti-openpooling/index.js new file mode 100644 index 0000000000..cd8b9786d5 --- /dev/null +++ b/projects/reti-openpooling/index.js @@ -0,0 +1,19 @@ +const { getAppGlobalState } = require('../helper/chain/algorand') +const retiAppID = 2714516089 + +async function getStake () { + const state = await getAppGlobalState(retiAppID) + return { + 'algorand': state['staked'] / 1e6, + } +} + +module.exports = { + timetravel: false, + methodology: 'Returns total amount staked protocol-wide for the RĂ©ti open pooling protocol.', + algorand: { + tvl: async () => { + return getStake() + }, + } +}