Skip to content
Open
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
5 changes: 2 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ yarn build # Build static site to build/
yarn serve # Serve the built site locally
yarn clear # Clear Docusaurus cache
yarn typecheck # TypeScript type checking
yarn sync-deployments # Sync docs/deployments.json to src/data/ and static/
```

No test suite exists in this repo. Use `yarn build` to validate changes (catches broken links, bad imports, MDX errors). The build config uses `onBrokenLinks: 'warn'` and `onBrokenMarkdownLinks: 'warn'`, so broken links show as warnings rather than build failures.
Expand Down Expand Up @@ -45,7 +44,7 @@ Doc files are `.md` (not `.mdx`), but MDX features (JSX, imports) are still supp

### Deployments Data

`docs/deployments.json` is the **source of truth** for contract addresses. After editing it, run `yarn sync-deployments` to propagate changes to `src/data/deployments.json` and `static/deployments.json`. All three must stay in sync.
`static/deployments.json` is the **source of truth** for contract addresses. Edit it directly, then validate JSON and run `yarn build`. The user and developer deployment pages both render this file through `src/components/DeploymentFilter`.

### Markdown Features

Expand Down Expand Up @@ -315,4 +314,4 @@ Most contract pages include these sections at the bottom:

- All public/external functions in the ABI should be documented
- The ABI JSON block should match the actual contract ABI
- Cross-reference `docs/deployments.json` for deployment addresses
- Cross-reference `static/deployments.json` for deployment addresses
148 changes: 54 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,112 +1,72 @@
# Website
# Curve Docs

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
This repository contains the Docusaurus site for Curve documentation.

### Installation
## Setup

```
$ yarn
```

### Local Development

```
$ yarn start
```bash
yarn
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.
The local dev server hot reloads most documentation and component changes.

### Build
## Validation

```
$ yarn build
```bash
yarn typecheck
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
There is no separate test suite. Use `yarn build` before opening a PR; Docusaurus reports broken links, bad imports, and MDX errors during the build.

### Deployment
## Contract Deployments

Using SSH:
The contract deployments pages in the user and developer docs both render data from:

```text
static/deployments.json
```
$ USE_SSH=true yarn deploy

To add or update a deployment:

1. Open `static/deployments.json`.
2. Find the target chain key, such as `ethereum`, `arbitrum`, or `base`.
3. Add the address under the relevant category path, such as `tokens`, `dao`, `fees`, `integrations`, `amm.stableswap`, `amm.twocrypto`, or `lending`.
4. If the chain is new, add its block explorer URL to `_explorers`. The deployment UI uses this value to build address links.
5. Validate the JSON and build the site.

Example:

```json
{
"base": {
"amm": {
"stableswap": {
"factory": "0x..."
}
}
}
}
```

Not using SSH:
Validation commands:

```bash
node -e "JSON.parse(require('fs').readFileSync('static/deployments.json', 'utf8'))"
yarn build
```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.


---


- Introduction: single page which welcomes a user, explains what curve is and what it stands for; mention the three key products: DEX, Lending and DAO; what makes Curve different;

- Curve Ecosystem Tokens:
- CRV: curve-tokens/crv.md
- veCRV: curve-tokens/vecrv.md
- crvUSD: curve-tokens/crvusd.md
- scrvUSD: curve-tokens/scrvusd.md
- FAQ: curve-tokens/faq.md

- Using the Curve DEX:
- Primitives: dex/primitives.md # <– high-level intro
- Swap Tokens on Curve: dex/swap.md
- Provide & Withdraw Liquidity: dex/liquidity.md
- Understanding Yield & Returns: dex/earning-yield.md
- Differences Between Pool Types (Optional): dex/stableswap-vs-cryptoswap.md
- FAQ: dex/faq.md

- Lending & crvUSD:
- Overview: lending/primitives.md # what this used to be
- Liquidations: lending/liquidations.md
- Loan Health: lending/loan-health.md
- Borrow Rate: lending/borrow-rate.md
- FAQ: lending/faq.md
- Guides:
- Beginner Guides:
- Open & Close Loan: lending/guides/beginner/open-close.md
- Manage Loan: lending/guides/beginner/manage.md
- Loan in Liquidation: lending/guides/beginner/liquidation.md
- Intermediate Guides:
- Custom Bands: lending/guides/intermediate/custom-bands.md

- veCRV & Boosting Rewards:
- What is veCRV?: vecrv/what-is-vecrv.md
- How to Lock CRV: vecrv/how-to-lock.md
- Boosting Pool Rewards: vecrv/boosting.md
- Claiming Revenue Share: vecrv/revenue.md
- veCRV FAQ: vecrv/faq.md

- Governance:
- What is the Curve DAO?: dao/overview.md
- Voting & Gauge Weights: dao/voting-gauges.md
- How to Vote: dao/how-to-vote.md
- Submitting a Proposal: dao/proposals.md
- Community Fund & Treasury: dao/community-fund.md
- Governance FAQ: dao/faq.md

- Cross-Chain Curve:
- Overview: cross-chain/overview.md # Why Curve is multi-chain, what’s available where
- Supported Chains & Features: cross-chain/supported-chains.md
- Using Curve on L2s: cross-chain/using-on-l2s.md
- Bridging Curve Tokens: cross-chain/bridging-tokens.md
- Curve DAO & Voting on L2s (Optional): cross-chain/dao-on-l2.md
- Cross-Chain FAQ: cross-chain/faq.md

- Risks & Security:
- Overview: risks/overview.md # Why risk awareness matters, how to think about risk in DeFi
- Liquidity Pool Risks: risks/pools.md
- Lending & crvUSD Risks: risks/lending.md
- scrvUSD Risks: risks/scrvusd.md
- Security Practices & Audits: risks/audits.md

- Glossary: glossary.md

- Branding & Icons: branding.md

- Useful Links: links.md
Do not edit `build/deployments.json`; `build/` is generated output.

## Docs Structure

- `docs/user` serves `/user`
- `docs/developer` serves `/developer`
- `docs/protocol` serves `/protocol`
- `sidebars/` contains the manually maintained sidebars
- `src/components` contains React components used by pages and MDX docs
- `src/partials` contains shared MDX fragments
- `static` contains public assets copied into the generated site

When adding a new documentation page, add it to the relevant sidebar file.
2 changes: 1 addition & 1 deletion docs/developer/amm/curve-amm-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import DocCard, { DocCardGrid } from '@site/src/components/DocCard'

Curve's Automated Market Maker (AMM) is built around two core invariants — **StableSwap** for assets that trade near parity, and **CryptoSwap** for volatile asset pairs. Both algorithms have gone through multiple iterations, with the current generation ("-NG") contracts offering significant gas optimizations, built-in LP tokens, and improved oracle support.

For the mathematical foundations, see the [StableSwap whitepaper](../assets/pdf/whitepaper_stableswap.pdf) and the [CryptoSwap whitepaper](../assets/pdf/whitepaper_cryptoswap.pdf).
For the mathematical foundations, see the [StableSwap whitepaper](/pdf/whitepapers/whitepaper_stableswap.pdf) and the [CryptoSwap whitepaper](/pdf/whitepapers/whitepaper_cryptoswap.pdf).

---

Expand Down
126 changes: 0 additions & 126 deletions docs/developer/assets/javascripts/contract-template.js

This file was deleted.

Loading