For the complete documentation index, see llms.txt. This page is also available as Markdown.

EVM Permits

Learn how to use EIP-2612 and Permit2 signatures in Omniston EVM order payloads instead of relying only on pre-approved ERC-20 allowances.

To support EIP-2612 permits and Permit2 signatures, BuildEvmOrderPayloadRequest can include these optional fields:

  • encodedPermitData

  • permitSignature

  • usePermit2

These fields let a client attach permit-based token authorization directly to the EVM order payload request, so the resolver can use the provided permit instead of relying on a pre-existing on-chain allowance.

If these fields are omitted, the flow stays unchanged: the trader must approve the token in the usual ERC-20 allowance flow before the order can be executed.

This support is available starting with these SDK versions:

  • @ston-fi/omniston-sdk: 0.8.3

  • @ston-fi/omniston-sdk-react: 0.8.3

Which Should I Use

Use EIP-2612 when the input token supports token-native permit.

  • no separate ERC-20 approval transaction is needed

  • this avoids spending gas on a standalone approval transaction

  • the signature is produced directly against the token contract permit domain

Use Permit2 when the token does not support EIP-2612, but you still want a signature-based authorization flow.

  • the token usually needs a one-time ERC-20 approval to the Permit2 contract first

  • that one-time approval still requires gas

  • after that, each order can use a Permit2 signature instead of approving the final spender directly

In practice:

  • if the token supports EIP-2612, prefer EIP-2612

  • otherwise, use Permit2

  • if neither is available for your use case, fall back to the regular allowance flow

  • the regular allowance flow requires a gas-paying approval transaction before the order can be executed

Example 1: EIP-2612

Not all ERC-20 tokens support EIP-2612, so support needs to be checked for each token individually.

This example uses pUSD on Polygon 0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB.

Example 2: Permit2

This example uses USDC on Base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.

This example uses the Permit2 contract 0x000000000022D473030F116dDEE9F6B43aC78BA3.

Before using Permit2 signatures, the token usually needs a one-time ERC-20 approval to the Permit2 contract. That approval is still a regular on-chain transaction, so the wallet needs enough native gas token to submit it.

Once allowance is granted to the Permit2 contract, each order can use a signed PermitSingle payload.

Last updated