mento-protocol / reserve-site

Mento Reserve Website
https://reserve.mento.org
1 stars 3 forks source link

feat: account for univ3 cusd/USDT pool #98

Closed philbow61 closed 1 month ago

philbow61 commented 1 month ago

Description

This Pr updates the reserve site to account for the new USDT/cUSD pool. Subtracts total CUSD supply by cUSD share in that pool owned by the reserve. Adds share of USDT share owned by the Reserve to Reserve USDT holdings.

Tested

Verified numbers are correct: Liquidity of our position: 418603952010722297498 (https://explorer.celo.org/mainnet/token/0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A/read-contract positionID is ist 55551) Actual Pool address https://celoscan.io/address/0x5dC631aD6C26BEA1a59fBF2C2680CF3df43d249f#readContract Total liquidity of Pool 747799139469933054569 -> our share of pool balances: 418603952010722297498/747799139469933054569 = 0.55978127001 -> Total USDT balance of the pool: 527,674.557799 -> 527,674.557799 0.55978127001 = 295,382.334117 our USDT share -> Total cUSD balance of the pool: 459,839.73334488 -> 459,839.73334488 0.55978127001 = 257,409.669933 our cUSD share

Numbers might be a bit off from the value calculated on the site since I didn't query all the numbers at the exact same time.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
reserve-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2024 0:05am