Skip to content

Osmosis Skip Block SDK ‐ MEV Auction Support

Peter edited this page Jun 6, 2024 · 1 revision

Overview

The MsgAuctionBid TX allows users to bid on top-of-block execution of a list of transactions. The auction is conducted by the Skip Auction Module, which is a part of the Block SDK.

When a user submits a MsgAuctionBid TX, they specify the list of transactions they want to execute at the top of the block if they win the bid. The Skip Auction Module will then conduct an auction for the right to execute these transactions on top of block the MsgAuctionBid is executed on.

Workflow:

  1. The Blockchain includes the MEV Lane provided by the Block SDK see here
  2. MsgAuctionBid is executed with a list of transactions
  3. Skip Auction Module conducts an auction for the right to execute these transactions at the top of the block, comparing the bids of all MsgAuctionBid TXs chosen for that block
  4. The winner of the auction is chosen and the transactions are executed at the top of the block

Block example: Block 16448358 - shows:

  1. A MsgAuctionBid TX is at the final position of the Mintscan block TX list (top of block) - MsgAuctionBid TX
  2. Decoding the MsgAuctionBid TX shows:
    1. A bid of 6.133432 Noble USDC (6,133,432 ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4)
    2. 2 TXs in the list
      1. A MsgSwapExactAmountIn TX
      2. A MsgAuthzExec TX
  3. This TX won the auction, so their TXs are next in the same block's TX List
    1. MsgSwapExactAmountIn
    2. MsgAuthzExec

Indexer - Parsing

  1. Auction Winner: Bid removed
    1. The MsgAuctionBid transaction that is included in a Block is a clear indication that the auction was conducted and the winner was chosen
    2. The successful MsgAuctionBid TX will need to be parsed to extract the Bid Amount
  2. Auction Winner: Transactions Executed
    1. The transactions in the list of the winning MsgAuctionBid TX are executed at the top of the block
    2. Nothing to do: These transactions are included in the block and processing will be handled by the other handlers across the codebase

Example Executions

  1. 0E9E1AB7586E621F2834DB1D8EC709E8B319511B7A4A045295D9AA1028349FE8 - Block 16440566
  2. D555A7A952A0171AB3CF727BE0D28238AC1B9C10D0DF86F5B3FEF8D105CDE552 - Block 16443773
  3. 0308DC7FA4577A5FE95AA0D9F60A987040B04E2EDE569307D578243BE285C9E6 - Block 16443776
  4. FE6E02715128A48F525F93C8A1A2F02A2B23071E48E3B63D2B92079C8FFA9493 - Block 16448358

Docs