Iage: modified Drugwars Logo
This is a follow-up to my post from early March 2019, that found that more than half of all invest-to-heist ops were done from scripts and that a fourth of all players used some kind of scripts or bots in the game:
Drugwars changed considerably since then, taking a lot of efforts to fight bots while trying to attract human players.
This contribution, like the previous one, looks into the transaction signatures of drugwars' custom-JSON blockchain ops as sent to the blockchain on each game action. All game actions done from the drugwars.io frontend create blockchain transactions that are signed by the steemconnect key. The public key corresponding to the private used to sign a transaction can be reconstructed from the public signature of each transaction. Checking if a drugwars operation/transaction was signed from a key other than the steemconnect key is a clear indication that this action was not done from the drugwars interface but created otherwise.
However, a few aspects have to be kept in mind:
- a transaction or game action signed by the steemconnect key is not necessarily coming from the drugwars interface. There are still ways to send transactions to the chain that are signed by the steemconnect key but not generated from the drugwars interface
- transactions, especially if scripted, are not necessarily picked up and treated as valid by the drugwars backend. The backend may silently ignore invalid transactions, independent of their signer.
Both aspects can slightly dilute the results.
The data used here is from arbitrarily selected days between March 5th (data from the last analysis) until May 4th. Fetching and reconstructing signature information is a quite slow process. The transaction signatures are not part of SteemSQL and the reconstruction of the signer is quite CPU intensive. Fetching and processing one day of blockchain data takes more than an hour for me, which is why I "only" chose a couple of random blockchain days. Data gathering and signature processing was done with beem, data processing and plotting with python and matplotlib.
The drugwars team spent a lot of effort to make it harder to play with scripts or bots. Since my last post on this topic in early March, the team has implemented several measures to achieve this. This includes (out of my head, not necessarily complete):
- rate limits on the API servers
- authentication with SC tokens when connecting to the API
- encryption of blockchain ops, at first with a static key, then with per-user keys
- authentication with username and token for each API call
Changes affecting the analysis of the blockchain data were the switch from individual custom-JSON IDs (
dw-upgrade, ...) to later on using the same id ("
drugwars") for all ops. The encryption makes it impossible for me to find the drugwars operation type for accounts other than my own. This is why I cannot distinguish between different op types anymore like I did in the previous analysis.
Number of drugwars blockchain operations
This graph shows the number of drugwars blockchain operations per day. The blue line is the overall number of drugwars ops per day. This number varies roughly between 60,000 and 80,000 per day. That's in average more than 2 ops per block, which is already pretty impressive on its own! In orange is the number of those ops that were not signed by the Steemconnect key and therefore were not created with the drugwars interface, e.g. from a bot or a script. This number significantly decreased from around 20,000 per day in March to around 170 in May.
Number of drugwars players
This graph shows the number of drugwars players. In blue is the overall number of distinct players per day. In orange is the number of players that had at least one op that was not signed with the SteemConnect key on that day. Also this number decreased significantly from around 1000 in early March to 14 in May. Additionally, it has to be noted that some of these players still send "dw-heist" ops in the "old" format, which isn't accepted from the drugwars backend since weeks.
Drugwars had a good number of bots and scripted accounts playing, especially in the beginning. Human players had hard times to compete against those, obviously limiting the fun. The drugwars team spend a lot of effort in making it hard to play with bots or scripts.
The numbers shown here confirm that this worked remarkably well! The fraction of blockchain ops not coming from the drugwars UI decreased significantly in the last two months. There are only a handful of accounts left that can be identified as bots/scripts by the signatures of their ops, and some of these are clearly left-overs from previous bots that don't work anymore with the current drugwars backend. While, the signature approach may not catch all cases, I believe that bots could mostly be removed from the game.
Tools and Scripts
All scripts to obtain the blockchain data, reconstruct the signers and finally create the above plots are in my GitHub: https://github.com/crokkon/steem-analyses/tree/master/1905_drugwars