WHITEPAPER · NOVEMBER 2020
Establishing trust through provably fair bets backed by an open-sourced, verifiable smart contract
By Federick Joe P. Fajardo. A proof-of-concept for a decentralized application on the Ethereum network, built to show that fairness can be verified rather than asserted.
ARPAX
The flagship for our blockchain work
ArpaX is our flagship for blockchain-based, decentralized applications and smart contract development. These projects allow businesses to utilise the potential of blockchain technology in the areas of education, gaming and finance. In November 2020 we launched our first Dapp project, ArpaGames.
ABSTRACT
Trust is an essential part of every transaction whether it is interpersonal or computational. The trust involved in interpersonal relationships allows social associations and quality interactions between people. The same principle enables computer networks to have a symbiotic connection.
There are two major factors or components that inherently build trust: fairness and equal opportunity. The goal of this paper is to formulate a method of establishing these factors in computer networks to elevate the trust between human actors and blockchain networks.
Utilizing the classic game of Dice, which is widely played in physical and online casinos, the author of this paper aims to create a proof-of-concept that will serve as a reliable working model for a decentralized application on the Ethereum network.
WHAT “PROVABLY FAIR” MEANS
Verifiable, not asserted
Provably fair algorithms are algorithms which can be examined and verified on the part of the service operator. Every transaction is published — including the generation and hashing of random numbers and the corresponding seed — so fairness is something a player can check rather than something the house claims.
Fairness and equal opportunity
Two components inherently build trust. The paper formulates a method of establishing both in computer networks, to raise trust between human actors and blockchain networks.
The Byzantine Generals Problem
Consensus, finality and immutability (Lamport, 1983) — once a decision has been executed, no single component can alter the state of its execution.
Provable as the oracle
Blockchains cannot reach external data, so random number generation comes from an oracle. Returned data carries an authenticity proof signifying its integrity.
The law of large numbers
The average of results from a large number of trials approaches the expected value as more trials are performed (Dekking, 2005) — which is what makes a fair dice game provably fair at scale.
THE EVIDENCE
Tested against the expected value
Bets were simulated using random numbers from random.org, based on a fair theoretical ninety-four-sided die producing one of the numbers 2 to 95 for each roll.
Random rolls per sample, drawn from random.org
Total rolls across four samples
Expected value — and the value each sample reached
PROOF OF CONCEPT
ArpaGames
An open source decentralized application designed and forked from Etheroll, an Ethereum-based dice game built entirely on top of the blockchain. A bet is placed with three parameters — bet size, roll under, and a wallet with enough balance to cover the wager and the gas. The smart contract requests an encrypted random number from the oracle, then settles the game.
function playerRollDice(uint rollUnder) public payable gameIsActive betIsValid(msg.value, rollUnder) { bytes32 provable_qryId = provable_newRandomDSQuery( QUERY_EXECUTION_DELAY, NUM_RANDOM_BYTES_REQUESTED, GAS_FOR_PROVABLE_CALLBACK ); queries[provable_qryId] = true; playerNumber[provable_qryId] = rollUnder; playerBetValue[provable_qryId] = msg.value; playerAddress[provable_qryId] = msg.sender; }

House edge
Provably fair bets using Ether, backed by an open-sourced verifiable smart contract. No sign-ups and no deposits required.
ARPAX tokens per win
An ERC20 reward token sent from the smart contract to the winning player’s address — the 50,000 → 49,900 movement in the table below.
Place bets anonymously
Anonymity is native to everyone who plays. There are no deposits or sign-ups, unlike regular online and physical gambling operations.
Random number generation by Provable
The smart contract runs on the Ethereum blockchain and requests an encrypted random number from the oracle to settle each game.
The playerRollDice function, as published in the paper.
WORKED EXAMPLES
Where the money goes
Bet size 0.20 ETH, roll under 50. When the player wins, the house does not take the wager; profit goes to the player’s address along with an ARPAX affiliate token, an ERC20 reward asset.
| Player wins — result 47 | Before | After |
|---|---|---|
| Player | 1.01 ETH | 1.20 ETH |
| House | 36.68 ETH | 36.47 ETH |
| Token | 50,000 ARPAX | 49,900 ARPAX |
| House wins — result 87 | Before | After |
| Player | 1.20 ETH | 1.00 ETH |
| House | 36.47 ETH | 36.66 ETH |
| Token | 50,000 ARPAX | 50,000 ARPAX |
READ THE PAPER
