Blockchain gaming is inaccessible

The inspiration for this project started over a year ago and has morphed into something completely different over time. At first, the project was designed to solve the issue of fairness in digital tournaments. There have been cases in which gaming tournament winners have to wait weeks or months for their winnings - that's not right. Our goal was to streamline this process and put it on-chain for immediate payout in gaming tournaments. That was the inspiration behind a project of mine, Basin. I then went to Chainlink SmartCon 2022 and told everyone about it which generated some traction and started some really good conversations. By the end of the conference, I realized that Basin was not the right approach and that there were some fundamental issues with crypto gaming that needed to be solved - that's what started the Current hackathon project.

The two main drivers are:

  1. Crypto-based games are clunky.

There is an excessive amount of overhead just for users to play a Minecraft-like derivative crypto game. Additionally, developers do not want to build on top of crypto-based games because it's extremely complicated for both themselves and their end users to interact with.

  1. Chainlink Hackathon.

Basin was cool, but it didnt solve any deep rooted issues. The harsh reality is only crypto native users want to use web3 and protocols - for everyone else, they’re inaccessible. For the hackathon, we decided to solve this problem and build a completely new system designed around onboarding web2 users to web3 seamlessly.

We decided it was necessary to rethink the entire distribution idea and build our Chainlink Hackathon project around the points outlined above. The future state goal of this project is to design a system that allows anyone to build fast, state-of-the-art games on top of our SDK and obfuscate all blockchain-related processes from both the users, as well as the developers. This is a completely new idea from Basin and requires brand-new smart contracts, infrastructure, and software.

What even is Current?

Current is a custodial web3 asset solution designed for web2 users. CurrentSDK is the Software Development Kit which is designed for game developers to utilize in their games. We built Current and the CurrentSDK so that developers could obfuscate all blockchain details away from their users (and themselves)! You can see the power of the CurrentSDK by joining our Discord and using the "!roll" functionality in the dice roll channel. This channel allows any user to roll a die and earn blockchain-based rewards without the need for a wallet connection or transaction signature.

Simply log in, register in the channel, and win rewards - it's that easy! The discord bot is set to demo the sheer power and accessibility of the CurrentSDK; a developer will have the ability to create an entire AAA game on top of the CurrentSDK architecture.

UI's are cool, but devs are king

Competitors in this space are focused on building a UI / UX for companies to use blockchain assets in web2 games - Current is the opposite. We believe the key to mastering this integration is to look at the developers and create an environment with minimal barriers to entry. Developers will have the ability to seamlessly build on top of our software and deliver blockchain-based assets to their users, while users will have a premier experience earning blockchain-based assets and exporting them to their own non-custodial wallet if they choose. In addition, both the user and the developer will be separated from transactions/execution of transactions and wallet/blockchain connections; this function will be a core responsibility of Current. We believe that the removal of this core functionality from users and developers will help onboard the masses to crypto as it removes the excessive noise associated with the technology and makes it a true back-end.

In our model, a developer will be able to make a simple call to our API/SDK to deliver an asset to a user, this can be in the form of ERC20, ERC721 or ERC1155. The developer simply needs to know what the asset is, and the associated identifier - Current will handle all the mapping, allocation, and everything in between. The user on the other hand merely needs to play the game and collect rewards. Once the user receives a reward, Current will store it in a custodial address and record the user's ownership in a database. From a UI/UX standpoint, there is no blockchain interaction or lag. Once a user interacts in-game (i.e., "!roll") and wins, they instantly receive the asset. When the user decides it is time to become non-custodial, they can simply set their blockchain address ("!setAddress") through a UI, and export ("!export") their assets to a non-custodial address. From then on, Current stores their address in the database and automatically sends all future rewards from the game. This integration allows for a completely seamless experience for the user, without the need to hassle with wallet connection, sketchy websites, transaction signs, etc. Current will control assets for the user until their ready for non-custodial control - similar to how Coinbase works.

Transactions cost money, how are you covering the cost?

This is where our smart contracts and Chainlink comes in. We have infrastructure setup to allow a new customer to register on chain. When they do so they are given a new implementation of our Customer contract and they fund it with Ethereum. Everytime we mint an asset to a user, we add the transaction cost to the customers object on chain and will automatically bill them later. This is billing through code. We use the Chainlink DON to automate our billing process and ensure a decentralized approach to collecting fees. We have additional functionality being built out to allow for the registration address of the SDK to bill users for other transactions they incur through the SDK. This will all be open source and transparent.

The reason we chose to use Chainlink is the Decentralized Oracle Network (DON). Customers dont have to rely on us to create billing statements or charge them for their usage and they can completely trust the Chainlink DON for automated execution of their invoice contract (Customer.sol). This allows us to build an awesome product that connects games to the blockchain, allows customers to pay us fairly through decentralized code execution, and allows users and developers to have a completely obfuscated experience with blockchain assets in their games.

So why did you build it like this, wheres the website?

For the hackathon project we decided to switch it up a bit. We didnt build a website where you go and connect your wallet and run some transactions. Remember we're an SDK for devs, not web users! In true Web3 fashion, we used discord. You can join our discord today and play our dice roll game for free. It's a really simple game that simulates a dice roll. Sometimes you'll win 100 tokens, sometimes 1000, and sometimes an NFT. All of this in discord with no wallet requirements. Just !register with your discord username and you're ready to collect some web3 assets. When you're ready, follow the instructions to export them to your own wallet.

We chose to do it this way because:

  1. Its different - sending transactions through discord?? That’s not normal

  2. People are familiar with Discord and already use it - no sketchy websites.

  3. The discord bot required 1 file - the real power is in the SDK.

With using Discord, we wanted to show something: There is no custom logic handling transactions in the UI - its all in the SDK. You can read the code executing the Discord bot, it only interacts with the coordinator and the database, there isn’t any javascript asking for signatures or connecting a wallet or executing transactions. This simulates a real game. In an traditional game, when you're rewarded with items or tokens, you aren’t required to sign a transaction and accept them, they just show up in your inventory. That’s how the bot works. Once you're registered, just roll the dice and earn tokens - super simple.

Take-aways

There were some lessons learned while building this thing.

Custodial solutions are very hard to build. Seems pretty simple from the outside, but building the architecture for the software and how we're going to charge customers was a very difficult problem. This project took many different iterations and architecture diagrams to figure out how we were going to connect the off-chain data with the on-chain costs - and how we would automate the fund collection and asset management. Chainlink automation was a clear winner for us, the only issue was figuring out what exactly it was going to do, and how we were going to automate the data flow in our smart contracts.

Databases are not fun to work with. I'd much rather build a smart contract and use on-chain storage than remember all the information required for users off-chain (and there are still some big issues we need to address).

I learned that tooling is incredibly important. I'm looking forward to some time after the hackathon to fix the Makefile, our python tests (mocks!), and our foundry tests (cheats, helpers, configurations, multi-chain). There’s been quite a bit of tech debt created just to get the product out the door. That leads me to the next section, there is a ton of work to be done in the future for Current.

Current++

  1. Space and Time (decentralized database). Currently we run a local mongoDB for easy development and storage of user assets, this will need to become decentralized to ensure we follow the ethos of crypto.

  2. Layer 2 (zk rollups). We intend to use Layer 2 technologies to bolster our product. ZK-rollups are the future of ethereum scaling and we will need that to execute thousands of in-game transactions a second.

  3. Customer authentication through API / SDK (Zero Knowledge proof security). We intend to research how we can utilize zk proofs to confirm an SDK caller is the correct customer thus ensuring that the correct calls are being made and the correct customer is getting billed.

  4. True SDK Build out. Currently we're only building in python (for dev speed). We'll need to build out the SDK in more languages that work better for gaming.

  5. Customer portal (UI/UX). The customer will need a portal to perform admin activities (maybe even a no code solution?).

  6. Fiat On-Ramp. Not everyone wants to transact in crypto only, we'll need a way to make it so users can buy assets in game from a store and execute a transaction through us. We'll also need a way for customers to deposit funds to their smart contract through our UI / UX so they don’t even need to touch the chain.

  7. Asset generation. We'll need more smart contracts to allow a customer to deploy assets through us, similar to how we deploy the customer invoice address in our Coordinator.sol.

  8. Optimization Custom errors -> Error types. LOGGING.

In the future state there are a few things we are considering to enhance our decentralized architecture and make the experience better for users and developers.

This is the starting point of the company Current. We plan on building out the Current ecosystem to facilitate the web2 to web3 paradigm shift. We will onboard users and make their lives easier while also providing more ownership of assets and a trustless system of interaction. This is how we onboard users to Web3.

Links: Github Youtube Video Twitter Discord

Built With

Share this project:

Updates