Skip to main content
A single swap in BEX allows you to exchange one token for another within a single liquidity pool by calling the swap function on the BEX Vault. This function is implemented in the Vault contract, which serves as the main entry point for all BEX operations.

Swap

Parameters Returns

Structs

SingleSwap

FundManagement

Example

Here’s a small example of how to call the swap function in Solidity: