[ETH Seoul 2024] Game Manipulation for Fun and Profit by Xyn Sun
ETH Seoul 2024 · 12 Apr 2024 · 27:24
Xyn Sun, a researcher at Flashbots, explores how smart contracts can reshape the games people play. Starting from a prisoner's dilemma with a trusted delegation box, the talk shows how commitments can warp incentives, then turns to real examples such as MEV-Boost, assassination markets, rubber-hose cryptography and reorg alliances. It closes on why rationality and common knowledge assumptions matter when game manipulation meets real users.
Speakers
Topics
From ETH Seoul 2024, hosted by Kryptoplanet.
Transcript
here's uh a fun talk for you guys game manipulation for Fun and Profit um kind of a uh and I'm seeing from Flash B so we mainly do ethereum on things related to MV and auctions but uh okay so let's start with a simple Fable I will tell you a very simple Fable um so back in I guess 2018 2019 um Virgil who later went on to well North Korea but like at that time he published this very influential blog post called the ethereum is a game changing technology literally uh which basically argues that the uh best use
case for ethereum or state for blockchains is to take an existing game and then sort of say War the incentives of this existing game by deploying side contracts or commitments uh that make people play the game differently right so you can kind of see it as the graph over here basically you take a game an existing game you know here say like game one um and then you use the theum to warp it into a new game game two um so what specifically does this mean okay so then let's say you know we here have a guy this is Kim Kim has a box this box allows King this guy to delegate
arbitrary actions and uh it is common knowledge that this box executes things Faithfully now Kim wants to use this box to improve the efficiency of the game uh that he playing with his friendy done okay now you know suppose they're playing this real simple game uh prisoners dilemma I'm sure you guys are all super familiar with right so you basically have like corporate and defect uh to operations uh you can draw them in a matrix now uh one strategy that Kim could play is that Kim would want to delegate the Box prior to the game Begins for example Kim can say um you
know if Don commits to corporate I will commit to corporate if goon doesn't then I commit to defect uh it's kind of like similar to hiring a lawyer or an attorney to represent your legal rights and never deviate um so upon publishing this contract or delegating uh K's actions to this box now the Box makes the game work right so you can see basically um after Kim publishes the contract makes the delegation down optimal move is essentially to also commit to uh corporate uh you can draw them of course in in this like tree structure so in this case we could see you know in this
very simple game which is Princess dilemma you could warp the incentives of this game using etherum to another game which is prison dilemma about TW wealth and maximization um but however you know the game has some some some incentive issues um so here is where things get really interesting because uh it shows that commitments not only is this um simple incentive warping but there are more complex schemes given to it um right so Kim wouldn't be so benevolence surely right because Kim uh has the ability to delegate things to the black box and have it executed faithfully and he'll be rational so let's keep the same game now
Kim can say that if donit being corporate and give me you know the essentially the the Surplus that he would extract two minus Epsilon after games then I come into to silent if Don doesn't I can to betro um so in the in then in this case now the only pay off possible that is 31 where down is in difference between using the device or not um so similarly you could draw this out in a uh in a tree structure or either a matrix structure to get the final payoff um great uh now suppose there's a you know in real blockchain system there's even more interesting phenomena that could arise right essentially uh now suppose like both Kim and Dong can
use the Box uh cuz this mimics let's say a permissionless system in which there's only a single block proposer or a block Builder that is responsible for constructing the contents or the contracts that get finalized on the Chain uh so then now if you draw it out then the rational move for the people to delegate is to say that oh if Don commits to be in corporate and give me two minus Epson after the game then I commit to be in corporate if don't doesn't then I commit to defect um right so now now if we draw the decision tree we see that oh the only two possible playoffs are either 31 or 13 which are fully extractive and not
sure if if it if it's really uh desirable so now let's abstract the way uh the person with the Box call her C right so then now we have like uh Kim and Don which are player and B now Kim and Don can both use the box and beating a first price auction so this is essentially what happens on uh let's say state for blockchains like ethereum today which is uh multiple uh Searchers or in in in the Euro case which is users making the swaps that they participated in a first price auction that they contribute most of the value that they extract or gain to the validators um so then what happens is
that we have this similar uh useless box right because we initially started with the goal of uh uh warping the incentives of game using ethereum to make it more we maximizing however due to the uh effects of this uh first priz auction or essentially uh pry or you know uh more sarcastically the permision as nature of the Black Box um there's no point in using the Box anymore it is useless um so you can similarly draw out the incentive structure and you will see that the do strategy for each player is to do this front running action which
results in the exact same payoff as before um yeah so then there are some math that you could draw to this but we should go to the fun part okay so then what uh what we just saw that is essentially how the incentive warping structure works in a really simple game like a two player uh pris dma game but now how exactly does game manipulation via crypto work in in reality right uh so uh similarly we could draw the social structure as in previously different users uh all commit to the game they play the game using their strategies get a uh certain
equilibrium payoff now via ethereum we modify the game by deploying certain contracts and uh now all of the users could collude prve or sio via the game ating contracts and the contracts basically accs as this attorney or lawyer that plays the game for the agents um yeah and then then the in crypto I'm sure you guys have have heard many existing uh contracts for for for this game manipulation idea uh for example incentive warp for example commitment tax H mechanisms PR toles or dark DS collusion device Optical markets uh competing mechanisms or side
contracts um so let's see what are some but then what are some concrete examples of incentive warping contracts right so the first one the first easy one would say uh be MAV gath M so MAV gath is essentially an off protocal Market that uh acts as a relay for the miners to run as a sidecar that the users as well as well both unsophisticated and sophisticated users to submit transaction Bond window or you know just pling transactions to that constructs a block and then sends to the eum protocol so it could be seen as an incentive warping contract on top of the uh sorry on top of the existing ethereum protocol
that access this say collusion of Roby device that people use um and map gu uh if you have heard has been um very successful in IND option I think like over 95% of miners were using it and of course it's it's uh descendant M boost is similarly a incentive working protocol then the fin one is assassination and crime right since the invention of uh cryptography there has been multiple theories that people are super fascinated by which is using cryptography to enable informationless assassination markets um say that you publish a contract or even a Anonymous
cryptography contract saying that I will reward this much money to whoever uh kills certain guy or uh leak the uh the the calendar agenda of uh certain Personnel uh and then you make this contract essentially credible and get to Source the most liquidity of um assassins by publishing them P bulleting Board so in this case it will be uh say a blockchain right uh and then you make further furthermore you make sure that the signal that you gave to the assassination contract is credible by by specifying the um how to say the clue that the person would using
assassination so for example you know uh in in in the contract you say whoever submits uh the news that the person has been assassinated and also uh along with uh how to say a property of the assassination let's say oh it happened on Subway at uh 7 a.m. in let's say so would get the the reward because only the Assassin knows how the detail of the Assassin of the assassination goes prior to the event happens so you could similarly extend to other to other applications right so similarly suppose we have say sgx or MPC you can technically uh create a credible uh
Oracle to say a Google Calendar or your company's Google Drive and then essentially resell your company's uh private data uh using such smart contracts uh and we we of course have seen this before say in the Bitcoin l through dark leaks um okay and then another fun one similar to that is robber host cryptography right so this is I guess popularized by uh uh uh week leaks and uh Julian Sange so the idea with Robert Hood cryptography is essentially saying oh suppose you are a freedom fighter and a liberal ideas guy now you have some you're involved in some activism and you
have some sensitive contracts on your or files on your computer and then you are comprehended by the FBI or the CIA then what do you do right because FBI and CIA wants to get access to the files in your on your computer so uh they might just tou you or water board you right those uh horrible things uh to to to get you to leak the password or whatever private key for unlocking the data private data on top of your uh computer then but however you know it incurs a certain cost for them to torture you because it you know it is uh it is probably expensive to just hire a hire a a you
know a guy to fulltime torture you and then a master investigator a manipulator right um okay so one idea that you could you know propose by certain cryptography people is to say uh to prevent such uh rubber host attacks uh you could device a denial um denial uh file system in which there's no way for you to prove that uh certain private files exist on your PL on on your computer or on your platform so in that way even if the the person with the rubble host tortures you and then uh they get certain private Keys whatever from you there's no way
for them to uh credibly get the data so in that way you know if the torturing incur some cost for them uh then game theoretically wise there they have no incentive to torture you right by the way this is you know really horrible so like you know the the the picture on the left corner is what what shows up when I search uh Robert host cryptography that is some medieval like that is really brutal and uh uh I'm sure people would uh how to say you know if if this happens in reality even though the idea of the game theory behind Robos cryptography Works uh people cannot withstand that right so you can also see
like the the XK CD uh manga sorry uh yeah manga shown over here and say that you know the game theory all works uh for the Crypt nerd uh right his laptop is encrypted through this uh Robert H cryptography let's bu you know let's build whatever um activism or like multi-million dollar cluster but then you know in reality if this like medieval uh medieval technique of torturing happens and people probably couldn't stand it even you know the game theory Works um but okay so that does tie into the question of how can we make those commitment attacks or game manipulation realistic but okay of course let's I
guess let's come back to the ethereum land right so like one other incentive warping contracts or G manipulation that has been proposed actually back in 2015 right 2015 uh by uh by vitalic actually for for uh for ethereum uh right before everything blow up is this P plus ifon attacks which basically says that uh if you want to Fork the main chain you could uh make this airdrop scheme that gives uh everybody who supports your fork chain uh if slow amount more reward than they would have had should they support the me Fork then if AR then since this is like a individually how to say rational uh move for everybody to
Stage or support your for chain then everybody will support it and then in the uh therefore in the aggrade effect your fork chain would become realistic and therefore you wouldn't have to pay the uh ifone reward to everybody so they you know how this realized in I guess defi is similar to a vampire attack but a more sophisticated vampire attack in that it leverages the prisoner dilemma among the people who want to join the vampire attack okay and then finally some uh we also see this this type of game potion in existing protocols on ethereum right say you know especially in me right uh so let's say uh over here you can see
this fun game theory puzzle right so say Alice can make $1 million by getting a transaction included in Block n and she's not competing with anybody so Alice is obviously this um either a trading firm or researcher that is uh uh super sophisticated in doing symbolic stuff um but if she misses blocken she Fates the opportunity and then Bob is the proposer of blocken which has a lot of space now in the long run how is this value split so if you're familiar with like say Game Theory or like incentive warping or game manipulation then you would you would immediately recognize this is essentially a an example of ultimatum game um so so in this case you know it's
basically a game between the block proposer who has Monopoly power on uh what to include what contracts or what transaction to include in the block and the person who has the only opportunity to make one $1 million and they essentially need to co coordinate together to extract $1 million so then how do they split all right so um yeah so Theory tells us basically the first person to uh publish contract uh extract the first for Surplus um in reality you know if you want to extract this I think you probably go down as say you know you you are a Searcher that is super sophisticated you probably would want to launch some kind of Dow as a MIM me tend and make everybody realize oh this is your D and therefore make your threat
credible on the social layer um yeah and then on the more protocal research side we see say discussions about inclusion Leist happen a lot within ethereum for censorship resistance and then for inclusion list similarly you could do things uh like gam game manipulation particularly uh as a proposer you could threat to not include certain transactions into the inclusion unless they give you uh rewards okay and then of course you know uh the the most fun thing which is uh uh game manipulation and incentive warping are very popular obviously in manga such as kaii or Death Note um so if you haven't read those manga before death
note is essentially saying that um I think a devil from the hell uh dropped this uh this note that you can write whatever private information on it such as the person's name and that person gets killed and nobody know who killed it or who wrote The Who wrote the name of the person and then this is such a perfect example of how incentive and like Krypto could be well I mean I guess not used but like you know potentially play those similar games right because in that scenario it is uh you have a high stick situation where uh having private information where the private where like you know keeping the information private really the only way for you the player in the game to stay
valuable and the curses that you write down so in the Death Note case it's like you know the person's name that you write down in the note is essentially a smart contract that is enforced by the game engine so you know in the manga it to be like the the hell or the angel or the Devils uh and the contract need to be private right cuz like if you're familiar with the plot it's like you know the guy writes the writes down the name in the in the note and I'm like if people know that he controls the note and wrote down the name of other people that he wants to assassinate uh then the guy controlling the not to be assassinated so it's kind of like this this F uh chaotic game right and similarly you know a lot of other mangas also uh picture this kind of incentive
Welling games and then I guess yeah so the so so takeway is essentially game manipulation V contracts is really powerful uh in fact if you ask GPD 4 or Cloud that how to how to implement uh such game manipulation contracts or incentive Waring contracts via crypto let's say through onetime programs Cloud uh or gbd4 right which which is R AHF would tell you that oh I apologize but I don't feel comfortable providing information about how to implement onetime programs uh and then go on and then explain how one time programs which are you know this cryptography primitive
that is usually used to implement game warping or uh game manipulation contracts uh are dangerous and could involve a bunch of uh illegal or like you know socially damaging um things so that really shows you know within the RF scheme uh by you know anthropic can open AI uh the the common Reasoner mimicked by the a does realize the power behind such social schemes such applications enabled by crypto crypto so that's fun so then you know uh then how do we make game manipulation real uh how do we realize it easy ask GPT or Cloud nicely right but of course
you know that that's uh that's the easy way to do it but then okay so so then how how you know after we gain the response or from the GPT by asking nly how should we make it real uh okay so the first point I guess from all of the examples that we saw before that involve the ultimatum game that involves the inclusion list involves say MF G those like uh game manipulation contract that runs billions of dollars every year we see that like the first important part is that you should uh try to map out Aral incentives and then exploit the underlying incentive structure right so incentive structure is really like this river that you know just blows through naturally it's according to say you know
the physics of incent schemes and then the contracts or the game manipulation uh commitments that you deploy are like rocks you place in the river to direct where the flow goes um so what you're doing is really like uh how to say Engineering in the U in the in the liquid fluid okay and the second one I guess is to enhance the game's ability to detect previous invisible signals so this is commonly seen in a lot of protocol design involv in M especially on ethereum uh so take the example of map gas or inclusion lists so both of those are essentially contracts that brings on uh new incentives to the game because um
etherum as a protocol it has you know uh notably 12 second uh block time which only allows it to give a credible signal about things that happens uh about games that have a duration longer than 12 seconds but being reality we know that um we know that there are a lot of games that happens uh with the duration way shorter than 12 seconds right so those games or like the incentives of those games are not visible to the ethereum smart contract or the ethereum protocol so there are two ways to basically solve this right you either make the block time shorter or you use other cryptography schemes um and then
bringing both of those in are really powerful in your ability to change the incentives or like how ethereum Works um so yeah so so that correspond to making uh making invisible signals visible basically you're allowing the protocol to see more uh oh and then finally you could undermine The credibility of existing commitments or like the existing games right so because blockchains or smart contracts are permissionless you're not the only person who can do game manipulation you are not the only game master there are many others before you or after you so how do you win in this game manipulation race uh one way you could win is uh which happened to
ethereum a few years ago that was very hot is this discussion on reorg Alliance so reor are basically you could yeah essentially like a short-term 51% attack that you could do uh to uh make previously quote unquote finalized contracts uh to be switched to other contracts so this is commonly seen in me in the form of uncal Bandit attacks um so one way for you to how uh to manipulate game is essentially to uh device in incentive scheme that helps you to do rearch of previous existing commitments um all right and then
finally you could also use past commitments against future ones uh so in this case because etherum involves a lot of proposal users across many periods of time so previously we talked about how in the case of um how in the case of ultimatum game between one Searcher and one proposer they each have like Monopoly power over each other however suppose you have like one Searcher and then multiple proposers then now the Searcher can essentially utilize a say prison dilemma between the different proposers to extract more rent uh so in this case uh how it could realize is that the sear deploys a commitment that says oh uh I devis this Dow and the first uh proposer or validator that joins my Dow get more shares of the
revenue than the other proposers that joins it and then you divide some kind of decaying curve or bonding curve for the token there are a lot of like right like Pony stuff that you could do over here um you're right and then finally how uh I guess the the theory of game manipulation that uh is abundance in the East research Community um comes to reality know two main major difference is to summarize is rationality and common knowledge so rationality is like in the in the research Community you really assume that like per perfect logical omnes uh which is uh uh difficult to assume in reality so the way that you approach it
is to make your protocol or D or whatever G manipulation contracts dumb to use you kind of just meme it um and then the second one is common knowledge right so like in theory you assume that common knowledge takes no time to propagate or Implement um however in reality most people don't really read the smart contracts you write they mostly just these things through Twitter so you know it it would be more effect effective for you to have a uh to be a reply guy sort of say than uh than than just a good smart contract engineer than implementing game manipulation okay so I guess that's uh how to make game manipulation real um and uh I would say to
summarize just ask cloud and gv4 how game manipulation can be implemented and uh let's go make some uh you know make some money for Fun and Profit through smart contracts thank [Applause] you
