Generative art created and rendered entirely with Solidity

Brotchain is generative NFT art with bitmaps generated and rendered entirely by a blockchain contract. This is about as pure as you can get for an NFT: no inputs, no externalities, no rendering dependencies, just 100% Solidity.

Brots are generated from the Mandelbrot and related Mandelbar, Multibrot, and Burning Ship fractals. We used hand-crafted EVM assembly (i.e. manipulating 0s and 1s) to calculate the "escape time" value for each pixel. This is fairly simple maths, but extremely difficult in a language which doesn't even handle decimal points. The resulting values are mapped to a customizable color palette—creating the recognisable patterns seen below in a way anyone can add their own stamp to.

There are 512 NFTs (“Brots”) available, each an edition from one of the 8 series (i.e. 64 of each). Each series is either an entire fractal, spanning the full range of its possible pixels, or a zoomed region chosen to demonstrate the incredible diversity of patterns and shapes that can be generated.

The Mandelbrot

The classic Mandelbrot fractal, the set of complex numbers \(c\) for which the function \( z_n \rightarrow z_n^2 + c\) remains bounded

Palm Trees

A close-up of a region found within the fringes of the Mandelbrot's body

The Mandelbar

Also called the "Tricorn", resulting from a fractal set similar to the Mandelbrot but mapping to the square of the complex conjugate \( z_n \rightarrow \bar{z}_n^2 + c\)

The Multibrot

A play on the classic Mandelbrot, where \(z\) is mapped to \(z^4\) (rather than \(z^2\))

The Burning Ship

Yes, this is generative! This is a portion of a fractal set in which the real and imaginary parts are set to their absolute values before squaring in each iteration of the sequence

Snowflake Silhouette

Another zoomed in region, this time from the 3-headed Multibrot

The Mini-Mandel

An offshoot of the Mandelbrot. Fractals, not turtles, all the way down…

Seahorse Valley

A view from a well-studied region found in the "shoulders" of the Mandelbrot

Project Details

The Brotchain Story

Brotchain came about when a leading engineer in the NFT space, Simon DLR, posited that the only way on-chain generative art could be created was through the use of an SVG renderer. That sounded like a challenge, and a short while later Brotchain was born—proving the "impossible" was entirely feasible after all, with a bit of computing magic and a lot of gas.

The next challenge was getting it on OpenSea, as the resulting NFTs were so different to everything else they broke the site! However the few weeks it took to fix things gave us time to set up a pre-registration process that meant anyone could try to mint a Brot, without wasting any gas at all. The sessions saw nearly 10,000 people racing for the 400 available spots, each given to a different wallet to ensure fair distribution from the start. A large number of people managed to get their very first NFT this way, and already sales have been genuinely life-changing for some members of the community.

We don't have a "roadmap" or plans for further Brotchain collections. Instead, we'll continue to bring value and attention to the project by finding new ways to innovate and push boundaries, while looking after our existing community (e.g. through early access or lotteries to mint new collections).

Giving Back

We have committed to giving 100 ETH to charity—over 60% of primary sales.

Instead of simply converting to fiat, we are working to support UK-based charities to accept donations directly in crypto—because right now, very few do. Until then, the 100ETH has been put aside in a separate wallet from which donations can be tracked.

We'll announce the exact charities just as soon as they are ready (and are really trying hard to get this moving!), but causes we intend to support include:

  • The safety and wellbeing of women and persecuted groups in Afghanistan
  • Promising initiatives and technologies to help counter the impact of climate change
  • Addressing societal inequalities in the UK, particularly related to education and training (for children and adults)

If you're interested in learning more, or want to offer your support, please get in touch with Harri on our Discord.

Technical details: in-chain art

On-chain generative art is all the rage in the NFT world. What exactly constitutes "on-chain" is variable though, from non-Solidity code archived by various means on the blockchain through to contract-generated art that requires external interpretation through an established standard such as ASCII or SVG.

Brotchain's thesis can be summed up as an attempt to create the "purest" form of on-chain art, using nothing but Solidity, and computing nothing but pixel colors. To capture this, we coined the term in-chain to describe the entirety of the generative and rendering processes occuring within a smart contract.

Generating Brots—requiring computation of complex numbers—faced significant hurdles as the EVM only allows for integer mathematics. Coupled with strict computational limits enforced by gas, the Brotchain contract required painstaking optimization of hand-crafted assembly code.

Environmental protection

We've encountered a number of valid concerns raised over the potential environmental impact of producing Brots in-chain. This is something we considered from the very beginning and devised a mechanism to negate impacts.

Mining in proof-of-work is wasteful because all miners compete to solve the same problem but only one wins. All other computation (and its requisite energy) is wasted as the results are discarded. We avoided wasteful computation by running Brot calculation on a single Ethereum node before storing the results on the network. Storage incurs significant gas fees but requires negligible "work" and compute power from miners.

Technical considerations: to prove in-chain computation and data provenance we included a contract function that allows any other node to verify the validity of data by recomputing and comparing through cryptographic hashes that guarantee identity down to a single bit. As such verification is a read-only event it is again limited to a single node and therefore wastes no energy through mining competition. Such cryptographic proof lies at the heart of blockchain technology.

This is a highly experimental project, pushing Solidity usage into uncharted territory. While code is thoroughly tested, it has not been externally audited. In buying into the project, collectors acknowledge and accept the risks involved.