Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

130 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Atoshi Chain

Atoshi Logo

Privacy-Preserving EVM Blockchain

Release License

Website X (Twitter) Telegram


🌟 Overview

Atoshi is a privacy-preserving EVM-compatible blockchain designed to enable confidential transactions while maintaining full compatibility with existing Ethereum tooling, wallets, and smart contracts.

Key Features

  • πŸ” Privacy Transactions: Hide transaction amounts, sender/receiver identities using Zero-Knowledge Proofs
  • ⚑ EVM Compatible: Full compatibility with Ethereum smart contracts, wallets (MetaMask), and development tools
  • πŸ›‘οΈ Shield Contracts: Deposit-withdraw privacy pools for confidential asset transfers
  • 🌐 Multi-Asset Privacy: Support for native tokens, ERC-20, NFTs, and SBTs
  • πŸ”— IBC Enabled: Cross-chain communication with Cosmos ecosystem

πŸ“‹ Chain Specifications

Property Value
Chain Name Atoshi
Native Token ATOSHI (ATOS)
Base Denom aatos
Display Denom atos
Decimals 18
Total Supply 10,000,000,000,000 ATOS (10 Trillion)
Pre-mine 70,000,000,000 ATOS (70 Billion)

Chain IDs

Network Chain ID EIP-155 ID
Mainnet atoshi_88188-1 88188
Testnet atoshi_88288-1 88288
Devnet atoshi_88388-1 88388

Bech32 Prefixes

Type Prefix
Account Address atoshi
Validator Operator atoshivaloper
Consensus Node atoshivalcons

πŸ—οΈ Architecture

Privacy Transaction System

Atoshi implements a comprehensive privacy layer using Zero-Knowledge Proofs (ZK-SNARKs/STARKs) to enable confidential transactions on the EVM.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Layer    β”‚     β”‚    L2 Privacy Layer     β”‚     β”‚  L1 Settlement      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                 β”‚     β”‚                         β”‚     β”‚                     β”‚
β”‚  User Wallet    β”‚     β”‚  Sequencer/Relayer      β”‚     β”‚  Rollup Contract    β”‚
β”‚       β”‚         β”‚     β”‚         β”‚               β”‚     β”‚        β”‚            β”‚
β”‚       β–Ό         β”‚     β”‚         β–Ό               β”‚     β”‚        β–Ό            β”‚
β”‚  Generate       β”‚     β”‚  Transaction Pool       β”‚     β”‚  Verifier Contract  β”‚
β”‚  Stealth Addr   │────▢│         β”‚               │────▢│        β”‚            β”‚
β”‚       β”‚         β”‚     β”‚         β–Ό               β”‚     β”‚        β–Ό            β”‚
β”‚       β–Ό         β”‚     β”‚  Batch Builder          β”‚     β”‚  State Storage      β”‚
β”‚  Create Note    β”‚     β”‚         β”‚               β”‚     β”‚                     β”‚
β”‚  Commitment     β”‚     β”‚         β–Ό               β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚       β”‚         β”‚     β”‚  Prover Service         β”‚
β”‚       β–Ό         β”‚     β”‚         β”‚               β”‚
β”‚  User Wallet    β”‚     β”‚         β–Ό               β”‚
β”‚                 β”‚     β”‚  Batch Proof            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚         β”‚               β”‚
                        β”‚         β–Ό               β”‚
                        β”‚  State Tree Manager     β”‚
                        β”‚                         β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Components

1. Shield Contract (L1)

  • Receives deposit commitments
  • Verifies withdrawal ZK proofs
  • Manages nullifier registry
  • Executes asset transfers

2. Commitment System

  • Off-chain generation of secret data (amount, recipient pubkey, randomness)
  • Hash commitment submitted to Shield contract
  • Acts as a "receipt" for deposited funds

3. Merkle Tree

  • Off-chain tree structure for all deposits
  • Tree root stored on-chain
  • Membership proofs required for withdrawals

4. Nullifier

  • Prevents double-spending
  • One-time "seal" computed in ZK circuit
  • Recorded on-chain after successful withdrawal

5. ZK Proof System

  • Generated off-chain by Prover
  • Verified on-chain by Shield contract
  • Supports Plonky2/Halo2 proving systems

Transaction Flow

Deposit Flow

1. User generates commitment (hash of secret data) locally
2. User submits commitment to Shield contract
3. Contract adds commitment to pending queue
4. Commitment is added to off-chain Merkle tree
5. Tree root is updated on-chain

Withdrawal Flow

1. User runs Prover locally with:
   - Secret data (amount, randomness, etc.)
   - Merkle proof of membership
2. Prover generates ZK Proof + Nullifier
3. User submits to Shield contract:
   - ZK Proof
   - Nullifier
   - Recipient address
4. Contract verifies:
   - Proof validity
   - Nullifier not used
5. Contract executes transfer and records nullifier

πŸš€ Quick Start

Prerequisites

  • Go 1.22+
  • Make
  • jq

Build from Source

# Clone the repository
git clone https://github.com/ATOSHI-ORG/Atoshi-chain.git
cd atoshi

# Build and install
make install

# Verify installation
atoshid version

Run Local Development Node

# Start a local single-node chain (development/testing)
./local_node.sh

# Options:
#   -y              Overwrite existing data without prompting
#   -n              Keep existing data and start node
#   --no-install    Skip the build step
#   -h, --help      Show help message

Development Endpoints

After starting the local node:

Service Endpoint
Tendermint RPC http://localhost:26657
EVM JSON-RPC http://localhost:8545
WebSocket ws://localhost:8546
REST API http://localhost:1317
gRPC localhost:9090

Connect MetaMask

  1. Open MetaMask β†’ Settings β†’ Networks β†’ Add Network
  2. Configure:
    • Network Name: Atoshi Devnet
    • RPC URL: http://localhost:8545
    • Chain ID: 88388
    • Currency Symbol: ATOS
    • Block Explorer: (leave empty for local)

πŸ“ Project Structure

atoshi/
β”œβ”€β”€ app/                    # Application configuration
β”‚   β”œβ”€β”€ app.go              # Main application setup
β”‚   β”œβ”€β”€ config.go           # Chain configuration
β”‚   └── ante/               # Transaction ante handlers
β”œβ”€β”€ cmd/
β”‚   └── atoshid/            # CLI binary
β”‚       β”œβ”€β”€ main.go
β”‚       └── root.go
β”œβ”€β”€ contracts/              # Solidity contracts
β”œβ”€β”€ crypto/                 # Cryptographic utilities
β”œβ”€β”€ precompiles/            # EVM precompiled contracts
β”œβ”€β”€ proto/                  # Protobuf definitions
β”œβ”€β”€ rpc/                    # JSON-RPC implementation
β”œβ”€β”€ scripts/                # Utility scripts
β”‚   └── init_genesis.sh     # Genesis initialization
β”œβ”€β”€ server/                 # Server configuration
β”œβ”€β”€ types/                  # Core types
β”œβ”€β”€ utils/                  # Utility functions
β”œβ”€β”€ x/                      # Cosmos SDK modules
β”‚   β”œβ”€β”€ erc20/              # ERC20 module
β”‚   β”œβ”€β”€ evm/                # EVM module
β”‚   β”œβ”€β”€ feemarket/          # Fee market (EIP-1559)
β”‚   β”œβ”€β”€ inflation/          # Token inflation
β”‚   └── vesting/            # Vesting accounts
β”œβ”€β”€ local_node.sh           # Local development script
β”œβ”€β”€ Makefile                # Build commands
└── README.md

πŸ”§ Configuration

Genesis Configuration

Initialize a new chain with pre-mined tokens:

# Using the initialization script
./scripts/init_genesis.sh

# Or manually:
atoshid init my-node --chain-id atoshi_88188-1
atoshid keys add preminer
atoshid genesis add-genesis-account <address> 70000000000000000000000000000aatos

Environment Variables

Variable Description Default
CHAIN_ID Chain identifier atoshi_88388-1
MONIKER Node moniker atoshi-node
KEYRING_BACKEND Keyring backend test
HOME_DIR Data directory ~/.atoshid

πŸ› οΈ Development

Build Commands

# Build binary
make build

# Install to GOPATH
make install

# Run tests
make test

# Generate protobuf
make proto-gen

# Lint code
make lint

Testing

# Run all tests
make test

# Run specific package tests
go test ./x/evm/...

# Run with coverage
go test -cover ./...

πŸ” Privacy Technology Stack

Zero-Knowledge Proofs

  • Proving System: Plonky2 / Halo2
  • Hash Function: Poseidon (ZK-friendly)
  • Commitment Scheme: Pedersen commitments

Supported Privacy Features

Feature Status
Amount Hiding βœ… Planned
Sender/Receiver Hiding βœ… Planned
Multi-Asset Privacy βœ… Planned
ERC-20 Privacy βœ… Planned
NFT Privacy πŸ”„ In Progress
SBT Privacy πŸ”„ In Progress

πŸ“š Documentation


🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the ENCL-1.0 License.


πŸ”— Links


Built with ❀️ by the Atoshi Team

About

Core repository for Atoshi Chain, an EVM-compatible L1 with privacy transaction support, tokenomics, and L2 integration.

Resources

Code of conduct

Contributing

Security policy

Stars

56 stars

Watchers

18 watching

Forks

Releases

Packages

Used by

Contributors

Languages