From ae148feadc3bf75deddfa098c4ff04030533fc39 Mon Sep 17 00:00:00 2001 From: parketh Date: Wed, 21 Aug 2024 09:45:38 +0100 Subject: [PATCH] docs: update readme --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6c822ca..5d7021b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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: @@ -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 | | ----------- | ------------------------------------------------------------------------- | ---------------------------------------- |