It began with an e-mail. “I have been following your blog for a while,” wrote Gabe Newell, president of the videogame developer Valve, in October 2013. “Here at my company we were discussing an issue of linking economies in two virtual environments (creating a shared currency), and wrestling with some of the thornier problems of balance of payments, when it occurred to me ‘this is Germany and Greece’…. Rather than continuing to run an emulator of you in my head, I thought I’d check to see if we couldn’t get the real you interested in what we are doing.”

The recipient of that e-mail was an economics professor. His name was Yanis Varoufakis, and he had become well-known for predicting the terrible problems that now afflicted his native Greece in the wake of the 2008 financial crash. As he wrote on his blog, “every 70 years or so…a major economic collapse turns us economists from creatures to be avoided at all costs (especially on TV or around the dinner table) into minor celebrities whose words are eagerly followed by a despairing public”.

Varoufakis’s words are now followed eagerly worldwide, because the January elections that swept the populist left-wing party Syriza to power in Greece also made him the country’s finance minister. The challenge facing him is huge—Greece experienced six straight years of recession after the crash and needed 240 billion euros’ worth of bailouts from its neighbours, contingent on harsh austerity measures. But he has one advantage over any other politician in Europe: he has had the chance to study a huge, functioning economy in incredible detail already, through an online multiplayer videogame.

Team Fortress 2 is a game developed by Valve Corporation, an American video game company. After that e-mail from Gabe Newell, Varoufakis agreed to become Valve’s economist in residence. His appointment provoked surprise: What was a 50-something academic doing watching people shoot each other with rocket launchers? But if you looked a little closer, the appointment made perfect sense. Varoufakis’s specialty as an economist is game theory, the study of strategy and decision-making. In Team Fortress and other games available through the Steam portal, 50 million players were making decisions every day. And even better, unlike lab subjects, they cared about the outcomes. They’d spent money on the game and they had the opportunity to spend even more money on in-game extras, like better guns or fancy hats.

What’s more, the full data set was available immediately, accurately measured and in machine-readable form, and you could even change the underlying conditions of the scenario to see how players responded. On his blog, Varoufakis described videogames as an “economist’s paradise.”

He wasn’t the first to come to this conclusion, Earlier, the Icelandic company CCP, which makes the massive multiplayer online game EVE, had appointed Eyjólfur Guðmundsson as their in-house data cruncher. (“I would like to thank [him] for making my name sound almost easy-going,” joked Varoufakis.) Since then, other academics have become involved in the field, including a doctoral student at Princeton who studies in-game spaceship insurance.

Following his work with Valve, Varoufakis wrote a paper about “arbitrage”—trade which relies on the gap between the cost of buying an item and its possible sales price. There was plenty of this kind of trade in Team Fortress 2.

He was also able to observe whether the barter system moved toward a currency system—i.e., if one item became the “gold standard” against which others are measured. In the ends, hats—yes, hats, although some of them did spray confetti over your character as he rained down bullets on an opponent—emerged as the favorite. When I asked Varoufakis in 2013 why this might be, he said: “Currency selection is based on some necessary features—liquidity, intrinsic value, aesthetics, relative price—but also some intangibles. Why cigarettes in prison, or particular baseball cards among teenagers in the 1960s, or salt in medieval Asia?”

In other words, although the forms that economies might take vary wildly, the underlying principles are often the same. One of the themes of Varoufakis’s work at Valve concerned trades between games, or between previously discrete communities. “Suddenly, exchange rates across different economies emerge and so does some sort of balance of payments,” he told the Financial Times in 2013. “Should we fix that exchange rate across this set of economies, eurozone style? Should we worry about internal imbalances evolving within such a currency union?”

Varoufakis didn’t answer these questions in his time at Valve; he ended his paper about arbitrage with a cheeky suggestion that perhaps the company should make the current trading prices of popular items visible, which would both increase the number of people looking to make a quick buck, and the difficulty of beating the market. A hat-based stock exchange, if you will.

Now, however, he has a much bigger sandpit to play in: the eurozone. How should debt-ridden Greece deal with Germany’s financial muscle? For Angela Merkel’s government, the troubles of other eurozone countries have kept the euro weak, allowing Germany’s export-driven economy to thrive. But being part of a currency union has prevented Greece from carrying out classic stimulus measures like quantitative easing, while repayments on its €317 billion external debt have crippled its recovery.

On February 10, Varoufakis echoed Syriza’s leader Alexis Tsipras by telling the Greek parliament that the country would not agree to the old austerity terms. He was adamant that he didn’t want “Grexit” from the euro, but that “at some point, someone has to say No.” Clearly, he is using the insights gleaned from studying shoot ’em ups to play a much older game: high-stakes poker.