edicted Blog Banner

edicted

Hive Goldmine: Looking at Escrow Services

gold.jpg

There are a few gambling dapps I'm developing that I would love to bring to the Hive blockchain. However, being an American, the legality and regulation surrounding such services are highly questionable and risky.

The end goal in these cases is to decentralize the risk to the community (much like torrents) so that even if the activity in question is deemed illegal, decentralization makes it impossible to regulate and enforce the law.

So, at this point, you might be thinking:

You're goal is to break the law and get away with it?
Seems like a dick move.

To wit I would reply:

A lot of this gambling regulation that exists in the first place was put there by people in power who intended to capitalize on that regulation themselves. There wasn't a crusade against online poker back in the day for any other reason than tax evasion and money laundering.

Those may sound like serious offenses, but the people making those laws do it so the even more powerful people at the top can continue tax evading and money laundering without the entire system collapsing. As we can all see, we've reached a point where the entire system is going to collapse anyway from all this rampant corruption. Perhaps the system could use a little push in the right wrong direction.

startrekenterprisepoliticsmoneyregulation.jpg

Legal Definition of Gambling

Did this research all the way back in September 2018.
To recap, gambling requires three things:

  • Consideration (money)
  • Chance
  • Prize

If you eliminate any of the three categories that thing is no longer gambling by law. I've thought of some ways this could be done but that's not what this post is for.

How do we make gambling on Hive impossible to regulate?

As we've seen with other chains like Bitcoin and Ethereum, the SEC doesn't even attempt to regulate them and throws out a classification of: not-a-security. They realize they can't regulate it, so they don't even attempt to. There is no centralized body to regulate.

Decentralizing gambling.

Originally I thought I'd have to invent my own kind of escrow service and centralize that to one or more accounts to run that service. If the service I was providing was illegal in my country, I'd likely have to get someone trustworthy from another country to help me. Not necessarily an easy task.

Escrow smart-contracts

However, I've seen that Hive has had these contracts since inception, and I've never really looked at them until now. I find them very interesting, and I feel like no one is even using them to even half their full potential. This is what I'm talking about when I say that Hive is just a goldmine ready to be mined by devs who know what they are doing.

Let's take a look, shall we?

t1.png
t1.png
t1.png
t1.png

So what did we learn?

Well, for starters, the most important thing I learned is that these smart contracts will allow me to create escrow accounts that never actually have control of the money. You see, I thought we were going to have to trust the escrow accounts to not steal all the money that was transferring hands. Instead, we can see that all the escrow account can do is send the money to one party or the other; they literally can't steal the money as defined by network consensus.

This is pretty awesome, because it means that if I create peer-to-peer gambling services with escrow smart contracts, the vast majority of the time (say 99%+) there is never even going to be a dispute between the two parties and the transfers will go through without a hitch in a trustless manner. Many users could even act as their own escrow service because the process will be decentralized.

Even in the case of the escrow account being a bad actor, the node that I set up would know the rules of the game and know what the escrow account did. They would be blacklisted immediately. If users were playing dollar a pop games, at best the bad actor in question could steal a dollar before being blacklisted and need to create a new account and have others use that account (rather than the ones that already have a history of being trusted).

Doesn't work for @lottoshi

Unfortunately, this service only works for 1v1 2-player games. A lottery that collects a large fund from many different players and then gives it all to one player wouldn't work with this system.

Built in service fee.

One nice thing about the escrow smart contracts is that the escrow can rake a fee off the top, monetizing their service to the community. While I would rather create a frictionless service that has no such overhead, it will still be nice to have the option for anyone to be able to charge a small fee for their escrow service. For example, what if you were gambling for a charity or to fund a project? That project or charity could run an escrow service and host these games to turn a profit for funding.

In all likelihood, many accounts will be willing to provide escrow service for free, winning the race to the bottom and perhaps monetizing their services in some other way (ads or reputation).

Example escrow transaction

Say two people are going to bet each other on the outcome of a coin flip. Each one sends an escrow transaction of 1 HBD to the other. The loser is expected to perform an EscrowReleaseOperation on both transactions. If the loser doesn't perform this action, the winner performs an EscrowDisputeOperation and the escrow arbiter account would perform the EscrowReleaseOperation to the winner.

t1.png

Unfortunately, I don't know if these operations even work on Hive as I've never tested them. Am I really supposed to list how much "Steem" I am sending on the Hive blockchain and hope the nodes perform the correct action? I guess we'll find out.


Return from Hive Goldmine: Looking at Escrow Services to edicted's Web3 Blog

Hive Goldmine: Looking at Escrow Services was published on and last updated on 09 May 2020.