feat(thorchain): refund the stuck BASE.USDC outbound in Migrate20to21
🔎 Visual review ofda460278(same diff asb38e2486): explainer, review flags and prompts to ask an AI about the change
Stacked on !5348 (merged) (bond-slash refunds, Migrate20to21); GitLab retargets this to develop once !5348 (merged) merges.
What
Adds refundStuckBaseUsdc322 to Migrate20to21.
One BASE.USDC outbound (in-tx D67BAD8C4C3F66C7E1C05FA9E4AEC74401222A3F32931084B7F50D9898F0888E, amount 74186700, addressed to the USDC token contract) has sat unsigned since h28,160,945. The MaxOutboundAttempts recovery skips it because the swap's RUNE leg was already paid, so it can never be recovered or re-signed.
The migration:
- reverse-swaps the parked amount back to ETH.USDC to the original sender
0x6e0061688a6595929d28a65b050dd988024982a0, through the same recovery-swap pathsendFailedOutboundToTreasuryuses (recipient = sender instead of treasury); - then cancels the parked copy (
OutHash = BlankTxID).
Both steps run in one cache context and commit only if both succeed. A settled, missing or mismatched item soft-skips and never fails the upgrade. Toggle: baseUsdcRefundEnabled322.
Tests
refund + cancel · disabled · settled (no refund) · idempotent · missing (soft-skip). Builds mainnet + mocknet.