<p>In general, as mentioned in the comments. Your problem in these games resemble a Byzantine Generals Problem where you may experience non-compliant/malicious actors in the network. To achieve consensus in this context, there are multiple avenues.</p>

<p>Firstly, there's Bitcoin's approach. Bitcoin enables every full node to perform independent verification of the Blockchain. The Blockchain is simply a store of a series of past events leading to the current state. Where "past events" (i.e. transactions) are stored in Blocks and the "chain" refers to the hard requirement that each subsequent block is required to be dependent on the previous block based on a set of requirements. Access to the write permissions to the Blockchain is governed by means of Proof-of-Work, where you must burn CPU cycles to create a new block which implicitly grants you a write permission to append to the Blockchain. A key difference here is that the Proof-of-Work need not be done in a collaborative manner as it is a Poisson Process, meaning my chances are just as good as anyone else's, assuming that everyone has the same hash power. In other election algorithms, you may have to negotiate collaboratively and it is not necessarily fully byzantine-failure tolerant. </p>

<p>So how can some elements of this be applied in your gaming context is left for you to decide. But in principle, yes, elements of Bitcoins are applicable in the context you've described, but again I'd reiterate, it is somewhat "overkill". Maybe in the context of the game, you'd set the leaderboard to have some condition that requires some proof of some action that proves that the player has actually done something to mutate the leaderboard? Otherwise, it'd probably be simpler to do it in Lockstep as in RTS games.</p>

CC BY-SA 3.0
2016-06-16T01:18:59.187Z
As PoW power is dominated by who invests the most money in hardware and electricity, you're effectively allowing people to spend money to influence the leaderboard. That's almost certainly not what you want. Use a traditional distributed consensus protocol instead.
Pieter Wuille
CC BY-SA 3.0
2016-06-17T21:27:15.177Z
I'm not sure whether the blockchain protects against fraudulently submitted proofs in this matter. Suppose Alice, Bob, Carol, Dave and Eve are playing. Eve sends a fake "Earned X points" message to Alice, Bob, Carol and Dave, where she actually didn't earn one at all. Wouldn't all 5 calculate the same block based on this message?
Nzall
CC BY-SA 3.0
2016-06-16T00:55:47.447Z
2016-06-16T00:55:47.447Z
rny
<p>For a World of Warcraft community feature conception contest I've come up with something that involves a leaderboard. However, World of Warcraft addons are purely individual, so a centralize platform where a leaderboard is usually saved is not possible. Because of this, it would be trivial to fake the sending of leaderboard updates to the community.</p>

<p>I've been reading about the blockchain recently, and it seems like this might be a way to fix this. The blockchain can protect the integrity of Bitcoin transactions, so it seems like it might protect this. However, I'm not 100% sure.</p>

<p>My main concern is to avoid people abusing the leaderboard by giving themselves extra points. However, Bitcoin transactions are usually between 2 parties. Could the blockchain work with only positive transactions that only involve a single party?</p>

<hr>

<p>Technical explanation: The general concept is that users can get points for completing certain challenges and compete with each other on a constantly updated leaderboard, similar to how some multiplayer games have a list of best players (cfr. Diablo 2). There are no rewards linked with the leaderboard beyond bragging rights.</p>

<p>The problem, however, is that leaderboards are susceptible to manipulation by malicious players unless they have enough verification that people actually achieved what they said they did. Most games fix this by having the leaderboard being hosted on a remote server where the game tells the server what happened and the server checks if the client could have done that.</p>

<p>However, in World of Warcraft, addons are local-only: you cannot configure an addon as a server to receive messages and do central validation. You can send messages from one addon client to other clients via a central addon message channel, but you cannot say "only send messages to this client", because the channel is not secured and any addon can register to listen to a channel. In addition, addons are written in human-readable LUA code and may not be obfuscated.</p>

<p>Because of this, it's easy for a malicious user to manipulate his addon and just spoof the messages. Or even write an addon that will send an autocomplete for every newly generated challenge. This is the problem with distributed leaderboards, they are easily manipulated because there is no verification of integrity.</p>

<p>However, from what I understand, Bitcoin has managed to fix this issue through the blockchain. Transactions are publicly logged, community consensus is required for transactions to be completed and the final state can by verified by anyone. However, the Bitcoin blockchain handles transactions between 2 parties, so there is always 2 sources for each transaction. Because of this, it's unlikely for any single user to be able to manipulate the blockchain.</p>

<p>However, with leaderboards, there are no multiple parties in a transaction. Each transaction is just a player receiving challenge points locally based on something that happens on their machine. So there is no second party that helps against manipulation. This is one of the reasons why I'm concerned the blockchain might not work for this.</p>

<p>Is there an aspect of the blockchain that can help defend against this? And if not, (although somewhat off-topic) is there a different method that could help defend against forgery?</p>

CC BY-SA 3.0
2016-06-14T19:50:48.520Z
I neither understand what your problem is nor how you think bitcoin can contribute to fix it. Describing it in more technical terms probably will help.
UTF-8
CC BY-SA 3.0
2016-06-14T21:16:38.813Z
Proof-of-work (i.e. hashcash) sounds like a solution to your problem, not so much Blockchain. What you need is a deterrence against ease of access and proof-of-work deters very well as users would have to prove that they've done some "work" to mutate the scoreboard.
rny
CC BY-SA 3.0
2016-06-14T21:21:29.070Z
@renlord i'm editing my question to clarify what I'm after.
Nzall
CC BY-SA 3.0
2016-06-14T21:53:25.947Z
The core problem described mimics a Byzantine generals problem which is a consensus problem. Bitcoin solves this by proof of work. In your case, proof of work may be overkill and games often use lockstep or even some paxos algorithm to resolve these problems.
rny
CC BY-SA 3.0
2016-06-15T20:14:39.100Z
@renlord I see. I know this is starting to get off-topic, but could you write an answer based on my minor edits I just made so I can at least give you some rep for helping me?
Nzall
<blockchain><alternatives>
can I use elements of the blockchain to protect the integrity of a leaderboard without central servers?
Nzall
# can I use elements of the blockchain to protect the integrity of a leaderboard without central servers?

(Asked by: username_0 on 2016-06-14)

For a World of Warcraft community feature conception contest I've come up with something that involves a leaderboard. However, World of Warcraft addons are purely individual, so a centralize platform where a leaderboard is usually saved is not possible. Because of this, it would be trivial to fake the sending of leaderboard updates to the community.

I've been reading about the blockchain recently, and it seems like this might be a way to fix this. The blockchain can protect the integrity of Bitcoin transactions, so it seems like it might protect this. However, I'm not 100% sure.

My main concern is to avoid people abusing the leaderboard by giving themselves extra points. However, Bitcoin transactions are usually between 2 parties. Could the blockchain work with only positive transactions that only involve a single party?

---

Technical explanation: The general concept is that users can get points for completing certain challenges and compete with each other on a constantly updated leaderboard, similar to how some multiplayer games have a list of best players (cfr. Diablo 2). There are no rewards linked with the leaderboard beyond bragging rights.

The problem, however, is that leaderboards are susceptible to manipulation by malicious players unless they have enough verification that people actually achieved what they said they did. Most games fix this by having the leaderboard being hosted on a remote server where the game tells the server what happened and the server checks if the client could have done that.

However, in World of Warcraft, addons are local-only: you cannot configure an addon as a server to receive messages and do central validation. You can send messages from one addon client to other clients via a central addon message channel, but you cannot say "only send messages to this client", because the channel is not secured and any addon can register to listen to a channel. In addition, addons are written in human-readable LUA code and may not be obfuscated.

Because of this, it's easy for a malicious user to manipulate his addon and just spoof the messages. Or even write an addon that will send an autocomplete for every newly generated challenge. This is the problem with distributed leaderboards, they are easily manipulated because there is no verification of integrity.

However, from what I understand, Bitcoin has managed to fix this issue through the blockchain. Transactions are publicly logged, community consensus is required for transactions to be completed and the final state can by verified by anyone. However, the Bitcoin blockchain handles transactions between 2 parties, so there is always 2 sources for each transaction. Because of this, it's unlikely for any single user to be able to manipulate the blockchain.

However, with leaderboards, there are no multiple parties in a transaction. Each transaction is just a player receiving challenge points locally based on something that happens on their machine. So there is no second party that helps against manipulation. This is one of the reasons why I'm concerned the blockchain might not work for this.

Is there an aspect of the blockchain that can help defend against this? And if not, (although somewhat off-topic) is there a different method that could help defend against forgery?

**Tags:** blockchain, alternatives

> **Comments:**
> **username_1**: I neither understand what your problem is nor how you think bitcoin can contribute to fix it. Describing it in more technical terms probably will help.  
> **username_2**: Proof-of-work (i.e. hashcash) sounds like a solution to your problem, not so much Blockchain. What you need is a deterrence against ease of access and proof-of-work deters very well as users would have to prove that they've done some "work" to mutate the scoreboard.  
> **username_0**: @renlord i'm editing my question to clarify what I'm after.  
> **username_2**: The core problem described mimics a Byzantine generals problem which is a consensus problem. Bitcoin solves this by proof of work. In your case, proof of work may be overkill and games often use lockstep or even some paxos algorithm to resolve these problems.  
> **username_0**: @renlord I see. I know this is starting to get off-topic, but could you write an answer based on my minor edits I just made so I can at least give you some rep for helping me?  

---

## 1 answers

### Answer by username_2 on 2016-06-16. Score: 1 | Accepted answer

In general, as mentioned in the comments. Your problem in these games resemble a Byzantine Generals Problem where you may experience non-compliant/malicious actors in the network. To achieve consensus in this context, there are multiple avenues.

Firstly, there's Bitcoin's approach. Bitcoin enables every full node to perform independent verification of the Blockchain. The Blockchain is simply a store of a series of past events leading to the current state. Where "past events" (i.e. transactions) are stored in Blocks and the "chain" refers to the hard requirement that each subsequent block is required to be dependent on the previous block based on a set of requirements. Access to the write permissions to the Blockchain is governed by means of Proof-of-Work, where you must burn CPU cycles to create a new block which implicitly grants you a write permission to append to the Blockchain. A key difference here is that the Proof-of-Work need not be done in a collaborative manner as it is a Poisson Process, meaning my chances are just as good as anyone else's, assuming that everyone has the same hash power. In other election algorithms, you may have to negotiate collaboratively and it is not necessarily fully byzantine-failure tolerant.

So how can some elements of this be applied in your gaming context is left for you to decide. But in principle, yes, elements of Bitcoins are applicable in the context you've described, but again I'd reiterate, it is somewhat "overkill". Maybe in the context of the game, you'd set the leaderboard to have some condition that requires some proof of some action that proves that the player has actually done something to mutate the leaderboard? Otherwise, it'd probably be simpler to do it in Lockstep as in RTS games.

> **Comments:**
> **username_3**: As PoW power is dominated by who invests the most money in hardware and electricity, you're effectively allowing people to spend money to influence the leaderboard. That's almost certainly not what you want. Use a traditional distributed consensus protocol instead.  
> **username_0**: I'm not sure whether the blockchain protects against fraudulently submitted proofs in this matter. Suppose Alice, Bob, Carol, Dave and Eve are playing. Eve sends a fake "Earned X points" message to Alice, Bob, Carol and Dave, where she actually didn't earn one at all. Wouldn't all 5 calculate the same block based on this message?  

---

