These developments go live 24 hours after the liquidity and arbitrage mining program ends.
The Hiding Game is the cooperation between users and keepers (arbitrage bots) to hide MEV (on-chain profit) by wrapping trades/debt in specialized on-chain contracts. It maximises the profits available from these opportunities by having priority access. The profits are then shared directly with the user as a reward for using KeeperDAO.
The HidingBook is a backend infrastructure component of the Hiding Game’s DEX trading feature. It is a virtual mempool which enables users and keepers to coordinate, capture, and distribute MEV.
How to participate in the Hiding Game
Users, DeFi products, and keepers can participate in this MEV redistribution and capture profit. For users, it’s as simple as routing your limit orders and borrowing positions through the Hiding Game.
For DeFi product operators, DEXs, DEX aggregators, wallets, etc, it’s as simple as integrating your DeFi product with the Hiding Game. If you don’t already have a limit order or borrowing feature, then this is the perfect opportunity to consider adding one. If you already have those features, then this is the perfect opportunity to upgrade yours so you can begin taking part in capturing MEV instead of letting that value go to someone else. Refer to our Client and partner integration guide.
For keepers, refer to our Keeper integration guide to learn how to coordinate as a keeper in the Hiding Game.
Participants eligible for incentives
All Hiding Game participants share in the $ROOK rewards every time MEV is extracted. Here’s a breakdown of the participants and their benefits:
- Users —anyone using a Hiding Game product either via UI or API
- Keepers — whitelisted arbitrage bots
- Treasury —collected tokens, governed by $ROOK holders
- LPs — liquidity providers in a KeeperDAO liquidity pool
- Partners — an entity engaged with KeeperDAO
The profits generated by keepers involving a participant are returned back to the participant based on their share percentage.
reward_user = profit * share_user
reward_keeper = profit * share_keeper
reward_treasury = profit * share_treasury
reward_lp = profit * share_lp
reward_partner = profit * share_partner
All participants are eligible for all rewards. The exact percentages are subject to governance and change over time, enabling KeeperDAO to boost incentives to the right parties when needed.
Initial incentive plan
The user’s will receive 100% of the Hiding Game’s $ROOK rewards share based on the profit generated by keepers. The treasury will receive 100% of the underlying token profit generated by keepers. This plan is ideal for an initial launch because it incentivizes users to immediately begin using the Hiding Game for their DEX trades and (soon) lending positions.
Benefits of participating in the Hiding Game
- Generate $ROOK rewards each time a keeper arbitrages your order or liquidates your borrowing position
- For limit orders, this results in the user getting a better trade price than they signed. The formula ends being Input token -> Output token + reward
- For borrowing positions, this results in the user getting a % of the profit from a liquidation arbitrage in the event that their position goes underwater and gets liquidated
- Protection against invisible slippage caused by front running attacks
- Protection against sandwich trading attacks which push user slippage to the max
- Trade without paying gas
- Generate $ROOK rewards each time your user uses Hiding Game to generate MEV
- Your users inherit the Hiding Game’s user benefits
- Gain synergy between your DeFi product offerings + Hiding Game offerings
- Quick and easy way to add new features
- Generate $ROOK rewards for correctly facilitating trade for user’s & returning captured MEV
- No gas auctions
- Maximized profit opportunities
- Gas efficient ERC20 token trading protocol
- Bypass the mempool front running battles
- No gas tokens required to trade efficiently
- Yield generation opportunity in $ROOK
- Yield generation opportunity in underlying token
These percentages are used for illustration purposes only. Actual MEV distribution varies wildly on a trade-by-trade basis. The key takeaway here is that due to keepers in the wild gas auctioning each other, the massive majority of MEV goes directly to the miners. Users and DeFi products are getting nothing despite their critical participation in creating MEV opportunities.
This is a bad experience for users for a number of reasons. Keeper gas auctions lead to network congestion. Which leads to an increase in gas prices. It’s very common for a user to have created this MEV opportunity to begin with. For example, a user may have placed a large trade on Uniswap which shifted the price scale creating an arbitrage opportunity between Uniswap and Balancer. Or a user may have used a high slippage % which opened the door for a bot to perform a slippage attack on the user.
This is a bad experience for keepers because, during a gas auction, almost all of the profit goes directly to the miners. All it takes is two keepers front running and outbidding each other to lead to a break even or net loss for all keepers involved.
The Hiding Game enables all participants to create, hide, and share MEV. This chart is for illustration purposes only. The exact percentages are subject to governance and change over time, enabling KeeperDAO to boost incentives to the right parties when needed. Do note that we’re not currently planning on giving $ROOK rewards to miners. Miners are on this chart to indicate that we’re executing transactions on the blockchain and paying gas accordingly.
Users have the most to gain with the Hiding Game. They go from having their trades manipulated and getting 0% of the MEV, to sharing in the profit captured. So if a user’s trade leads to generating profit, the user directly benefits. The Hiding Game also eliminates gas auctions which reduces network congestion. This leads to lower gas prices and a better trading experience for the user. Not only do users not have to pay gas, but they no longer have to worry about front running or slippage based attacks.
Keepers in the Hiding Game have a variety of gains here as well. All of them revolve around trading efficiency and MEV capture efficiency by preventing gas auctions and enabling coordination. We will be announcing more on coordination in the future.
The evolution of the Hiding Game
Soon we will be announcing our next Hiding Game feature which enables users to hide their borrow positions using common DeFi lending protocols. More can be read about this topic in our whitepaper until we make further announcements.
We’re currently in Phase 1 of the Hiding Game’s DEX trading feature. More can be read about these phases in our Keeper integration guide. Coordinating keepers in the Hiding Game is an important phase and we’ll be announcing more information on this in the future. For this initial launch of the Hiding Game, only our internal keeper bot will be eligible to participate. Our bot is a wily veteran in the DeFi space and currently has 8 active DEX integrations with more to be coming online soon. These DEX integrations are used to source liquidity to facilitate trade for the Hiding Game users.
The current phase of the Hiding Game assigns all $ROOK rewards to the user once per epoch (24 hour period). A finite number of $ROOK rewards will be distributed each epoch regardless of how much profit is generated. This will certainly create some interesting opportunities for users. Rewards are calculated formulaically based on MEV captured during the epoch, and the amount of $ROOK being distributed during each epoch. This is very similar to our arbitrage and liquidity mining program’s reward mechanism.
In the future, we would like to have each individual user reward be determined on a per transaction basis based exactly on how much MEV was captured by the keeper. This is a lot more complex than the 24 hour epoch distribution period we’ve used in the past. This approach, while much more accurate, is much more complex. We’d like to upgrade to this mechanism in the future.
We have designed the Hiding Game such that only KeeperDAO keepers can fill a Hiding Game user’s order. Non-KeeperDAO keepers (both bots and human traders alike) cannot fill a KeeperDAO user’s order. This is a primary mechanism for preventing gas auctions. All KeeperDAO keepers must have their addresses whitelisted in order to become a Hiding Game keeper. In the event that a keeper either continuously fails to fill user orders or continuously grim triggers other fellow keepers, they will have their turns reduced and will eventually be blacklisted from participating. In the future, $ROOK staking, slashing and inflation will enable the market to govern over keeper behavior, and imply a pecking order over MEV-capture priority (read more about the coordination game in our whitepaper).
We will not be rewarding our internal keeper bot with a keeper’s $ROOK rewards while it’s the only keeper in the Hiding Game. We will wait until we have onboarded more keepers to begin rewarding keepers with their $ROOK rewards. Even after we’ve onboarded more keepers, we may still forgo our internal keeper bot’s $ROOK rewards in favor of other participants getting more rewards. Governance can decide this in the future.
0xv4 protocol & audits
The Hiding Game uses the 0xv4 protocol for DEX trades. The 0x team spent a great deal of attention on gas efficiency which makes it a great foundation for hiding MEV. Gas efficiency is critical in maximizing the profit opportunity for all participants involved. You can read more about the 0xv4 integration requirements in our Client and partner integration guide. Audits for 0xv4 can be found here.
Gas auctions in the wild
If you like digging into trades on chain, get ready for some fun. Here, we’ll reveal an ideal user for the Hiding Game who likely would have made tens of thousands of dollars in $ROOK rewards were they to be trading through the Hiding Game. We’ll also critique a variety of different gas auctions. Each of which are unique and entertaining to follow. Through these examples, you will see the massive amount of value the Hiding Game has to offer its participants.
The ideal Hiding Game user
Ethereum address 0x4ce9 is a whale. He makes frequent $100k-$1mm trades using limit orders. Ethereum addresses 0x0…07f and 0x3d71 are sharks. The Ethereum miners are also sharks. They swim in, arbitrage the whale’s massive orders, generate massive gas fees, then move onto the next opportunity. The whale is essentially feeding the sharks all of the MEV.
Here’s a trade where our whale bought 5.2 WBTC with USDT. And here’s another where he sold 8 WBTC for USDT. Both trades were massive and both were performed as limit orders. The first trade resulted in 0.132 ETH in profit for 0x0…07f. While the second trade resulted in 1.022 ETH profit for 0x3d71. What’s interesting about these two trades is that these are some of the more rare occurrences where a massive gas auction did not occur. These two trades combined for 1.154 ETH profit for the keepers while also generating gas fees for miners.
This whale has done dozens, possibly hundreds, of trades just like the ones mentioned above. We estimate that, over a 3 day period, he was missing out on tens of thousands of dollars in $ROOK rewards by making his limit orders on open order book instead of through the Hiding Game (which wasn’t released yet at the time of these trades). This clearly shows that this user will greatly benefit from the Hiding Game in that he can share in the arbitrage profit generated from his trades. After all, these profits wouldn’t have existed if it weren’t for him.
Grim (trigger) outcomes
The whale from the previous example experienced a few trades where grim triggers and gas auctions did not occur. That’s a very rare occurrence. Here, we’re going to walk through some of the more common examples that frequent the Ethereum blockchain. Then we’ll reiterate how the Hiding Game and keeper coordination could have prevented these ugly scenarios from happening.
Grim trigger, block 11351321
- The auction’s “winner”
The trader 0x0…07f from our earlier example will show up a few more times. In this trade, he was bidding with several other traders and ended up grim triggering. He spent 1.19 ETH on gas in order to capture 1.23 ETH of arbitrage. After burning several gas tokens, he broke even on the trade.
- The auction’s top loser
Another trader 0x0…094 who was also bidding on the trade, gave up after being outbid by the winner of the trade. An interesting thing to notice here is that 0x0…094 actually ended up spending a higher gas price than the other trader who won. This is because he had to increase his gas price in order to cancel his previous bid which would have lost the gas auction had it been mined in. This trader uses a clever method of canceling trades. Similar to gas tokens, his method involves releasing storage so that his cancel only costs 13,649 gas instead of ~21,000 gas. Even despite that discount. His cancel cost him 0.092 ETH.
- The auction’s second best loser
This trader 0xfaed missed the hard way. He wasn’t able to overwrite his losing trade with a cancel, so he ended up spending 0.12 ETH on gas.
- The auction’s third best loser
This trader 0x1335 lost the auction, realized he lost the auction, and canceled by sending 0 ETH to himself. Not quite as advanced as the auction’s top loser, but he found himself losing 0.057 ETH regardless.
- The auction’s fourth best loser
This trader 0x975e lost the auction, realized he lost the auction, and canceled by sending 0 ETH to himself. Again, not quite as advanced as the auction’s top loser, but he found himself losing 0.029 ETH regardless.
- The auction’s fifth best loser (the funniest one of all)
This trader 0x0…07f… wait a second. He’s the same trader that won the auction! Ooops. Remember when we said he broke even? Well he accidentally tried to make two trades on the same arbitrage opportunity path. Won one of them, and lost the other (to himself and 4 others). So he’s now officially in the hole. He lost 0.028 ETH here.
- There were more losers who bid on this arbitrage opportunity. But we’re going to stop here because you get the point.
- All these traders combined for a loss of 0.326 ETH. The keepers lose, the unknown user got nothing, the miners won.
Liquidation gas auction, block 11699786
- The auction’s “winner”
This trader captured approximately $54,035.26 during a liquidation. But they paid 44.986 Ether ($53,427.76) in gas for a net profit of $607.5.
- The auction’s top loser
Trader 0x945e came in a close second as he narrowly lost the gas auction by coming in 50,000 Gwei short (lol). Fortunately this was his cancel tx so he only spent 21,000 gas on this tx. This miss cost him 1.118 ETH
- The auction’s second best loser
Trader 0x3333 wasn’t so lucky. His missed trade did not get canceled in time and it cost him 3.153 ETH. Ouch.
- The auction’s third best loser
Trader 0x8442 missed by a wide margin and suffered a loss of 0.998 ETH.
- Collectively, all of these traders lost about 5.1 ETH. The user got liquidated, the keepers suffered massive losses, and the miners won.
- It’s also worth noting that this block was filled with arbitrages and missed trades that appear to be unrelated to this liquidation. There were also 27 reverted transactions in this block, many of which appear to be missed trades. This block was very messy.
Sandwich trade, block 11200668
- User initiates a trade on Uniswap
User 0x0f8a becomes a target for sandwich trading after initiating a trade to buy $ROOK.
- Sandwich trade begins
Trader 0xeb46 front runs the user, sandwiches them giving them a worse price in order to arbitrage. Notice this tx mines in before the user’s tx.
- Different trader tailgates
A different trader, 0xb8db, tailgates the user, capturing a different arbitrage to profit 0.0115 ETH
- Sandwich trade concludes
Trader 0xeb46 strikes again, finishing off the sandwich to capture the arbitrage.Trader 0xeb46 actually pulled one additional sandwich trade in this same block. In both cases, the two users had their trade’s slippage price pushed resulting them trading at a worse price than they had desired. The two traders seem to be unrelated and uncoordinated despite them playing off the same user.
- The user got abused via sandwich trade, the keepers got away with some profit this time, and the miners won.
Tailgating gas auction, block 10664967
Gas auctions when tailgating are much different from a regular gas auction. When tailgating, a trader is tied to a specific gas price because they want to sneak in behind another trade. So instead of increasing gas price in order to win, traders will ship multiple txs. This results in each tx representing one chance that they’ll “win” the auction. Which ultimately leads to keepers spamming the blocks with txs.
- User’s trade
User ships tx to buy 60 ETH worth of PNK. Because the trade is so large, it becomes a huge tailgating target.
- Trader tailgates to the extreme
Trader 0x5392 ships 46 txs to maximize his odds of winning. One of his txs succeeds, and the other 45 miss. This is incredibly wasteful in terms of block space. He spent approximately 0.129 ETH on gas for all 45 misses. The one successful trade more than made up for it by capturing 0.5 ETH. He made a net profit of 0.371 ETH, but the cost was flooding the blockchain and congesting the network.
- To see all of the keeper’s txs, view the block’s list of txs and search for the keeper’s address: 0x5392f73b013ea80b4c5eec3ea229388809114537
- This one is especially awful because one single profit opportunity led to dozens of txs spammed onto the network. The user got nothing, the trader made some profit, and the miners won.
Observations from the above examples:
- Arbitrage profit is completely wasted on gas auctions
- Users trades are being manipulated
- Coordination does not exist
Ethereum’s on-chain profit opportunities will always be prevalent. It’s time to coordinate and distribute them fairly and efficiently. Happy hiding!