Skip to main content
DEX aggregation protocol powering swaps across the DeFi ecosystem. Exchange Proxy provides a single entry point for token swaps across multiple sources.

What it offers

  • transformERC20: Execute a token swap via the Exchange Proxy transformer pipeline

Notes

  • The Exchange Proxy address is the same on 6 of its 7 chains; Optimism’s differs
  • Uses transformer pipeline architecture - each swap is a sequence of transformations
  • Route computation happens via 0x API - transformations array comes from API response
  • Approve inputToken to exchangeProxy before swapping
  • 0x API provides the route, slippage protection, and transformer calldata

Its names in a program

On Ethereum, Zerox is a namespace: its contracts need no import.

Deployments

ABI

ExchangeProxyABI

import ExchangeProxyABI from "./protocols/zerox/ExchangeProxyABI.json"; Speaks for: exchangeProxy.
  • transformERC20(address inputToken, address outputToken, uint256 inputTokenAmount, uint256 minOutputTokenAmount, (uint32 deploymentNonce, bytes data)[] transformations) payable returns (uint256 outputTokenAmount)

Next steps