Approve tokens for Nexus smart contracts to enable cross-chain operations on your behalf.
The Nexus SDK requires allowances.Through allowances, a user permits the Nexus Vault contracts on the source chains
to collect their funds. The protocol uses these funds to settle the transaction
delivered on the destination chain.
Allowances are chosen per operation, via the onAllowance hook passed in options.hooks.
The hook receives { sources, allow, deny } — one entry per source chain, each showing the current and minimum required allowance.
Calling allow([...]) sets the approval per source: 'min' (exactly what this operation needs), 'max' (unlimited), or an exact amount.
If no hook is provided, the SDK defaults to minimal ('min') approvals — it never grants unlimited approvals on its own.
Until the required allowance is in place, the Nexus Vault contracts on the source chains cannot collect the user funds for Nexus operations.By approving allowances for chain abstraction on the source chains, users can:
Spend anywhere with funds from two or more source chains.
Bypass bridging to enable liquidity on the destination chain.
Transact on newer chains with zero or insufficient liquidity.
Warning
Setting an allowance is normally an on-chain transaction, so users pay a gas fee for it. Where a token supports EIP-2612 permits, the SDK uses a signed permit instead — a gasless signature — so no separate approval transaction is needed.
How Allowances Work
Here is how allowances enable chain abstracted transactions:
The SDK builds the operation and presents the user with an intent: the amounts to collect per source chain, the destination amount, and fee details. The user approves or rejects it via the onIntent hook.
The onAllowance hook fires for any source chain where the current allowance is below what the operation needs, and the approval amounts are chosen ('min' by default).
Approvals are granted to the Nexus Vault contracts on the source chains — via a regular ERC-20 approval, or a gasless EIP-2612 permit where the token supports it.
The user signs the intent. Solvers then supply liquidity on the destination chain.
The protocol settles with the solvers using the funds collected from the source chains.
See Hooks for the full onAllowance and onIntent shapes.