Docs
/
Protocol

Gas and cost model

What each action costs, where the cost comes from, and why the numbers are modelled rather than measured on a live network.

Gas is fixed, price is not

Gas is measured; the money is not. The gas figures come from the test suite and from EVM cost rules, so they are accurate. What they cost in currency depends entirely on the gas price and the BNB price at the moment you send, so treat any amount here as an order of magnitude.

Where the cost comes from

Three EVM prices explain almost the entire cost model.

OperationGasEffect on bMail
Writing a fresh 32-byte storage slot20,000Kept for small structural facts only
Event log data, per byte8Carries every message body
Event topic375Three indexed topics make inbox filtering cheap
Base transaction21,000The floor under any action

Message cost by size

MessageEnvelopeApprox. gasNotes
One line~0.5 KB~55,000Padded to the 256-byte block
Short note~1 KB~74,000The reference figure
Long email~4 KB~110,000At the free-envelope threshold
Maximum32 KB~330,000MAX_ENVELOPE_BYTES

The envelope is roughly twice the plaintext, because every message carries two ciphertexts: one for the recipient and one so the sender can read their own sent copy. Padding to 256-byte blocks adds a little more.

Other actions

ActionApprox. gasFee on top
Register a name, 5+ characters~150,000 to 250,000None. Gas only.
Register a name, 3 to 4 characters~150,000 to 250,000price3 / price4
Rotate a key~50,000None
Set a stamp price~30,000None
Claim or refund one stamp~45,000None
Two-step transfer, both halves~90,000None
Reading any mail0Reads are log queries, not transactions
Receiving is always free

Only the sender pays. Reading your inbox is a filtered log query against an RPC node and costs nothing on chain.

Why two chains

BSC carries the liquidity and the recognition. opBNB carries the cost profile that makes routine messaging feel free. Deploying to both lets a user choose between the two without changing identity, since the mailbox key derivation deliberately excludes chainId.

Relative cost of a 1 KB message BSC cents, not dollars opBNB a small fraction of a cent Bars show relative magnitude only. Actual cost tracks the gas price at send time.
Figure 7. Identity is shared across both networks; cost is not.

What large attachments would need

32 KB is a hard ceiling in the contract. Anything larger belongs off chain, with only a reference and a content key inside the envelope. BNB Greenfield is the intended target for that, and it is not part of v1.

bMail is an independent, community-built project. It is not affiliated with, endorsed by, or operated by Binance or BNB Chain.