# Quickstart

This guide walks you through launching the market maker on Unichain ETH/USDC using a recommended config (in`config/quickstart.toml`).

You'll need a funded wallet and Docker Compose (or a local Rust setup)

### Requirements

Wallet

* Public address
* Private key
* ETH balance (for gas)
* Base token (WETH) or quote token (USDC) balance

Infrastructure

* Rust and Node installed, or Docker
* A PostgreSQL database endpoint (optional)&#x20;

### Setup

1. Clone repository and install dependencies

```sh
git clone https://github.com/0xMerso/tycho-market-maker tmm
cd tmm
## If you won't use Docker and want to run the quickstart locally
yarn install
cargo install sea-orm-cli
```

2. Configure monitoring env file

```sh
cat > config/secrets/.env.monitor.global << EOF
TESTING=true ## false if you want to save events/trades in db
## Can be empty:
DATABASE_URL="" ## optional. e.g. postgresql://user:password@host:5432/database"
DATABASE_NAME="" ## optional. e.g. tycho
HEARTBEAT="" ## optional
EOF
```

3. Configure the wallet secrets

```sh
## Create config/secrets/.env.quickstart:
cat > config/secrets/.env.quickstart << EOF
  WALLET_PRIVATE_KEY="0xYOUR_PRIVATE_KEY"
  TYCHO_API_KEY="your_tycho_api_key" ## 'sampletoken'
  TESTING=false ## If true, it won't send transaction
  HEARTBEAT=""
  EOF
```

4. Edit config

```sh
## Edit the config/quickstart.toml file
## [...]
wallet_public_key = "0xYOUR_WALLET_ADDRESS" ## Match the associated private key
## [...]
```

5. (optional) If you run it in local and want the monitoring program, this script will setup your DB and generate DB (via sea-orm) Rust struct entities

```sh
## To generate entities
sh prisma/all-in-one.sh
```

### Launch

* Docker Compose (recommanded)

<pre class="language-sh"><code class="lang-sh"><strong> docker network create tmm
</strong> docker compose up --build
</code></pre>

* Local (Cargo)

```sh
sh ops/maker.sh unichain.quickstart
## In another Terminal, if you want to monitor trades (require the PGSQL setup)
sh ops/monitor.sh
```

***

Logs when starting the program

<figure><img src="https://755909824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh5Z828Hh3eHrVg9DlmPO%2Fuploads%2FXkS2OM30l13Y7GoSgYaK%2FTycho-MM-logs.png?alt=media&#x26;token=eb6db5e8-e356-4e93-8677-a53b09f6ff5a" alt=""><figcaption></figcaption></figure>
