Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
parketh authored Aug 21, 2024
1 parent c6a3322 commit ae148fe
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Solver

Solvers are the new, improved version of Haiko [Strategies](https://haiko-docs.gitbook.io/docs/protocol/strategy-vaults). They take the best parts of Strategies (e.g. convenience, 1-click automation) and make them simpler, more efficient, and less error-prone.
Solvers are a new, improved framework for building Haiko Vaults. They take the best parts of [Strategies](https://haiko-docs.gitbook.io/docs/protocol/strategy-vaults) (e.g. convenience, 1-click automation) and make them simpler, more powerful, and less error-prone.

## Docs

Expand All @@ -13,7 +13,7 @@ Solvers are the new, improved version of Haiko [Strategies](https://haiko-docs.g

## Solvers vs Strategies

Unlike Strategies, Solvers are standalone smart contracts that generate quotes and execute swaps on demand, without depositing to or interacting with an underlying AMM. Rather than managing and rebalancing static AMM positions, solvers directly compute swap amounts on the fly, executing trades against deposited reserves.
Whereas Strategies place and update liquidity positions on Haiko's AMM, Solvers are stateless, meaning they never mint any liquidity positions or interact with any AMM. Instead, traders swap directly against liquidity deposited to Solver contracts. Swap quotes are generated on the fly based on an oracle price feed and a set of market configurations.

By using a stateless architecture, Solvers are:

Expand Down Expand Up @@ -53,18 +53,21 @@ The `SolverComponent` in the `core` package implements most of the core function
4. Managing and collecting withdraw fees (if enabled)
5. Admin actions such as pausing and unpausing, upgrading and transferring ownership of the contract

Solvers currently support two market types: (1) Private Markets, which offer more granular control, and (2) Public Markets, which are open to 3rd party depositors and track ERC20 vault tokens for composability.
Solvers currently support two market types:
2. Public Markets, which are open to 3rd party depositors and track ERC20 vault tokens for composability
1. Private Markets, which offer more granular control and flexible access to admin functions

A Solver implementation must:

1. Inherit the base functionality of `SolverComponent`
2. Implement `SolverHooks` which contains methods for generating quotes and minting initial vault liquidity tokens
2. Implement `SolverHooks` which contains methods for generating quotes, minting initial vault liquidity tokens and other callbacks
3. Implement hooks for other components used (e.g. `GovernorHooks` for the `Governor` component used for decentralised governance of pool parameters)

The core `SolverComponent` component will eventually be moved to its own repo to be reused across multiple Solvers. We currently store it as a package under a single monorepo for ease of development.

### Implementations

Solver implementations are standalone contracts that inherits from `SolverComponent` and implement the `SolverHooks` trait. You can read more about these implementations [here](./docs/4-solver-implementations.md).
Solver implementations are standalone contracts that inherits from `SolverComponent` and implement the `SolverHooks` and other trait. You can read more about these implementations [here](./docs/4-solver-implementations.md).

| Solver | Description | Package |
| ----------- | ------------------------------------------------------------------------- | ---------------------------------------- |
Expand Down

0 comments on commit ae148fe

Please sign in to comment.