Recently I reminisced about the excitement of opening up trading card packs when I was a kid. The exciting moment that happens when you rip open the pack, you are not sure what you are going to get. Will it be a bunch of junk or an elite fighter I can add to my deck.
This experience does exist today but it is on all controller platforms where players are not allowed to trade cards yet alone packs with each other. The experience and joy that I experienced when I was a kid, should be available to everyone online today. Excitement when you open new packs and the ability to trade cards in bulk with other players.
This weekend, I built a Proof of Concept around this experience. I started to build the platform that lets users buy Cache Tokens on the mainnet, and redeem those tokens on a sidechain for NFTs and burn those NFTs for other NFTs or trade the original "closed" NFT.
This product can be extended to be a full platform as well. Users can purchase Cache Tokens in bulk and redeem them for any ERC-721 contract on the sidechain that consumes those tokens at any ratio. The token flow supports hundreds of games and experiences could be built.
What it does
Contract on the main chain allows the purchase of ether which gives the user tokens. Tokens are lock on the main chain and synched to a plasma Matic chain. Secondary contracts on the side chain consume those tokens ( exploding loot caches ) to generate new random ERC-721 tokens.
How I built it
Ruby on rails backend, webpack react on the front-end.
2 Solidity contracts
- Mainnet ERC-20 to purchase tokens
- Matic chain ERC-721 contract to redeem tokens synched tokens and generate new assets.
Contracts are linked in the github repo
Challenges I ran into
I only have 2 weeks of solidity programming experience. All the blockchain tech is new to me.
Accomplishments that I'm proud of
It works !
What I learned
Brushed up on my front-end react programming. All of the solidity programming was new. The way that contracts manage data and state as well as cross contract communication.
What's next for Cache Loots
- Move off of Metamask. The number of transactions the user has to confirm and the switching of networks makes it a prohibitive.
- Continue to develop the UI and the the first game mechanics. e.g. Battle mechanics where you can Loose your ERC-721 token. Transmog tokens together to create new assets.