This document analyzes the swap workflow for Chain 1 (Ethereum Mainnet), specifically for the proposal "Will Tesla shareholders approve the 2025 CEO Performance Award?".
Scenario:
- User: Has 100 USDS on Mainnet.
- Goal: Buy YES_TSLAon (Long Tesla).
- Chain: Ethereum Mainnet (1).
| Feature | Gnosis Chain (100) | Ethereum Mainnet (1) |
|---|---|---|
| Base Token | sDAI / xDAI | USDS (0xdC03...) |
| Swap Router | SushiSwap V3 / Algebra | Universal Router (0x66a9...) |
| Approvals (Swap) | Standard ERC20 | Permit2 (0x000...BA3) |
| Approvals (Split) | Standard ERC20 | Standard ERC20 |
| Gas Costs | Low (< $0.01) | High ($5 - $50+) |
Based on the provided proposal data:
- Futarchy Router:
0xAc9Bf8EbA6Bd31f8E8c76f8E8B2AAd0BD93f98Dc - Universal Router:
0x66a9893cc07d91d95644aedd05d03f95e1dba8af(Standard Mainnet Deployment) - Permit2:
0x000000000022D473030F116dDEE9F6B43aC78BA3
Tokens:
- Base (USDS):
0xdC035D45d973E3EC169d2276DDab16f1e407384F - Split (YES_USDS):
0x87f94FaBA3e8FD5fbb9f49F7e9Ab24E8fC6E7B7E - Target (YES_TSLAon):
0x192e4580d85dc767F81F8AD02428F042E3c1074e
The user holds USDS and needs YES_USDS to swap. This interaction happens with the Futarchy Router.
-
Approve USDS:
- Call:
USDS.approve(FutarchyRouter, Amount) - Why: The Futarchy Router needs permission to pull USDS to split it.
- Note: This is a standard ERC20 approval, NOT Permit2.
FutarchyCartridge.jsuses standardapprove.
- Call:
-
Split Position:
- Call:
FutarchyRouter.splitPosition(Proposal, USDS, Amount) - Result: User sends 100 USDS -> Receives 100 YES_USDS + 100 NO_USDS.
- Call:
Now the user holds YES_USDS and wants to swap for YES_TSLAon. This interaction uses the Universal Router via uniswapSdk.js.
-
Approve YES_USDS to Permit2:
- Call:
YES_USDS.approve(Permit2, MaxUint) - Why: Universal Router uses Permit2 for token transfers. The user must first allow Permit2 to control their YES_USDS.
- Frequency: One-time per token.
- Call:
-
Permit2 Signature / Allowance:
- Call:
Permit2.approve(YES_USDS, UniversalRouter, Amount, Expiration) - Why: This authorizes the Universal Router to pull the specific amount from the user via Permit2.
- Call:
-
Execute Swap:
- Call:
UniversalRouter.execute(Commands, Inputs) - Commands:
V3_SWAP_EXACT_IN(0x00) +SWEEP(0x04). - Path: YES_USDS -> [Fee] -> YES_TSLAon.
- Result: User sends 100 YES_USDS -> Receives ~95 YES_TSLAon.
- Call:
The architecture is designed to be chain-agnostic regarding the Futarchy logic, while adapting the Swap logic to the chain's best-in-class DEX.
-
FutarchySDK (
FutarchyCartridge.js):- Uses standard
viem/etherscontract calls. splitPositionandmergePositionsare standard contract interactions that work identically on Gnosis and Mainnet, provided theFutarchyRouteris deployed (which it is:0xAc9B...).
- Uses standard
-
UniswapSDK (
uniswapSdk.js):- Specifically checks
chainId. - If
chainId === 1(Mainnet), it defaults to using the Universal Router and Permit2 flow. - It handles the extra complexity of Permit2 approvals automatically (checking allowance -> approving Permit2 -> approving Router).
- Specifically checks
-
Gas Optimization:
- On Mainnet,
Permit2allows for batched approvals and signature-based permissions, which can save gas compared to multiple standard approvals if used correctly (though the initial setup requires an on-chain approval). - The
UniversalRouterallows executing multiple commands (Swap + Sweep) in a single transaction.
- On Mainnet,
Yes, the system is fully capable of handling Chain 1 (Mainnet). The key distinction is the Swap step:
- Gnosis: Uses SushiSwap/Algebra (Standard Approvals).
- Mainnet: Uses Universal Router (Permit2 Flow).
The Split/Merge logic remains consistent (Standard Approvals) across both chains.