From 87d6f0ac62bdecd2548a88b79d56e6df590f3175 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Sun, 30 Jun 2024 21:30:37 +0100 Subject: [PATCH 01/11] Working on docs on positions and adapters --- docs/adapters.md | 36 ++++++++++++++++++++++++++++++++++++ docs/positions.md | 9 +++++++++ 2 files changed, 45 insertions(+) create mode 100644 docs/adapters.md create mode 100644 docs/positions.md diff --git a/docs/adapters.md b/docs/adapters.md new file mode 100644 index 00000000..34775cc9 --- /dev/null +++ b/docs/adapters.md @@ -0,0 +1,36 @@ +# Adapters + +Adapters integrate Cellars with extenal Defi protocols enabling them to use the assets in the protocol. + +We have an establish catalogue of adapters that can be used to integrate with the following protocols: + +## Aave + +Thare are adapters for both Aave V2 and V3. + +The adapters support both despoting assets and borrowing assets. + +Frequent uses cases include: + - Leveraged Staking + - Stablecoin lending + - Leveraged Peg Arbitrage + +## Aura + +## Balancer + +## Compound + +## Convex + +## Curve + +## Frax + +## Maker + +## Morpho + +## OneInch + +## 0x diff --git a/docs/positions.md b/docs/positions.md new file mode 100644 index 00000000..309e240c --- /dev/null +++ b/docs/positions.md @@ -0,0 +1,9 @@ +# Positions + +A Position is an instantiation for an adapter for a specific asset. A cellar may have multiple positions using the same adapter. + +The process for setting up a position is as follows: + +1. A cellar add an adapter that has been trusted by Registry with `AddAdapterToCatalogue` +2. A cellar adds a position that has been trusted by Registry with `AddAdapterToCatalogue` +3. `AddPosition` places the the position in the internal index and passes configuration data to the adapter. This connected to things like holding position, withdrawal order etc. From 015c42a1ef088ffc57d0b1dd35c0e03545ae68f5 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 22:48:32 +0200 Subject: [PATCH 02/11] Add more adapter docs --- docs/adapters.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/adapters.md b/docs/adapters.md index 34775cc9..8c246f15 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -17,20 +17,56 @@ Frequent uses cases include: ## Aura +Adapter for Aura contracts using a specialized ERC4626 adapter. + ## Balancer +Allows Cellars to interact with Stable and Boosted Stable Balancer Pools (BPs). + ## Compound +Deposit and borrow assets in Compound. + ## Convex +The Convex allows cellars to have positions where they are supplying, staking LPTs, and claiming rewards to Convex-Curve pools/markets. + ## Curve +The Curve adapter supports creating and managing LP positions in Curve pools and depositing the LP tokens into guages to earn CRV rewards. + ## Frax +The Frax adapter supports using the Frax lend protocol to deposit Frax and eary yield. + ## Maker +Support for DAI staking to earn stablecoin yield. + ## Morpho + + ## OneInch +Another source of swap liquidity. + + ## 0x + +Another source of swap liquidity. + +## Pendle + +Enables the cellar to mint SY tokes and minting PT and YT tokens from the SY tokens. + +The positions are these tokens and the adapter doesn't expose a position. + +## Uniswap + +The adapter supports swaps against both Uniswap V2 and V3. It supports holding multiple NFT LP positions in Uniswap V3. + + +## Staking Adapters + +There is a universal template adapter that can specialied into staking assets into various protocols. We have support for the major LRT and LST protocols. From 87cecb9f11b67e8163f22a199d1c5833c9303dd0 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 22:56:46 +0200 Subject: [PATCH 03/11] Add to TOC --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7b72cf42..dc79b8ca 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Cellar contracts for the Sommelier Network. - [Permissions](./docs/permissions.md) Permissions in Cellars - [Using Cellars](./docs/using_cellars.md) Using the Cellars Smart Contracts as a strategist - [Fees](./docs/fees.md) How fees work for the strategist and the platform +- [Positions](./docs/positions.md) How positions are created and managed +- [Adapaters](./docs/adapters.md) How adapters are created and managed ### Development From e79d745e88d7db8bd591b81d5ecc8bc879b7863a Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:10:14 +0200 Subject: [PATCH 04/11] Update docs/adapters.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/adapters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adapters.md b/docs/adapters.md index 8c246f15..5cc0137e 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -2,7 +2,7 @@ Adapters integrate Cellars with extenal Defi protocols enabling them to use the assets in the protocol. -We have an establish catalogue of adapters that can be used to integrate with the following protocols: +We have an established catalogue of adapters that can be used to integrate with the following protocols: ## Aave From 26d90eb196a30dec381b259632d75031091cdca0 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:10:26 +0200 Subject: [PATCH 05/11] Update docs/positions.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/positions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/positions.md b/docs/positions.md index 309e240c..e2e85bc1 100644 --- a/docs/positions.md +++ b/docs/positions.md @@ -4,6 +4,6 @@ A Position is an instantiation for an adapter for a specific asset. A cellar may The process for setting up a position is as follows: -1. A cellar add an adapter that has been trusted by Registry with `AddAdapterToCatalogue` +1. A cellar add an adapter that has been trusted by Registry with `AddAdapterToCatalogue`, 2. A cellar adds a position that has been trusted by Registry with `AddAdapterToCatalogue` 3. `AddPosition` places the the position in the internal index and passes configuration data to the adapter. This connected to things like holding position, withdrawal order etc. From 9aa0382dd8240158a0218510fe55b114e8bae476 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:10:45 +0200 Subject: [PATCH 06/11] Update docs/positions.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/positions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/positions.md b/docs/positions.md index e2e85bc1..ece9398a 100644 --- a/docs/positions.md +++ b/docs/positions.md @@ -1,6 +1,6 @@ # Positions -A Position is an instantiation for an adapter for a specific asset. A cellar may have multiple positions using the same adapter. +A Position is an instantiation of an adapter for a specific asset. A cellar may have multiple positions using the same adapter. The process for setting up a position is as follows: From 4d3db8c482ab0d995d58d8683c579af68be33376 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:11:18 +0200 Subject: [PATCH 07/11] Update docs/positions.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/positions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/positions.md b/docs/positions.md index ece9398a..64c9f439 100644 --- a/docs/positions.md +++ b/docs/positions.md @@ -6,4 +6,4 @@ The process for setting up a position is as follows: 1. A cellar add an adapter that has been trusted by Registry with `AddAdapterToCatalogue`, 2. A cellar adds a position that has been trusted by Registry with `AddAdapterToCatalogue` -3. `AddPosition` places the the position in the internal index and passes configuration data to the adapter. This connected to things like holding position, withdrawal order etc. +3. `AddPosition` places the position in the internal index and passes configuration data to the adapter. This is connected to things like holding position, withdrawal order, etc. From f994336baca5763b5f7bd832892b0336c97abb43 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:11:32 +0200 Subject: [PATCH 08/11] Update docs/adapters.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/adapters.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/adapters.md b/docs/adapters.md index 5cc0137e..e49d5019 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -11,9 +11,9 @@ Thare are adapters for both Aave V2 and V3. The adapters support both despoting assets and borrowing assets. Frequent uses cases include: - - Leveraged Staking - - Stablecoin lending - - Leveraged Peg Arbitrage + - Leveraged Staking + - Stablecoin lending + - Leveraged Peg Arbitrage ## Aura From 540b88575c34ef7d70ea004e28ad99c2d4c9461a Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:11:42 +0200 Subject: [PATCH 09/11] Update docs/adapters.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/adapters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adapters.md b/docs/adapters.md index e49d5019..9d3176a2 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -6,7 +6,7 @@ We have an established catalogue of adapters that can be used to integrate with ## Aave -Thare are adapters for both Aave V2 and V3. +There are adapters for both Aave V2 and V3. The adapters support both despoting assets and borrowing assets. From 925ce51b041896442c9917cea605bd33c989ff32 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:11:53 +0200 Subject: [PATCH 10/11] Update docs/adapters.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/adapters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/adapters.md b/docs/adapters.md index 9d3176a2..c3447ca8 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -1,6 +1,6 @@ # Adapters -Adapters integrate Cellars with extenal Defi protocols enabling them to use the assets in the protocol. +Adapters integrate Cellars with external DeFi protocols, enabling them to use the assets in the protocol. We have an established catalogue of adapters that can be used to integrate with the following protocols: From 3c05f2cd2b11137749deaf4d13f1ce3292a603f9 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 4 Jul 2024 23:12:04 +0200 Subject: [PATCH 11/11] Update docs/adapters.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- docs/adapters.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/adapters.md b/docs/adapters.md index c3447ca8..f78552ec 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -45,8 +45,6 @@ Support for DAI staking to earn stablecoin yield. ## Morpho - - ## OneInch Another source of swap liquidity.