Definition
A gas bomb is a transaction that executes a low gas operation at a high gas price, with the intention of efficiently burning a portion of the signer’s ETH balance. The bomb serves as a binding promise by the signer to carry out some action. The signer shares their bomb with a trusted third-party, who can use it to slash them. Once in the mempool, the only way to defuse a gas bomb is for the creator to submit a transaction that costs at least as much gas as the bomb itself.
Application to Trade Reservations on a TEC
A trade reservation system looks something like this:
- Taker requests to fill a set of orders within some timeframe, T
- The TEC reserves the orders on behalf of the Taker for T seconds
- The Taker has T seconds to submit their fill transaction on-chain
- After T seconds, if the order has not been filled, the TEC starts accepting reservations again
The purpose of trade reservations is to mitigate on-chain trade collisions. However, it also creates an undesirable incentive for the Taker to grief the Maker: if the market fluctuates unfavorably during the reservation period, the Taker can choose not to fill the orders.
Constructing a Gas Bomb for Trade Reservations
A gas bomb is a disincentive for Taker griefing by ensuring mutual destruction:
- Taker constructs a gas bomb that uses the same nonce as their promised fill transaction (should be next valid nonce)
- Taker submits the bomb to the TEC, along with their request to fill a set of orders
- The TEC monitors the mempool for the taker’s fill transaction (which has the same nonce as the gas bomb)
- If the fill transaction is not observed after T seconds then the TEC submits the gas bomb
Benefits of a Gas Bomb
- No gas cost if the signer behaves correctly (vs deposit contracts)
- Minimal overhead
- Flexible slashing cost
Potential Drawbacks of Using a Gas Bomb for Trade Reservations
- Blocks the Taker from creating other transactions before filling the reserved orders
- It is an online slashing strategy (requires monitoring the mempool), opposed to retroactive
- A MITM could intercept the gas bomb and submit it to the blockhain
- There is a trusted third-party (the TEC)
- It’s an eye-for-an-eye disincentive, which is less desirable than disallowing the bad behavior altogether
- Minimal support at present for signing a transaction w/o submitting it to the mempool
Shoutout to our friendly research fellow Peter for his work on this design