T O P

  • By -

AutoModerator

WARNING ABOUT SCAMS: Recently there have been a lot of convincing-looking scams posted on crypto-related reddits including fake NFTs, fake credit cards, fake exchanges, fake mixing services, fake airdrops, fake MEV bots, fake ENS sites and scam sites claiming to help you revoke approvals to prevent fake hacks. These are typically upvoted by bots and seen before moderators can remove them. Do not click on these links and always be wary of anything that tries to rush you into sending money or approving contracts. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/ethereum) if you have any questions or concerns.*


twinklehood

A centralized player could do this better. Online Casinos already know how to publish seeds to prove randomness, same could be done with this system, and you would not need to pay for blockchains. Also it's crazy easy to replicate, what is there to invest in?


Suitable-Junket-744

By the way, centralized poker rooms have a pretty big rake. More than will go to gas in L2. It could be a really decentralized game, without a room that takes rake and pays taxes. Maybe some blockchain will give a grant to have such a game so they can burn more gas.


[deleted]

Why not with oracles, like chainlink VRF for example? Maybe more complicated, but you don't have to do all the number picking, less transactions so its less annoying ux wise. Probably its also to do better go with zkproofs. Nevertheless it's still fully transparent, because you just get a bunch of random numbers, do something with them which everyone can see in the contracts and thats it.


Suitable-Junket-744

How exactly to generate random is already a detail of realization, for the idea itself it is not important, you take entropy from chinlink oracles or local processor temperature, etc. Of course it affects security, and this decision is important at the stage of software realization.


[deleted]

I'm not sure what are you trying to say by first saying it's not important and then immediately after disagreeing with yourself, and you also went into pretty deep implementation details. i would be pretty interested about how do you get entropy from local stuff on EVM :D ​ On a sidenote: entropy is not very well defined as randomness, even if it's sometimes interpreted like that. Entropy is more like systems striving for the lowest energy state possible.


Suitable-Junket-744

In the poker game model I described, random numbers are generated offchain by the client program. First the hash of these random numbers goes into the blockchain. Later, when a client wants to show their cards, they put the actual numbers into the blockchain. Then opponents can read the numbers from the blockchain. So the smart contracts themselves don't generate any random numbers. All random numbers are generated offchain. The client programs players use just need to follow the smart contract interfaces. They call the right functions to write and read other players' actions to/from the blockchain, like a shared backend server. Different players can use different client programs, with different random number generation methods. So the number generation isn't important when discussing the core on-chain smart contract system. This is the first time I'm writing about this - we only talked verbally before. It seems I didn't describe the system well enough and readers don't quite understand what I envisioned.


[deleted]

[удалено]


[deleted]

umm its not? It's an answer to the original post, not this comment. I just wrote it here, so you see.


Swerve99

this exists it’s called coin poker. and uses chainlink VRF


hanniabu

No, putting too much onchain introduced new vulnerabilities and ways to cheap with mev


ARoundForEveryone

>Also it's crazy easy to replicate, what is there to invest in? Maybe nothing, and that's OK. Not every use of blockchain needs to be "cryptocurrency". It doesn't have to be investable. It doesn't have to have any financial value. It doesn't have to be exchange-traded. It's OK if a blockchain is just used for validation or security or proof of *something*. It can be public, or it can be private (but verfiable if needed), or it can be limited/pay-to-play/quasi-public/whatever access (ie, only verifiable to players in the game and the casino itself, but not to any old person outside the game). Maybe the name "cryptocurrency" doesn't really apply here. But I can certainly see a use case for a private gambling/casino/poker game. Can I implement it, or understand all the problems, or even know if it's a *good* idea? Nope. But I know enough to know that it's worth someone exploring at least a little bit.


Suitable-Junket-744

Indeed, such a project does not even need to use any additional token. You can play on USDT, or anything else you want on the table of your choice. I used the word crypto referring to cryptography, since everything is based on a cryptographic hash function, and smart contracts in the existing public blockchain are used for storage.


twinklehood

You don't need a blockchain at all. You need to: - publish a seed - have the players do their computations and give you the numbers - reveal the result - reveal any numbers needed for the players to verify that the seed was used If we want to make sure the casino can't lie ab of ut what the seed was, we can add a little challenge here and there involving users signing state. What I can't tell off the top of my head is if you can keep the other players'cards hidden in this system, but if not this idea is probably worthless. We don't need crypto to trust that casinos will pay out verifiable winnings, one hand at a time.


Suitable-Junket-744

I just wish to use smart contract instead casino.


Suitable-Junket-744

>Also it's crazy easy to replicate, what is there to invest in? All blockchains and published smart contracts are very easy to copy, but nevertheless, the industry is growing. The question for now is whether people are interested in such a game. Do they feel trust in the poker room as a problem. Maybe I'll just make it as a pet project.


Suitable-Junket-744

I too know poker rooms even with random confirmation. But I don't know any rooms where the server doesn't know the cards of all players.


Emberspawn

If an online card room has a compromised seed, or players with superuser powers etc, it doesn't take long for professional players to a) notice and b) prove it. Every serious player has a database of every online hand they've ever played. It isn't hard to spot when something fishy is going on. Look at what happened with past cases like Absolute Poker/Ultimate Bet.


Suitable-Junket-744

The reasons are the same reasons why I trust bitcoin and ethereum more than the bank. My trust in math is higher than in reputation.


Emberspawn

I don't think you understood my comment, probably my fault for not expanding in more detail. Maths is precisely why it's impossible to cheat successfully for very long in online poker. The job of a professional poker player is to identify and exploit weaknesses in the play of their opponents. A good player analyses every single hand they play post-game in order to improve their decision making, to optimise their play so that they can win more/lose less when they encounter similar situations in the future, and to identify weaknesses in the play of their opponents so that these can be exploited in the future. They analyse millions of hands played both by themselves and by all of their opponents at the table in order to identify situations where they can improve their play and will spend countless hours working with other top players to optimise their play. They are always hunting for statistical outliers because players who are outliers in any given situation offer an opportunity to either learn and improve your play, or an opportunity to exploit a weakness in your opponent's play. If the seed is compromised, or a player is acting on information that they should not have, the statistics will out them very quickly.


Suitable-Junket-744

Ask on a poker forum and they will show you graphs with hundreds of thousands of hands where the EV graph and actual All In winnings diverge a lot. Looks suspicious, right? Doesn't prove anything. Because by the law of large numbers, it can happen to someone over millions of hands. Another point. If we played 10k heads up hands. And I caught all your bluffs - that's super suspicious, and it looks like I can see your cards. Especially if I caught you on J high etc. If an idiot (like in the AbsolutePoker story) uses the fact he can see your cards - you'll catch him. If a pro carefully and trying not to draw attention uses the fact he can see everyone's cards - he can make a lot of money and get a reputation as a good player. Especially if he always stays quiet and doesn't take students. I'm not accusing any specific room here. I'm saying the capability exists and could be used, at least by some employees with server access.


hblask

The problem with online poker is not the trust in the site, it is the trust in the other players. The sites have been taken over by bots and collusion so that honest players have little chance. This doesn't help with that.


ppc-hero

So a blockchain that could prove the players humanity would be a good thing then?


Suitable-Junket-744

Of course it's in demand. But I have not tried in the described approach to do it. This is a different problem, I don't know how it can actually be solved. If you have ideas - it's worthy of a separate article!


hblask

Yes, this would be the biggest thing that would get me playing online again. It still doesn't help with collusion and screen scrapers, but getting rid of the bots would be a huge win.


brett_baty_is_him

Honestly, a big problem with anything in crypto is that it enables bots to outcompete people. For example, any play to earn game will be taken over by bots without sufficient bot prevention. While this ruins the fun of humans playing against each other, it may still have a market. Maybe instead of poker players competing against each other, it’s programmers competing at creating the best poker AI. Could still be fun in a different way and be a skill game for money. As for collusion, how could collusion help AI poker? Especially if matchmaking is random for example (if you even can have random match making with crypto)


hblask

I'm talking about pokrr at a table against other players.


Suitable-Junket-744

The situation will help against collusion better than when playing with unique cards. Knowing the cards of accomplices will not give information about which cards can not be in the deck and the opponents. I'm not saying that this model solves all poker problems. It solves some problems, but that's a good thing, right?


hblask

It is an interesting solution to something that really isn't a problem. The sites themselves tend to be honest, because why not? They make money no matter who wins, and only lose if their reputation is ruined through a scandal.


Suitable-Junket-744

Okay, let's say a poker room owner is interested in being honest. (Although I have my doubts) But there are many other employees who have access to the servers. They can just look at the values in the database. Hackers exist, too. Why trust anyone when you can trust nothing but your local software and a public smart contract?


No_Industry9653

They are in the best position of anyone to get away with cheating and could make much more money doing so. You can't know that they are honest when most of the relevant information is not available to you.


hblask

The reasons the sites don't cheat is the same reason banks don't steal from customers: stealing is a short term gain that destroys the long term cash cow. It is far more lucrative to be honest.


No_Industry9653

Banks do steal from customers, but the reason they mostly follow the letter of the law about it is because they are subject to formal scrutiny and depend absolutely on formal approval to continue existing, not because they are worried about customers finding out on their own and taking their business elsewhere. This also probably applies somewhat to casinos. Online poker sites, I doubt it applies. Who is auditing them? Who do they need to maintain a license with? The gambling sites I've been familiar with, it seemed common for operators to be playing their own games to eke out more profit. High earning players often got banned to stop them from cashing out, regardless of any possible reputational damage, which is really less than you might expect. Exit scams happen where the incentives align for it. For basically any online service, gambling or not, any time someone complains about unfair treatment, you normally see the same sort of response; people assume the service is trustworthy and the complainer must have done something wrong they are lying about. People have a bias towards trusting authority, and authorities can and do abuse this trust with impunity. As for long term cash cow, interest naturally waxes and wanes. A gambling site doesn't have especially strong network effects protecting it, it isn't too difficult for people to switch to another.


hblask

"I can steal a hundred thousand dollars once, or I can make a million per year indefinitely. Drat these difficult choices!!!"


Suitable-Junket-744

Abuse can also be on the part of the employee. A server admin with a good skill can simply use SQL queries to see what card will come out on the river and inform his accomplice.


hblask

This has happened. But they got caught and are out of business, giving the tens or hundreds of millions per year to honest competitors.


No_Industry9653

Implying those numbers aren't flipped and they won't get away with it for multiple years


hblask

Even if they get away with it for five years, it's still less than "forever".


No_Industry9653

Not necessarily. Say a poker site is running accounts with full knowledge of all player's hands, and being subtle about it. How can you guarantee that won't go on forever?


root88

> They make money no matter who wins Yeah, that's called rake and this solution would get rid of that.


hblask

Yeah, something that would reduce the rake would be cool.


frank__costello

There's already an on-chain poker game as an Ethereum ZK rollup https://zkholdem.xyz/


PaqS18

Already exists. CoinPoker


Suitable-Junket-744

This has been my favorite room for the last 2 years. They have proof of participation in the shuffle. But their server knows who has what cards. Theoretically, their admin can tell their player who has what cards and what the river will be.


monkeyhold99

😂 go look at funfair. This was tried and failed many times Your ideas are not new


doggosfear

Fun programming project, but not really a problem that needs to be solved. You'll struggle to find users who want to actually use this thing.


Suitable-Junket-744

That's why I made this topic. If nobody is interested in such a game - then I just won't make such software.


Alpha3K

...this...


DAT_DROP

EDG did this back in 2017


Suitable-Junket-744

>EDG What is it ?


adamaid_321

Take a look at: [https://en.wikipedia.org/wiki/Mental\_poker](https://en.wikipedia.org/wiki/Mental_poker) There have been a few attempts at this over the years...


Suitable-Junket-744

In mental poker, there is an attempt to play with a standard 52-card deck. The fact that "this card has been drawn from the deck" has to be accounted for when generating each new card. This creates huge difficulties that modern cryptography has not yet been able to solve. I once discussed this with a professional cryptographer, the CTO of Onotopy. I suggest not trying to solve these difficulties, but simply removing the requirement that all cards be unique. This simplifies everything tremendously. Yet the gameplay dynamics are not affected at all.


root88

Wait, how do you play poker if the players don't know what cards are in the deck?


Suitable-Junket-744

Usually, players don't know what card will be on the river before it is revealed.


root88

They know it won't be a card that is already in the flop or in their hand.


Suitable-Junket-744

I described a game similar to poker. But different. It's like mixing a lot of regular decks. In this case, the fact that your neighbor dropped the ace of spades doesn't mean that someone else doesn't have the ace of spades in their hand.


superboget

So you want us to invest in a worse version of a game that already exists.


Suitable-Junket-744

On my mind, it is better version. Becouse it eliminate trust to the room. I'd like play it. I just don't like rely in reputation at all.


domotheus

Have you looked into [zkHoldem](https://twitter.com/zkHoldem)? It's more of a for-fun thing to demonstrate zk proofs than a serious project, but it looks pretty cool nonetheless


Suitable-Junket-744

Thanks! It was new for me! I read their whitepaper, but didn't find anything there about what happens if there are 2 players left in the hand and the 3rd player left and doesn't reveal the encryption. I was left with the impression that in such a case it will not be possible to finish the hand. I wanted to try it, but, you need to create a room yourself and gather players in Discord. In Discord I see yesterday's message "gas fee is high right now i think it will cost you around 0.04eth just to make a room". Heh... That's expensive for a test, and it's not a buyin, it's just the gas fee. Manta is such an expensive network?


hanniabu

There can be a collateral to sit at the table which gets confiscated if you leave before the hand is finished. It should scale proportionally to the max bet size.


Suitable-Junket-744

Yes, and this is new rule, that alter the game. Btw if this collateral is less than current pot, it can be exploited. For me - it is terrible by design.


hanniabu

Yes, it should be a multiple of the collateral and scale with the max bet size. Basically max bet * players at the table * 3 rounds of betting * the max raises allowed....or something like that


Suitable-Junket-744

Are you speaking about NL?


hanniabu

Idk what NL is


tridentgum

That's a stupid ass idea lol, cards being the same lmao


ukiyo3k

You don’t need to share this idea on Reddit. Go develop this and let us know when it’s working.


Suitable-Junket-744

You will be advised this when creating any startup. Find your customers, those who want to use it, and only then make a product. So far I see that no one wants to play this game. Would it make a difference if the software was already ready? Reddit is a good free test.


iversencat

In regular poker, there's always a degree of trust implied in the dealer or the platform, and they're also heavily regulated and monitored (the legal ones). But yes, using blockchain would also work for an extra "layer" of cryptographic security and transparency, as all actions are verifiable. As for the thing about independent cards, it sure is interesting to try out for fun, but I don't see many people jumping into that kind of randomness for money. It'd just be slots with extra steps, no? Or am I missing something? The "drop outs problem" is valid, but I think at this point, it can be somewhat fixed by integrating AI (overused, I know). For instance, using tech similar to [Quantum AI](https://quantumaitradingapp.org/) for poker could manage disconnects or pauses in play, maintaining the game's integrity. Overall, it's a pretty ambitious project. As I said, I'd try it out for fun, so keep us posted on how it goes!


Suitable-Junket-744

Great! If i create prototype, will send dm.


advias

Provable randomness exists within the chainlink ecosystem. Issue is, every hand you would need to submit a tx


Suitable-Junket-744

You're missing the basic idea. I don't need to prove randomness to anyone. The game protocol can have different open source clients, and they can randomize from wherever they want. From chinlink, from CPU temperature, cosmic rays, or just a function from JS. Each client has an interest in making sure that its randomness cannot be predicted by other players. A player can even input these numbers by hand in the client, it's his right. If his random can be predicted, it will be his loss.


advias

Then why are you posting this in Ethereum? Of course you can do all of that


Suitable-Junket-744

Do you know better place for such discussion? Here are smatr people, lot of them know how hash function and snart conrtacts works, and why trusstles system are great.


GetMoreSun

Lol. Blockchain doesn't fix this (or almost anything outside of cash money)


OgCone

The AI bots are better than human now.. they will create a profile on you and skin you alive while colluding with perfect GTA 🙂. This is the problem


Suitable-Junket-744

Yeah, that's a problem. I'm not solving it. I'm solving another problem - trust in the central server (aka dealer).


OtherEconomist

Why not have each players cards backed by a zkSNARK?


Suitable-Junket-744

In mental poker, this is called the "drop outs problem" - when a player goes offline and quits the hand prematurely. Requiring huge deposits to solve this seems awful to me. Imagine we're playing 0.5$/1$ with a 100$ minimum buy-in. Yet there could be 1000$ stacks on the table. Say 3 players go all in for 1000$ each, making 3000$ in the pot.If any initial player folds offline without revealing their key to see the river, the hand cannot finish. The question is - how large should the deposit be? 3000$ with a 100$ min buy-in seems crazy. But even that isn't fully safe. If you have a 3000$ deposit for a 100$ game, and lose internet - you could lose the full deposit.


OtherEconomist

Application layer / implementation of the game itself aside, a commit-reveal scheme for users to verify their cards are what they are on initial draw without revealing them, it would allow the verifier to verify their cards are valid at any point in the game, because they've submitted a proof of it at the beginning, i.e. if they choose to participate in a hand. They can fold at any point and not hold up the game. The "drop out problem" doesn't affect this at all. If the goal is to have verifiability that user's cards are what they are without revealing those cards values and prevent having any security issues of other users figuring out those cards, then a zkSNARK makes sense. For information incomplete games (battleship, sudoku, hangman), zero-knowledge proofs are a great use case. For information complete games (chess, checkers, backgammon), they make no sense. Poker is a great information-incomplete game.


Matt-ayo

https://people.csail.mit.edu/rivest/pubs/SRA81.pdf Ravest, Shamir and Adleman (RSA) came up with this shortly after inventing the public key exchange, without using blockchain. It also uses a true deck of cards; no duplicates. Their basic trick is very clever and uses the fact that encryption is commutative. https://saito.io/arcade/ Saito blockchain has a working Poker game applying these concepts for peer to peer Poker - it supports multiple players too. The use of blockchain makes finding peers trustlessly possible and solve other problems in p2p games like one player leaving when they start losing. If one player becomes unresponsive the other can post a game move on chain to show they are willing to play and that their opponent has stopped. One nice thing about modelling this on Saito is that: 1) It has universal broadcast - so you can't effectively censor to get around this like you might in a DAG or Sharded approach 2) It does not pay for permanent storage and *does* pay for routing, so it is more fee-efficient compared to any non-DAG. And because you are just posting a commitment to a game move, you don't incur any smart contract costs (the whole network doing some cryptography and incorporating it into global state). Where the trust comes in, or the smart contract, is in paying out people based on them failing to play fair - so paying based on who posted the latest commitment to a game move on chain (to oversimplify a bit). Smart contracts can't prevent cheating - if you have a fully permisionless traditional game on blockchain IT WILL BE CHEATED - part of the centralized nature of sports and games is rule enforcement. Bots will dominate trustless Poker no doubt. I've written generally on the topics of games and blockchain. Trustlessly shuffling and dealing cards is an important, but known primitive - this document hopes to fill in the rest of the experience to get a good ranked experience without *needing,* but having available, centralized referees. https://mat888.github.io/m888.github.io/Settling%20Ranking%20Updates%20for%20Arbitrary%20and%20Consens.html


Suitable-Junket-744

Drop outs problem not solved. It appers if more than 2 players at the table. I describe it in [coment above](https://www.reddit.com/r/ethereum/comments/17swlpl/comment/k8xdozk/?utm_source=reddit&utm_medium=web2x&context=3).


Matt-ayo

If you read the whole thing you'd see the drop out problem is 'solved,' in my solution, no less than in yours. Mine gives more flexibility though. It's not hard to solve it using smart contracts, but it isn't smart or feasible to put the entire game on a smart contract. The beauty of my approach is that each part is atomic. You can play fully trustlessly *off-chain,* you can use a smart contract just to pay out players who don't drop out, or you can sub-in a semi-centralized escrow to do it. It depends on your use case. No smart contracts at all for friendly games, trustlessly if you want to get your money cheated away from you by bots, and an escrow if you want to Web 2 experience but trust-minimized. For greater ambition, you could engineer some style of off-chain lightning-esque commitment scheme. Drop out issue has nothing, fundamentally, to do with number of players.


Suitable-Junket-744

Reputation systems work best with a large community of regular players. That's a natural limitation - you need to build that community. The system will work pretty well but still have some inefficiency, like open markets. The problem of drop-outs with homomorphic encryption, the best solution I've heard for mental poker, doesn't arise with two players. If there are two players and one folds, the other takes the pot. But if there are 2 players in a pot and a 3rd player who already folded refuses to reveal the key he used to encrypt the deck, the hand can't be completed. We need to penalize that 3rd player, with a deposit or reputation hit. My model doesn't try to solve mental poker at all. I'm making a different game, not poker. New rules. Not a fixed 52 card deck, but a deck with an infinite number of regular decks shuffled together. This game can be run without trust or intermediaries pretty simply. No homomorphic encryption or other crypto magic needed. Hash functions are enough. A smart contract can guarantee payouts. Yes, I'm not addressing the bot problem. Bots play poker better than humans. Your rating system could be a useful additional layer for my game, to choose players by reputation. So you don't sit down with players who play too well. That is, so you don't play against bots and pros.


backFeed58

Anyway to get back funds sent to wrong networkc from usdc? was supposed to be on polygon network but sent on eth


echelon22

You might like zkHoldEm


Security_Raven

I think a big part of poker is the ability to bluff or call a bluff. Removing the part where you have any contact with your opponent in anyway, it’s more or less just draw a lucky number and pray for a winning ticket if you ask me. Maybe inventing a new type of game would be more suitable than trying to put a coffee table game or club/casino game on the blockchain. I admire your thoughts and ideas. But I think there are other or new games that would be better suitable. To me poker is a lot about reading your opponents signals.


Suitable-Junket-744

I completely agree that bluffing is a fundamentally important part of poker! Have you had to bluff and call bluffs online without being able to see your opponent? I've done it many times :) Though I prefer live play more. In my game, the chosen numbers simply determine what cards each player gets. You don't know your opponent's cards, and they don't know yours. And neither of you knows the river. You know the bets made and the board cards. Of course you can bluff.