Table of Contents
Remember the NFT you bought in 2021 for 5 ETH? You’d rather not think about it, because it’s now worth next to nothing. Junkyard.wtf is a cross-chain NFT game that provides a cathartic option for dealing with your pain.
Junkyard’s popularity leapt last week in a bear-market surge: 10,000 NFTs were drawn in Junkyard’s random lottery. The activity sent General Message Passing transactions, shown on Axelarscan, to new all-time highs.
“Once it's in the junkyard it's gone forever. We can't touch it. Everything is fully on-chain,” said Julius Cheddar, one of the rats that built the NFT Junkyard. “Last week, someone fished a Moonbird and a Cool Cat. We drop in the big NFTs — but sometimes people don’t value a good NFT.”
Want to learn more? Join Axelar, Julius Cheddar & the Junkyard community for a live AMA, Friday, April 7 at 1500 UTC.
How Junkyard works
The Junkyard setup is simple, designed to convert the bear-market pain of now-worthless NFTs into a lottery game for new, higher-value NFTs — along with a little gallows humor and fun:
- Players throw their despised and embarrassing NFTs into the “Junkyard,” a smart contract on Ethereum.
- Dumping NFTs earn players credits to “fish” from the pile in a random lottery. Fishing costs a small fee paid in ETH and is the only way to retrieve NFTs locked in the Junkyard.
- The game uses proceeds from fishing fees to seed the Junkyard with valuable NFTs.
- Once a year, everything in the Junkyard gets burned.
The cross-chain component
It’s not easy to take an NFT cross-chain. Unlike fungible tokens, one NFT is not interchangeable with another. Technically, an NFT could be “bridged” to another chain — but the wrapped version of the NFT, minted on the second chain, wouldn’t have the properties of portability and cross-chain liquidity that other Axelar-wrapped tokens enjoy.
However, NFT dApp builders have the same problems as builders in DeFi: block space on Ethereum is expensive, and there may be other chains that are better for your dApp. Axelar’s General Message Passing (GMP) solves this problem for DeFi, NFTs and other categories with cross-chain function calls that “bring the program to the asset.”
Junkyard implements GMP in the following flow:
- A participant dumps NFTs in the Junkyard, which is a smart contract on Ethereum. Data on the dumped NFTs are sent securely via Axelar to a contract on Polygon, where it is stored.
- When a participant fishes the Junkyard, the Polygon contract calls a random beacon on Chainlink to pick a set of NFTs from the junkyard at random.
- If the participant chooses to claim one of the fished NFTs, delivery is fulfilled on the Ethereum blockchain — while Axelar passes messages that ensure state is synced between the data on Polygon and Ethereum, by removing that NFT’s data from Junkyard’s Polygon smart contract.
For Junkyard, Polygon provides a low-cost chain to handle the fishing game for participants. Axelar provides the secure connection that makes it possible. For the participant, all this is abstracted: there’s no need to think about which chain they are accessing; the user experience is basically seamless. All of the above takes place over decentralized, on-chain infrastructure.
The Junkbot expedites cross-chain NFT transactions
Cross-chain transactions can take longer than transactions taking place on a single chain, because the network handling cross-chain validation must wait for confirmation on both sides, before allowing a transfer to take place.
Junkyard’s “junkbot” gets ahead of this process by probabilistically triggering a transaction on a connected chain after two or three confirmations — before the transaction would be considered final on the source chain.
This involves some risk. Junkyard reports the risk is minimal — on the order of 0.2 % of transactions have problems in which Junkbot doesn’t match final state on a connected chain.
Axelar is developing a similar service designed for broad use, called GMP Express. It’s currently on testnet. Other dApps, like Squid — which provides cross-chain swaps and liquidity routing over Axelar network — have implemented their own versions, to get around long wait times for finality.