Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3cfe675
initial layout
badgersrus Sep 9, 2025
78a066f
stashing
badgersrus Sep 9, 2025
a4fcb62
stashing
badgersrus Sep 9, 2025
0921e55
add testnet page
badgersrus Sep 16, 2025
885f9a9
add sample dapps
badgersrus Sep 18, 2025
7db3a24
fix project setup
badgersrus Sep 22, 2025
ac595d0
stashign while I fix tutorial
badgersrus Sep 23, 2025
25843cc
clean up
badgersrus Sep 24, 2025
e6f48b0
add testnet URLs
badgersrus Sep 24, 2025
5951c3d
fix more links
badgersrus Sep 24, 2025
fabb585
first round of PR comments
badgersrus Oct 6, 2025
8ffdb7e
add links to ten-kit and add some about secure randomness
badgersrus Oct 7, 2025
fc07a28
fix links
badgersrus Oct 7, 2025
caabdb6
Rework the "migrate dapp" section
tudor-malene Oct 8, 2025
e22fc06
point tutorial to github
badgersrus Oct 8, 2025
df7f197
Merge remote-tracking branch 'origin/will/docs-revamp' into tudor/mig…
tudor-malene Oct 9, 2025
6321b1a
add supported wallets
badgersrus Oct 9, 2025
9f36132
add list of supported wallets
badgersrus Oct 9, 2025
24a028f
add new section and address review
tudor-malene Oct 9, 2025
e0fe280
Merge pull request #89 from ten-protocol/tudor/migrate_dapp_revamp
badgersrus Oct 9, 2025
5af69fc
fix release notes page
badgersrus Oct 9, 2025
9d39f17
move overview out of a drop down
badgersrus Oct 9, 2025
56c94d4
fix session key docs
zkokelj Oct 10, 2025
6d073a9
Merge pull request #90 from ten-protocol/ziga/fix_session_key_docs
badgersrus Oct 10, 2025
a2a9f6a
remove duplicate pages
badgersrus Oct 10, 2025
4a11c70
fix links
badgersrus Oct 10, 2025
7f5228f
fix links
badgersrus Oct 10, 2025
2a00836
gavin comments
badgersrus Oct 24, 2025
7801978
merge latest
badgersrus Oct 27, 2025
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
40 changes: 0 additions & 40 deletions docs/introduction/overview.md → docs/1-overview/Overview.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
sidebar_position: 1
---
# Overview

![TEN in Web3](../assets/overview-banner.png)

Expand Down Expand Up @@ -34,45 +33,6 @@ TEN reclaims the critical Web2 feature Web3 left behind: **privacy with permissi

---

## AI-Native Architecture

Every user and dApp can run a personal **autonomous AI agent** inside a TEE:

- Manage assets, execute logic, interact with dApps
- Suggest strategies or transact on behalf of users
- Enable confidential collaboration between institutions

---

## Key Use Cases

- **Private Gaming**
Fully on-chain hidden-state games (e.g., poker, fog-of-war) with no off-chain servers. AI agents as players, opponents, or coaches.

- **Confidential DeFi**
Dark pools, private DEXs, and liquidation-resistant lending — all with hidden thresholds, encrypted order books, and tamper-proof execution.

- **TEE-Stablecoins**
Reserve-backed stablecoins with provable, confidential attestation and on-chain enforcement of issuance/redeemability.

- **Autonomous Agreements**
Confidential contracts (SLAs, NDAs, term sheets) enforced by oracles without revealing parties or terms.

- **Agent Marketplaces**
Deploy trustless AI agents — financial bots, predictors, or assistants — with protected algorithms and private coordination.

---

## Developer Experience

- Native Solidity / Hardhat / MetaMask compatibility
- Session keys for seamless UX
- Free, in-contract randomness (no oracles)
- Precise timestamping & async execution
- Native Ethereum bridge

---

## Data Revelation

Confidentiality on your terms:
Expand Down
4 changes: 4 additions & 0 deletions docs/1-overview/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Overview",
"position": 1
}
4 changes: 4 additions & 0 deletions docs/2-introduction/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Introduction",
"position": 2
}
75 changes: 75 additions & 0 deletions docs/2-introduction/chain-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
sidebar_position: 2
---

# Chain Information

## TEN Public RPC Endpoints TODO

:::caution
- TEN Protocol RPC endpoints support standard Ethereum JSON-RPC methods with additional privacy features
- All transactions are encrypted by default - use TEN-compatible wallets and tools
- View the [faucet](https://faucet.ten.xyz/) for testnet tokens
:::

This section provides an overview of the available public RPC endpoints for TEN Protocol networks and necessary details to interact with them.

| Name | RPC Url(s) | Chain ID | Block explorer | Underlying chain | Tech stack | Faucet |
|------|------------|----------|----------------|------------------|------------|---------|
| TEN Sepolia Testnet | `https://testnet.ten.xyz/v1/` | `8443` | [TENscan](https://tenscan.io/) | Ethereum Sepolia | Confidential Rollup (TEE) | [Faucet](https://faucet.ten.xyz/) |

:::info More RPC endpoints
Additional TEN Protocol RPC endpoints and infrastructure providers will be listed here as they become available.
:::

# JSON-RPC API

TEN offers compatibility with a subset of Ethereum's [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/). This document outlines the supported JSON-RPC API methods.

## Supported Methods

TEN nodes cater to the following JSON-RPC API methods, accessible via both HTTP and websockets:

- `eth_blockNumber`
- `eth_call`
- `eth_chainId`
- `eth_estimateGas`
- `eth_gasPrice`
- `eth_getBalance`
- `eth_getBlockByHash`
- `eth_getBlockByNumber`
- `eth_getCode`
- `eth_getLogs`
- `eth_getTransactionByHash`
- `eth_getTransactionCount`
- `eth_getTransactionReceipt`
- `eth_sendRawTransaction`

## Websocket Subscriptions

For websocket connections, additional API methods include:

- `eth_subscribe`
- `eth_unsubscribe`

Currently, the sole supported subscription type is `logs`.

## Network Configuration

### TEN Sepolia Testnet

To add TEN Sepolia Testnet to your wallet, use the following configuration:

```json
{
"chainId": "0x1BB",
"chainName": "TEN Sepolia Testnet",
"rpcUrls": ["https://testnet.ten.xyz/v1/"],
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"blockExplorerUrls": ["https://tenscan.io/"]
}
```
62 changes: 62 additions & 0 deletions docs/2-introduction/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
sidebar_position: 1
---

# What is TEN Protocol?

TEN is a next-generation Ethereum Layer 2 rollup protocol that introduces data confidentiality, computational privacy, and resistance to Maximal Extractable Value (MEV) by leveraging hardware-based Trusted Execution Environments (TEEs). TEN represents a major step forward in decentralized system design by reintroducing **data access controls** — a foundational feature of Web2 that Web3 largely abandoned in favor of radical transparency.

## The Web3 Privacy Problem

Public blockchains have validated the promise of programmable value, but exposed a critical flaw: the complete absence of data access control. Transparency, once celebrated as a virtue, has become a liability. On-chain activity today remains fully public — every balance, transaction, strategy, and piece of logic is visible to everyone, including competitors, adversaries, and MEV bots.

If you analyze any successful digital application — Netflix, WhatsApp, Spotify, banking apps, even mobile games — they all rely on access control. Not just for privacy, but to function. Smart contracts today can define who can write data, but they cannot restrict who can read it. This fundamental limitation makes it nearly impossible to build viable real-world applications in Web3 beyond speculation.

## TEN's Solution: Smart Transparency

TEN introduces **Smart Transparency** — a paradigm where smart contracts not only enforce rules of computation, but also enforce rules of data access. By integrating programmable encryption, TEEs, and an Ethereum-compatible execution environment, TEN enables encrypted, autonomous, and composable smart contracts that preserve privacy without sacrificing decentralization or composability.

### Core Architecture

**Encrypted Execution**: All transactions and internal state of application contracts remain encrypted and hidden, providing a credible solution to MEV while maintaining EVM compatibility for easy migration of existing contracts.

**Trustless Design**: TEN leverages TEEs for privacy but not for integrity. If a TEE is compromised or a manufacturer behaves maliciously, the system gracefully degrades into a transparent blockchain, preserving ledger integrity while forfeiting privacy.

**Ethereum Foundation**: TEN uses Ethereum as a base layer for security and data availability while enabling lower transaction costs similar to other Layer 2 networks, with quick finality synchronized to L1 block cadence.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Ethereum Foundation" - make people think of "The Ethereum Foundation".
Let's use something else


## Key Differentiators from Transparent Chains

| Feature | Transparent Chains | TEN Protocol |
|---------|-------------------|--------------|
| **Data Access** | All data public | Programmable access control |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add the usual stuff like:

  • Account-based smart contract execution
  • Decentralised

| **MEV Protection** | Limited solutions | Built-in confidentiality |
| **Smart Contract State** | Fully visible | Encrypted with selective disclosure |
| **Transaction Privacy** | Public by default | Private by default |
| **Compliance** | Difficult | Time-delayed revelation for deterrence |

## Addressing Key Challenges

**Hardware Trust**: TEN's trust model doesn't require perpetual belief in any single hardware vendor. The protocol uses Ethereum's security combined with game theory to detect and correct eventual TEE compromises.

**Usability**: The system implements flexible policies for delayed transaction revelation, balancing privacy needs with regulatory compliance and illegal activity deterrence.

**MEV Prevention**: Beyond hiding transactions, TEN introduces delays at critical moments to prevent aggregators from performing replay-attacks and exploiting side-channels.

## Unlocking New Applications

TEN's confidential rollup architecture enables previously impossible on-chain applications:

- **Confidential DeFi**: Dark pools, private lending, MEV-resistant trading
- **Private Gaming**: Poker, strategy games with hidden information
- **Autonomous AI Agents**: Protected algorithms and private coordination
- **Enterprise Solutions**: Confidential auctions, private supply chains
- **TEE-Stablecoins**: Reserve-backed with provable but confidential attestation

## Whitepaper & Blog Links
- [TEN Protocol Whitepaper](https://github.com/ten-protocol/ten-whitepaper/blob/main/whitepaper.md)
- [SGX Demystified](https://medium.com/obscuro-labs/intel-sgx-demystified-757a242682a3)
- [Smart Transparency](https://medium.com/obscuro-labs/web3-needs-access-control-9a80719eec4a)
- [Securing Randomness](https://medium.com/obscuro-labs/against-all-odds-securing-randomness-on-the-blockchain-4c15587a39a8)
- [High-Level Explanation](https://medium.com/obscuro-labs/ten-in-a-nutshell-for-devs-874666910f65)
- [iGaming Features](https://medium.com/@tudor.malene/the-ideal-gaming-chain-bb5674202ec2)

52 changes: 52 additions & 0 deletions docs/3-write-ten-dapp/1-high-level-concepts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
sidebar_position: 1
---

# High level concepts

TEN Protocol is fully **Ethereum-compatible**, meaning you can use all your familiar development tools; Solidity, Hardhat, Foundry, MetaMask, and Remix, without any changes. The key difference is that TEN adds powerful privacy and confidentiality features on top of the standard EVM functionality.

Below are the core concepts that make TEN unique while maintaining complete compatibility with existing Ethereum tooling and workflows.

## End-to-End Encryption

TEN implements comprehensive end-to-end encryption through its **Encrypted EVM** architecture. All smart contract execution occurs inside **Trusted Execution Environments (TEEs)**, ensuring that transaction data, contract logic, inputs, and state remain encrypted and private from all external observers—including node operators and validators.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's talk a bit here about how we use:

  • Https from the user directly into an enclave
  • TEEs for execution
  • Encrypted storage


## Smart Contract Execution with Hidden State

Unlike Ethereum where all contract state is publicly visible, TEN provides **genuine private variables** through its encrypted execution environment. TEN disables `getStorageAt` and ensures private variables are truly private, only accessible through authorized functions that developers define.

## Data Access Control Primitives

TEN introduces **Smart Transparency**—a paradigm where smart contracts enforce rules of data access, not just computation. This provides fine-grained control over who can see what data and when, including programmable disclosure, conditional data access, and event visibility rules.

## TEN Gateway
The TEN Gateway securely routes encrypted transactions between users and validator nodes, ensuring data confidentiality throughout the transaction process.

## Personal Data

TEN enables true **personal data** management on-chain by ensuring that sensitive user information remains encrypted and accessible only to authorized parties. This supports applications like private messaging, confidential medical records, and identity verification systems while maintaining compliance with data protection regulations.

## Free Native On-Chain Randomness

TEN provides **secure, immediate, and free randomness** without oracles or external dependencies. Random numbers are generated within secure enclaves, ensuring unpredictability while eliminating the delays, complexity, and fees associated with traditional oracle-based solutions.

```solidity
function getRandomNumber() public view returns (uint256) {
return uint256(block.prevrandao); // Secure randomness on TEN
}
```

## Precise Timestamping of Transactions

Every transaction on TEN receives a **precise timestamp** when it reaches the sequencer, enabling applications that require exact timing information such as real-time games, auction systems, and time-sensitive financial instruments.

## Native Commit-Reveal (Required by Many Games)

TEN eliminates the need for traditional commit-reveal schemes through its **native async execution** and **on-block-end callbacks**. This provides the same security benefits without the complexity, latency, and cost of separate commit and reveal transactions, enabling seamless gaming experiences.

## Native Session Keys

TEN provides **native session key** support managed by TEEs, eliminating the need for proxy contracts while enabling seamless user experiences. Users can play games or interact with dApps without signing every transaction, while developers benefit from simple integration through standard RPC endpoints.

---
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 2
---
# Set Up Dev Environment
# Set up development environment

## 1. Wallet Setup & Configuration

Expand Down
56 changes: 56 additions & 0 deletions docs/3-write-ten-dapp/3-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
sidebar_position: 3
---

# Migrate your dApp to TEN

Migrating to TEN enables your dApp to leverage "Programmable Encryption". Below are steps to help you transition smoothly.

### Key Migration Steps

- Update your Hardhat deployment to support the `--network ten` option.
- Add data protection logic to your view functions (if applicable).
- Configure visibility rules for event logs and internal storage.
- Add the TEN onboarding widget to your JavaScript UI.

## 1. Configuring Hardhat

First, set up a Hardhat project if you haven't already.

### 1.1 Installing the TEN Hardhat Plugin

To add TEN Network compatibility, install the `ten-hardhat-plugin`:

```bash
npm install ten-hardhat-plugin
```

_You can use `npm` or `yarn` to install plugins._

### 1.2 Configuring `hardhat.config.js`

Modify `hardhat.config.js` in your project’s root directory as follows:

```javascript
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "ten-hardhat-plugin";

module.exports = {
solidity: "0.8.10",
networks: {
hardhat: {
// Configuration for the Hardhat Network
},
ten: {
url: "https://testnet.ten.xyz/v1/",
chainId: 443,
accounts: ["your-private-key"],
},
},
};

export default config;
```

Once configured, you can start writing or migrating your smart contracts.
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,7 @@
sidebar_position: 4
---

# Migrate your dApp to TEN

Migrating to TEN enables your dApp to leverage "Programmable Encryption". Below are steps to help you transition smoothly.

### Key Migration Steps

- Update your Hardhat deployment to support the `--network ten` option.
- Add data protection logic to your view functions (if applicable).
- Configure visibility rules for event logs and internal storage.
- Add the TEN onboarding widget to your JavaScript UI.

## 1. Configuring Hardhat

First, set up a Hardhat project if you haven't already.

### 1.1 Installing the TEN Hardhat Plugin

To add TEN Network compatibility, install the `ten-hardhat-plugin`:

```bash
npm install ten-hardhat-plugin
```

_You can use `npm` or `yarn` to install plugins._

### 1.2 Configuring `hardhat.config.js`

Modify `hardhat.config.js` in your project’s root directory as follows:

```javascript
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "ten-hardhat-plugin";

module.exports = {
solidity: "0.8.10",
networks: {
hardhat: {
// Configuration for the Hardhat Network
},
ten: {
url: "https://testnet.ten.xyz/v1/",
chainId: 443,
accounts: ["your-private-key"],
},
},
};

export default config;
```

Once configured, you can start writing or migrating your smart contracts.

## 2. Writing Smart Contracts for TEN
# Writing smart contracts for TEN

TEN executes smart contracts within the EVM similarly to Ethereum, so you can reuse your existing code.
However, the execution and the internal state are hidden from everyone, including node operators and the sequencer.
Expand Down
Loading