project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Splatter Party

This hack is a experiment in collaborative art on the blockchain. Using a canvas as a shared form of communication is feasible when gas fees on L2s are so low. Also updates in real time on a LED Matrix you can hang on the wall!!

Splatter Party

Created At

Superhack

Project Description

The idea for this project was to build a collaborative painting dapp that allows participants to work together to create a piece of art that can then be traded as an NFT. The contributions are tracked so royalties from trading activities could be split between the participants proportionally according to their contributions.

Will this incentivize participation? Will some colors be more predominant in the resulting artworks?

When a canvas is created, it is held in custody by the contract. Only one unlocked canvas is ever available at a given time. The contract has an 8-hour window to allow painting on it. After that time, it can be locked; This transfers the NFT to the person who locked it and allows it to be traded. During locking, the on-chain metadata is generated and uses up quite a bit of gas, so it seems fair that whoever pays for that gas gets the NFT. The contract turns the pixel data into an SVG onchain. Something that I will explore in the future is encoding a base64 PNG from data on-chain - I'm curious if it would be better or worse than the SVG in terms of gas.

I also hooked up the canvas to a 64x64 LED matrix to display the process of the art being created in real time as it is updated on the blockchain. I'm pretty happy that I was able to accomplish this and it was definitely the highlight of this hackathon for me.

How it's Made

The project is making use of the optimism-starter repo as a starting template (https://github.com/ethereum-optimism/optimism-starter) which uses Foundry, Wagmi, Viem, Rainbowkit, and Vite.

It was pretty easy to get things up and running and to quickly iterate on ideas, test things and fix errors.

The contracts are deployed on OP Goerli and the front-end is hosted on vercel. Deployment was pretty straightforward with scaffold-eth as well. It would be nice if it had base and zora support too.

I had originally planned to add a way for users to buy "colors" or 'brushes" and you would only be allowed to use the colors you owned. However, this didn't seem very fun. Another interesting idea I wanted to try was keep track of how many of these assets you owned when placing a pixel - then someone could only overwrite it if they owned more assets than you. These assets could be the aforementioned brush colors or they could be tokens that get used up when painting and are periodically rewarded for holding the brush assets.

After hacking the first weekend, I discovered another app that was very similar to this idea and was being released on Base (basepaint.xyz). Their app is pretty cool but the difference was that this one is free (i.e. don't have to buy brushes to paint) and its entirely on-chain. As a result, however, the gas cost to "lock" the canvas is pretty high.

After that discovery I was feeling like my project was too similar, so I decided to do something that could be considered more of a super "hack' - I decided that I wanted to try getting the paint canvas to update on an LCD Matrix screen that you could hang up on a wall and have real-time updates as people contributed. I ordered all the parts and they arrived super quick. I was able to squeak in this functionality right at then end and am super happy about it :)

background image mobile

Join the mailing list

Get the latest news and updates