Tide admin / cron tools
One-time pool init + permissionless window advancement + aggregation/swap orchestration.
init_pool
Creates the canonical USDC → SOL pool. Window duration is fixed for the pool's lifetime (program seeds are mint-pair only — no re-init), so pick carefully. 100 USDC aggregate minimum, 5 bps fee.
init_window
Opens the next aggregation window. Pool must exist.
mint_test_usdc
devnet faucetMints fresh test USDC to your connected wallet. Skips Circle's faucet (region-blocked for many users). Requires the connected wallet to be the test mint authority.
raydium_quote_preview
DEX backbone · liveProbe Raydium V3 trade API for current USDC → SOL price + route. Calls mainnet (Raydium has no devnet endpoint). Read-only — does not execute. The execute_swap instruction would forward this route via CPI to Raydium AMM v4 (675k…1Mp8).
pyth_oracle_snapshot
SOL / USD · liveReference price feed for window-time slippage benchmarking. On-chain consumer (post-MVP) reads the same feed inside execute_swap to set window.effective_slippage_bps honestly.
Calls encryptIntent() with the real @arcium-hq/client SDK — RescueCipher + x25519 ECDH path. Produces a 32-byte commitment hash + ciphertext + ephemeral pubkey + nonce. Same code shape as production; only the MXE pubkey source differs.
Arcium Docs →Real MoonPay API data — proxied via /api/moonpay/currencies. Onramp button uses the same key path (HMAC-signed via /api/moonpay/sign); webhook handler at /api/moonpay/webhook verifies HMAC-SHA256 signatures.
MoonPay /v3/currencies docs →trigger_aggregate
Closes the active window and flips status to Aggregating.
execute_swap
Pulls a Jupiter quote (USDC → SOL) and forwards the swap as a CPI signed by the escrow PDA. Requires window status = Aggregating.
mark_window_failed
Pool-authority escape hatch when the swap can't execute. Flips an Aggregating window to Failed, which unlocks refund_intent for every participant. Use when Jupiter has no route or slippage breach makes execute_swap impossible.
Single-wallet pool authority is hackathon-only. For mainnet, Tide migrates to institutional infrastructure:
- Pool authoritySquads V4 multisig (Altitude) ↗
- Smart-contract auditOttersec or Halborn (~2-4 weeks, $15-30K)
- Confidential aggregateArcium MXE (Cohort 2) ↗
- DEX routingJupiter v6 / Raydium aggregator (real liquidity)
- Idle yieldReflect Protocol (USDC vault APY) ↗
- Bug bountyImmunefi ($50-100K critical tier)
- Auth verificationPrivy server-side token check ↗