> ## Documentation Index
> Fetch the complete documentation index at: https://docs.garden.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Auctions

> Garden's auction system selects solvers to execute user intents efficiently

The auction process identifies a solver to execute user intents, such as performing a swap. Garden's auction system ensures intents are fulfilled efficiently and at competitive prices.

Garden balances both competition and fairness by leveraging **solver scores** to create a system where solvers are incentivized to optimize their performance while maintaining accountability to their stakers.

## Solver score

The solver score combines performance efficiency and vote power to determine a solver's priority in the auction process. It is calculated as:

**Settlement score for a specific chain C:**

$$
\text{Settlement Score}_{C} = \frac{\text{Average Settlement Time}_{C} - \text{Solver's Settlement Time}_{C}}{\text{Standard Deviation}_{C}}
$$

**Weighted settlement score across all chains:**

$$
\text{Weight}_{C} = \frac{\text{Solver Settlements}_{C}}{\text{Total Solver Settlements}}
$$

$$
\text{Settlement Score} = e^{\left(\sum_{C} \left(\text{Weight}_{C} \times \text{Settlement Score}_{C}\right)\right)}
$$

**Final solver score:**

$$
\text{Solver Score} = \left(\frac{\text{Total Volume on Garden} \times \text{Stake Against Solver}}{\text{Volume Filled by Solver} \times \text{Total Staked Amount}}\right) \times \text{Settlement Score}
$$

<Note>
  Solvers with a score greater than 1 get priority in the auction. Solver scores are calculated before every auction.
</Note>

## How does a typical auction work?

1. All solvers submit their quotes for a given intent to the order book. Each quote specifies the solver's proposed execution price for fulfilling the intent.
2. The order book identifies the solver with the best price (i.e., the lowest quote).
3. Solvers with a **staker score** higher than the solver with the best quote have a 5-second window to accept the best quote. This mechanism ensures that solvers with higher backing from stakers have the opportunity to get first dibs on intents.
4. The outcome depends on the participation during the acceptance period:

### Auction outcomes

<AccordionGroup>
  <Accordion title="No one accepts">
    The solver with the best quote wins the auction and fills the order.
  </Accordion>

  <Accordion title="One solver accepts">
    The solver who accepts the quote gets the order.

    <Frame>
      <img src="https://mintcdn.com/garden-e60e7dd0/yKKuQ7rvURdFCM8B/images/solver_one_select.png?fit=max&auto=format&n=yKKuQ7rvURdFCM8B&q=85&s=79565304391d1455bb8e92573e4313fb" alt="Single Solver Selection" width="1920" height="1080" data-path="images/solver_one_select.png" />
    </Frame>
  </Accordion>

  <Accordion title="Multiple solvers accept">
    Among the solvers who accept the best quote, the one with the highest **staker score** wins the auction and fills the order.

    <Frame>
      <img src="https://mintcdn.com/garden-e60e7dd0/yKKuQ7rvURdFCM8B/images/solver_multiple_select.png?fit=max&auto=format&n=yKKuQ7rvURdFCM8B&q=85&s=c8d96c08e79332dd4892ac14ebe93578" alt="Multiple Solver Selection" width="1920" height="1080" data-path="images/solver_multiple_select.png" />
    </Frame>
  </Accordion>
</AccordionGroup>
