Skip to main content
On each EVM chain, the Value Transfer API uses three contracts. LZMultiCall executes a batch of calls in one transaction. TransferDelegate holds the token allowance and transfers tokens from the user to LZMultiCall during that batch. The Treasury address receives fees. These are Value Transfer API contracts, not Stargate protocol contracts. The Stargate frontend builds its transfers with the Value Transfer API, so its transfers use the same contracts. Solana uses a different flow; see Solana.
Setting token allowancesThe spender in each approve step depends on the route. On routes that execute through LZMultiCall, the spender is TransferDelegate. On other routes, the spender is the bridge contract that the bridge step calls. An ERC20 transfer returns zero, one or two approve steps. The API encodes the spender in each approve step’s data, so you do not need to look up or hardcode a contract address. You MUST execute each step as returned.You MUST NOT grant an allowance to LZMultiCall. See the warning under LZMultiCall (Wrapper).See Contract Addresses for the Wrapper and Delegate addresses on each chain.

Contract architecture

On routes that execute through LZMultiCall, the user calls LZMultiCall. During that call, LZMultiCall calls TransferDelegate to transfer the user’s tokens to LZMultiCall, sends the fees to the Treasury, and then calls the bridge contract.

TransferDelegate (Delegate)

On routes that execute through LZMultiCall, users approve TransferDelegate as the ERC20 spender. It has one function:
Only the paired LZMultiCall can call delegateTransferFrom; calls from any other address revert. The call succeeds only if from has approved TransferDelegate for at least amount of token. On these routes, the approve userStep returned by the API encodes the TransferDelegate address in its data.

LZMultiCall (Wrapper)

LZMultiCall executes an ordered list of calls in one transaction. Each call has a target address, a value and calldata. LZMultiCall does not restrict the targets or the calldata, except for calls to TransferDelegate. The API uses it to transfer the user’s tokens, pay fees, call the bridge contract, and sweep any remaining balance. Each LZMultiCall deploys its own TransferDelegate in the constructor, so the two contracts are always paired 1:1. You can look up the paired Delegate address via the TRANSFER_DELEGATE getter on any LZMultiCall deployment. There are two execution modes:
  • Direct execution: execute(calls, quoteId). The caller is the signer. Any address can call it. The API’s bridge userStep uses this mode.
  • Signature-based execution: execute(calls, quoteId, expiration, signer, signature). Any address can submit a batch that signer has signed with EIP-712, or approved through ERC-1271 if signer is a contract. The signature covers the calls, quoteId, an expiration timestamp and a per-signer nonce.
LZMultiCall forwards a call to TransferDelegate only if its from address equals the signer. A batch therefore cannot transfer tokens from any address other than the signer. LZMultiCall has a sweep() function that transfers its full balance of the listed tokens, or of native currency, to a recipient. Only LZMultiCall itself can call sweep(), so it runs only as a call inside a batch. The API adds a sweep() call at the end of each batch it builds. LZMultiCall is also the fee wrapper. Inside each execute() call, the batch deducts fees from the transfer amount and sends them to the Treasury before running the bridge. See Fees for details.
Do not approve LZMultiCall as a token spenderAny address can call execute on LZMultiCall with any list of calls. Any address can therefore spend an allowance granted to LZMultiCall, and can transfer any tokens or native currency that LZMultiCall holds. You MUST NOT grant an allowance to LZMultiCall, and you MUST NOT transfer assets to its address.When a batch sent through LZMultiCall includes a compose message, LZMultiCall is the sender, so the composer receives LZMultiCall as composeFrom. A composer used this way MUST NOT refund to composeFrom. It MUST take the refund address from the compose message.On routes that execute through LZMultiCall, the spender is TransferDelegate. On other routes, the spender is the bridge contract that the bridge step calls.

Treasury

The Treasury is an address, not a contract that the API calls. Each chain’s deployment has its own Treasury address. Inside the batch, LZMultiCall makes one transfer to the Treasury for each fee: a native transfer for a fee in native currency, or a token transfer for a fee in the source token. You don’t interact with the Treasury directly. The API builds the fee transfers into the bridge userStep.

Fees

LZMultiCall is also the fee wrapper. Inside execute(), the batched calls deduct fees and send them to the Treasury before bridging the rest. The API builds this into the bridge userStep for you.

Fee types

Up to three fees can apply per transfer: Zero-amount fees are omitted. A fee is charged either in the source token or in native currency. Fees in the source token are subtracted from the source amount before bridging, so the destination amount is the post-fee value. When the source token is not native, fees in native currency are added on top and paid in msg.value.

How fees flow through the contracts

The fee mechanism depends on the token type: Native tokens (e.g., ETH):
  1. Call LZMultiCall.execute() with msg.value set to the fee plus the bridge cost.
  2. Inside the batch, one call sends the fee to the Treasury.
  3. The remaining calls run the bridge.
ERC20 tokens (e.g., USDC):
  1. Approve TransferDelegate for the full source amount (fees included).
  2. Call LZMultiCall.execute().
  3. Inside the batch, TransferDelegate pulls the full token amount from the user to the Wrapper.
  4. A transfer sends the fee portion from the Wrapper to Treasury.
  5. The remaining calls bridge the post-fee amount.

Tracking

Each execute() call includes a quoteId. On confirmation, LZMultiCall emits an Executed(signer, quoteId, nonce) event. The API uses this event to attribute the transfer to the API key that requested the quote, linking volume and fee data back to each integration.

How the contracts work together

A typical ERC20 cross-chain transfer from an EVM chain:
  1. You request a quote, and then call /build-user-steps for the chosen quote. The API returns zero, one or two approve steps, followed by one bridge step. It omits the approve step when the current allowance already covers the amount.
  2. The approve step calls the ERC20 token’s approve() with TransferDelegate as spender.
  3. The bridge step calls LZMultiCall’s execute() on the source chain.
  4. Inside that execution, LZMultiCall calls TransferDelegate.delegateTransferFrom() to pull the full token amount (fees included) from your wallet to the Wrapper.
  5. LZMultiCall sends the fee portion to Treasury and bridges the remaining amount.

Solana

Solana does not use LZMultiCall or TransferDelegate. The API returns one transaction for the user to sign, with no approve step. It adds two kinds of instructions after the bridge instructions: a transfer from the user to the Treasury for each fee, and one call to the fee wrapper program that records the quoteId. The user signs the fee transfers directly. The call to the fee wrapper program passes no token accounts, so it does not move tokens. Fees in the source token are deducted from the bridged amount, and fees in SOL are added on top. Because the user signs the bridge instructions, the user is the sender of any LayerZero message, and a composer receives the user as composeFrom. You MUST sign and submit the transaction from /build-user-steps as returned. The API does not support modified or rebuilt transactions.

Contract addresses

Each chain has its own Wrapper and Delegate deployments. See Contract Addresses for the full list.