Skip to content

Commit

Permalink
elip abf: change to LiquiDEX extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoComandini committed Jul 26, 2024
1 parent a27f30e commit cba50dc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions elip-abf.mediawiki
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<pre>
ELIP: XXX
Layer: Applications
Title: Asset Blinding Factors for Partially Signed Elements Transaction Format
Title: LiquiDEX extensions for Partially Signed Elements Transaction Format
Author: Leonardo Comandini <leonardo@blockstream.com>
Comments-Summary: No comments yet.
Status: Draft
Expand All @@ -14,17 +14,18 @@

===Abstract===

This document describes an extension to the Partially Signed Elements Transaction (PSET) format, to encode additional data, the asset bliding factors, that might be necessary to collectively blind a transaction.
This document describes extensions to the Partially Signed Elements Transaction (PSET) format for [https://leocomandini.github.io/2021/06/15/liquidex.html LiquiDEX] swaps.

The asset blinding factors are necessary under specific circumstances, but otherwise these fields should not be set.
In LiquiDEX swaps, transactions are (partially) blinded collectively, thus some extra information must be shared to make blinding possible, this ELIP describes how to encode the necessary extra data (asset blinding factors) in a PSET.

===Copyright===

This ELIP is licensed under the 2-clause BSD license.

==Specification==

This ELIP extends the current PSET specification (available at https://github.com/ElementsProject/elements/blob/master/doc/pset.mediawiki) with an additional field for input asset blinding factors and an additional field for output blidning factors.
To avoid possible collisions with PSET fields from the main specification (available at https://github.com/ElementsProject/elements/blob/master/doc/pset.mediawiki), a distinct proprietary field prefix <tt>"pset_liquidex"</tt> is used for the fields described in this ELIP.
For example, identifier of PSBT_ELEMENTS_LIQUIDEX_IN_ABF is a sequence of 11 bytes <tt>fc0d707365745f6c6971756964657800</tt>.

This additional per-input proprietary type element is defined:

Expand All @@ -40,7 +41,7 @@ This additional per-input proprietary type element is defined:
! Versions Allowing Inclusion
|-
| Asset Blinding Factor
| <tt>PSBT_ELEMENTS_IN_ASSET_BLINDING_FACTOR = 0x16</tt>
| <tt>PSBT_ELEMENTS_LIQUIDEX_IN_ABF = 0x00</tt>
| None
| No key data
| <tt><256 bit uint></tt>
Expand All @@ -64,7 +65,7 @@ And this additional per-output proprietary type element is defined:
! Versions Allowing Inclusion
|-
| Asset Blinding Factor
| <tt>PSBT_ELEMENTS_OUT_ASSET_BLINDING_FACTOR = 0x0b</tt>
| <tt>PSBT_ELEMENTS_LIQUIDEX_OUT_ABF = 0x00</tt>
| None
| No key data
| <tt><256 bit uint></tt>
Expand Down Expand Up @@ -127,5 +128,6 @@ However, in most cases, setting the asset blinding factors in a PSET is not nece

==Reference implementation==

(TODO: update to match spec changes)
* [https://github.com/ElementsProject/elements/pull/1329 Elements Core]
* [https://github.com/ElementsProject/rust-elements/pull/201 rust-elements]

0 comments on commit cba50dc

Please sign in to comment.