V3 transaction policy for anti-pinning

V3 transaction policy for anti-pinning

Original Postby Chris_Stewart_5

Posted on: February 5, 2024 14:49 UTC

In the digital contract space, particularly concerning Discreet Log Contracts (DLCs), there is a notable application of packaging to enhance transactional security and reliability.

DLCs employ a system where refund transactions are pre-signed upon funding the contract, which activates after a specified refund_locktime as determined in the initial offer message. This mechanism ensures that if an oracle fails to fulfill their role, the involved parties—Alice or Bob—can still recover their funds.

However, one challenge that arises is the fluctuation of network fees from the time of contract creation to the point of refund execution. Since the transaction fees are locked in at the time of the contract's funding, there could be a significant discrepancy if the network fees have changed by the time the refund is processed. To address this issue, packages have been introduced to combine the refund transaction with a Child-Pays-For-Parent (CPFP) transaction. This bundled submission, comprising both the refund_tx and CPFP_refund_tx, allows for adjustment of the total fee to encourage faster confirmation, regardless of the current network fee conditions.

Both parties in the contract, Alice and Bob, have the capability to submit this package since they each hold valid outputs on the refund_tx. The flexibility offered by this approach adds a layer of financial protection for the entities involved in a DLC, ensuring that even in cases of unexpected oracle inactivity, the refund mechanism remains robust against the volatility of network transaction fees.

This advancement in secure transaction processing within DLCs highlights the evolving landscape of smart contracts and the continuous efforts to mitigate risks associated with oracle behavior and dynamic network fees. For more technical details on how these refund transactions are structured and broadcasted, further information can be found in the DLC specifications.