Gasless Settlement
Sweepster enables users who hold only ERC-20 tokens — no native gas — to move those tokens across chains or within a chain. The user never touches native gas at any point. The whole point: a wallet holding only ERC-20s and zero native token can still sweep.
How it works
The product is EIP-7702-only. The user signs two messages off-chain — no gas, no on-chain approval, no allowance:
User signs TWO things off-chain (no gas):
1. EIP-712 signTypedData of the SweepDelegate SweepOrder → the `bytes signature`
2. EIP-7702 authorization delegating the EOA to the
per-chain SweepDelegate implementation → the `authorization`
│
▼
Client submits { quoteId, signature, authorization } to POST /intents
│
▼
Relayer (Kryard) broadcasts the EIP-7702 type-4 ("set-code") tx and PAYS THE GAS
│
▼
The user's EOA — now temporarily running SweepDelegate code — executes
the settlement (single atomic tx, as address(this) == the user's EOA):
1. Pull tokenIn from the EOA (self-pull; no Permit2, no approval)
2. Swap tokenIn → canonical asset (e.g. USDC)
3. Skim protocol fee + builder fee
4. Hand off to delivery engine
│
▼
Delivery engine:
• Same-chain: swap/send to destination
• Cross-chain: bridge via LI.FI / Across
│
▼
Destination delivery (relayer covers destination gas)The two off-chain signatures
| Signature | What | How |
|---|---|---|
| Order signature | EIP-712 typed-data signature over the SweepDelegate SweepOrder. Becomes the bytes signature argument to sweep(). | signTypedData({ account, ...buildDelegateTypedData(order, chainId) }) — see the Signing guide. |
| EIP-7702 authorization | Authorizes the user's EOA to temporarily run the per-chain SweepDelegate implementation. | walletClient.signAuthorization({ contractAddress: sweepDelegate, chainId }). |
Both are produced off-chain with no gas. The authorization is required — POST /intents returns 422 if it is absent (there is no fallback path). Chains that do not support EIP-7702 are rejected at quote time.
Gas sponsorship
The Sweepster relayer (Kryard):
- Fronts source-chain gas — broadcasts the EIP-7702 set-code transaction using its own treasury on the source chain.
- Fronts destination-chain gas — for cross-chain sweeps, sponsors the final delivery on the destination chain.
Gas costs are recovered from the swept tokens in the same atomic settlement transaction. This is the key invariant: repayment is never separable from the transfer.
Why not Permit2?
The on-chain SweepRouter / Permit2 contracts are retained but unused by the product. Permit2 requires an on-chain approve of the Permit2 contract before the first sweep — and an approval costs gas, which defeats the zero-native-gas use case. EIP-7702 lets the EOA pull its own tokens as part of the delegated execution, so no allowance and no prior on-chain transaction are needed. The settlement contract's shared SweepSettlementBase logic (_skimFees → delivery dispatch) is the same one the SweepDelegate path runs.
Delivery modes
- Local (
_deliverLocal) — same-chain swap + send to destination; enforcesminAmountOutslippage. - Cross-chain (
_deliverCrossChain) — signsdestChainId != block.chainid; hands the swept value to an allowlisted bridge.minAmountOutmust be0cross-chain — slippage lives in the bridge calldata.
ERC-4337 paymaster (planned)
A verifying + ERC-20 paymaster is planned (Phase 6) as an additional gas-abstraction option alongside the current EIP-7702 path.