-
Notifications
You must be signed in to change notification settings - Fork 32
feat(sdk-docs): add documentation configuration for SDK monorepo #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e92e6b0
Add CoW AMM Deployer tutorial
yvesfracari 842eeb8
Apply mfw78 suggestions
yvesfracari 5a12ea8
fix price oracle wrong uniswap version
yvesfracari f561cd5
Merge branch 'cowprotocol:main' into main
jeffersonBastos 435eba3
feat(sdk-docs): add documentation configuration for SDK monorepo
jeffersonBastos 0c59957
chore(docs): fix pnpm dependency for build process
jeffersonBastos 64507cb
chore(docs): change ether to ethers SDK named path
jeffersonBastos b98b4c3
Merge branch 'main' into feat/sdk-agnostic-docs
jeffersonBastos bacdcac
Merge branch 'main' into feat/sdk-agnostic-docs
jeffersonBastos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| **/* | ||
| !_category_.json | ||
| !_category_.yml | ||
| !provider-adapters/ | ||
| !provider-adapters/_category_.json | ||
| !core-utilities/ | ||
| !core-utilities/_category_.json | ||
| !protocol-components/ | ||
| !protocol-components/_category_.json | ||
| !.gitignore | ||
8 changes: 8 additions & 0 deletions
8
docs/cow-protocol/reference/sdks/core-utilities/_category_.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "label": "Core Utilities", | ||
| "position": 3, | ||
| "link": { | ||
| "type": "generated-index", | ||
| "description": "Core utility modules for the Cow Protocol SDK" | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
docs/cow-protocol/reference/sdks/protocol-components/_category_.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "label": "Protocol Components", | ||
| "position": 4, | ||
| "link": { | ||
| "type": "generated-index", | ||
| "description": "Protocol-specific components and modules" | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
docs/cow-protocol/reference/sdks/provider-adapters/_category_.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "label": "Provider Adapters", | ||
| "position": 2, | ||
| "link": { | ||
| "type": "generated-index", | ||
| "description": "Provider adapters for different Ethereum libraries" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| --- | ||
| sidebar_position: 6 | ||
| --- | ||
|
|
||
| # CoW AMM Deployer | ||
| The [CoW AMM Deployer](https://app.safe.global/share/safe-app?appUrl=https%3A%2F%2Fdeploy-cow-amm.bleu.fi&chain=et) is a user-friendly Safe App that simplifies the process of deploying and managing [CoW AMMs](https://cow.fi/cow-amm) (Automated Market Makers) from Safe wallets. It enables users without programming skills to take advantage of the benefits of CoW AMM. | ||
|
|
||
| The app was developed by [bleu](https://github.com/bleu-fi) with sponsorship from the [CoW Grants DAO](https://grants.cow.fi/). | ||
|
|
||
| This app is only accessible from a Safe wallet. | ||
|
|
||
| :::caution | ||
|
|
||
| The Safe wallet you use to create a CoW AMM should **ONLY** be used for the purpose of deploying a CoW AMM. | ||
|
|
||
| ::: | ||
|
|
||
| :::tip | ||
|
|
||
| Provide the tokens for the CoW AMM to your Safe wallet **before** creating the CoW AMM. Beware **any** imbalance between tokens will _automatically_ be traded. | ||
|
|
||
| ::: | ||
|
|
||
| ## Prerequisites | ||
| Before using the CoW AMM Deployer, ensure that you have the following: | ||
| 1. A Safe wallet: If you don't have one, follow these steps to create a new Safe wallet: | ||
| - Go to the [Safe website](https://app.safe.global/welcome) and click on "Create new Safe". | ||
| - Choose the network (e.g., Ethereum) and the number of required confirmations. | ||
| - Add the owners of the Safe wallet and set the threshold for confirmations. | ||
| - Review and create the Safe wallet. | ||
| 2. Necessary tokens: Transfer both tokens that you want to provide liquidity for to your Safe wallet. Make sure you have sufficient amounts of each token. | ||
|
|
||
| Once that's done, you're ready to create your first CoW AMM! | ||
|
|
||
| ## Creating an AMM | ||
| To create a new CoW AMM using the deployer, follow these steps: | ||
| 1. Access the CoW AMM Deployer app from your Safe wallet. | ||
| 2. On the homepage, click on the "Create AMM" button. | ||
| 3. Fill in the required information in the AMM creation form: | ||
| - **Token Pair**: Select the token pair you want to provide liquidity for. Both tokens should already be in your Safe wallet. | ||
| - **Price Oracle**: Choose the price oracle (e.g., Balancer, Uniswap V2) to provide price hints to the watch-tower about your CoW AMM. Enter the pool identifier used by the selected protocol. You can also load this information from the protocol subgraph using the provided button. If the button fails, it means there isn't a pool with at least $1000 USD of TVL for that token pair. | ||
| - **Minimum Trade Amount**: Specify the minimum amount of the first token required for each trade. For most tokens, this value is automatically filled. If not, a strategy may be to calculate the equivalent of $10 USD in the first token. | ||
| - **Fallback Handler**: If your wallet is unsupported, upgrade to a Safe with the special fallback handler. [Learn all about the new Safe Extensible Fallback Handler](https://blog.cow.fi/all-you-need-to-know-about-cow-swaps-new-safe-fallback-handler-8ef0439925d1) and its relevance to Safe in this [overview](https://help.safe.global/en/articles/40838-what-is-a-fallback-handler-and-how-does-it-relate-to-safe). Naturally, the upgrade process has undergone [extensive auditing](https://github.com/cowprotocol/composable-cow/tree/ab3addad9bc05acdbf5fb040eb5c336209b58e31/audits) for increased peace of mind. | ||
| 4. Review the entered information and click on the "Create AMM" button. | ||
| 5. Sign the transaction on your Safe wallet to confirm the AMM creation. | ||
| 6. Wait for the transaction to be confirmed. You will be redirected to the "Manager" page once the AMM is successfully created. | ||
|
|
||
|  | ||
|
|
||
| ## Managing and Editing an AMM | ||
| The "Manager" page provides an overview of your CoW AMM LP position and allows you to manage and edit its parameters. | ||
|
|
||
| The page displays the following information: | ||
| - **Total Value**: The total value of the liquidity provided to the AMM, calculated based on the current token prices. | ||
| - **Token Amounts**: The individual amounts of each token in the AMM liquidity pool. | ||
| - **Price Oracle**: The selected price oracle used by the AMM. | ||
| - **Swaps Link**: A link to view the swaps executed by the CoW AMM on the CoW Explorer. | ||
|
|
||
| From the "Manager" page, you can perform two actions: | ||
| 1. **Stop AMM LP Position**: Clicking this button will redirect you to a confirmation page. After confirming, the CoW AMM will be stopped, and the tokens in your Safe wallet will no longer be used to provide liquidity. | ||
| 2. **Edit AMM LP Parameters**: This action will redirect you to the AMM creation form, pre-filled with the current parameters of the AMM. You can modify the parameters as needed and push the changes your existing AMM. | ||
|
|
||
|  | ||
|
|
||
| ## Additional Resources | ||
| - [CoW AMM Documentation](https://cow.fi/cow-amm) | ||
| - [CoW Grants DAO](https://grants.cow.fi/) | ||
| - [Safe Wallet Documentation](https://help.safe.global/) | ||
| - [CoW Swap (Safe App)](https://app.safe.global/share/safe-app?appUrl=https%3A%2F%2Fswap.cow.fi&chain=eth) | ||
|
|
||
| ## Troubleshooting and FAQs | ||
|
|
||
| ### Frequently Asked Questions | ||
| 1. **Can I create multiple CoW AMMs with the same Safe wallet?** | ||
| - No. | ||
|
|
||
| 2. **What happens to my tokens when I stop an AMM LP position?** | ||
| - When you stop an AMM LP position, your tokens in your Safe will no longer be used to provide liqudity. As the CoW AMM **IS** the Safe when there is an active CoW AMM, the liquidity never leaves your Safe wallet! You can then withdraw or use them for other purposes. | ||
|
|
||
| 3. **Can I change the token pair of an existing AMM?** | ||
| - No, once an AMM is created with a specific token pair, you cannot change the token pair. If you want to provide liquidity for a different token pair, you need to create a new AMM. | ||
|
|
||
| For further assistance or questions, join the [CoW Protocol Discord](https://discord.com/invite/cowprotocol) and ask in the `#tech-talk` channel. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.