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

COLLAB

Name, web address, logo and description

Every DAO has four public marks: a title, a web address, a logo and a description. The title and the web address are set when the DAO is created and never change. The logo and the description live in the DAO's profile contract and are rewritten in place when they change. This page gives the exact rules for each, how they are edited and what edits cost, and how COLLAB tells apart two DAOs with the same name. It is for founders, representatives and members who want to be sure which DAO they are looking at.

Part
Using COLLAB
Version
COLLAB 2.2.0
Updated
Reading time
9 min
The overview of a demo DAO, Open Proteomics Collective
A DAO's masthead: its logo, its permanent name, the start of its description and its web address

The title is permanent

The title, which pages call the DAO's name, is chosen in the creation wizard and stored by the DAO's profile contract. It takes 1 to 80 bytes of well-formed UTF-8, with none of the control characters below the space and no DEL. The contract has no function to change it: no vote, representative or anyone else can rename a DAO, and the composer and the DAO's settings say so ("The name is permanent.").

Titles are not unique. Two DAOs may have the same title, or titles that look the same, so the title alone never identifies a DAO; see Another DAO has this name. The contract accepts some characters that can mislead on screen, such as invisible characters and right-to-left controls. COLLAB removes invisible characters when it shows a title, and displays every name isolated from the text around it, so it cannot reorder that text.

The web address

Each DAO has a web address, its slug, chosen at creation: /dao/open-proteomics-collective on the site, for example. The masthead of every DAO page shows it as a pill, /dao/<web address>: "Its web address: permanent, and no other DAO can have it".

The factory enforces the rules:

  • 3 to 48 characters;
  • only lowercase letters a to z, digits 0 to 9 and hyphens;
  • a letter first;
  • no double hyphen, and no hyphen at the end;
  • unique: the factory refuses a web address another DAO already has, and names that DAO.

A web address never changes and is never reused. Because it starts with a letter, it can never be confused with an address: the DAO's treasury address works too, as /dao/0x…, and the page then moves to the web address, keeping the section, the query and the anchor. A web address typed with capital letters is lowercased. One that no DAO has shows "No COLLAB DAO is called “…”."

A web address can be taken first

Web addresses are first come, first served, and creating a DAO is one public transaction. Someone who watches pending transactions can send a creation with the same web address before yours is included. Yours then fails, and on GenesisL1 a failed transaction still pays at least half its gas limit. A creation that carries a large logo and description has a large gas limit, so losing the race is expensive:

Your creationGas limitA failure costs aboutAt 50 gwei
64 KB logo and 16 KB descriptionabout 71 million35.6 million gas1.8 L1
512 KB logo and 256 KB description, the maximumabout 631 million315 million gas15.8 L1

The cheapest creation that takes your address costs the other side about 5.4 million gas, 0.27 L1 at 50 gwei.

The wizard limits the risk: it checks the address as you type, again before the constitution is uploaded and once more right before your wallet opens, and its fee panel states what a failure would cost. To keep the stake small, create the DAO with a small logo and description, or none, and name yourself a representative with Edit the description and Change the logo in step 5, with a short term if you like; then upload the full versions from the DAO's Settings once it exists. A reservation of web addresses that cannot be taken first is planned, and is not in 2.2. See Known limitations.

A logo is a PNG of exactly 128 × 128 pixels, at most 512 KB (524,288 bytes). Empty bytes mean no logo, and the DAO then shows a molecule drawn from its address. The contract checks the PNG's header and refuses anything else:

  • the PNG signature;
  • the first chunk is IHDR, 13 bytes long;
  • a bit depth that is valid for the colour type (greyscale 1, 2, 4, 8 or 16; truecolour 8 or 16; indexed 1, 2, 4 or 8; greyscale with alpha and truecolour with alpha 8 or 16);
  • compression method 0, filter method 0, and interlace 0 or 1;
  • the standard IEND chunk at the very end;
  • width and height of 128 (WrongLogoSize).

Nothing else in the file is checked, so COLLAB shows a logo only as an image, never as markup. The creation wizard, the profile proposal and the representatives' tools all use the same editor: any image your browser can open becomes a 128 × 128 PNG, the smallest of a palette, a truecolour and the browser's own encoding, and the editor shows its size against the limit. A 128 × 128 logo is small: the demo DAOs' logos take 1.8 to 4.3 KB. Create a DAO describes the editor.

The logo is kept in the profile contract's own storage, not in TextStore. Pages read it in pieces of at most 16 KB, check it, and only then show it. On a COLLAB server they first try the site's copy at /data/logos/<hash>.png, which the server's prerender job writes; either way the bytes must hash (keccak256) to the hash the contract reports, or the logo is not shown.

The description

A description is Markdown text of up to 256 KB (262,144 bytes), shown in the About card of the DAO's overview, and its opening words under the name in the masthead. The contract accepts well-formed UTF-8 and refuses the control characters below the space except tab and line feed, so a carriage return is refused: the editor turns Windows and old Mac line breaks into line feeds and leaves out other control characters, saying how many. Empty bytes clear the description.

It is stored the same way as the logo, in the profile's own storage, and read in pieces of at most 16 KB, or from the site's copy at /data/texts/<hash>.txt. A description is shown only when it matches its keccak256 hash; the overview says "Stored in the DAO's profile on chain; the text matches its keccak256 hash." When it cannot be read and checked, the page says so instead of showing an unchecked text. Markdown is rendered with raw HTML and images switched off, so a description cannot run script or load anything from elsewhere.

Two routes change the logo, the description and the links. Both write the same contract.

By a representative

A representative with the matching permission (Edit the description, Change the logo or Edit links) edits directly in the DAO's Settings, under Your representative tools: Save the description, Save the logo or Save links. It takes one transaction, needs no vote, and records the representative's address. The tool shows the network fee and, for a large write, what a failure would cost. See Representatives.

A representative's profile tools in a DAO's Settings: the description and the logo
A DAO's Settings section, with Your representative tools and the description editor

By proposal

Any member with enough voting power can propose a change with a Representatives & profile proposal: Replace the description, Replace the logo or Edit links. These use the standard rules. The new bytes travel in the proposal, and the profile is rewritten when it executes. The builders show the change, line by line for a description, and the gas of executing it. When a proposal writes more than RPC nodes can estimate, it is not simulated, and Execute proposal sets the gas limit itself; see Proposals and voting.

What an edit stores

Replaced in place. "Saving overwrites the logo stored in the DAO's profile contract, so its state on chain does not grow with each edit. Earlier versions remain only in the chain's transaction history." An edit reuses the same storage words, and a shorter value clears the old tail.

The history keeps every version. The bytes of every edit stay in the chain's transaction history. A representative's edit puts them there once. An edit by proposal puts them there three times: in the submission, in its event and in the execution. For large edits, prefer a representative.

Events carry no bytes. Each change emits LogoChanged or DescriptionChanged with the new hash and length only, and the profile records when it was last edited and by whom.

What edits cost

Writing a new 32-byte word of storage costs 22,100 gas; rewriting or clearing one costs at most 5,000. So a first logo costs much more than replacing one, and changing a few words of a description costs little. These are measured on GenesisL1's rules; the costs at 50 gwei, where one million gas costs 0.05 L1, are for comparison:

EditGas usedAt 50 gwei
Representative: a first 64 KB logo46,597,431about 2.33 L1
Representative: a 64 KB logo over a 64 KB logo, every word different11,537,131about 0.58 L1
Representative: the same 64 KB logo again5,799,931about 0.29 L1
Representative: a 16 KB logo over a 64 KB one8,551,468about 0.43 L1
Representative: removing a 64 KB logo8,329,388about 0.42 L1
Representative: a 16 KB description, one word changed1,640,798about 0.08 L1
Representative: a 16 KB description, every word changed6,128,235about 0.31 L1
Representative: removing a 16 KB description2,109,820about 0.11 L1
Proposal: submitting a 4 KB logo429,908about 0.02 L1
Proposal: executing a first 4 KB logo3,061,096about 0.15 L1
Proposal: submitting a 64 KB logo and a 16 KB description2,463,790about 0.12 L1
Proposal: executing a first 64 KB logo and a 16 KB description58,661,210about 2.93 L1
Proposal: executing a rewrite of a 64 KB logo, every word different11,726,942about 0.59 L1

Removing a large value needs a gas limit above what it is finally charged, because storage refunds come back only at the end of the transaction. RPC nodes estimate at most 25 million gas, which a representative's write passes at about 33 KB of new bytes (rewrites cost about a quarter); COLLAB then sets the gas limit itself and says what a failure would cost. Costs and gas covers fees in general.

Another DAO has this name

Anyone can create a DAO with another DAO's title and even copy its logo, under a different web address. The web address is the identity; the name is not.

COLLAB compares every DAO's name with the others, ignoring case, extra spaces and invisible characters, and treating look-alike letters as the same: 1, l and I; 0 and O; rn and m; and Cyrillic, Greek and Armenian letters that pass for Latin ones. When another DAO's name matches, every page of the DAO says so under the masthead: "Another DAO has this name, or one that looks the same. Names are not unique; web addresses are. This DAO is /dao/…; the other is /dao/…." Directory cards and rows show Name shared beside the web address, and DeSciFi names the DAO that issued a token by its web address.

Bookmark a DAO by its web address, share it that way, and check the /dao/… pill before you vote, pay or buy its token. Staying safe covers copycats and counterfeit tokens.