Skip to content

Commit c6662ad

Browse files
authored
rain-one project analytics request (#16795)
1 parent 6fa8079 commit c6662ad

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

projects/rain-one/index.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const { sumTokens2 } = require('../helper/unwrapLPs')
2+
const { uniV3Export } = require('../helper/uniswapV3')
3+
4+
// Rain.one RAIN token address on Arbitrum
5+
const RAIN_TOKEN = "0x25118290e6a5f4139381d072181157035864099d"
6+
7+
// Non-circulating & treasury wallets
8+
const NON_CIRCULATING_ADDRESSES = [
9+
"0x467D5Bf8Cfa1a5f99328fBdCb9C751c78934b725", // Sablier Vesting
10+
"0xc41A5462362f6AB4A878AE0Aac91b7259f7176A5", // Claim Presale Contract
11+
]
12+
13+
// ---- Treasury TVL ----
14+
async function vesting(api) {
15+
return sumTokens2({
16+
api,
17+
tokensAndOwners: [
18+
...NON_CIRCULATING_ADDRESSES.map(addr => [RAIN_TOKEN, addr]),
19+
],
20+
})
21+
}
22+
23+
// ---- DEX TVLs ----
24+
// Uniswap V3 (official factory)
25+
const v3TVL = uniV3Export({
26+
arbitrum:{
27+
factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984',
28+
fromBlock: 377328276,
29+
}
30+
})
31+
32+
async function tvl(api) {
33+
await v3TVL?.arbitrum?.tvl(api);
34+
return api.getBalances()
35+
}
36+
37+
module.exports = {
38+
timetravel: true,
39+
misrepresentedTokens: false,
40+
methodology:
41+
"TVL includes RAIN tokens held in Rain.one’s vesting/presale contracts, and liquidity in Uniswap V3 pools on Arbitrum.",
42+
arbitrum: {
43+
tvl,
44+
vesting,
45+
},
46+
}

0 commit comments

Comments
 (0)