feat(cosmwasm): introduce escrow vault for fungibility layer (#4937)
A CosmWasm contract that acts as a solver in the zkgm protocol, enabling fungible token transfers across IBC channels by managing escrowed assets. Key Features - Dual Token Support: Handles both native Cosmos tokens (via BankMsg) and CW20 tokens - Fungible Lane Configuration: Maps (channel_id, base_token) pairs to counterparty beneficiaries for cross-chain settlement - Intent Whitelisting: Controls which packet hashes can be filled before finality - Solver Interface: Implements DoSolve to release escrowed tokens and return beneficiary addresses for acknowledgments How It Works 1. Admin configures fungible lanes linking channels/tokens to counterparty beneficiaries 2. When zkgm calls DoSolve, the contract validates the order and releases escrowed tokens 3. Relayers receive fees (base_amount - quote_amount) 4. Returns the counterparty beneficiary address for source chain repayment (symmetric vault) Security - Access controlled: Only zkgm can call DoSolve, only admin can configure lanes - Validates base_amount ≥ quote_amount to prevent underflows - Intent packets must be whitelisted to prevent unauthorized pre-finality fills
H
hussein committed
014d50646e411cb99f8c5feec6de6f7225ba811a
Committed by GitHub <noreply@github.com>
on 8/11/2025, 12:59:35 PM