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
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ Then open the URL printed by the dev server.

- `overview/` — what deCDN is, who participates, how it works
- `protocol/` — technical reference
- `run-a-node/` — node operator guide: requirements, setup, earnings, operation, compliance, FAQ

Source of truth for all technical claims is `decdn/adr/` in the sibling repo.
30 changes: 30 additions & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,39 @@
]
}
]
},
{
"tab": "Run a node",
"groups": [
{
"group": "Get started",
"pages": [
"run-a-node/overview",
"run-a-node/requirements",
"run-a-node/testnet-funds",
"run-a-node/quickstart"
]
},
{
"group": "Run it",
"pages": [
"run-a-node/bond-and-earnings",
"run-a-node/traffic",
"run-a-node/operating",
"run-a-node/compliance"
]
},
{
"group": "Help",
"pages": ["run-a-node/faq"]
}
]
}
]
},
"redirects": [
{ "source": "/node-setup", "destination": "/run-a-node/quickstart" }
],
"footer": {
"socials": {
"website": "https://decdn.org",
Expand Down
20 changes: 10 additions & 10 deletions docs/protocol/governance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ The phase ends when the multisig judges the operator set broad and diverse enoug

Even governance cannot set parameters outside these bounds:

| Parameter | Default | Bounds |
| ----------------------------------------- | ----------------- | ----------------------- |
| Operator revenue share (`FeeRouter` base) | 60% (90% dormant) | 40% – 90% |
| Burn share (`FeeRouter`) | 30% (0% dormant) | 5% – 50% when active |
| Treasury share (`FeeRouter`) | 10% | 0% – 30% |
| Redemption grace window | 48 h | 48 h – 72 h |
| Per-operator voting cap | 10% | 1% – 10%, decrease-only |
| Trailing vote window | 13 weeks | 4 – 26 weeks |
| Capacity-curve exponent (α) | 1.2 | 1.0 – 1.8 |
| Unbonding window | 14 days | 7 – 60 days |
| Parameter | Default | Bounds |
| ----------------------------------------- | -------------------------------------------- | --------------------------- |
| Operator revenue share (`FeeRouter` base) | 90% at launch, 60% after activation | 40% – 90% |
| Burn share (`FeeRouter`) | 0% at launch (dormant), 30% after activation | 0%, or 5% – 50% when active |
| Treasury share (`FeeRouter`) | 10% | 0% – 30% |
| Redemption grace window | 48 h | 48 h – 72 h |
| Per-operator voting cap | 10% | 1% – 10%, decrease-only |
| Trailing vote window | 13 weeks | 4 – 26 weeks |
| Capacity-curve exponent (α) | 1.2 | 1.0 – 1.8 |
| Unbonding window | 14 days | 7 – 60 days |

The three `FeeRouter` shares must sum to exactly 100% on every update. The burn share is the one that also accepts **zero**, so the buyback sink can be switched off entirely; what it cannot be is nominally on at a negligible share — either off, or at 5% or more.

Expand Down
55 changes: 55 additions & 0 deletions docs/run-a-node/bond-and-earnings.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Bond and earnings
description: How the TOKEN capacity bond is sized, what can be slashed, how unbonding works, and how a node earns USDC per byte delivered.
---

## The capacity bond

A node bonds TOKEN in proportion to the bandwidth it declares. The curve is super-linear, so declaring more capacity than you can serve costs more than it is worth:

```text
bond = max(minBond, 12.6 × Mbps^1.2) TOKEN
```

| Declared capacity | Curve value |
| ----------------- | --------------- |
| 10 Mbps | ≈ 200 TOKEN |
| 100 Mbps | ≈ 3,165 TOKEN |
| 250 Mbps | ≈ 9,500 TOKEN |
| 1 Gbps | ≈ 50,000 TOKEN |
| 10 Gbps | ≈ 795,000 TOKEN |

`minBond` is a network-wide floor. **On the testnet it is 50,000 TOKEN**, so every declaration up to about 1 Gbps bonds 50,000 TOKEN. `decdn setup --dry-run` and `decdn node bond --mbps <N> --dry-run` print the exact live figure. The team sends testnet TOKEN on request; see [Get testnet funds](/run-a-node/testnet-funds).

To raise your declared capacity later, run `decdn node bond --mbps <N>`. It tops the bond up to the new requirement. The full curve and its rationale are in [ADR 026 § Capacity-bond curve](https://github.com/decdn/decdn/blob/main/adr/026-tokenomics.md#capacity-bond-curve).

## What can be slashed

Only two offenses are slashable, and each needs signed, on-chain evidence:

- **Rate manipulation.** Charging more than the rate your node signed in its probe response.
- **Blacklist violation.** Serving a blacklisted hash after its compliance window has passed.

Corrupt or failed delivery is **not** slashable. The client verifies every chunk against its BLAKE3 hash, pays nothing for a bad range and fetches it from another node, and your node loses local reputation with that peer. See [Slashing](/protocol/slashing) and [Compliance and risk](/run-a-node/compliance).

## Unbonding

Unbonding takes **14 days**. The node goes inactive when the unbond starts, and the bond stays slashable for the whole window. To lower your capacity, run `decdn node unbond --to-mbps <N>`. To exit fully, run `decdn node deregister`, then `decdn node unbond --all`, then run the unbond command again after the window to withdraw.

## How you earn

- **Per byte delivered.** Clients pay per megabyte in USDC through off-chain vouchers. A voucher pays only for bytes the client has verified.
- **Your rate.** You set your own per-MB rate with `payment.rate_per_mb` in USDC base units. The default, `10`, is $0.00001/MB, which is about **$0.01/GB**, the network's target client price. Clients choose the fastest node they can reach, so price within reason and compete on speed. A rate change takes effect after a restart.
- **Settlement.** The node redeems its vouchers on-chain automatically, by default every 5 minutes once a payment lane holds at least 1 USDC. `decdn node lanes` shows what has accrued. There is no claim step: the operator share goes to your address in the same transaction.

## Operator share

Each settlement passes through the on-chain `FeeRouter`, which splits it three ways: operator, buyback-and-burn, and treasury.

| Network | Operator | Buyback-and-burn | Treasury |
| ------------------------ | -------- | ---------------- | -------- |
| Testnet (today) | 60% | 30% | 10% |
| Mainnet at launch | 90% | 0% | 10% |
| Mainnet after activation | 60% | 30% | 10% |

Mainnet launches with the buyback bucket dormant, so operators keep 90%. Governance moves it to 60/30/10 only after the network meets set [activation criteria](https://github.com/decdn/decdn/blob/main/adr/018-liquidity-strategy.md). The testnet already runs the target split. See [Governance](/protocol/governance) for the bounds on each share.
55 changes: 55 additions & 0 deletions docs/run-a-node/compliance.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Compliance and risk
description: The operator terms, how the node follows the on-chain blacklist, regional obligations, your own refusal controls, and what can cost you bond.
---

Your node serves content from your own IP address. The node software is built to keep you compliant by default: it follows the on-chain blacklist automatically, scopes regional rules to the region you declare, and gives you local controls to refuse anything you choose. Your own obligations come from the law where you operate, and they apply on top of everything the software does.

## The operator terms

You accept the [operator terms](https://github.com/decdn/decdn/blob/main/crates/cli/TERMS.md) at registration. `decdn setup` shows them, and your acceptance is recorded on-chain as a hash of the exact text. In short, you agree to:

- **follow the law that applies to you**, including any duty to report illegal content such as CSAM in your jurisdiction;
- **declare your region truthfully** and accept that region's takedown scope;
- **act on actual knowledge**: if you learn that specific content your node serves is illegal, stop serving it promptly and report it where your law requires.

The terms do not, by themselves, require any particular automated scanning. What screening you must do, if any, is set by your law and your region. Read the full text before you register; it is short.

## The blacklist

The `ContentBlacklist` contract lists hashes no node may serve, and operators that sourced blacklisted content. Your node follows it on its own: it tails new entries live and re-reads the full list every 10 minutes, and it stops serving when its view of the chain is more than 30 minutes stale.

| Entry type | Who adds it | Applies to | Compliance window |
| ---------- | ----------------------------- | ------------------------------ | ----------------- |
| Global | Governance | Every node | 24 h |
| Regional | That region's governance body | Nodes that declared the region | 24 h |
| Emergency | 3-of-5 emergency multisig | Every node | 2 h |

The window is the time between an entry taking effect and it becoming slashable, so normal polling lag never costs you bond. A node running current software stays compliant without any action from you. See [Content takedown](/protocol/takedown).

If you find a blacklisted hash in your cache, remove it at once with `decdn node evict <hash>`.

## Your region

The region you declare at registration decides which regional entries and which regional body apply to your node. Regional rules follow the region you declare, never the region of the client. Keep it truthful: a claim that measured latency contradicts costs reputation, and a region change only takes effect after a 7-day stability window, during which the old region's entries still bind you.

## Refusing content yourself

You can refuse any content locally, beyond what the blacklist requires. List hashes or origin operators in the `[content]` section of `node.toml`:

```toml ~/.decdn/node.toml
[content]
denied_hashes = ["<blake3-hash>"]
denied_origins = ["0x<operator-address>"]
```

`decdn node reload` applies the change without a restart. To stop serving entirely, stop the daemon: `decdn node drain --wait`, or `systemctl stop decdn-node`.

## What can cost you bond

Only two offenses are slashable:

- **Rate manipulation.** Charging more than the rate your node signed in a probe response.
- **Blacklist violation.** Serving a blacklisted hash after its compliance window.

The penalty is 5% of bond for the first offense, 15% for the second and 50% for the third and later, counted over the operator's lifetime. Unmodified node software commits neither offense. A slashed operator can appeal within 30 days with `decdn appeal slash`. Corrupt delivery, refusing a request, downtime and slow service are not slashable: they cost you payment and reputation, not bond. See [Slashing](/protocol/slashing).
139 changes: 139 additions & 0 deletions docs/run-a-node/faq.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
---
title: Operator FAQ
description: Short answers to the questions prospective node operators ask most, each linking to the page with the details.
---

## Getting started

<AccordionGroup>
<Accordion title="Is onboarding open?">
Yes. The public testnet on Arbitrum Sepolia is permissionless: anyone can
bond, register and serve. See [Run a node](/run-a-node/overview).
</Accordion>
<Accordion title="What is the setup procedure?">
Install `decdn` and `decdn-node`, run `decdn config init`, then `decdn setup
--dry-run` to preview and `decdn setup` to bond and register, then start
`decdn-node run`. See [Quickstart](/run-a-node/quickstart).
</Accordion>
<Accordion title="Which OS should I use? Is there a Docker image?">
Linux under systemd is what we run ourselves. A Docker image is published at
`ghcr.io/decdn/decdn-node`. macOS and Windows builds work for testing. See
[Requirements](/run-a-node/requirements#operating-system).
</Accordion>
<Accordion title="How do I get testnet tokens?">
We send testnet TOKEN directly. Send your EVM operator address through any
channel on our [contact section](https://decdn.org/#contact). Gas is
Arbitrum Sepolia ETH from any faucet; USDC comes from Circle's faucet. See
[Get testnet funds](/run-a-node/testnet-funds).
</Accordion>
<Accordion title="Where do I ask questions?">
The [Discord](https://discord.gg/vVbNswKVGX),
[info@decdn.org](mailto:info@decdn.org), or [GitHub
issues](https://github.com/decdn/decdn/issues).
</Accordion>
</AccordionGroup>

## Hardware and network

<AccordionGroup>
<Accordion title="Which ports do I open?">
UDP 4433, for QUIC. Keep metrics (9090) and admin (9191) on localhost. See
[Requirements](/run-a-node/requirements#network).
</Accordion>
<Accordion title="Do I need a static IP?">
No. The transport hole-punches through NAT and falls back to a relay. A
stable public address with UDP 4433 forwarded gives the fastest direct path.
When your address changes, the node updates its registration.
</Accordion>
<Accordion title="What hardware do I need?">
There is no protocol minimum. The recommended start is 4 vCPU, 8 GB RAM, an
SSD and 5 TB/month of egress. See
[Requirements](/run-a-node/requirements#hardware).
</Accordion>
<Accordion title="How much storage should I give it?">
Your choice, and larger is better for hit rate. Our test nodes run 250 GB to
1 TB. If your hit rate is low on testnet, increase the cache first. See
[Disk and cache size](/run-a-node/requirements#disk-and-cache-size).
</Accordion>
<Accordion title="Can I run a node at home?">
Yes. Residential and homelab nodes are fully supported, and an unmetered
home connection is the cheapest way to run one.
</Accordion>
</AccordionGroup>

## Bond and earnings

<AccordionGroup>
<Accordion title="How much do I need to bond?">
The bond scales with the capacity you declare. On testnet it is 50,000 TOKEN
for any declaration up to about 1 Gbps. `decdn setup --dry-run` prints the
exact figure. See [Bond and
earnings](/run-a-node/bond-and-earnings#the-capacity-bond).
</Accordion>
<Accordion title="What can get my bond slashed?">
Only rate manipulation and serving blacklisted content after its compliance
window. Bad delivery is unpaid, not slashed. See [Compliance and
risk](/run-a-node/compliance#what-can-cost-you-bond).
</Accordion>
<Accordion title="How long does unbonding take?">
14 days, during which the bond stays slashable. See
[Unbonding](/run-a-node/bond-and-earnings#unbonding).
</Accordion>
<Accordion title="How am I paid?">
Per byte delivered, in USDC. The node redeems its vouchers on-chain
automatically and the operator share goes straight to your address. See [How
you earn](/run-a-node/bond-and-earnings#how-you-earn).
</Accordion>
<Accordion title="What is the price, and what share do operators get?">
The target client price is about $0.01/GB, and each operator sets its own
per-MB rate. Mainnet launches at 90% operator, 0% buyback, 10% treasury, and
moves to 60/30/10 once governance confirms the activation criteria. The
testnet already runs 60/30/10. See [Operator
share](/run-a-node/bond-and-earnings#operator-share).
</Accordion>
</AccordionGroup>

## Traffic

<AccordionGroup>
<Accordion title="Will my node receive test traffic?">
Yes, from real clients. There is no synthetic traffic, so volume reflects
demand near you. See [What to expect on
testnet](/run-a-node/traffic#what-to-expect-on-testnet).
</Accordion>
<Accordion title="How does the network choose my node?">
Clients pick the responsive node with the lowest round-trip time. Nodes
filling a cache miss weigh price, latency and reputation. See [How a request
reaches you](/run-a-node/traffic#how-a-request-reaches-you).
</Accordion>
<Accordion title="Does being the first node in a region help?">
Yes. Clients in your region reach you fastest, and regional warming routes
their requests through your node so it caches what they pull. Turn on
pull-through to take part. See [Regional
warming](/run-a-node/traffic#regional-warming).
</Accordion>
</AccordionGroup>

## Compliance

<AccordionGroup>
<Accordion title="Am I responsible for the content my node serves?">
You follow the law where you operate and accept the operator terms at registration. The node follows the on-chain blacklist on its own, and you can refuse any content locally. See [Compliance and risk](/run-a-node/compliance).
</Accordion>
<Accordion title="Can I stop serving something immediately?">
Yes. Evict it with `decdn node evict <hash>`, deny it in the `[content]` config section, or stop the daemon. See [Refusing content yourself](/run-a-node/compliance#refusing-content-yourself).
</Accordion>
</AccordionGroup>

## Mainnet

<AccordionGroup>
<Accordion title="Will requirements change for mainnet?">
No hardware minimum is planned. The bond keeps scaling with declared
capacity, and selection keeps rewarding fast, reliable nodes.
</Accordion>
<Accordion title="When is mainnet?">
The target is Q1 2027. The date is fixed once the testnet has earned it. See
[the road to testnet](https://decdn.org/blog/road-to-testnet/).
</Accordion>
</AccordionGroup>
Loading
Loading