The Settler contract is provided by RockawayX. It atomically settles fixed-price token redemption intents authorized by a user through a single Permit2 EIP-712 signature.
<aside> 📍
Production deployment
chainId: 1)0x14e9873B7f10A7d2A281deEF6f4722Bbf0b817320xafe6E71a9D796DfaF4f2be67b9eE38C5A8EC828DA user signs an IntentOrder specifying the exact input token and amount they will provide, the exact output token and amount they will receive, a Permit2 nonce, and a deadline. An approved operator submits that signed order to fill.
Settlement happens atomically in one transaction:
IntentFilled as the canonical confirmation of completion.If any step fails, the entire transaction reverts. No partial settlement is possible.
sequenceDiagram
autonumber
actor U as User
participant O as Approved operator
participant S as Settler
participant P as Permit2
participant R as Input recipient
U-->>O: Signed IntentOrder
O->>S: fill(order, signature, inputRecipient)
S->>S: Validate operator, deadline, amounts, and recipient
S->>P: Verify Permit2 signature and consume nonce
P->>R: Transfer input token from user
S->>U: Transfer output token from operator
S-->>O: Emit IntentFilled
IntentOrder commits the user to all economically relevant settlement terms:
| Field | Meaning |
|---|---|
user |
Signature owner and recipient of the output tokens |
nonce |
Permit2 unordered nonce preventing replay |
deadline |
Last timestamp at which the order can be filled |
inputToken |
Token transferred from the user |
inputAmount |
Exact input amount in base units |
outputToken |
Token supplied by the operator |
outputAmount |
Exact output amount in base units |
The order is hashed with INTENT_ORDER_TYPEHASH and used as the witness in Permit2's PermitWitnessTransferFrom signature. Because the user and nonce are both included in the signed witness, the resulting orderHash uniquely identifies the order.
fillOnly an address approved in isOperator may call fill, and settlement must not be paused. The supplied inputRecipient must also be an approved operator address.
This separates two roles: