bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 33쪽 중 23쪽
lue with human contribution.
### 1.5 M1 Design Philosophy
M1 is a social-technical system. Its purpose is not to create another marketplace for tokens but to establish a durable framework for coordination and ownership. The network treats every contribution — from validation to governance to development to education — as a building block of value.
In this sense, Movement is less a product than a public utility: a system where effort converts into value, contribution into ownership, and participation into collective strength.
### 1.6 M1 Key Features
M1 implements the following key features:
1. **Move Runtime**: MoveVM implementation for blockchain execution.
2. **High-Throughput Consensus**: Jolteon lineage and a Quorum Store–like dissemination layer for scaling under load.
3. **Parallel Execution**: transaction parallelization for increased throughput.
4. **State Management**: state storage and management solutions.
5. **Developer Tooling**: development environment and debugging tools.
## 2. Technical Architecture
### 2.1 System Overview
M1 employs a modular architecture with distinct layers handling different aspects of blockchain operation:
```
Application Layer │ DApps, DeFi, NFTs, Enterprise Applications
API Layer │ REST, WebSocket, Indexer GraphQL Interfaces
Execution Layer │ MoveVM Runtime, Transaction Processing
Storage Layer │ State Store, Transaction History, Events
Consensus Layer │ BFT Consensus, Validator Network
Network Layer │ Peer-to-peer communication, Mempool management, Message routing
```
### 2.2 Consensus Protocol
#### 2.2.1 Jolteon
M1 adopts a [Jolteon](https://arxiv.org/abs/2106.10362)-style BFT protocol. Jolteon introduces a 2-chain commit rule and a quadratic view change (pacemaker) to reduce latency and ensure fast recovery. In the happy path it achieves linear message complexity with one-round confirmations; under stress it remains robust.
The protocol guarantees ***safety*** with consistency up to 1/3 Byzantine validators, ensures ***liveness*** with progress under network asynchrony, provides ***finality*** through 2-chain commit for fast confirmations, and maintains ***efficiency*** with optimized message complexity and round duration.
#### 2.2.2 Validator Selection
The network employs Proof-of-Stake (PoS) with ***weighted selection*** where validator selection probability is proportional to stake, a ***dynamic set*** allowing validators to join/leave based on stake and performance, and ***rewards*** with staking rewards for honest validation and block production. (Note: slashing is defined in protocol but not currently active.)
#### 2.2.3 Block Production
Block production follows a deterministic leader selection algorithm:
```rust
// Note: This is a simplified pseudocode representation.
// Deterministic, stake/reputation-weighted round-robin (illustrative)
fn select_leader(set: &ValidatorSet, round: u64) -> ValidatorId {
let order = set.weighted_order_by_stake_and_rep(); // fixed per epoch
order[(round as usize) % order.len()]
}
```
#### 2.2.4 Data Dissemination
Quorum Store–style dissemination: separate transaction dissemination from ordering to stabilize throughput under bursty load; bypass under low load for minimal latency.
### 2.3 Move Virtual Machine
#### 2.3.1 Runtime Optimization
M1's MoveVM implementation includes an ***optimized interpreter*** with verified bytecode, ***instruction caching*** for caching of compiled bytecode for repeated execution, ***gas optimization*** with precise gas metering and minimal overhead, and ***memory management*** with efficient memory allocation and garbage collection.
#### 2.3.2 Security Features
The MoveVM provides built-in security guarantees including ***resource safety*** to prevent double-spending and resource leaks, ***type safety*** with compile-time and runtime type checking, ***access control*** with fine-grained permission management, and ***formal verification*** support for mathematical proof of contract correctness.
#### 2.3.3 Parallel Execution
Transaction execution can be parallelized when dependencies allow (**Block-STM** approach):
```rust
// Note: This is a simplified pseudocode representation.
struct ParallelExecutor {
worker_pool: ThreadPool,
dependency_graph: DependencyAnalyzer,
conflict_detector: ConflictDetector,
}
impl ParallelExecutor {
fn execute_batch(&self, transactions: Vec<Transaction>) -> Vec<ExecutionResult> {
let dependency_groups = self.dependency_graph.analyze(&transactions);
let results = dependency_groups.par_iter()
.map(|group| self.execute_group(group))
.collect();
self.resolve_conflicts(results)
}
}
```
### 2.4 State Management
#### 2.4.1 Global State Model
M1 maintains a global state organized by account addresses using an ***account model*** where each address can hold multiple resources and modules, ***resource storage*** with native storage of Move resources and type information, ***module storage*** for compiled Move modules with metadata, and ***versioned state*** indexed by ledger version, with authenticated proofs via the Jellyfish Merkle Tree.
#### 2.4.2 Jellyfish Merkle Tree (JMT)
State commitment uses the Jellyfish Merkle Tree:
M1 uses a Jellyfish Merkle Tree for state commitment. This structure enables efficient proofs of state and supports scalable verification for light clients and full nodes.
```
State Root (Jellyfish Merkle Tree)
├── Account Subtree
│ ├── Address_1 → {Resources, Modules}
│ ├── Address_2 → {Resources, Modules}
│ └── ...
├── Events Subtree
│ ├── Event_Stream_1 → [Event_1, Event_2, ...]
│ └── ...
└── Metadata Subtree
├── Validator Set
├── Network Configuration
└── ...
```
#### 2.4.3 Storage Optimization
Several optimizations improve storage efficiency including ***state pruning*** for removal of old state versions (configurable), ***RocksDB-level compression*** for data storage and transfer, ***indexing*** with efficient indexing for common query patterns, and ***caching*** with multi-level caching for frequently accessed data.
### 2.5 Network Protocol
#### 2.5.1 Peer-to-Peer Communication
Network communication uses a gossip-based protocol with ***peer discovery*** for automatic discovery and connection to network peers, ***message routing*** for efficient routing of messages based on type and priority, ***bandwidth optimization*** through compression and batching of network messages, and ***security*** with cryptographic authentication and message integrity.
#### 2.5.2 Transaction Propagation
Transaction propagation is optimized for low latency:
1. **Client Submission**: Transaction submitted to any network node
2. **Initial Validation**: Basic validation (signature, format, balance)
3. **Mempool Insertion**: Addition to local mempool if valid
4. **Gossip Protocol**: Propagation to connected peers
5. **Consensus Inclusion**: Selection for inclusion in next block
## 3. Economic Model
### 3.1 Tokenomics
#### 3.1.1 MOVE Token
The native MOVE token serves multiple purposes including ***transaction fees*** for payment of transaction execution and storage, ***staking*** for validator staking and network security, ***governance*** for voting on protocol upgrades and parameters, and ***incentives*** for rewards to validators and network participants.
#### 3.1.2 Token Distribution
<TokenDistributionChart />
<CumulativeVestingChart />
#### 3.1.3 Fee Structure
Transaction fees are calculated based on resource consumption:
```rust
// Note: This is a simplified pseudocode representation.
// Fee model: gas unit price × gas used, minus storage refund
struct GasSchedule {
instruction_costs: HashMap<Opcode, Gas>,
storage_costs: StorageGasSchedule,
}
fn calculate_fee(gas_used: Gas, gas_unit_price: Octa, storage_refund: Octa) -> Fee {
gas_used * gas_unit_price - storage_refund
}
```
#### 3.1.4 Staking Mechanism
Validator staking follows these principles including ***minimum stake*** requirements for validator participation, ***delegation*** allowing token holders to delegate stake to validators, ***rewards*** with proportional rewards based on stake and performance, and ***slashing*** defined in protocol but not active on mainnet as of 2025.
#### 3.1.5 Fee and Staking reward flow
Stakers (and delegated stakers) receive rewards from the Reward-and-Gas-Pool.
This pool has two inflow streams. First, fees are collected directly into the pool, paving a natural way for a sustainable reward model. Second, the pool is funded by the staking reward treasury, which refills regularly.
To enhance the security of the network, the staking reward treasury delegates stakes. Since rewards are returned to the treasury, this does not contribute to the circulating supply, nor does it reduce runway. The rewards returned to the treasury also add to the longevity of the pool, driving a more sustainable model long term. Since the staking reward treasury reduces over time through payouts to the Reward-and-Gas-Pool, the treasury's influence on governance and operation will also reduce over time.
This design has two advantages. First, in the bootstrapping period, the treasury provides critical security to the network. Second, as the network and token distribution mature, the necessity for such a bootstrapping pool becomes less important, and its continuous reduction gradually opens the path to full ownership by the community.
<TokenomicsFlowDiagram />
### 3.2 Governance Model
#### 3.2.1 On-Chain Governance
Governance decisions are made through on-chain voting with ***proposal submission*** allowing stakeholders to submit governance proposals, ***voting periods*** with time-bounded voting on active proposals, and ***execution*** with automatic execution of approved proposals.
#### 3.2.2 Parameter Management
Key network parameters can be adjusted through governance including ***gas prices*** for base gas price and fee structure, ***block parameters*** for block size, time, and transaction limits, ***staking parameters*** for minimum stake, reward rates, and slashing conditions, and ***network configuration*** for validator set size and consensus timeouts.
## 4. Security Analysis
### 4.1 Threat Model
#### 4.1.1 Network Attacks
Protection against various network-level attacks includes ***DDoS attacks*** with rate limiting and traffic analysis, ***eclipse attacks*** through peer diversity and connection management, ***sybil attacks*** via Proof-of-Stake and identity verification, and ***long-range attacks*** using checkpointing and weak subjectivity.
#### 4.1.2 Consensus Attacks
Safeguards against consensus-level attacks include ***nothing-at-stake*** protection with economic penalties for equivocation, ***supermajority (≥ 2/3 voting-power capture)*** deterrence through high economic cost and provable misbehavior penalties, ***grinding and leader manipulation*** reduction via a deterministic stake-weighted leader schedule, and ***bribe attacks*** prevention through accountability of votes and misbehavior proofs.
#### 4.1.3 Smart Contract Security
Move language features enhance smart contract security through a ***resource model*** that prevents double-spending and asset duplication, ***type safety*** with compile-time prevention of common vulnerabilities, ***access control*** with fine-grained permission and capability systems, and ***formal verification*** support for mathematical proofs of contract correctness.
### 4.2 Cryptographic Primitives
#### 4.2.1 Digital Signatures
M1 uses Ed25519 signatures for ***transaction authentication*** providing proof of transaction authorization, ***validator signatures*** for consensus vote authentication, ***message integrity*** for P2P message authentication, and ***multi-signatures*** via Multi-Ed25519 threshold schemes.
#### 4.2.2 Hash Functions
SHA-3 (Keccak) is used throughout the system for ***block hashing*** with unique block identification and in the ***Jellyfish Merkle Tree*** for authenticated state and transaction commitments. Consensus uses deterministic leader selection; there is no proof-of-work or random beacon.
### 4.3 Audit and Verification
#### 4.3.1 Code Audits
Regular independent security audits ensure system integrity covering the ***core protocol*** including consensus and networking components, ***MoveVM implementation*** for the virtual machine and execution engine, ***cryptographic libraries*** for all cryptographic implementations, and ***smart contracts*** including system contracts and modules.
#### 4.3.2 Formal Verification
Mathematical verification of critical components includes ***consensus safety*** with formal proofs of consistency for the underlying Jolteon protocol and ***Move semantics*** with automated verification of language safety properties through the Move Prover. Incentive economics and governance-driven upgrades are not subject to the same level of formal proof.
## 5. Development Ecosystem
### 5.1 Developer Tools
#### 5.1.1 Movement CLI
Comprehensive command-line interface:
```bash
# Note: This is a simplified pseudocode representation.
# Create new Move project
movement init my-project
# Compile Move modules
movement build
# Deploy to testnet
movement deploy --network testnet
# Run local testnet
movement node run-local
# Interact with deployed contracts
movement call --function transfer --args 0x123 100
```
#### 5.1.2 IDE Integration
Support for popular development environments:
* **VS Code Extension**: Syntax highlighting, debugging, IntelliSense
* **IntelliJ Plugin**: Full IDE support with advanced features
* **Language Server**: Language Server Protocol for editor integration
* **Web IDE**: Browser-based development environment
#### 5.1.3 Testing Framework
Comprehensive testing infrastructure:
```move
// Note: This is a simplified pseudocode representation.
#[test]
public fun test_transfer() {
let sender = @0x1;
let receiver = @0x2;
let amount = 100;
// Setup test environment
let state = create_test_state();
// Execute transfer
let result = transfer(sender, receiver, amount);
// Verify results
assert!(result.success, 1);
assert!(balance_of(receiver) == amount, 2);
}
```
***
*This protocol specification is a living document and will be updated as M1 continues to evolve and mature.*
# Staking and Delegation
URL: /general/l1/staking
This document explains how staking and delegation work on M1, including stake lifecycle states, delegation pools, reward distribution, and the synchronization mechanism.
## Stake States (Lifecycle)
Staked tokens progress through different states during their lifecycle:
<StakeLifecycleDiagram />
**State Descriptions**
* **pending\_active** — Just deposited; will become active next epoch
* **active** — Earning staking rewards
* **pending\_inactive** — Delegator requested unlock; waiting for lockup to expire. Still earns rewards during the lockup duration!
* **inactive** — Lockup expired; can be withdrawn
**Key point:** `pending_inactive` still earns rewards until the lockup period ends.
## Shares vs Tokens: How Delegation Pools Work
When staking to a delegation pool, delegators receive **SHARES** rather than holding tokens directly. Shares represent proportional ownership of the pool's total token balance.
**Key Definitions**
* **SHARES** — Unit of ownership in the pool (delegator shares count stays constant)
* **SHARE PRICE** — `total_tokens / total_shares` (increases as rewards accumulate)
* **VALUE** — `shares × share_price` (a delegator's stake worth in TOKEN)
**What Happens to a Delegator After Rewards**
<SharesComparisonDiagram />
* Delegator shares count stays constant (e.g., 100 shares → 100 shares)
* But share PRICE increases (e.g., 1.00 → 1.05 TOKEN/SHARE)
* So delegator VALUE increases (100 × 1.00 = 100 TOKEN → 100 × 1.05 = 105 TOKEN)
See [The Gap](#the-gap) section for a detailed example showing how 5.5 tokens total rewards (5 tokens to user after 0.5 token commission) result in a share price increase from 1.0 to 1.05 TOKEN/SHARE.
**Reward Distribution Process**
When the pool earns staking rewards:
1. **Commission deducted** — The operator's commission percentage is calculated from the gross rewards.
2. **Remainder added to pool** — The net rewards (after commission) are added to `total_tokens` while `total_shares` remains constant, causing the share price to increase.
3. **Operator mints new shares** — The operator uses their commission to buy shares at the new (post-appreciation) share price.
This ordering ensures the operator cannot benefit from appreciation on rewards they didn't earn.
**Benefits**
* O(1) gas cost for reward distribution
* Proportional allocation without per-account calculations
* Reduced rounding errors
## Architecture: StakePool and DelegationPool
These are two separate structs stored at the same address (the resource account address):
<DelegationPoolDiagram />
### StakePool
A separate struct holding actual tokens. Earns rewards from consensus. Can only have ONE owner (the delegation pool's resource account).
**Fields:**
| Field | What it contains | Earns rewards |
| ------------------ | ------------------------------------ | ------------- |
| `active` | Stake participating in consensus | ✅ Yes |
| `pending_active` | Added this epoch, active next epoch | ❌ No |
| `pending_inactive` | Unlocked, waiting to be withdrawable | ✅ Yes |
| `inactive` | Ready to withdraw | ❌ No |
**Total stake** = `active` + `pending_active` + `pending_inactive` + `inactive`
### DelegationPool
The main struct that tracks ownership via shares. Contains `pool_u64::Pool` instances (generic share-tracking pools) that map delegator addresses to their share balances.
**Shares Pools:**
1. **active\_shares** (`pool_u64::Pool`)
* Tracks: `StakePool.active` + `StakePool.pending_active`
* One pool for all active stake
2. **inactive\_shares** (`Table<ObservedLockupCycle, pool_u64::Pool>`)
* Tracks: `StakePool.pending_inactive` (until lockup expires)
* One pool per lockup cycle
* When lockup ends, `pending_inactive` → `inactive`
**Why Two Types of Shares Pools?**
* **Different lifecycles:** active can receive deposits; pending\_inactive cannot
* **Multiple lockup cycles:** each cycle has its own pending\_inactive pool
* **Divergent share prices:** slashing could affect one pool but not the other
* **Withdrawal timing:** only pending\_inactive becomes withdrawable after lockup
**Why Two Structs?**
A StakePool supports only one owner. The DelegationPool wraps it to allow multiple delegators, tracking each person's ownership via shares inside `pool_u64::Pool` instances.
Think: StakePool = vault with cash. DelegationPool = ledger of who owns what percentage of that cash.
## Synchronization and the Gap
The delegation pool uses **lazy synchronization** — no automatic sync at epoch end.
<LazySyncDiagram />
**What Triggers Sync**
* ✅ `add_stake()` — User adding stake
* ✅ `unlock()` — User unlocking stake
* ✅ `withdraw()` — User withdrawing
* ✅ `synchronize_delegation_pool()` — Anyone can call (public)
* ❌ Epoch ends — no automatic sync
**At Epoch End**
1. Rewards go to `StakePool.active` and `StakePool.pending_inactive`
2. `DelegationPool` shares pools are not updated (stale)
3. Commission is not calculated yet
### The Gap
The "gap" is the difference between:
* **StakePool value:** actual tokens in `StakePool.active` (or `pending_inactive`)
* **Shares pool value:** `active_shares.total_coins` (or `inactive_shares[cycle].total_coins`)
This gap represents unsynchronized rewards waiting to be distributed to delegators (via share price increase) and operator (via commission).
<GapDiagram />
### Sync Process
For each shares pool (`active_shares` and `pending_inactive_shares`):
1. Calculate gap: `gap = stake_pool_value - pool.total_coins`
2. Calculate commission: `commission = gap × commission_rate`
3. Update shares pool: `pool_u64::update_total_coins(pool, stake_pool_value - commission)`
* This increases share price for delegators
4. Ope프로젝트로 돌아가기