Overview
Unlike traditional atomic swaps that require coordination between parties, non-interactive swaps allow:- One party to fund a swap offer that anyone can fill
- A solver to complete the swap without the user who funded it being online
- Automatic verification of swap conditions without trusted third parties
maker and taker are script parameters — the
funding side and the filling side. See Asset
Swaps for the participant
terminology used by Arkade Intents.
Contract Architecture
The non-interactive swap contract uses a combination of:- Hash Preimage Verification - To ensure the correct asset is being swapped
- Transaction Introspection - To verify output amounts and destinations
- Timelock Mechanisms - Expiry-based reclaim
Example Implementation
This example illustrates an expiry-based contract variant. The current
reference Intents swap has no automatic expiry; it stays open until a
solver fills it or the user cancels it.
Advanced Features
Partial Fills
Non-interactive swaps can be extended to support partial fills, allowing multiple takers to each fulfill a portion of the swap:Price Oracles
For swaps that need to execute at market price rather than a fixed rate, oracle integration can be added:Using it
The contract described here settles thearkade:<asset> → arkade:<asset>
route. Exchange Assets documents
the working integration against it — discovering a market, funding the derived
contract, tracking the fill, and cancelling an unfilled swap.
Security Considerations
When implementing non-interactive swaps, consider these security aspects:- Frontrunning Protection - Consider mechanisms to prevent frontrunning of attractive swap offers
- Fee Management - Ensure the contract accounts for transaction fees to avoid dust outputs
- Replay Protection - Implement nonces or other mechanisms to prevent replay attacks
- Timelock Selection - Choose appropriate timelocks that balance security with capital efficiency
Future Directions
The Arkade ecosystem is exploring several enhancements to non-interactive swaps:- Multi-asset Swaps - Supporting swaps involving more than two assets
- Conditional Swaps - Swaps that execute only when certain external conditions are met
- Privacy Enhancements - Techniques to improve the privacy of swap participants