delvingbitcoin

Ephemeral Anchors and MEVil

Ephemeral Anchors and MEVil

Original Postby ajtowns

Posted on: January 24, 2024 05:20 UTC

The email elaborates on a specific conditional check within a code snippet related to transaction fees and the use of an ephemeral anchor.

The sender calculates the fee rate of combining two transactions, TxA and TxB, and compares it to the fee rate of TxA with an additional burn of 65 bytes on the ephemeral anchor. The provided C++ code illustrates a conditional statement where if the product of the spender's fee and the sum of the size of the bytes to spend plus 65 is less than the product of the anchor value and the sum of the sizes of the bytes to spend plus the spender’s size, the transaction will fail due to an insufficient fee when spending by the ephemeral anchor.

Furthermore, the sender suggests an optimization if the ephemeral anchor is added as an input to an existing transaction. In such a case, the value 65 in the code should be replaced with 41, reflecting the reduced overhead since only an additional input is being added without the need for a new transaction header or additional outputs. This adjustment accounts for the efficiency gained by consolidating the inputs into a single transaction rather than creating separate ones.

Overall, the discussion revolves around optimizing transaction fees in a system where ephemeral anchors are utilized, and the importance of calculating the correct byte size to maintain an adequate fee rate is emphasized.