> For the complete documentation index, see [llms.txt](https://docs.en.omnibridge.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.en.omnibridge.pro/intent/solver-integration.md).

# Solver integration

## 1. Introduction

A **Solver** is a service node responsible for providing quotes and executing exchanges.

The platform will request quotes from multiple Solvers simultaneously, select the Solver with the best quote, and then the selected Solver will independently complete the exchange for that order.

***

## 2. Integration Process

A Solver needs to implement the following four APIs:

| API                                | Direction         |
| ---------------------------------- | ----------------- |
| Solver Quote API                   | Platform → Solver |
| Solver Order API                   | Platform → Solver |
| Solver Order Notification API      | Platform → Solver |
| Solver Settlement Notification API | Platform → Solver |

At the same time, the Solver needs to call the following two APIs provided by the platform:

| API                     | Direction         |
| ----------------------- | ----------------- |
| Solver Submit Order API | Solver → Platform |
| Solver Query Order API  | Solver → Platform |

## 3. Workflow

```
Platform
 │
 ├──► Request quotes from multiple Solvers
 │
 ├──► Select the best Solver
 │
 ├──► Create order
 │
 ├──► Notify Solver to create order
 │
 ▼
User deposits tokens
 │
 ▼
Platform confirms deposit
 │
 ├──► Notify Solver to start execution
 │
 ▼
Solver sends tokens to user
 │
 ├──► Submit transaction hash
 │
 ▼
Platform verifies transaction
 │
 ▼
Platform settles funds to Solver
```

***

## 4. Authentication

All Solver requests to platform APIs must include the following parameters.

(`solverCode` and `solverSecret` need to be obtained from the platform.)

| Parameter    | Description                       |
| ------------ | --------------------------------- |
| solverCode   | Solver identifier                 |
| solverSecret | Solver authentication key         |
| timestamp    | Current timestamp in milliseconds |
