The approval target is the contract allowed to call transferFrom on the user's token. The transaction target is the entry point receiving the swap call. Those addresses can match, but your integration must not assume they always do.
The ERC-20 allowance model is keyed by owner and spender. Sending approve to the token contract with a spender parameter grants that spender permission; it does not grant permission to whatever contract later appears in transaction.to.
The 0x distinction is operationally important
0x v2 contract documentation identifies the allowance target through issues.allowance.spender or allowanceTarget. Execution uses transaction.to. The documentation explicitly prohibits approving Settler. AllowanceHolder and Permit2 are the relevant approval mechanisms for their respective paths.
Consequently, an adapter should return separate fields for spender and executionTarget. It should also identify the approval mechanism and its chain-specific validation rule. A missing allowance issue can mean approval is already sufficient; it should not cause the application to invent a spender by copying the execution target.
Validation before prompting
- Bind the response to the requested chain and provider version.
- Resolve the documented spender for the selected path.
- Compare it with the expected deployment or authorized registry result.
- Read allowance for the actual owner and token.
- Build the approval only if permission is insufficient.
Keep contract validation independent from response parsing. A syntactically valid address is not proof of authority. Conversely, dynamic execution addresses need a maintained validation method rather than a permanently frozen list.
A strong fixture deliberately returns different spender and transaction addresses. The expected result is an approval to the documented spender, followed by execution at the transaction target. If both operations use the same field, the adapter fails the fixture.
Sources & verification (2)
Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.
- ERC-20: Token Standard
Token units, optional metadata and allowance semantics
https://eips.ethereum.org/EIPS/eip-20 - Contracts
Allowance target versus execution entry point; Settler warning
https://docs.0x.org/docs/core-concepts/contracts