You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(8.5.10): on-chain unwind orchestration — full end-to-end
Closes the final gap on cross-chain withdrawal unwind. The fulfiller now
sends real txs when it detects a needs-cross-chain-unwind request:
Step 1: Relayer.provideLiquidity(-d0, -d1) on sister chain — removes
LP, releases USDC + WETH back to the Relayer's balance
Step 2: Relayer.bridgeUsdcHome(amount) — CCTP-burns released USDC,
with the Base vault as mint recipient
Step 3 (next cycle, ~20 min later): vault has the USDC; fulfill the
queued withdrawal via vault.fulfillWithdraw
Delta math: approximate WETH equivalent using ETH_PRICE_USD env (default
3000). The LP-remove computes liquidity via the Relayer's existing
LiquidityAmounts.getLiquidityForAmounts, so the proportional pair of
deltas finds a reasonable removal amount. Exact precision is a future
improvement (read actual position state from chain).
Failure modes handled:
- Step 1 fails → return false, mark NOT in-progress, retry next cycle
- Step 2 fails after step 1 succeeded → return false but log that the
USDC sits at the Relayer; future cycle re-attempts bridgeUsdcHome
- Wallet/env not configured → graceful skip + clear error message
Tracker integration: only `recordUnwindInitiated` on full success, so
partial-failure retries don't get blocked by stale in-progress markers.
After this commit, the protocol's depositor + withdrawer flows are
fully end-to-end on the agent layer. Remaining work is operational:
deploy the new bytecode (per RC7-MIGRATION.md), configure bridge
on the new Relayer, set localLpRelayer on the vault.
0 commit comments