Swapper RouterΒΆ

Throughout the Mero protocol there are several places where we need to swap one token for another token. For example:

  • Harvesting profits in the strategies

  • Burning fees into a single token

  • Selling bribe rewards from CVX staking

Instead of this logic being repeated in every place, the SwapperRouter contract is used to handle this.

The Swapper Router contract is designed as a general purpose contract for handling the swapping of one token to another. It supports swaps via Uniswap, Sushiswap and Curve. And does some on chain checks before swapping to find the most optimal path. It uses the Oracle Provider to get appropriate slippage parameters to protect from sandwich attacks. For most swaps it will go via WETH as an intermediary. It supports swaps to and from ETH, with the zero address being used to represent ETH.