Introducing PeerplaysBlockchain.Info

in ppy •  6 years ago  (edited)

ppybc.PNG

A representation of real time information generated by the world’s first decentralised and provably fair dedicated betting blockchain.

Beta version connected to the Peerplays TESTNET @ https://peerplaysblockchain.info

Site Development

The first and main task was to find a complete list of possible RPC calls to a testnet API node. I found little information for invoking the API calls, so the parameters for each call where manually/brute force guessed with the aid of error message hints until I retrieved valid responses. It would be nice to see some more extensive/updated documentation specific to Peerplays for on-boarding new developers, for example: https://petstore.swagger.io/.

I analysed the JSON data from the responses and picked out specific API calls that could populate rich objects for display and aggregation purposes. The selected responses where then parsed into local data models.

Following on from the task of retrieving blockchain data it felt natural to build a custom block explorer for Peerplays as part of the site to understand the graphene data structure in detail and include this as the core of the site. Creating the site was the usual design pattern, code architecture, service integrating, testing, validating, site building activities.

The idea now is to build outwards with many features based on the rich models. Still lots of data to identify and model – Updates and new block data enabled by PBSA to the testnet on a regular basis.

Site Performance Hurdle

Figures relate to peerplays testnet as of time of publish.

  • Blocks: 9,075,962
  • Block Transactions: 242,146
  • Block Transaction Operations: 250,168

Site performance was a challenge to initially overcome and attempt to future proof site speed for decades of 3 second blocks, vast data-sets and concurrent users. The biggest lesson learnt was to handle as much off-site data processing as possible. Implementing a cleaver caching strategy and specific storage of data is key.

Page load speed is one thing, but real-time data and statistics is another. Creating a real time experience by pushing data to connected clients instantly as it becomes available is on the agenda.

The result of the above paved the way for a hybrid data site with as much data as possible is retrieved directly from APIs rather than repositories.

Data Possibilities

Whilst performing the tedious task of parsing JSON responses from the blockchain API's I noticed lot information can be extracted from the data. A few examples off the top of my head to mention...

Real Time Calculations & Data Aggregation

  • Token & Affiliate Revenues

A list of pending digital currencies can be calculated every 3 seconds. PPY holders and Affiliates will have the ability to monitor their revenue streams in real time.

  • Intrinsic Token Value

Peerplays is a DAO (https://medium.com/universablockchain/decentralized-autonomous-organization-what-is-a-dao-company-eb99e472f23e), your ‘tokens’ are shares in a Decentralised Autonomous Organization. The token price theoretically should be defined by its intrinsic value in terms of how much direct profit the blockchain earns per token in various digital currencies using existing industry algorithms; https://www.investopedia.com/articles/basics/12/intrinsic-value.asp.

The true Peerplays token value is not defined by exchange market makers, but by its own success.

Machine Learning & Predictions

Predictions and decision making based on block data will become more accurate as the ledger matures. We are at the very beginning.

  • Automated Betting Bots

Learning effective betting strategies from the increasing bet data and betting accounts may lead the way to forging successful automated bot algorithms.

  • Identifying Bad Actors

An account's betting activity can be weighted by its history; transaction relationships, bet style, bet timings, online time etc. in order to identify potential bad actors/bots.
Example; A potential court-side better - Identified by; bet timings, transaction relationship, account creation.

Final Comments

  • Make site data real time (web socket integration).
  • On-board a CSS wizard to enhance the style and create a limited functionality mobile version.
  • Enable mainnet switch (awaiting mainnet update with new functionality).
  • Feel free to leave a comment with any statistic or graph ideas.
  • Betting on a bright future ahead.
  • Lots of work to be continued...


houdini-c.jpg

Houdini-Witness

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @houdin1! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

The new SteemFest⁴ badge is ready
Vote for @Steemitboard as a witness to get one more award and increased upvotes!