Single-page app to withdraw staked MYST from the Mysterium IQ Protocol pool on Polygon.
cd tools/iq-myst-withdraw
npm install
npm run devStats preloads public/data/stakers.json so visitors less wait on the first paint. A background scan then replaces it with live chain data.
Generate / refresh snapshots (once a day):
npm run fetch-balances
# optional custom RPC:
RPC_URL=https://polygon-rpc.com npm run fetch-balancesWrites:
public/data/stakers.json— sMYST holderspublic/data/borrowers.json— rMYST holders (active borrowers)
Then commit and push:
git add public/data/stakers.json public/data/borrowers.json
git commit -m "chore: update pool snapshots"
git pushnpm run buildDeploy the dist/ folder (includes data/stakers.json from public/). vite.config.ts uses base: './'.
- Unstake needs enough available pool liquidity (
getAvailableReserve). If rentals are still marked “used”, unstake may revert untilreturnRentalfrees reserve. - One
unstaketransaction per sMYST NFT (sequential). - Snapshot amounts are strings (wei) for JSON safety; the UI formats them as MYST.