Smashing PokerStars All-In Cash Out for Fun and Profit

Danny Leshem
13 min readOct 4, 2019

--

“The house always wins. You play long enough, never change the stakes, the house takes you. Unless, when that perfect hand comes along, you bet big, and then you take the house.” — Danny Ocean

Part 1: The Sting

PokerStars All-In Cash Out explained

“All-In Cash Out” is an optional insurance offered by PokerStars when all remaining players are all-in in a poker hand. As PokerStars explains:

All players will find themselves in an all-in situation at some point, with all their chips at stake and no way to further influence the hand.

When there are community cards still to come, even a big favorite will get unlucky and lose the hand sometimes.

All-in Cash Out is a feature that gives eligible players who are all-in the option to collect the value of their hand without having to play the hand to its conclusion.

Here’s how it looks like:

All-In Cash Out Demonstration on PokerStars

Of course, PokerStars is not doing this pro bono: insured players receive their equity in the pot minus a 1% insurance premium, charged on top of the standard rake. In essence, PokerStars gives players the option to sell their equity in the pot at a 1% discount — give up some expected value to reduce variance.

So… what could go wrong?

Collusion scheme explained

The key point we’re going to abuse is the exact way player equities (expected values) are calculated.

Consider a 3-handed game between Alice, Bob, and Carol. At some point, Alice and Bob find themselves all-in pre-flop, with Alice holding two black queens (Q♠ Q♣) and Bob holding the ace and king of hearts (A♥ K♥). Card Player magazine’s poker odds calculator tells us that equities are roughly 54%-46% in Alice’s favor.

Now, what if Carol — no longer in the hand — told us she mucked the ace of diamonds and six of hearts (A♦ 6♥)? Taking these dead cards into account, the calculator tells us equities actually run closer to 59%-41%. That’s a small but important difference.

Obviously, PokerStars knows which cards are dead and could, in theory, calculate the exact player equities all things considered. But doing so would leak information on cards held by players no longer in the hand — not cool. To avoid this, and to better simulate a live setting, PokerStars limits their equity calculation to publicly available information, i.e. just the all-in players’ cards. This is by design — a feature, not a bug — and clearly stated in the All-In Cash Out announcement post on PokerStars’ blog:

Are dead cards taken into consideration?

Dead cards are those which have already been folded by non-all-in players during the hand.

These cards are not taken into consideration when an All-in Cash Out amount is determined. Only the cards known to the players at the time of the potential Cash Out (your own cards, your opponent’s cards, and the board cards) are considered when calculating equity and the Cash Out amounts.

Players, however, are not bound by this limitation — creating an information gap that can be abused by a team of advantage players.

For example, say each of Alice and Bob puts $100 in the pot, of which $1 is rake. Taking Carol’s dead cards into account, Alice and Bob calculate their true equities as $199×59%≈$117, and $199×41%≈$82. Meanwhile, PokerStars offers to buy these equities for $199×54%×99%≈$106, and $199×46%×99%≈$91. Since $117>$106, Alice will not take insurance. Bob will, as $91>$82, causing their combined expected value to become $117+$91=$208 — Alice and Bob just created $8 out of thin air.

Put differently, we just reduced one 3-handed Texas hold ’em game to a table game that gives us 4% edge over the house.

Part 2: Analysis

Quantifying our edge

Our edge is a direct result of the additional information we have on dead cards, that PokerStars won’t use. Its magnitude depends on the game type (Texas hold ’em vs. Omaha hold ’em), number of players, and luck (the actual cards dealt).

To quantify it, we need to formally define our strategy.

We’re dealt n hands. For each two-hand combination, calculate pre-flop equities with no additional information (“PokerStars equities”), and with complete information of all dead cards (“real equities”). Find the hands with the largest gap between these two (our “information edge”). Our play is to go all-in pre-flop with these hands, and take advantage of the overpaying insurance to create a statistical arbitrage.

Here’s a random example of a 6-handed Texas hold ’em game where we’re dealt the following hands: J♠ Q♣, A♣ 9♦, K♠ 9♣, T♠ 7♦, 3♥ Q♠, K♦ 4♣

Information Edge Example

Based on the above, we’ll go all-in pre-flop with K♠ 9♣ and T♠ 7♦, and take the insurance for the first. For $100 stacks, and rake capped at $2.5, our expected value is $197.5×62.61%×99%+$197.5×45.65%≈$213. Our final edge in this game is roughly 6.5%.

Alternatively, we could go all-in on the flop or on the turn instead of pre-flop. I didn’t run the numbers, but intuitively our information edge would only decrease: an out (and thus, knowing that a theoretical out is in fact dead) is more valuable the more chances we have to hit it. So when it comes to information edge, I’d expect pre-flop>flop>turn>river. Likewise, we could have three (or more) carefully chosen players go all-in instead of two, but this seems like a minor optimization at best.

To compare Texas hold ’em and Omaha hold ’em in various field sizes, I ran 5,000 simulations for each combination of game and field size (dataset, code). In each run, players received random hands and the information edge was calculated as above.

This chart shows the average information edge for each game. As expected, our edge increases with the number of players:

Average Information Edges
Average Information Edges

Interestingly, the average information edges in Texas hold ’em and Omaha hold ’em are pretty close given the same field size. This is surprising: you learn twice the number of dead cards in Omaha collusion, so you’d expect the information edge to also increase significantly. However, Omaha is more of a flop game, with pre-flop equities running much closer to 50–50. This seems to almost exactly balance out all that extra information, resulting in just a small advantage to Omaha hold ’em collusion. Omaha hold ’em collusion is roughly equivalent to Texas hold ’em collusion with an extra ½ player.

We can further examine each game’s information edge distribution, shown here — as a histogram — for Texas hold ’em 3-handed (mean = 2.57%):

Information Edge Distribution: Texas hold ’em, 3-handed
Information Edge Distribution: Texas hold ’em, 3-handed

This bimodal distribution seems to be a mixture of two normal-like distributions, and can be justified by multiple effects in play. The primary effect, which explains the two modals, is the number of cross-player card duplicates: the left modal corresponds to no duplicates, and the right modal corresponds to a single duplicate (e.g. two players holding a king). Two or more duplicates are also possible, but rare. The distribution around each modal represents secondary effects related to card ranks, as well as to straight and flush outs.

For comparison, here’s the information edge distribution for Texas hold ’em 9-handed (mean = 13.79%). More distributions are available in the dataset.

Information Edge Distribution: Texas hold ’em, 9-handed
Information Edge Distribution: Texas hold ’em, 9-handed

This too is a mixture of distributions, but the many effects in play overlap to create an almost-unimodal distribution.

Rake and commission

In our 6-handed example, an information edge of 8.26% resulted in a final edge of only 6.5% due to rake and insurance premium.

While the insurance premium is fixed at 1%, PokerStars rake depends on the game type, stakes, and number of players. For example, for Texas hold ’em 6-handed, blinds at $0.50/$1 and 100bb stacks, rake is capped at $2.5 which is 1.25% of the pot.

This means that in rounds with very low information edge (say, a 1% information edge, which is quite common in the Texas hold ’em 3-handed distribution above), our strategy has negative expected value.

Fortunately, we don’t have to play. PokerStars’ “no flop, no drop” policy means we can simply fold around in these cases and lose nothing.

Likewise, we can decide to only play rounds where our edge is higher than some threshold. This is a risk/reward trade-off: limiting ourselves to these higher edges lowers our variance, but also our EV/hour.

Bankroll management

A statistical arbitrage in a single round is not enough to take down the house.

Consider a double-or-nothing game where your odds of winning are 55%. If you risk $10, your expected profit is $20×55%−$10=$1, which implies a 10% edge. There’s one caveat though: you must play 100 rounds.

A possible strategy would be to risk $10 each time, and expect a total profit of $1×100=$100. The Law of Large Numbers guarantees that your actual profit will be in that ballpark. Alternatively, you could follow the Kelly criterion to set optimal bet sizes.

However, what if you started with $10, but had to repeatedly risk your entire stack each round? To be left with any money after 100 rounds, you’d have to win 100 consecutive times, the odds of which are 55%¹⁰⁰. That’s roughly 1:100,000,000,000,000,000,000,000,000, which is… unlikely. In the remaining 99.999999…% of times, you’d just lose your initial $10. We can still calculate your expected profit (in the sense of expected value) to be $10×2¹⁰⁰×55%¹⁰⁰−$10≈$137,796, but that’s just a number — it has nothing to do with the real world.

The main difference between these two scenarios is that the first implies an additive process, and the second a multiplicative process. In both cases, expected profit grows exponentially — but the law of large numbers, which gives real world meaning to expected values, simply does not apply in the multiplicative case.

In fact, if instead of stopping after 100 rounds we’d just keep playing forever, our bankroll will tend to infinity in the first case, but converge to zero almost surely in the second. That’s true even if we could reload indefinitely, as in the second case our time-of-ruin is almost surely finite. Probability theory works in mysterious ways.

This is a key concern in any real life application of our collusion scheme, because in poker you’re generally not allowed to take some of your money off the table (“go south”). Leaving the table and immediately returning, buying back for less, doesn’t work either:

In Pot Limit or No Limit play, a return to the game at the same table after an absence of less than 120 minutes is still considered part of the same playing session. In such a case, a player must buy in for at least the amount with which they cashed out, or up to 10% less, if that’s all the player has left in their account.

The implication is that after going all-in and winning a pot, we start the next round with a bigger stack — which we’ll soon have to go all-in with as our strategy dictates. We are knee deep in the multiplicative case.

From a theoretical perspective, our bankroll is a submartingale process, and we’d like to know whether it tends to infinity, converges to zero, or else. Unfortunately, the stochastic process governing it is way too complex to analyze using, say, Doob’s martingale convergence theorems. Our best route is to analyze it empirically.

To see how things go, I simulated 1,000 rounds of our strategy in a 9-handed Texas hold ’em game, $0.50/$1 blinds, and 5% rake (capped at $2.5). Players starting a hand with less than 100bb reload from an external shared bankroll. No information edge threshold is used: every hand has two players going all-in, with the winner chosen at random in accordance with the odds (code).

This shows our aggregate profit in this simulation:

Profit Simulation: Texas hold ’em, 9-handed
Profit Simulation: Texas hold ’em, 9-handed

After 1,000 hands, we withdrew $19,604 from the external shared bankroll, and have $1.1M in play. Our largest stack sits with $602,831. Our aggregate profit is $1.08M, which is insane.

The big jump in hand #841 is two players going all-in pre-flop for $339,959 each: a player holding 8♥ 2♦ open-shoved 3,400bb and got insta-called by a player holding Q♣ 7♥. The latter chose to insure, which proved wise as the eight-deuce player — who waived insurance — hit an out and took down the pot. Our information edge in this hand was 13.7%. Sickness level: max.

To put things in perspective, $1.08M profit over 1,000 hands in these blinds, divided by 9 players, gives each player a winrate of 120,000bb/100 — that’s about 1,000x what the best hold ’em players in the world make.

Simulating for Texas hold ’em 6-handed exhibited a similar pattern (dataset), though numbers were much lower in accordance with the lower average information edge.

All in all, looks like we can indeed expect our profit to grow exponentially.

Part 3: Practical Considerations

Automation

Sharing hands, calculating information edges, and following the strategy — all in real-time — cannot be done manually. At least some level of automation is required.

Developing a poker bot to automate the entire process is a costly option: it requires full instrumentation of the PokerStars software, as well as circumventing anti-bot protections, and handling many edge cases.

A much better option is to develop a poker HUD (head-up display) to display the required actions (all-in or fold; take or waive insurance) directly on the poker table in floating panels next to each player. This requires a much lighter integration to the PokerStars software, and should be easy enough. Trained human players can then simply follow the suggested actions.

OpenHUD, an open-source poker HUD that supports third-party plugins, is an excellent choice for this job: I expect no more than 100 lines of JavaScript to do the trick.

Anonymity

Running this scheme using your real identity is probably not a good idea.

Registering to PokerStars requires going through their KYC protocol: you’ll need copies of a government-issued ID, and a utility bill. Both are easy to fake.

The bigger challenge is anonymously moving money in and out of the site (hopefully, more out than in). PokerStars doesn’t support Bitcoin directly, but you can load Bitcoin to an anonymous Neteller account, and deposit to PokerStars through it. Withdrawal works in reverse: move money from PokerStars to Neteller, and use it to buy Bitcoin (incurring significant fees — but what can you do?).

Obviously, everything should be done through a VPN to avoid exposing your real IP address.

Legality

There’s a thin line between advantage gambling and cheating, and this scheme most likely crosses it.

This article is provided for educational purposes only — I strongly discourage you from actually attempting to make $1M in a 1,000 hands.

At the very least, you’d be violating section 5.4 of PokerStars’ terms of service:

COLLUSION. Collusion between Users by sharing poker hole cards or by any other methods is strictly forbidden. The Stars Group reserves the right, in addition to other measures, to restrict seating and/or to prohibit Users from playing at a particular poker table or in a tournament, including restricting two or more Users from playing together at the same table or in the same tournament. In addition, The Stars Group reserves the right to consider any collusion or attempt at collusion between players (including Users) as a material breach of this Agreement and accordingly The Stars Group shall have the right to terminate a User’s account if a User engages or attempts to engage in any such activity, regardless of the outcome of such attempt.

Also, PokerStars is definitely aware of this scheme:

Doesn’t it […] add incentive for players to collude?

Collusion is, of course, something we continuously consider and prepare for. It’s against our terms of service, and we have detection systems in place that we’ve designed specifically to address and prevent it.

Be warned.

Part 4: Countermeasures

Hard limits

While not officially advertised, PokerStars must have some hard limits in place to prevent (or at least mitigate) massive exploitation of their All-In Cash Out feature.

The most straightforward would be to not offer insurance for very large pots, measured either in absolute dollars or in big blinds. Even if that’s the case now, they’ll likely keep raising the bar. Features are meant to be used: players will legitimately want insurance in large pots, and PokerStars will want their 1% premium.

Generally speaking, I doubt any hard limit will be effective long-term. Once they’re public knowledge, which is always the case eventually, attackers will work around them or adjust the strategy accordingly. The end result is a cat-and-mouse game in which attackers have the upper hand.

Anomaly detection

A better way for PokerStars to detect abuse is by statistical analysis.

Whenever a user takes insurance, PokerStars can log both the “PokerStars equity” (as offered to the player) and the “real equity” (the real expected value based on full information of all dead cards — basically the same one our collusion strategy uses).

Then, for each player we can compare:

  1. The number of times the player gained value by insuring
    (PokerStars equity > real equity)
  2. The number of times the player lost value by insuring
    (PokerStars equity < real equity)

For players committing “insurance fraud”, we’d expect (1) to be higher than (2). This can be tested by a chi-squared test, or by some Bayesian estimate. Players who are highly suspect of abusing the system can then be denied insurance (or blocked) until further examination.

We can further increase statistical power by logging not just insurance events, but all insurance offers (including those waived by players). We can then analyze, for each player, the 2×2 matrix of “insured” (yes/no) and “gain value” (yes/no). Players following our strategy will take insurance if and only if they gain value, separating themselves from all other players.

For colluding players, I’d expect these statistical countermeasures to be triggered very quickly — surely before any meaningful damage is done.

I have no idea if PokerStars has these in place.

--

--

Danny Leshem

L̶o̶o̶k̶i̶n̶g̶ ̶f̶o̶r̶ ̶m̶y̶ ̶n̶e̶x̶t̶ ̶c̶h̶a̶l̶l̶e̶n̶g̶e̶.̶