Skip to main content
Permit2 lets the user lock tokens and produce a signature that authorizes the swap. Tokens stay secure until the swap is executed, on the same chain or across chains. The resolver uses this signature to move funds into escrow and complete the swap.
The user must have granted the Permit2 contract an allowance on the source token first. See Approve for Permit2.

How the signature is built

When approval_mechanism is permit2, sign an EIP-712 PermitWitnessTransferFrom message built from the quote and the intent:

Example

End to end with fetch and viem: quote, intent, Permit2 signature, approval.
Then track the intent status.