AlphaCOLLAB runs on GenesisL1 mainnet and has had no external audit. Use small amounts.Security notes

COLLAB

Gas reference

This page gathers what COLLAB's transactions cost in gas, as measured for release 2.2, and the formula the web app uses when a transaction is too large for a node to estimate. It is for developers who send COLLAB transactions from their own code, for reviewers, and for anyone who wants the numbers behind the fee review in the app. Members will find the short version in Costs and gas.

Part
Developers
Version
COLLAB 2.2.0
Updated
Reading time
9 min

GenesisL1's rules

RuleValueConsequence
Block gas limit1,000,000,000every COLLAB transaction fits a block, the largest creation included; local chains start anvil with --gas-limit 1000000000
Base fee50 gwei, the figure every cost here uses1,000,000 gas costs 0.05 L1
Gas scheduleLondon rulesa new 32-byte storage word costs 22,100 gas, a rewritten or cleared one at most 5,000
Estimate capeth_estimateGas and eth_call stop at the node's json-rpc gas cap, 25,000,000 by defaultabove it a wallet cannot estimate: the transaction needs an explicit gas limit
Chargemax(gasUsed, gasLimit / 2), even when the transaction revertsa failure pays at least half the limit it was sent with

The last rule is Ethermint's minimum gas multiplier of 0.5, seen in GenesisL1 mainnet receipts during the 2.2 contract review (RV22-1). Explicit limits therefore matter: a limit far above what a transaction needs costs nothing when it succeeds, since gasUsed is then above half the limit, but costs half of it when it fails.

Measured gas

Measured on November 1, 2026 on anvil (chain 29, block gas limit 1,000,000,000, London schedule), each write its own transaction. "Limit" is eth_estimateGas, the smallest gas limit that works; it is above gasUsed for big writes, because nested calls forward only 63/64 of their gas and refunds for cleared words come back only at the end. Logos are random PNG bytes. "ASCII" text is prose with tabs and newlines; "adversarial" text has a 2-byte letter every 30 bytes, so no 32-byte window takes the fast path (the slowest text to check).

TransactionLimitgasUsed
createDAO, no logo, no description5,427,3465,427,346
createDAO, 4 KB logo + 1 KB description9,164,0109,164,010
createDAO, 64 KB logo + 16 KB description65,267,78163,850,801
createDAO, 64 KB logo only53,053,50752,006,663
createDAO, 16 KB description: ASCII / CJK / accented Latin / adversarial17,251,108 / 19,629,680 / 20,345,563 / 20,420,40217,251,108 / 19,593,864 / 20,287,546 / 20,360,075
createDAO, worst case: 512 KB logo + 256 KB ASCII description587,697,589570,494,853
createDAO, worst case with adversarial text639,052,179620,257,186
setLogo by a representative: 64 KB over 64 KB, every word differs11,702,92411,537,131
… the same 64 KB again5,875,4935,799,931
… 16 KB over 64 KB / 64 KB over 16 KB10,854,391 / 38,385,7708,551,468 / 37,802,227
… a first 64 KB logo / removing a 64 KB logo47,319,741 / 10,576,58546,597,431 / 8,329,388
setDescription by a representative: 16 KB, one word differs / every word differs1,663,050 / 6,226,6021,640,798 / 6,128,235
… removing a 16 KB description2,679,5662,109,820
submitProposal: Signal, no actions, no description316,125306,631
… with a 16 KB / 64 KB proposal description4,081,421 / 15,129,7104,017,247 / 14,905,459
… Representatives & profile: setLogo 4 KB / setLogo 64 KB + setDescription 16 KB440,288 / 2,486,273429,908 / 2,463,790
… Representatives & profile: setLogo 512 KB + setDescription 256 KB (above the 25M cap)27,305,90527,091,724
castVote132,712131,050
execute: a first 4 KB logo / a first 64 KB logo + 16 KB description3,320,849 / 61,837,2013,061,096 / 58,661,210
execute: a first 512 KB logo + 256 KB description603,597,652570,636,022
execute: rewrite a 64 KB logo, every word differs12,608,26611,726,942

At 50 gwei: a DAO without logo or description costs about 0.27 L1, one with a 64 KB logo and a 16 KB description about 3.2 L1, a vote about 0.0066 L1, and a representative's rewrite of a 64 KB logo about 0.58 L1. Real 128 × 128 logos are usually 5 to 30 KB.

ProfileGasTest in test/Profile.t.sol reports creation figures close to this table, but measures its edits inside the transaction that created the DAO, where rewritten words count as already written, so its edit figures are about half the real cost (RV22-2). Use this table for edits.

Above the estimate cap

These need an explicit gas limit, because a node stops estimating at 25,000,000:

  • a createDAO with more than about 25 KB of logo and description together (about 20 KB when the text is not ASCII); each new 32-byte word adds about 23,000 gas to the 5.4M base;
  • an execute, or a representative's write, of more than about 33 KB of new words (rewrites cost about a quarter as much);
  • removing a logo or description of more than about 150 KB;
  • a submitProposal near the maximum: about 0.7 MB of action data, or big actions with a long proposal description.

A node whose operator set a per-transaction gas cap below these figures refuses them; send them through another RPC.

The gas-limit formula

The web app uses this formula only when eth_estimateGas fails at the node's cap without a revert (an "out of gas" or "gas required exceeds allowance" answer); below the cap, the estimate with the usual margin is better. The constants are GAS and MARGIN in web/js/core/daoprofile.js, and every row of the measured table was checked against them: the formula gives 1.07 to 1.24 times the smallest working limit, more only where it assumes every word changes.

  • w(n) = ceil(n / 32), the 32-byte words of n bytes.
  • Store(N, O), writing N bytes over O stored bytes (O from logoInfo or descriptionInfo): 22,100 × max(0, w(N) − w(O)) + 5,000 × min(w(N), w(O)) + 5,000 × max(0, w(O) − w(N)), plus 44,200 when O = 0 and N > 0, else 10,000 (the length and hash slots).
  • Proc(N) = 1,000 × w(N) for a logo or an all-ASCII text, 8,000 × w(N) for any other text.
  • Write(N, O) = Store(N, O) + Proc(N) + 20,000.
TransactionGas limitFunction
createDAO1.10 × (E + Σ Write(N, 0)) over a non-empty logo and description; E is eth_estimateGas of the same call with both empty (about 5.43M, GAS.createEmpty when it cannot be estimated)createGasLimit
execute1.10 × (400,000 + 100,000 × A + Σ Write(N, O) + 20 × P + (P / 32)² / 100) over its setLogo and setDescription actions; A actions, P bytes of action dataexecuteGasLimit
a representative's setLogo or setDescription1.10 × (60,000 + Store(N, O) + Proc(N))directGasLimit
submitProposal1.10 × (350,000 + 25,000 × A + 26 × P + (P / 32)² / 75), plus 1.10 × (100,000 + 230 × D) for a description of D bytessubmitGasLimit

The quadratic terms are memory: the actions are copied in the governor's and the treasury's frames. Other heavy actions in an execute need their own allowance. Every limit is capped at 990,000,000 (GAS_CEILING). The largest the formula gives are about 694M (createDAO with adversarial text) and about 712M (an execute of the maximum with adversarial text, extrapolated), and the wallet must hold gasLimit × maxFeePerGas to send them: about 35 L1 at 50 gwei.

A worked example, createDAO with a 64 KB logo and a 16 KB ASCII description:

logo:        Write(65,536, 0) = 22,100 × 2,048 + 44,200 + 1,000 × 2,048 + 20,000 = 47,373,000
description: Write(16,384, 0) = 22,100 × 512 + 44,200 + 1,000 × 512 + 20,000    = 11,891,400
limit = 1.10 × (5,427,346 + 47,373,000 + 11,891,400)                          = 71,160,921

The smallest limit that works is 65,267,781, so the margin is 9 %; the transaction uses 63,850,801 gas and pays that.

The web app's composer does not simulate a proposal whose profile writes need more than 20,000,000 gas (ESTIMATE_SAFE) and says why. send() in web/js/core/wallet.js takes an explicit gasLimit, still runs the preflight, and uses the limit only when the estimate failed at the cap.

What a failure costs

A transaction that fails pays half its gas limit on GenesisL1, and some failures are caused by someone else:

CaseLimitPaid on failure
the largest createDAO (512 KB + 256 KB ASCII) loses its slug to a creation mined firstabout 631Mabout 315M gas, 15.8 L1
a createDAO with a 64 KB logo and 16 KB description loses its slugabout 71Mabout 35.6M gas, 1.8 L1
the second of two executions of one large proposal in a blockup to 712Mup to about 356M gas
the front-runner's cheapest creation, for comparisonabout 5.4M gas, 0.27 L1

A creation that loses its slug reverts SlugTaken at once, after about 12.6M gas of calldata for the largest one, but is charged half its limit. An execution that runs out of gas pays its whole limit, as on any EVM chain; that can happen when a representative enlarged the logo between your estimate and the block, leaving more words to clear than counted. The app shows failureLine() with every transaction it sends with its own limit, checks the web address again just before the wallet opens, and reads state(id) again just before a large execute. A commit–reveal slug reservation and a two-step creation (the DAO first, then its logo and description uploaded by its creator as a representative) are future work, not in 2.2.

Store(0, O) counts 5,000 gas for every cleared word, before refunds. London refunds at most a fifth of the gas used, and only at the end of the transaction, so the limit must cover the full cost:

WriteSmallest limitCharged
removing a 512 KB logoabout 83M (82,879,271)about 66M (66,303,417)
removing a 64 KB logo10,576,5858,329,388
removing a 16 KB description2,679,5662,109,820

Removing more than about 150 KB is above the estimate cap; the formula then gives the limit (about 90M for a 512 KB logo by a representative).

Reads and history

  • A full 16 KB logoChunk or descriptionChunk costs about 1.2M gas in eth_call, so a 512 KB logo is 32 calls, each far below the cap.
  • DAOLens.directory costs about 70,000 gas per DAO, cold: 200 entries with the longest fields take 13.1M. getDAOs with 200 such summaries takes 23.6M, which is why its pages stay at 100 or less (page sizes).
  • An edit by proposal puts the bytes into the chain's history three times (the submit calldata, the ProposalSubmitted event, the execute calldata); a representative's edit puts them in once. Prefer a representative for large edits.

Deploying the protocol

The admin page's Deploy tab sends the 20 creations with the estimate × 1.2 + 20,000 as their limits. Measured on the 2.2 bundle: the largest creation (the DAOGovernor implementation) uses 4,631,659 gas, the largest limit sent is 5,577,990, and all 20 take 42,931,071 (the release rehearsal measured 42,953,788 on its own test chain), so every creation stays below the 25M cap. Deploy the protocol from /admin covers the operator's side.