paint-brush
Gamifying Bitcoin using Blockchain-APIs - Part 1by@maken8
New Story

Gamifying Bitcoin using Blockchain-APIs - Part 1

by M-Marvin Ken8mAugust 15th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

An Application Programming Interface is a software that allows two or more computer programs or components to talk to each other. Better than a computer only talking to another to effect an in-game purchase that keeps money outside the game, the in-game purchase could keep the money in-game while absorbing more money into the game (literally). This is the future of gaming.
featured image - Gamifying Bitcoin using Blockchain-APIs - Part 1
M-Marvin Ken HackerNoon profile picture
0-item

Image Source

A Detailed Introduction to Blockchain APIs and RPC Nodes

1. Introduction to APIs


An Application Programming Interface is software that allows two or more computer programs or components to talk to each other.


APIs are not user interfaces like operating systems (GUIs) and so are not meant to be seen by the user.

They are a program-to-program interface built by programmers for programmers and users, which fetch data from another system into the one the user will be on, without the need to understand whatever is happening inside the other system.


For personal computing (on-PC) applications, we interact with APIs like; "Compatibility Mode" when opening old versioned Word docs on newer versions of MS Word and DirectX for running games on a Windows O/S.

While online, we interact with Web APIs. Think web popups like CAPTCHA (a client-side Web API built for verifying if a user interacting with a website is a human), or PayPal querying your bank account when you make a purchase (which uses a server-side API linking Paypal's server to your bank's server).



2. Introduction to Blockchain APIs


A blockchain API is a blockchain application programming interface.

Because blockchains like Bitcoin are large, open-source web application systems, blockchain APIs are usually public web APIs.


Blockchain APIs are used to build blockchain testnets, protocols for blockchain wallets and dApps (decentralized applications) to communicate with blockchain networks, protocols for building bridges across two different blockchains, etc.


Accessing blockchain data might require different forms of APIs. Node APIs allow a user to access data from a node on the blockchain e.g Blink's GraphQL API

Other APIs include; Wallet APIs, Smart contract APIs.


Most blockchain API calls follow a similar procedure in their functionality:


a) Choose a Blockchain Network e.g. Bitcoin.


b) Choose an API e.g. Blink's GraphQL API


c) Identify the API endpoint e.g. in the aforementioned GraphQL, the endpoint provided here is for sending BTC on the Lightning Network.


d) You need to have your API token to authenticate API access. This ensures Blink's node can be accessed safely and legally.


e) Send API requests using GraphQL's query language syntax.

(Or your favourite programming language if you prefer. You should know how to make HTTP requests and parse JSON).



d) Receive API responses.


e) Analyze and Utilize API data.


3. Introduction to RPC nodes


This is from an early email before the prize pool was increased.



Currently happening is the Bitcoin Olympics Online Hackathon, in which thousands of people are competing for a total prize pool of $508,000 dollars!


This is more money than what the Paris 2024 Olympics will spend on gold medals (given a gold medal costs $950, thus 329 medal events = $312,550 in gold medals).


To win some of the prestigious, more-than-olympic-gold prizes, there will be no walk in the park.

It will require that a developer know how to make use of RPC node APIs.


For example the Bitcoin sidechain company - Rootstock, is one of the sponsors of this hackerthon, and it has put up $15,000 for projects that can build impressive EVM compatible smart contracts using its RPC API Methods.


DFINITY, the company behind the Internet Computer Protocol (ICP), has put up a meatier $50,000 for projects that can integrate Bitcoin in their ICP projects either using (warning: strange crypto dev terms ahead); Threshold ECDSA and Threshold Schnorr, Bitcoin Adapters but also, since ICP has an EVM RPC canister, it can interact with Rootstock's EVM compatible chain.


And many more companies.


To get some of the prize money, you still have until August 27th.


***


A lot has been said about RPC nodes.


What is an RPC node?


Firstly, a blockchain node is a server (computer) that verifies the "correctness" of a transaction block before adding it to the blockchain.

If a block has fraudulent transactions e.g. a double-spend transaction, that block is rejected and is not put in the blockchain.


An RPC (Remote Procedure Call) is an API call of a procedure / subroutine on a remote server, where the procedure is executed within that server before returning an API response.

(Contrast this with the GraphQL API call above, which only queries for some specific data, e.g., walletCurrency balance, or queries for a specific action e.g., lnInvoicePaymentSend(input: $input)


An RPC node is a blockchain node (server computer) that makes RPC calls.

One can either run an RPC node themselves (which is usually just a node), or they can rent an RPC endpoint online with the hardware hosted by somebody else be it physically or on the cloud.

The second option is what is called a decentralized RPC (dRPC, though not necessarily the company, also called dRPC) node.


While a lot of decentralized node solutions exist for Bitcoin and other blockchains, unfortunately, very few projects provide them for Bitcoin Lightning, and most advice is to set up a lightning node for oneself.


That there just aren't enough documented decentralized node providers for Bitcoin Lightning implies a business opportunity waiting to be exploited for gaming while leveranging Bitcoin tx data, bitcoins, Runes and more.


Let's figure out why setting up more decentralized RPC nodes and API methods for Bitcoin Lightning will revolutionize the gamification of Bitcoin as a blockchain API use-case.


Blockchain APIs as the Ultimate Tech-Stack for Web3 decentralized game development


The Bitcoin blockchain is the future of in-game purchases (called microtransactions).

This gaming paradigm was first introduced to the gaming world with the arcade game Double Dragon 3: The Rossetta Stone (1990) which was infamous for its use of microtransactions to purchase items in the game.


More games emerged to include ingame purchases including: Habbo Hotel (2001), Second Life (2003), The Elder Scrolls IV (2006), Clash of Clans (2012) (I discovered the Android game sometime in 2021), etc.


While microtransactions in freemium games have been very successful so far (accounting for 92% of app revenue on Android and iOS in 2013 - ref), there are problems with this game model:


  1. Exorbitant fees via Apple and Google's Play Store, plus bank transaction charges.
  2. It encourages underage gambling.
  3. Exacerbates wealth inequality with pay-to-win schemes.
  4. The free-to-play model usually hits an insurmountable pay wall.
  5. It is usually a classic pump-and-dump executed via gaming.


The aforementioned problems can be solved if one builds games in which in-game purchases leave the money in-game!

And it was real money!

And it remained mostly between the gaming peers and not the company.


Huh?!


Let's imagine you buy the Khaby Lame skin in Fortnite Battle Royale.

Classic Khaby Lame pose


Before cryptocurrencies like Bitcoin, all in-app purchases had to go through a bank account.

Most kids (people under 18) are not allowed to have a bank account.

However, they can own Bitcoin from P2P sites all over the internet or from their big brothers and sisters.


Strike 1: No more need for a Bank so as to buy gaming goods.


However, this only solves the first problem.

What of the other four?


With decentralized solutions like dRPC Node APIs, fast exchange of real money like Bitcoin can be masked as ingame mechanics.

This isn't a rip off of banks, this makes ingame purchases more valuable because now, the Khaby Lame skin isn't sold by the gaming company to the gamer, it is sold by one user (usually a skin dev) to another user.


Talk of having skin in the game.

Like the evolution of Facebook and Google before the ads eventually started pouring in, Games needs to use bitcoins for a while, without any charges or fees anywhere, before the ads and the other spending-points come on board.


Basically, before you build a cool game universe, don’t build a cheap supermarket on top.


Game developers, UI developers, Graphics artists, etc, have long sat in the shadows of their creations.

Now with crypto, they can be part of the game and a circular economy of cryptocurrency (bitcoins) is created in which in-game purchases leave the bitcoins in game.

Moreover, cheap transactions for big game items could spike the value of a cryptocurrency outside the game (for example, if somebody developing a game tool accepted to be paid one satoshi for something that would've cost $1).

Also, why not make money to get into the game and be in-game, from outside the game?


In this way, the game world is poised to develop way faster while teaching practical dev skills on how to create keys, connect endpoints, follow analytics, check balances, add funds, gamify wallets and the movement of funds, etc.


This is the future of game developement and gamefi to something like Ready Player One.




***


We are meant to build a massive game-verse around Bitcoin and Altcoins


GAMES and their development have been quite the ride.

First, you had fully text-based games like the earliest Dungeons & Dragons, which relied heavily on the players' imagination. Then simplistic video games like pong, which gave way to relatively okay adventure games, and then first-person shooters/drivers like GTA + massively-multiplaying-online-player games like Elden Ring.


In-app purchases then came around at the same time, and next year's GTA 6 might allow in-app purchases using Bitcoin.


source - https://www.cointribune.com/en/gta-6-is-becoming-a-reality-will-cryptocurrency-be-involved/


But that, too, will fail to create a revolution.


True, those purchases will not be going through the slow, bureaucratic rails of traffic apps like Paypal but the faster and permissionless rails of Web3 cryptocurrencies.


But if the money is going not from one gamer to another but from a gamer right away to the big corporation called Rockstar Games, people will eventually not pay so much for in-app juice.


Game play should involve holding onto real money (bitcoin satosis), spending it on virtual gaming cars, virtual guns, etc at an "NPC shop". But that is not just an NPC. It is an NPC owned by somebody else who is also playing this game as some other character.

They just hire an NPC to pick the dough for them. Like hiring an AI robot as one's receptionist irl.


Ready Player One cannot be built by one supergenius dev called Haliday. No matter how genius he is.

It can only be built by 1000+ human devs/gamers, + 100 AI devs/ NPC gamers + 1000 Bitcoins circulating in the game world 24/7.

Faster than irl bitcoins.


(To keep them in-game despite human temptation, they could be time-locked in place).


You game as you dev the next iteration of the game, meanwhile transacting bitcoin sats and helping to more and more, gamify Bitcoin using blockchain APIs.


***


How about the most advertised game on YouTube? Any chance it embraces Bitcoin as an in-game currency freely tradable between players?


Hero Wars browser game play with a bar added for bitcoin satoshis held



More gamefi ideas:




1,000,000 sats attached to the pong ball can be bounced around continuosly between wallets. This would leverage blockchain APIs for Bitcoin Lightning in the backend


2.


The arcade game DigDug could have the player digging around for real bitcoin satoshis instead of useless virtual coins.


3.



Snake would be revolutionized if the blockchain snake ate bitcoins and not game pixels.


4.

What if PacMan was beefed up to a Real Bitcoin