# Melmint arbitrage

## What is arbitrage?

Arbitrage is:

> The buying and selling of some asset (e.g. currency, securities, commodities, etc) in different markets to take advantage of differing prices for the same asset

In our case, we have multiple "markets", or liquidity pools, that contain asset pairs, such as MEL/SYM or MEL/ERG, and SYM/ERG. The Melmint mechanism [maintains the MEL/SYM pair](https://docs.melproject.org/concepts/melmint), but does not interact with the other asset pairs.

In order to maintain the other pairs, we'll need YOU to do arbitrage and hopefully make some money.

<img src="https://2733178711-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfyfIKQnkuheUwyaEXngm%2Fuploads%2F1VrhsPYJbB27FgODt8H6%2Fimage.png?alt=media&#x26;token=790d0786-5271-4ae3-a2c8-233714040152" alt="" data-size="original">

## Using melwallet CLI to arbitrage

### Prerequisites

You'll need a wallet containing funds. [Here](https://docs.melproject.org/developer-guides/using-wallets/getting-started) is a guide on how to set that up on the testnet.

### Time for some arbitrage :moneybag:

```shell-session
melwallet-cli --wallet-path <path to wallet> autoswap <value>  
```

Here, `<value>` is the amount of MEL that you want to automatically swap for arbitrage.

This command will automatically execute trades on the "triangular" MEL/SYM/ERG pairs.
