project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Fightnight.fun

A trading platform that rewards honest memecoin traders with fun payout mechanisms.

Fightnight.fun

Created At

Superhack 2024

Winner of

Pyth - Most Innovative use of Pyth pull oracle (Price Feeds) 1st place

Worldcoin - Pool Prize

Prize Pool

Project Description

Fightnight.fun is like pump.fun on steroids, gamefied. In pump.fun, when a token reaches market cap, there commences an incredibly unexciting event: the token moves off the platform to another protocol (Raydium). There are many issues with this model: it’s anticlimactic for traders, pump.fun loses fees (to both Raydium and Solana network), and a token’s success isn’t properly rewarded; devs are literally incentivized to rug.

Fightnight.fun introduces a new innovative and fun way to incentivize healthier memecoin microtrading while retaining fees and rewarding traders both by economic and psychological rewards.

Fightnight.fun starts as a familiar, pump.fun-like trading experience, enabling users to deploy and trade memecoins on any major Superchain-compatible network (deployed on Optimism Seploia, Base Sepolia, and Mode Sepolia testnets). But instead of the token dying when the bonding curve reaches a certain market cap, the token gets frozen on the chain it was traded on, and the liquidity is bridged over to the Fightnight.fun OP Stack Appchain, where stage 2 commences.

Instead of trading grinding to a halt on raydium, when a token’s liqudity gets bridged to Fightnight OP Stack chain, a game is played among all players who traded and still hold the memecoin. The winners of the games then receive payouts according to how well they did in the game.

This mechanism incentivizes buy-and-hold behavior to reach the game, reducing rugpulls and creates a new platform for onchain gaming. And the games that are played on the OP Stack appchain can be anything. This provides new avenues for games to create more adoption, while making it easier for WorldID verified user’s to interact and play onchain, with both gas subsidies and transaction priority thanks to the custom-built reth sequencer.

This is gaming and trading revolutionized.

How it's Made

This whole project is a fork of the Optimism Monorepo (OP Stack) with additional code added into the monorepo, including smart contracts, a web frontend, and the Reth custom EL sequencer.

The token factories are created using solidity/forge and deployed on Optimism Seploia, Base Sepolia, and Mode Sepolia testnets. The tokens use a variety of tech, including Pyth price feed oracle and CCIP. Upon market cap reach by the token’s bonding curve, the token is locked and swapped to CCIP-compatible tokens, and bridged to Ethereum Sepolia via CCIP. From Ethereum Sepolia, we use the canonical OP Stack bridge for our OP Stack appchain to move the funds from Ethereum Sepolia to our appchain.

From there, we created a game, where all players holding the previously minted token tries to guess a random number generated by the Pyth entropy oracle. The players who are closest receive payouts from the bridged ETH according to how close to the number they were. Both the trading and the gaming steps are played on our React frontent, where we used Thirdweb for wallet connections and WorldID Incognito Actions to send proofs for each guess attempt in each game. A player submits their guess by (optionally) signing the action with their Device through WorldID, and then submitting a transaction on the appchain.

The appchain’s sequencer is a custom reth instance with a modified transaction forwarder to verify and prioritize WorldID users for both transaction priority and gas subsidies. Each game transaction also sends the proof of the incognito action from the frontend in the transaction calldata. The sequencer decodes the calldata upon submission to find the WorldID proof. If no proof is found, or if it is invalid, the txn is de-prioritized (by adding a 10 second delay before being forwarded to the block builder). But if a proof is found in the calldata, the sequencer decodes it and verifies it using the /api/verify endpoint we built. And if verification is successful, that user’s transaction get’s no delay and get’s submitted right away, giving them a better edge in whatever game they are playing.

But just before submitting the WorldID verified txn, the sequencer, with it’s own private key and funds, will calculate how much gas that user will spend on that transaction, and will place an ETH transfer transaction JUST ahead of the user’s. So that the user receives gas money immediately before their transaction is executed. The sequencer “frontrunning” WorldID-verified transactions makes it easy for any WorldID user to have a seamless UX when gaming on the Fightnight.fun appchain.

background image mobile

Join the mailing list

Get the latest news and updates