DERO Tokens

Tokens on DERO are user-created assets deployed through smart contracts. What makes DERO unique is that tokens are stored as encrypted balances in user wallets, not in the smart contract itself - providing privacy and rug-pull resistance.
How DERO Tokens Are Different
| Aspect | ERC-20 (Ethereum) | DERO Tokens |
|---|---|---|
| Storage | In smart contract | In user wallets |
| Balance Privacy | 👁️ Public | 🔒 Encrypted (66 bytes) |
| Transfers | Through contract | Wallet-to-wallet (like DERO) |
| Contract Control | Can freeze/lock | ❌ Cannot control after issuance |
| Rug-Pull Risk | ⚠️ High | ✅ Resistant |
| Privacy | ❌ None | ✅ Ring sigs + encryption |
Token Storage Model
Traditional Tokens (ERC-20)
// ALL balances in contract
mapping(address => uint256) balances;
balances[alice] = 1000; // Public, everyone sees
balances[bob] = 500; // Public, everyone seesProblem: Contract controls everything. Owner can freeze, steal, or manipulate.
DERO Tokens
// Tokens sent to WALLETS
Function IssueAsset() Uint64
10 SEND_ASSET_TO_ADDRESS(SIGNER(), amount, SCID())
20 RETURN 0
End FunctionResult in wallet:
Alice's wallet contains:
DERO: E(500) // Encrypted 500 DERO (66 bytes)
Token: E(1000) // Encrypted 1000 tokens (66 bytes)
Each encrypted balance stored as ElGamal:
Left: 33 bytes
Right: 33 bytes
Total: 66 bytes per assetSource: cryptography/crypto/algebra_elgamal.go:91-93, cryptography/crypto/balance_serdes.go:31
Privacy Features
Token transfers use DERO's full privacy stack:
- Ring Signatures - Sender hidden among 2-128 members
- Homomorphic Encryption - Amounts encrypted
- Bulletproofs - Zero-knowledge validation
- TLS Network - Encrypted transmission
Verified in source:
- Balance storage:
blockchain/transaction_execute.go:239-nb.Balance.Add(echanges)(homomorphic) - Token sending:
dvm/dvm_functions.go:80-SEND_ASSET_TO_ADDRESSimplementation - Wallet updates:
dvm/simulator.go:378-nb.Balance.Plus()for tokens
Rug-Pull Resistance
Why DERO Tokens Are Safer
Ethereum ERC-20:
// Contract owner can:
function freeze(address user) onlyOwner {
balances[user] = 0; // Steal tokens
}
function pause() onlyOwner {
paused = true; // Lock all transfers
}DERO Tokens:
// Once issued to wallet, contract CANNOT:
// ❌ Freeze tokens
// ❌ Take them back
// ❌ See your balance
// ❌ Control transfers
// Tokens in YOUR wallet = YOU control themThe "Cash Model":
- Bank (contract) issues cash (tokens)
- Cash leaves bank → in your wallet (encrypted)
- Bank can't track or control it anymore
- You can spend it peer-to-peer
Token Types
Fungible Tokens
Example: Stablecoins, utility tokens, governance tokens
Function InitializePrivate() Uint64
10 STORE("total_supply", 1000000)
20 SEND_ASSET_TO_ADDRESS(SIGNER(), 1000000, SCID())
30 RETURN 0
End FunctionEach token is identical and interchangeable
Non-Fungible Tokens (NFTs)
Example: Collectibles, game items, unique assets
Function MintNFT(recipient String, token_id Uint64) Uint64
10 SEND_ASSET_TO_ADDRESS(ADDRESS_RAW(recipient), 1, token_id)
20 RETURN 0
End FunctionEach token has unique ID, quantity = 1
Using DERO Tokens
Receiving Tokens
Tokens arrive in your wallet automatically via SEND_ASSET_TO_ADDRESS():
Transaction received:
SCID: 0abc123def... (token identifier)
Amount: E(100) (encrypted 100 tokens)
Your wallet now contains:
E(previous_balance) + E(100) = E(new_balance)
All done homomorphically - no decryption needed!Sending Tokens
Transfer like native DERO:
# Using wallet RPC
curl -X POST http://127.0.0.1:10103/json_rpc -d '{
"method": "transfer",
"params": {
"transfers": [{
"destination": "dero1qy...",
"amount": 100,
"scid": "token_scid_here"
}],
"ringsize": 16
}
}'Privacy features:
- Ring signature hides sender
- Amount encrypted
- Balance stays encrypted
Key Advantages
1. Wallet Storage = True Ownership
- ✅ You control private keys
- ✅ Contract cannot take back
- ✅ No freeze functions possible
2. Privacy = Full Encryption
- ✅ Balances encrypted (E(amount))
- ✅ Transfers use ring signatures
- ✅ Cannot track ownership
3. Peer-to-Peer Transfers
- ✅ Send without contract involvement
- ✅ Like sending DERO
- ✅ Fast and private
4. Multiple Assets Per Wallet
- ✅ DERO + unlimited tokens
- ✅ Each encrypted separately
- ✅ All in one wallet
Learn More
- Private Smart Contracts - How token privacy works
- Homomorphic Encryption - Why balances stay encrypted
- DVM Smart Contracts - Building token contracts
Source Code References:
- Token implementation:
dvm/dvm_functions.go:398-SEND_ASSET_TO_ADDRESS - Wallet storage:
cryptography/crypto/balance_serdes.go:31-Balance *ElGamal - Homomorphic updates:
blockchain/transaction_execute.go:239-nb.Balance.Add(echanges)
Related Pages
Understand Token Privacy:
- Homomorphic Encryption - How encrypted balances work
- Ring Signatures - Transaction privacy layer
- Private Smart Contracts - Token contract privacy
Build with Tokens:
- Token Smart Contract - Full token implementation example
- Assets Exchange - Build a token swap contract
- DVM-BASIC Guide - Smart contract programming language
Deploy & Use:
- Wallet RPC API - Send and receive tokens
- DERO Wallets - Wallet options for managing tokens