Git Product home page Git Product logo

docs's Introduction

CoW Protocol Logo

CoW Protocol Documentation

The documentation is built using Docusaurus 2, a modern static website generator.

Installation

yarn

You will also need to build the app, to ensure external dependent projects are cloned and setup properly.

yarn build

Local Development

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

yarn build

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

docs's People

Contributors

acanidio-econ avatar alfetopito avatar anxolin avatar avsavsavs avatar cmagan avatar cowmarketing avatar crystalmacow avatar fairlighteth avatar fedgiac avatar fleupold avatar gitbook-bot avatar gogonimago avatar harisang avatar huynhnhathao avatar jpgonzalezra avatar juliusdegesys avatar marshymarsh avatar martinquaxd avatar mfw78 avatar mindycow avatar olgafetisova avatar proullon avatar shoom3301 avatar sunce86 avatar trocher avatar yvesfracari avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

chore: configure docusaurus for production.

Background

Docusaurus is only configured for basic development. Production hardening is required.

Details

Configure docusarus to be in a production ready state.

Acceptance criteria

chore: integrate documentation from notion

Background

There is some great material that has been written in notion but has not made it to published documentation.

Details

Documentation related to CoW DAO products that are in production are to be published in their relevant section in the CoW DAO documentation (save infrastructure).

Acceptance criteria

  • Documentation from notion is migrated to this repo.
  • Documentation that has been migrated is removed from notion to eliminate duplication.

chore: Make links stand out visually

Background

The docs are super nice and use links to get you to places with more info on some topics but because links are only identifiable as such by hovering over them you can probably not notice lots of links.
Basically you currently have to hover over every word in order to not miss any links.

Acceptance criteria

Links are immediately identifiable as such (or at least you should not have to hover over them to detect them).

Use of full stops at the end of proper sentences

With reference to:

https://github.com/cowprotocol/docs-v2/blob/df13deca3210c8fada6ea4f4155a0863e680b40a/docs/cow-protocol/concepts/batch-auctions/why-batch-auctions.md?plain=1#L13-L15

I think that full stops should be at the end of a bullet point where the bullet point itself is a full sentence. If it is a list of individual, unrelated "things", then no period at the end of the bullet point. For example:

  1. Something
  2. Another thing
  3. Aardvarks

However, if the bullet points / lists are actual sentences, such as:

  1. An example of a full sentence is here.
  2. CoW is going to the moon...of Jupiter or Saturn.
  3. Didn't think I was going to forget that full stop!

docs: add new liquidity

Background

It's common for new projects to launch, and bring about novel ways of handling liquidity / tokens. Often these then trade on secondary markets via AMMs, however the AMMs don't deliver the best value.

Details

It should be communicated to token distributors / projects what the requirements are for their token to be tradeable via CoW, and also how to to about integrating with solvers.

Acceptance criteria

  • Instructions for minimum liquidity
  • Instructions for integrating with solvers
  • Instructions for requesting addition to token lists

feat: TWAP tutorial

Problem

We are creating tutorials for all basic order types the our main UI provides, but TWAP

Suggested solution

Add TWAP

Alternatives considered

Consider TWAP not a core protocol order type and therefore don't create a tutorial, but that seems wrong to me.

Additional context

We might already have a medium guide for this

Acceptance criteria

Have a nice TWAP tutorial page next to Limit Orders and Swaps

chore: improve MEV Protection section

https://github.com/cowprotocol/docs-v2/blob/bf73c4804e225abcd2443c0806b40d2228b9bd01/docs/cow-protocol/concepts/batch-auctions/mev-protection.md?plain=1#L7

This part is mentioning in one sentence how we protect from MEV in the absence and presence of CoWs. I think we should have sections that explain both of the two protection in detail (with example transactions for both).

  • One transaction where the user set a large slippage but the solver set a tight slippage
  • One transaction where the solver got sandwiched (but the user got a better price)
  • One perfect CoW and how transaction ordering is irrelevant (no MEV)

We can potentially also reuse the high level diagram we presented in https://docs.google.com/presentation/d/1AB2Eok6nOuUOAMPqIrgSFhZIg39Tw9jHohMg7H5kF0E/edit#slide=id.ge38a0b1903_0_134

chore(tome): table of contents

Background

As a user, it is difficult to understand the documentation, and it would benefit from a rewrite. This issue tracks the table of contents.

Details

The table of contents (for "CoW Protocol") has been rewritten on an "Action" basis, ie. "What am I trying to achieve?", making it more logical to allow users to drill through their desired action.

Acceptance criteria

  • Logical table of contents is established.

bug: add caution around chainId being baked into GPv2Signing (replayable on fork)

Problem

A clear and concise description of what the bug is.

To reproduce

If you can reproduce the behaviour, steps to reproduce:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots/logs

If applicable, add screenshots or logs to help explain your problem.

docs version/commit hash

State the version of docs where you've encountered the bug or, if built off a specific commit, the relevant commit hash.

  • e.g. v0.9 or ed53bcd

Additional context

Add any other context about the problem here.

feat: add google analytics

Problem

No analytics

Suggested solution

Add analytics

Alternatives considered

Google analytics

Additional context

I just added some env variables with the values of the GA-4. It will automatically pick the right one depending on the environment

image

chore: rewrite Intents as Signed Orders

https://github.com/cowprotocol/docs-v2/blob/3fad222adcd7797919d4a7bd97e03fd7aeb2b574/docs/cow-protocol/concepts/introduction/intents-as-signed-orders.md?plain=1#L6

I'd first focus on the more practical benefits of intents (no fees for for failed transactions, eth-less trades, not committing to a route, slippage being protected by off-chain competition) and only then go into the advantages of batching and offer a whole subsection to CoWs (they are less common, yet a very important differentiation factor to other intent based trading systems).

Inspiration can be taken from the various talks we gave at DevConnect.

feat: Add programmatic order section under "Builder friendly" product features

Problem

Nowhere do we explain the concept of the programmatic order, watch-tower, etc as a high level product feature

Suggested solution

Add a section Under Concepts -> Product Features -> Builder Friendly

Additional context

While we go into details on this feature in the tutorials section, I feel like it also is a higher level product feature that should be discussed.

chore: Restructure Custom Integrations Section

Background

Currently the site structure inside the Custom Integrations secition is very messy.

Details

I'd suggest to separate first by type of tutorial, e.g.

  • Placing An Order
  • Metadata
  • Programmatic Orders
  • Hooks
  • Analyze Auctions

And within each of those section offer tutorials in different flavors. E.g. for placing an order

  • Using the SDK
  • Using the API
  • Using a python script
  • etc

Analyze auction could have a tutorial using the Graph, Dune and potentially our swagger endpoint.

chore: clarify connection with PBS may actually be complicating the understanding of what is going on

The first two paragraphs of this page try to connect PBS and batch auctions (by viewing the block as a batch, I guess). This connection is difficult to grasp and also too high level for this part of the documentation. I suggest dropping the initial two paragraphs, and start with "In a batch auction, first the protocol gathers intents..."

https://github.com/cowprotocol/docs-v2/blob/6c6e7477506a4ac2d709042ece80ef2e1b4ef0ed/docs/cow-protocol/concepts/batch-auctions/how-batch-auctions-work.md?plain=1#L7-L9

feat(section-2): Concepts

Background

At the start of the documentation, after the landing page, we introduce Concepts. This is from a high level perspective.

Details

This section is to be owned by Marketing, and cross-checked by Engineering for (sanity checks / veracity only).

Acceptance criteria

  • Introduction
  • Batch Auctions

NOTE: Update the acceptance criteria above if the documentation structure changes to reflect such.

feat: docusaurus

Background

Currently the documentation is implemented in Gitbook. While this provides a simple UI for non-technical content editors, it introduces issues associated with artifacts in markdown, vendor lock-in, integration dependencies etc.

Details

It is desired to implement the new docs site using docusaurus, as done by competitors and large open-source projects.

Acceptance criteria

chore: seo methodology

Background

It will be more difficult for robots to index the documentation site if they don't get correct metadata.

Details

Using front matter, correctly define the meta data for each page.

Acceptance criteria

  • description metadata set
  • keywords metadata set

chore: Rewrite The Optimisation Problem

Background

https://beta.docs.cow.fi/cow-protocol/reference/core/auctions/the-problem reads unnecessarily mathematical (e.g. why do we define the order as an n dimensional vector with two elements set) and not really practical for anyone trying to actually understand what the system is trying to enforce. It doesn't for instance mention user balances (endowments) which may not be available for the orders they placed

Details

I'd suggest rewriting this section making it more practical (what do we actually enforce, vs what are soft criteria) and less math heavy.

Acceptance criteria

Someone without a strong math background can get a clear picture of what solvers need to optimize.

chore: improvement Given an example for each type of CoW

I think each of the different types of CoWs should be accompanied with an example transaction and asset flow visualisation highlighting the savings.

https://github.com/cowprotocol/docs-v2/blob/763167a3ce1e9438525dbdf0b5b4d58e02575194/docs/cow-protocol/concepts/introduction/intents-as-signed-orders.md?plain=1#L14-L19

For ring trades, I'd also differentiate between perfect ring trades (rare) and imperfect ring trades that still allow price improvements because tighter markets on the "missing hop" of the ring exists.

E.g https://etherscan.io/tx/0xc9ddbcc88d1a40863013c7c4d4650cd215dd0a9c79dc69ce88f04a6650197101: Here we can CoW the USD(C/T)<>RBN leg (which normally trades at 0.3% fee) and close the missing link (USDC<>USDT) with a Balancer pool that only has a 0.01% fee).

Also a nit, but I believe bullet point lists with one item are frowned upon in some parts of the world.

feat(section-3.1): The Batch Auction Tome

Background

This volume is written on a "action" -> "actor" basis. It provides concrete methodology for how an action is to be performed by the respective actor.

Details

When writing this section, the language should be at most moderately technical, such that it can be expected, given an assumed background of the actor, they will understand.

eg. A user placing an order via the front-end isn't expected to have advanced knowledge of signing methodology, and therefore there is no need to cover highly technical information associated with such.

Acceptance criteria

  • Place Orders
    • CoW Swap Front-end
    • SDK
    • Protocol Integrations
  • View Orders
    • CoW Explorer
    • SDK
  • Solve Orders
    • Running a solver
    • Deploying a solver
  • Arbitrate Auctions
    • Autopilot
    • Driver
  • Settle Auctions
    • Smart Contracts
  • Analyse Auctions
    • Dune Analytics
    • Subgraph

NOTE: Update the acceptance criteria above if the documentation structure changes to reflect such.

chore: one sentence per line

Background

Merge conflicts can become a pain. For this reasons, the repository should use one sentence per line.

Details

Ensure that text file formatting does not create merge conflicts.

Acceptance criteria

  • One sentence per line across the repository.

feat: autopilot / driver documentation

Problem

I'm frustrated at the lack of information around the architecture for the autopilot / driver system and how various components fit together.

Suggested solution

Document the co-location architecture for autopilot / driver / solver.

Alternatives considered

None. We need this ๐Ÿ˜…

Additional context

The draft templates (not populated) can be found at https://github.com/cowprotocol/docs-v2/tree/main/docs/cow-protocol/tutorials/arbitrate. Feel free to add in any other documents as needed.

Acceptance criteria

  • Populate high level @sunce86
    • Architectural mermaid diagram showing relationship of components
    • Descriptions / overviews of autopilot, driver, solver functionality
    • Sequence diagram of the live of an order (from intent to settlement) - auction abstracted away
    • Sequence diagram of a single auction

Using the template suggested by mfw below:

Review @squadgazzz @narcis96

chore: improve Batch Auction Section

https://github.com/cowprotocol/docs-v2/blob/6c6e7477506a4ac2d709042ece80ef2e1b4ef0ed/docs/cow-protocol/concepts/batch-auctions/why-batch-auctions.md?plain=1#L5

I'd add a diagram show-casing the difference between continuous order books (bid ask spread) vs. discrete order books (orders overlapping clearing at the intersection).

I think we should also add context of why batch auctions are already arguably beneficial in TradFi (we can link/summarize to Budish's talk for that) and highlight more why they make even more sense on Ethereum, namely that there is no concept of continuous time on Ethereum, all transactions within a block are already batched and executed at the same instant in time (yet people apply pseudo-continuous time priority mechanisms to this which is ๐Ÿคฏ)

feat: composable-cow documentation

Problem

composable-cow has disparate documentation across hackmd and multiple repositories.

Suggested solution

Pull together documentation and add to a section within docs-v2.

Additional context

Acceptance criteria

  • Port architecture documentation
    • Detail specific handling around the salt
    • Merkle roots
  • Add cabinet to architecture

feat: solving auctions tutorial

Problem

Trying to start to run a solver, or write a solver is already a very difficult problem - and out of date documentation doesn't help ๐Ÿ™ƒ

Suggested solution

Rewrite the "tutorials" section for solvers, also taking into account the new driver/solver colocation architecture.

Alternatives considered

N/A

Additional context

Considerable work has been done consolidating the section from the old documents. Work in this area can be found at https://github.com/cowprotocol/docs-v2/tree/main/docs/cow-protocol/tutorials/solvers.

Acceptance criteria

  • Inaccurate information removed from documentation
  • Basic tutorial of starting a solver

chore: enable search

Problem

Something we had in our old docs is this search box:
image

I see new docs don't have it yet:
image

This is really a feature DEVs use and make it more user friendly, it would be nice to not loose this feature.

There's a page related to this in docusaurus:
https://docusaurus.io/docs/search

I would be great to have this feature in the new docs.

feat(section-1): Landing Page / Misc

Background

It's critical that the landing page for documentation conveys clearly to the user how to use the documentation.

Details

The editors should define the user directions for the documentation.

Acceptance criteria

  • Welcome Page
  • Clear directions for using documentation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.