Abstract
This IIP proposes a bridge to facilitate the transfer of Bitcoin assets to the IoTeX network, enhancing the network’s value and interoperability. It utilizes a multi-signature wallet managed by off-chain witnesses for securing asset on the Bitcoin network. The designed transactions on Bitcoin ensure compatibility with existing IoTeX contracts.
Motivation
The motivation for this proposal is twofold. First, by bridging Bitcoin to IoTeX, we aim to significantly increase IoTeX’s Total Value Locked (TVL) by tapping into the vast assets of the Bitcoin market. This initiative aims to enhance the appeal and functionality of the IoTeX ecosystem for IoTeX users, while also indirectly engaging Bitcoin users in the development of DEPIN projects and ecosystems. By doing so, it seeks to significantly increase liquidity across these projects. Establishing the IoTeX network as a fundamental hub for DEPIN project liquidity is identified as one of its key roles. Second, the unique challenges presented by Bitcoin’s limited programmability and the lack of open-source bridging solutions necessitate the development of a custom solution. This effort will not only provide IoTeX with a direct link to Bitcoin market but also demonstrate our capability to innovate and expand the blockchain’s functionality.
Specification
Legit BTC Transaction format
From sender to mulsig wallet
The output
Field should be exquisitely constructed for assets bridged to IoTex via ioTube:
- Output 1
PkScript: A taproot Address held by multiple signers.
Amount: the amount to be bridged from the user
- Output 2
PkScript: OP_RETURN + (BINARY DATA)
Amount: 0
- Notes:
The ETH ADDR of receiver is encoded in the binary data:
Content | Type | Data Length (in Bytes) | |
---|---|---|---|
Opcode | OP_DATA_31 | - | 1 |
Protocol Name | “iotube” | String | 6 |
Data byte | 1 | Uint8 | 1 |
Index of Transfer | index in LittleEndian | Uint32 | 4 |
Token Recipient | Address of wrapped btc mint to | ETH Address | 20 |
Total | 32 |
The expected length of PkScript is 33.
- Output 3
PkScript: the taproot Address same as output 1
Amount: A tip to the bridge
- Output 4 (Optional)
Change back to the sender
From mulsig wallet to BTC recipient
It is a P2TR transaction from mulsig wallet to BTC recipient
Rationale
Workflow
Signature Scheme
MuSig2 is a multi-signature scheme that allows multiple signers to create a single aggregate public key and cooperatively create ordinary Schnorr signatures valid under the aggregate public key. Signing requires interaction between all signers involved in key aggregation. (MuSig2 is a n-of-n multi-signature scheme and not a t-of-n threshold-signature scheme.)
More details could be found in BIP 327 and Musig2 paper
Bitcoin Script
With the support of aggregated schnorr signature, Pay-to-Taproot (P2TR) script is used to transfer assets from custody wallet to bridged wallet. Other benefits P2TR scripts bring include cheaper output spending and security upgrade.
Example
Examples of transactions bridging Satoshi between the Bitcoin testnet and the IoTeX testnet are provided to illustrate the bridge’s functionality:
- 600 satoshis are bridged from bitcoin testnet to iotex testnet
- 200 satoshis are bridged back to the wallet on bitcoin testnet
Backward Compatibility
The change will ensure seamless integration with existing infrastructure, including UI/UX enhancements to include a Bitcoin option and compatibility with the smart contracts on IoTeX.
Security Considerations
There is no security concern.
Copyright
Copyright and related rights waived via CC0.