# Searcher Contract Integration

Solver deploys their Solver Contract that implements `ISolverContract`

### Overview

* The interactions between the Atlas Contract and the Solver Contract in the execution of MEV strategies are vital for successful transactions in the FastLane network. The process involves several key steps to ensure efficient and timely execution.

### Key Processes

1. **Payout Mechanism**: The Solver Contract reimburses the Atlas Contract by returning the `BidAmount` after the successful completion of a task.
2. **Execution of MEV Strategies**: Utilizing the `solverOpData`, the Solver Contract deploys specific MEV strategies. This involves the internal execution of the `solver()` function.
3. **Initiation by Atlas**: The Atlas Contract triggers the execution by calling the `atlasSolverCall` function on the Solver Contract.
4. **Bundle Submission**:
   * The FastLane Auctioneer submits the victorious bundle directly to the validator via the Atlas Contract.
   * The FastLane Relay ensures the bundle is efficiently propagated to the FastLane Auctioneer.
5. **Network Integration**: The Solver submits its bundle to the FastLane Relay Network to facilitate the overall process.
6. **Deployment of Contracts**: To partake in this ecosystem, Solvers must deploy their own Solver Contracts, incorporating the `ISolverContract` interface, to implement the necessary operations effectively.

<figure><img src="https://4266440485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcdwawPu1WZY0iOUAGHRD%2Fuploads%2FM2ErodKXwJPcB5yTryZn%2Fimage.png?alt=media&#x26;token=57c15abe-15f6-4e6c-9b4f-b76b14fae1e2" alt=""><figcaption></figcaption></figure>

## Atlas

Atlas is a specialized **Execution Abstraction protocol** created by FastLane Labs to streamline the deployment of application-specific backrun auction processes. It enhances transaction efficiency and optimizes value retention in blockchain systems.

### **Execution Process for Atlas Solver**

**Atlas Solver Execution - Core Flow:**

1. **Security First**

* Validates solver is bonded
* Validate signature for solverOperation

2. **Execution**

* Atlas calls solver through `atlasSolverCall`
* Solver executes MEV strategy using calldata
* Must implement `atlasSolverCall` function

3. **Payment**

* Solver must pay specified `bidAmount` back to Atlas
* Atlas will try each solver until bid is paid

<figure><img src="https://4266440485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcdwawPu1WZY0iOUAGHRD%2Fuploads%2F9kq9qhbWAvWmcLYyrEs0%2Fimage.png?alt=media&#x26;token=fb07d077-e423-4c1a-9bfd-86bdbc0fa2b5" alt="" width="375"><figcaption></figcaption></figure>

### Example Solver Contract

For our sample solver contract, we suggest keeping the logic minimal. Implement an additional function to manage the MeV (Miner Extractable Value) strategy. Atlas will loop through each solver's solution, ordered by their `bidAmount`.

Searcher can choose how they want to implement their solver contract.

#### Two examples:

1\) Direct Method \
[Implement MEV strategy inside the contract which implements the `ISolverContract` interface](https://fastlane-labs.gitbook.io/polygon-fastlane/getting-started-as-a-searcher/solver-call-data#approach-1-direct-implementation-in-solver-contract)

2\) Proxy Method\
[Implement MEV strategy external to the contract which implement the `ISolverContract` interface](https://fastlane-labs.gitbook.io/polygon-fastlane/getting-started-as-a-searcher/solver-call-data#step-2-encode-the-solver-contract-call)
