Using Native ETH
While native ETH is not directly compatible with Balancer, the Vault can automatically wrap/unwrap ETH to/from WETH when performing typical operations.
In the documentation and smart contract comments, you may find references to the Sentinel Value when dealing with Native ETH. This is a placeholder address to denote that the asset you're dealing with is not an ERC20 token, but is instead Native ETH.
When dealing with Native ETH, the Sentinel Value you'll provide is the zero address
If you wish to send or receive native ETH in a single swap, simply provide the sentinel address for
If you wish to send or receive native ETH in a batch swap, provide the sentinel address in the
assetsarray and refer to it by its index in your swap steps as you would any other token. For Batch Swaps, you must sort the sentinel address numerically; do not sort it in the array as if it is the WETH address. Note: it is possible to send ETH and WETH in the same swap by providing both of the corresponding asset indices as inputs.
When joining or exiting a pool, you have to construct a
ExitPoolRequeststruct. Within this struct, you have the
As you'll find in the documentation for Joins and Exits, this array must be sorted numerically; there is a caveat here though. If you wish to join with or exit to Native ETH, you need to order the array as if you're dealing with WETH. Note that it is not possible to combine ETH and WETH in the same join/exit; any excess ETH will be sent back to the caller (not the sender, which is important for relayers).
Correctly Ordered Example with Native ETH