Documentation Index
Fetch the complete documentation index at: https://docs.skale.space/llms.txt
Use this file to discover all available pages before exploring further.
Beta on SKALE Base Sepolia — Confidential Tokens are available for testing and development on testnet. Mainnet deployment coming soon. API is stable but may see refinements.
Why Confidential Tokens?
Standard ERC20 tokens store balances as plaintext onchain — anyone can see who holds what. For payroll, lending, gaming, or any application where financial privacy matters, this is a non-starter. Confidential Tokens solve this by encrypting every balance using a dual-layer model: threshold encryption for onchain processing (transfers, sufficiency checks) and ECIES encryption for private off-chain viewing.What Are Confidential Tokens?
Confidential Tokens are ERC20 tokens where balances are encrypted onchain. No plaintext balance is ever stored. They use a dual-encryption model — threshold encryption for on-chain logic and ECIES encryption for off-chain viewing.Quick Start
- Foundry
- Hardhat
Dual-Encryption Model
| Layer | Key | Purpose | Who Can Decrypt |
|---|---|---|---|
| TE (Threshold Encryption) | Network BLS key | On-chain logic (transfers, sufficiency checks) | Consensus via CTX callback |
| ECIES | Recipient’s secp256k1 key | Off-chain balance viewing | Token holder’s private key |
Architecture
A confidential token transfer works like this — encryption of new balances happens inside the CTX callback, not upfront:Key Contracts
| Contract | Purpose |
|---|---|
ConfidentialToken | Core confidential ERC20 |
ConfidentialWrapper | Wraps an existing ERC20 into a confidential token |
MintableConfidentialToken | ConfidentialToken + restricted mint |
ConfidentialEIP3009 | EIP-3009 with encrypted value parameters |
Roles
| Role | Can Do | Can See Balance |
|---|---|---|
| Holder | Transfer, approve | Only via registered viewer key |
| Viewer | Decrypt ECIES balance off-chain | Yes (if granted access) |
| Anyone | View encrypted ciphertext onchain | Encrypted only |
setViewerPublicKey(). The holder can be their own viewer.
Learn More
- Re-encryption — The encryption precompiles that power confidential tokens
- Conditional Transactions — How CTX enables on-chain processing of encrypted data
