project screenshot 1
project screenshot 2
project screenshot 3

PFP WAR

PFP Pixel War is a collaborative game where the players use NFTs they own on L1 Ethereum mainnet to use them in L2 via Storage proofs and MUD. It's inspired from r/place by Reddit

PFP WAR

Created At

Autonomous Worlds

Winner of

πŸ₯‰ Optimism β€” Mod the Stack

πŸ₯ˆ 0xPARC β€” Best use of Advanced Cryptography

πŸ† Autonomous Worlds Finalist

Project Description

PFP War is a collaborative experience in which participants place their NFT on pixel (or β€œtile”) on an online canvas of 2500 (50 x 50) pixel squares, and wait a certain amount of time before placing another.

Technical motivations

  • Challenge to prove the ownership of an L1 NFT on L2
  • Challenge to make this verifier a precompile in op-geth
  • Discovery and Stress test the MUD framework

What have we done ?

  • Ethereum Merkle Patricia Trie proof verifier (Solidity smart-contract)
  • PFP War: A web game that uses our verifier (MUD React Client)
  • A op-geth precompile of this verifier (Go)

More details on our project README : https://github.com/cometh-game/pixel-war/blob/master/README.md

How it's Made

We made an autonomous world using MUD and Storage Proof verifier on OP-stack.

About the Ethereum Merkle Patricia Trie proof verifier:

The Ethereum state is a data structure (a modified Merkle Patricia Trie) which keeps all accounts (nonce, balance, codeHash, storageRoot) linked by hashes and reducible to a single root hash stored on the blockchain.

  • We developed the Solidity Library that verify the Merkle Patricia Trie (MPT)
  • We developed a precompile of this Lib

About PFP War that use the MPT verifier and MUD framework

We developed our project entirely with MUD / React. We have deployed our contracts with the MUD system and interacted with the hooks provided.

  • Really simplifies the work on the front-end
  • Some issues with the public testnet indexer
  • Great support from the MUD team
  • Ultra-simplified smart-contract dev and management
  • Binding between UI and contract state is really cool

About Optimism and Storage proof

  • The implementation of the Ethereum Merkle Patricia Trie was an interesting tech challenge.
  • We deepened our understanding of EVM, precompiles and how the state is stored.

The full feedback about our experiment is available here https://medium.com/@vincentlg/pfp-war-project-use-the-l1-state-on-optimism-l2-with-storage-proof-fc0124db7caf

background image mobile

Join the mailing list

Get the latest news and updates