Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

There are many ways to contribute to CoW Protocol. We welcome contributions of all kinds from anyone, whether you've been a long-time user or you are just getting started with development.

## Prerequisites

Before contributing, make sure you have the following installed:

- **Node.js** (version 22.14.0 or higher)
- **Yarn** (package manager)
- **pnpm** (required for external dependencies): `npm install -g pnpm`

## Troubleshooting

You can help other users in the community to solve their issues in the [CoW Protocol Discord].
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,30 @@ The preview should load in a new tab.

### Installation

This project requires both Yarn and pnpm to be installed:

```bash
# Install pnpm globally (required for external dependencies)
npm install -g pnpm

# Install project dependencies
yarn
```

### Build

You will also need to `build` the app, to ensure external dependent projects are cloned and setup properly.
You will also need to `build` the app, to ensure external dependent projects are cloned and setup properly. This process requires pnpm to be installed globally.

```bash
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

This documentation site is automatically deployed using Vercel. When changes are pushed to the main branch, Vercel automatically builds and deploys the updated documentation.

### Local Development

```bash
Expand Down
4 changes: 2 additions & 2 deletions docs/cow-amm/tutorials/cow-amm-for-solvers.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ This order can be included in a batch as any other CoW Protocol orders with two
- One of the pre-interactions must set the commitment by calling `BCoWPool.commit(hash)`.
- Must contain at most one order from the AMM in the same batch.

::note
:::note

Solvers using the non co-located driver should add a [`JitTrade`](https://github.com/cowprotocol/services/blob/95ecc4e01b7fd06ec0b71c6486cb2cdd962e5040/crates/solvers/openapi.yml#L744C1-L774C52) and a [`preInteraction`](https://github.com/cowprotocol/services/blob/95ecc4e01b7fd06ec0b71c6486cb2cdd962e5040/crates/solvers/openapi.yml#L920C1-L925C46) to their solution.

::
:::


### Surplus
Expand Down
2 changes: 1 addition & 1 deletion docs/cow-protocol/reference/core/intents/app_data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 1
---

import CodeBlock from '@theme/CodeBlock';
import appDataSchema from '/external/app-data/schemas/v1.3.0.json';
import appDataSchema from '/external/cow-sdk/packages/app-data/schemas/v1.3.0.json';
import JSONSchemaViewer from '@theme/JSONSchemaViewer';

# Application specific data
Expand Down
7 changes: 7 additions & 0 deletions docs/cow-protocol/reference/sdks/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
**/*
!_category_.json
!_category_.yml
Comment thread
alfetopito marked this conversation as resolved.
!provider-adapters/
!provider-adapters/_category_.json
!core-utilities/
!core-utilities/_category_.json
!protocol-components/
!protocol-components/_category_.json
!.gitignore
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"
}
}
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"
}
}
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"
}
}
83 changes: 83 additions & 0 deletions docs/cow-protocol/tutorials/cow-amm-deployer.mdx
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.

![Create AMM](/img/cowammdeployer/create-amm.png)

## 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.

![Manager page](/img/cowammdeployer/manager.png)

## 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.
2 changes: 1 addition & 1 deletion docs/governance/fees/fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 3

# Fees

:::Note
:::note

This documentation refers to CoW Protocol fees. Builders connected to MEV blocker also pay a fee, which is discussed [here](/mevblocker/builders/fees/subscription-fees).

Expand Down
Loading