diag: add script to verify all UniV3 pool health on mainnet#211
Open
vishalchangrani wants to merge 5 commits intomainfrom
Open
diag: add script to verify all UniV3 pool health on mainnet#211vishalchangrani wants to merge 5 commits intomainfrom
vishalchangrani wants to merge 5 commits intomainfrom
Conversation
Adds docs/v1_supported_features.md covering: supported strategies (TracerStrategy, mUSDCStrategy, mUSDFStrategy, simple ERC4626 strategies), FLOW-only deposit token, YieldToken output, 10-minute auto-rebalancing via FlowTransactionScheduler, health factors, deposit limits, fee model, and closed-beta access control. Open items flagged for team review. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… mainnet Checks all 8 Uniswap V3 pools required by FlowYieldVaultsStrategiesV2: - exists, initialized, hasLiquidity flags via factory.getPool + slot0 + liquidity() - Human-readable token reserves (balance) alongside raw wei values Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ny EVM address Checks balances of all 7 tokens used by FlowYieldVaultsStrategiesV2 (MOET, PYUSD0, FUSDEV, WFLOW, syWFLOWv, WETH, WBTC) at a given EVM address. Useful for inspecting COAs, strategy contracts, or pool reserves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es in USD Reports the redemption price of syWFLOWv and FUSDEV vaults in both their underlying token and USD via Band Protocol oracle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cadence/scripts/diag_verify_pools.cdc— verifies all 8 Uniswap V3 pools required byFlowYieldVaultsStrategiesV2are correctly set up on mainnetcadence/scripts/diag_evm_token_balances.cdc— checks balances of all relevant tokens at any EVM addresscadence/scripts/diag_vault_prices.cdc— reports the redemption price of syWFLOWv and FUSDEV ERC4626 vaults in both their underlying token and in USD (via Band Protocol oracle)For each pool
diag_verify_poolschecks:exists,initialized,hasLiquidity, and token reserves in human-readable units and raw wei.Pools checked
Usage
diag_verify_pools.cdc— check all pool healthSample output (mainnet, 2026-03-11)
{ "1_moet_pyusd0_fee100": { "label": "MOET / PYUSD0 fee=100 [pre-swap: PYUSD0 collateral → MOET for FlowALP]", "poolAddress": "863b8bf842a7205e55896e518869e9f29a9a35af", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 19999026440649, "MOET_balance": 19.89200582, "MOET_balance_wei": 19892005825342628491, "PYUSD0_balance": 30022.35759300, "PYUSD0_balance_wei": 30022357593 }, "2_fusdev_pyusd0_fee100": { "label": "FUSDEV / PYUSD0 fee=100 [FUSDEVStrategy: yield token ↔ stablecoin]", "poolAddress": "9196e243b7562b0866309013f2f9eb63f83a690f", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 28466223307593777194, "FUSDEV_balance": 115073.55934541, "FUSDEV_balance_wei": 115073559345419056595870, "PYUSD0_balance": 144238.86303100, "PYUSD0_balance_wei": 144238863031 }, "3_sywflowv_wflow_fee100": { "label": "syWFLOWv / WFLOW fee=100 [syWFLOWvStrategy: yield token ↔ WFLOW]", "poolAddress": "9ea72f7fe981eef7e6458beb02a977f27a48f4f9", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 696762855537495765389412480, "syWFLOWv_balance": 609667.49593107, "syWFLOWv_balance_wei": 60966749593107692000166833, "WFLOW_balance": 2235808.69809952, "WFLOW_balance_wei": 2235808698099520052337437 }, "4_pyusd0_wflow_fee3000": { "label": "PYUSD0 / WFLOW fee=3000 [FUSDEVStrategy: FLOW collateral exit path]", "poolAddress": "0fdba612fea7a7ad0256687eebf056d81ca63f63", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 861334314456052813, "PYUSD0_balance": 305980.65294200, "PYUSD0_balance_wei": 305980652942, "WFLOW_balance": 5270219.00060394, "WFLOW_balance_wei": 5270219000603940932099398 }, "5_pyusd0_weth_fee3000": { "label": "PYUSD0 / WETH fee=3000 [FUSDEVStrategy: WETH collateral exit path]", "poolAddress": "811491e52f828d934966beaf21d94f14a49bf225", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 12786161820710169, "PYUSD0_balance": 112758.47857400, "PYUSD0_balance_wei": 112758478574, "WETH_balance": 43.81450626, "WETH_balance_wei": 43814506261860122328 }, "6_pyusd0_wbtc_fee3000": { "label": "PYUSD0 / WBTC fee=3000 [FUSDEVStrategy: WBTC collateral exit path]", "poolAddress": "3b0727bbc497046a9dbd25417d2c78c09fe404fd", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 3087626960, "PYUSD0_balance": 82693.82123900, "PYUSD0_balance_wei": 82693821239, "WBTC_balance": 2.07492126, "WBTC_balance_wei": 207492126 }, "7_wflow_weth_fee3000": { "label": "WFLOW / WETH fee=3000 [syWFLOWvStrategy: WETH & WBTC collateral first hop]", "poolAddress": "65f1535a8c82613260e53d84d5745b2a8b31f52a", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 4514662552543590948860, "WFLOW_balance": 2375059.24580459, "WFLOW_balance_wei": 2375059245804599441133555, "WETH_balance": 23.59290529, "WETH_balance_wei": 23592905291877765918 }, "8_weth_wbtc_fee3000": { "label": "WETH / WBTC fee=3000 [syWFLOWvStrategy: WBTC collateral second hop]", "poolAddress": "c77d9a0dd85f2b140b3318f31f90c1e466ea1416", "exists": true, "initialized": true, "hasLiquidity": true, "liquidity": 4616697210435, "WETH_balance": 0.26799610, "WETH_balance_wei": 267996104144166848, "WBTC_balance": 0.00735991, "WBTC_balance_wei": 735991 } }diag_evm_token_balances.cdc— check token balances at any EVM addressflow scripts execute cadence/scripts/diag_evm_token_balances.cdc --args-json '[{"type":"String","value":"0xYOUR_EVM_ADDRESS"}]' --network mainnetSample output — querying the MOET/PYUSD0 pool address (mainnet, 2026-03-11)
flow scripts execute cadence/scripts/diag_evm_token_balances.cdc --args-json '[{"type":"String","value":"0x863b8bf842a7205e55896e518869e9f29a9a35af"}]' --network mainnet{ "MOET": { "decimals": 18, "balance": 19.89200582, "balance_wei": 19892005825342628491 }, "PYUSD0": { "decimals": 6, "balance": 30022.35759300, "balance_wei": 30022357593 }, "FUSDEV": { "decimals": 18, "balance": 0.00000000, "balance_wei": 0 }, "WFLOW": { "decimals": 18, "balance": 0.00000000, "balance_wei": 0 }, "syWFLOWv": { "decimals": 20, "balance": 0.00000000, "balance_wei": 0 }, "WETH": { "decimals": 18, "balance": 0.00000000, "balance_wei": 0 }, "WBTC": { "decimals": 8, "balance": 0.00000000, "balance_wei": 0 } }diag_vault_prices.cdc— check ERC4626 vault share prices in USDReports the redemption price of syWFLOWv and FUSDEV vaults using
totalAssets / totalSupplyfor the share price, multiplied by the Band Protocol oracle USD price.Sample output (mainnet, 2026-03-11)
{ "syWFLOWv": { "price_usd": 0.06578694, "price_in_underlying": 1.16033804, "underlying_usd": 0.05669120, "interpretation": "1 syWFLOWv = $0.06578694", "totalAssets": 706940.48583706, "totalAssets_wei": 70694048583706368000000000, "totalShares": 609197.13043739, "totalShares_wei": 60919713043739290000000000, "underlying_address": "d3bf53dac106a0290b0483ecbc89d40fcc961f3e", "asset_decimals": 18, "share_decimals": 20 }, "FUSDEV": { "price_usd": 1.01120000, "price_in_underlying": 1.01140000, "underlying_usd": 0.99980000, "interpretation": "1 FUSDEV = $1.01120000", "totalAssets": 144238.86303100, "totalAssets_wei": 144238863031000000000000, "totalShares": 142609.16543200, "totalShares_wei": 142609165432000000000000, "underlying_address": "99af3eea856556646c98c8b9b2548fe815240750", "asset_decimals": 6, "share_decimals": 18 } }Test plan
diag_verify_pools.cdcran against mainnet — all 8 pools returnexists=true,initialized=true,hasLiquidity=truediag_evm_token_balances.cdcran against mainnet — MOET/PYUSD0 pool address shows correct reservesdiag_vault_prices.cdcran against mainnet — syWFLOWv ~$0.066, FUSDEV ~$1.011🤖 Generated with Claude Code