fahimahmedx/b20-benchmark — explained in plain English
Analysis updated 2026-05-18
Compare gas costs between Base's native B20 token standard and a Solidity reference implementation.
Decide whether to use native B20 or a custom Solidity token contract for a project on Base.
Study how zero-to-nonzero versus nonzero-to-nonzero storage writes affect gas costs on Base.
Reproduce the benchmark's methodology to test other token operations or configurations.
| fahimahmedx/b20-benchmark | 0xlocker/d17-contracts | agus-ops/amphi | |
|---|---|---|---|
| Stars | 1 | 1 | 0 |
| Language | Solidity | Solidity | Solidity |
| Setup difficulty | hard | hard | hard |
| Complexity | 4/5 | 5/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Base's custom Foundry build with native B20 dispatch enabled, not standard Forge, to run the native comparisons.
This repository is a benchmarking project that answers one specific technical question: how much computational cost, measured in a blockchain unit called gas, does Base's native B20 token standard use compared to a standard Solidity-based token implementation. B20 is a token standard built into the Base blockchain itself, an alternative to writing token logic entirely in Solidity smart contract code the way most tokens, such as the widely used ERC-20 standard, are built. The project measures four common token operations, transferring tokens, approving another address to spend them, transferring on someone else's behalf, and minting new tokens, each under several different starting conditions, such as whether the recipient already has a balance or not. It compares three implementations: Native B20 running through Base's built-in precompiled code, Base's own official Solidity reference implementation of B20, and a simple OpenZeppelin-based ERC-20 contract included as a familiar point of comparison, though it has fewer features than B20 and is not treated as a direct competitor. The results, presented as charts and tables, show that Native B20 used less gas than the Solidity reference implementation in every tested scenario, with savings ranging from about three to seventeen percent depending on the operation. The README is careful to list what this benchmark does not cover, including token creation costs, optional B20 features like pausing or permits, and real network transaction fees, and it explains in detail the technical steps taken to make sure each implementation was measured fairly using the same underlying testing tool. This is a specialized research and tooling repository for blockchain developers evaluating Base's token standards, built using Solidity and Foundry testing tools, with raw and summarized benchmark data included as CSV and JSON files.
A gas-cost benchmark comparing Base's native B20 token standard against a standard Solidity ERC-20 implementation across common token operations.
Mainly Solidity. The stack also includes Solidity, Foundry, Base.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.