Mosaic: Client-driven Account Allocation Framework in Sharded Blockchains

Yuanzhe Zhang, Shirui Pan, Jiangshan Yu

TL;DR

Mosaic is a novel framework that moves the responsibility of account allocation in sharded blockchains from miners to clients. By allowing users to independently choose their shards using a lightweight algorithm called Pilot, the system achieves a four-order-of-magnitude reduction in computation time with only a negligible (~5%) increase in cross-shard transactions.

What Problem Does This Paper Address?

Scalability is the "holy grail" of blockchain research. Sharding—dividing a blockchain into parallel processing units—is the leading solution, but it has a major Achilles' heel: cross-shard transactions. When a transaction involves accounts in two different shards, it requires expensive, multi-round consensus that slows the whole system down.

To fix this, researchers previously proposed "miner-driven" allocation. In these models, miners analyze the entire global transaction graph to reshuffle accounts into shards that minimize cross-shard interactions. However, this approach has three massive flaws:

  1. Resource Intensity: Miners must store and process the entire ledger (terabytes of data) to run these optimizations.
  2. Lack of Incentives: Miners have no direct financial reason to perform these heavy computations.
  3. Rigidity: These systems require deterministic global algorithms, leaving no room for probabilistic optimizations or individual user preferences.

Methods

The authors introduce Mosaic, the first client-driven account allocation framework. Instead of a central authority (miners) deciding where everyone lives, Mosaic lets clients decide for themselves.

The Mosaic Framework

Clients monitor their own transaction patterns and the current workload of different shards. If a client realizes they would be better off in a different shard, they submit a "migration request" to a central beacon chain. During periodic "epoch reconfigurations," miners sync with the beacon chain to update the account-to-shard mapping.

The Pilot Algorithm

To help clients make these decisions, the authors designed Pilot, a reference algorithm that optimizes for two things:

  • Interaction Distribution: "Who do I talk to most?" Pilot tries to put the client in the same shard as their frequent counterparties to turn cross-shard transactions into faster intra-shard ones.
  • Workload Distribution: "Is this shard too crowded?" Pilot steers clients away from congested shards to avoid high fees and long confirmation latencies.

The beauty of Pilot is its simplicity. It uses a "Potential" function that allows a client to calculate their optimal shard using only their own transaction history and a small vector representing the current load of each shard.

Datasets

The researchers evaluated Mosaic using a massive, real-world dataset:

  • Ethereum Mainnet Data: Over 91 million transactions and 12 million accounts.
  • Timeframe: Blocks 10,000,000 to 10,600,000 (roughly three months of activity).
  • Setup: 90% of the data was used for initial allocation, with the remaining 10% used to evaluate how well the system handled new transactions and migrations over 200 "epochs."

Key Insights and Ideas

  • Selfishness is Efficient: The most striking insight is that when individual clients act "selfishly" to reduce their own fees and latency, the global system reaches an equilibrium that is nearly as efficient as a top-down, global optimization.
  • Data Sparsity as a Feature: A miner-driven approach requires a global view of the transaction graph (gigabytes of input). A client-driven approach only requires the client to know their own history (a few hundred bytes). This makes the optimization "lightweight" enough to run on a mobile wallet.
  • Incentive Alignment: Mosaic solves the "miner incentive" problem by shifting the work to the party that actually benefits from it: the user.

Key Results

The performance gains are dramatic, particularly regarding efficiency:

  • Computational Speedup: Pilot is four orders of magnitude faster than state-of-the-art miner-driven algorithms (like TxAllo). It executes in roughly 20 microseconds, compared to nearly a second for global methods.
  • Storage Reduction: The input data required for allocation dropped from 1.44 GB (per miner) to just 228.66 bytes (per account).
  • Minimal Trade-off: Despite being decentralized and local, Pilot only saw a ~5% increase in the cross-shard transaction ratio compared to global optimizers.
  • Throughput: The system maintained approximately 98% of the throughput achieved by heavy-duty global optimization methods.

Limitations and Future Work

  • Privacy Concerns: To optimize perfectly, a client might use "future knowledge" of their intended transactions. The authors acknowledge this could leak information about who a user intends to interact with, though they argue that only the shard is revealed, not the specific account.
  • Game Theory: The paper assumes clients act independently. In the real world, groups of users or decentralized apps (dApps) might coordinate migrations. The authors suggest that future research into the game-theoretical aspects of coordinated shard migration is necessary.
  • DoS Protection: While transaction fees on the beacon chain prevent spamming migration requests, the impact of "migration storms" during high volatility remains an area for further stress testing.

Summary updated

BibTeX
@inproceedings{zhang2025mosaic,
  author = {Yuanzhe Zhang and Shirui Pan and Jiangshan Yu},
  title = {{Mosaic: Client-driven Account Allocation Framework in Sharded Blockchains}},
  booktitle = {ICDCS},
  year = {2025},
  url = {https://openreview.net/forum?id=nIjHQndWTU},
}

Loading related content...

Figure