FlowStake

Activity Staking Blockchain Network

View the Project on GitHub

Hashrun - Proof of Activity Blockchain SportsBook

Activity Staking XYO & EOS Blockchain Networks

Proof of Stake - Smart Contract

  • Hybrid Proof of Stake / Proof of Activity
  • Escrow Time Release Proof of Activity Smart Contract
  • Activity Timestamp Verified on the Blockchain Network

Proof of Activity - Validators

EOS.IO - Delegated Proof of Stake Blockchain

  • https://developers.eos.io
  • https://github.com/EOSIO/eos
  • Smart contract key value storage, for cross platform immutable, persistant & activity records.
  • Open-source blockchain software protocol that provides developers & entrepreneurs to build high performance applications.

XYO Network - Proof of Origin Protocol

Proof of Activity as Stake - POS

  • Utilizing Blockchain technology to create a timestamped record of activity.
  • Proof of Activity as Stake - hash, validate & stake the longest chain of activity transactions.
  • Each activity is a node, bounding witnesses, timestamping runtime & last known location to validate proof of activity.

Problem to Solve

Purpose Of Our Hackathon Project:

Distributed Athletic Community - DAC

  • Distributed Athletic Community
  • Generate Performance Records
  • Immutable Data Storage & Persistanc

Applications for DAO and DACs

BACKEND UTILITY

  • Write a script that uses the XYO protocol to generate GPS coordinates / hash addressed content to put into the EOS chain
  • $BASH script that can run locally on our machines
  • Build with EOS PoS / XYO Bound Witnessing
  • EOS Data Persistance

FRONT END APP VIEWS

XYO.NETWORK

Install Mobile Application

XYO GraphQL Query

Searching the XYO network for location of users Creating cryptographic handshakes

Entering a Query

Enter all queries described in this guide into this field on the dashboard page

Block Hash Query

The near query retrieves blocks near GPS point provided. Enter the query near:LAT,LNG

Recent Query

Where Query

Tracking Public Key

Public Key - Bound Witness

Chain Query

Smart Contract Key Value Storage

Geohash Query

Blocks Query

Available queries offered

EOS - Delegated Proof of Stake Blockchain

EOS - Setting Up your Development Environment

Step 1: Install Binaries

Mac OS X Brew Install: Shell

brew tap eosio/eosio
brew install eosio

Ubuntu 18.04 Debian Package Install: Shell

wget https://github.com/EOSIO/eos/releases/download/v1.7.0/eosio_1.7.0-1-ubuntu-18.04_amd64.deb
sudo apt install ./eosio_1.7.0-1-ubuntu-18.04_amd64.deb

Ubuntu 16.04 Debian Package Install: Shell

wget https://github.com/EOSIO/eos/releases/download/v1.7.0/eosio_1.7.0-1-ubuntu-16.04_amd64.deb
sudo apt install ./eosio_1.7.0-1-ubuntu-16.04_amd64.deb

Step 2: Setup a development directory, stick to it.

You’re going to need to pick a directory to work from, it’s suggested to create a contracts directory somewhere on your local drive.

mkdir contracts
cd contracts

Step 3: Enter your local directory below.

Get the path of that directory and save it for later, as you’re going to need it, you can use the following command to get your absolute path.

pwd

Enter the absolute path to your contract directory below, and it will be inserted throughout the documentation to make your life a bit easier. This functionality requires cookies

###

EOS - Key Value Storage & Data Persistance

EOS - Smart Contracts

Deploy EOS Wallets

cleos wallet create --to-console

"/usr/local/Cellar/eosio/1.8.5/opt/eosio/bin/keosd" launched
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5Hwj71vw3gYFSdYs2fKFALMvdActDoRqDomRSFEQFYUtR3RM68g"

Open EOS Wallets

cleos wallet open
cleos wallet list

Unlock EOS Wallets

* cleos wallet unlock

Create EOS Wallets

cleos wallet create_key

Import EOS Wallets

cleos wallet import
enter the eosio development key provided below
5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

Create EOS account


cleos create account eosio token {public-OwnerKey} {public-ActiveKey}
cleos create account eosio hashrun EOS5BZi9LEKHhNSa8qV9vZczYJkYgVuQzFgX5YNmKM6hP5Ku9dEBb PW5Hwj71vw3gYFSdYs2fKFALMvdActDoRqDomRSFEQFYUtR3RM68g

Get EOS account from Testnet

cleos get account hashrun

EOS Smart Contract Deployment

Step 1: Build directory & navigatation

mkdir sportsbook
cd sportsbook

Step 2: Create and open a new file

touch sportsbook.cpp

Step 3: Deploy Smart Contract - Sportsbook

#include <eosio/eosio.hpp>

using namespace eosio;

class [[eosio::contract("sportsbook")]] sportsbook : public eosio::contract {
  public:
       
  private: 
  
};

Step 3: Write an Extended Standard Class and Include EOSIO

#include <eosio/eosio.hpp>

using namespace eosio;

class [[eosio::contract("sportsbook")]] sportsbook : public eosio::contract {
  public:
       
  private: 
  
};

Step 4: Create The Data Structure for the Table

struct person {};
struct person {
 name key; 
};
struct person {
 name key;
 std::string first_name;
 std::string last_name;
 std::string hash:BLOCK_HASH;
 std::string chain:PUBLIC_KEY;
 std::string where:PUBLIC_KEY
 std::string geohash:GEOHASH;
 std::string near:LAT,LNG;
 
 uint64_t primary_key() const { return key.value;}
};

Step 5: Configure the Multi-Index Table

#include <eosio/eosio.hpp>

using namespace eosio;

class [[eosio::contract("sportsbook")]] sportsbook : public eosio::contract {

  public:

  private:
    struct [[eosio::table]] person {
      name key;
      std::string first_name;
      std::string last_name;
      std::string hash:BLOCK_HASH;
      std::string chain:PUBLIC_KEY;
      std::string where:PUBLIC_KEY
      std::string geohash:GEOHASH;
      std::string near:LAT,LNG;

      uint64_t primary_key() const { return key.value;}
    };
  
    typedef eosio::multi_index<"people"_n, person> hash_index;
};
FlowStake 2019