BitMEX Enables Bech32 Sending Support

BitMEX is delighted to announce that customers can now withdraw bitcoin to the Bech32 (native SegWit) address format. This upgrade is effective immediately.


Bech32 Technical Details

Bitcoin currently has three address formats:

Address Format

Comments

Example Address
Pay to Public Key Hash (P2PKH)
Bitcoin’s original address format
Addresses starting with the number 1
19CPBGKkxj
4iPyfLu6E3
Wboydopqs6
U2GE
Pay to Script Hash (P2SH)
Enabled in April 2012
Addresses starting with the number 3
3BMEXScSmZ
yb22WhUpW6
XnX7FDwBbd
Xv2e

Bech32
The native SegWit address format
Addresses starting with bc1
bc1qdzac2x
4j6kcthjrc
dek4mdqghw
shkg30hgf60p

As of today, BitMEX is delighted to announce that customers can withdraw to all three address formats. Please note, when depositing to BitMEX, you must still send to our Pay to Script Hash (P2SH) format addresses, due to our multi-signature wallet solution. Bech32 address formats can currently only be used as the receiving address, when you withdraw from BitMEX.

This upgrade is part of BitMEX’s continued commitment to optimize our Bitcoin wallet infrastructure and technology, in order to reduce our usage of blockweight and to lower transaction fees for our customers. When BitMEX launched in 2014, we were one of the first companies to use P2SH multi-signature technology. BitMEX is keen to remain at the forefront of Bitcoin technology, and this announcement is only part of our wallet upgrade process, which will continue going forwards.

The Advantages of Bech32 Addresses

As explained in BIP173, the new address format has several advantages:

  • More efficient use of blockweight (and therefore lower fees)
  • Improved error detection
  • More efficient QR codes

Fee savings resulting from Bech32

The key advantage of Bech32 addresses is that transaction fees can be saved when spending bitcoin, which was already sent to a Bech32 address. Therefore this upgrade will not directly result in fee savings when customers withdraw from BitMEX, however in the next transaction, when the bitcoin already withdrawn from BitMEX is spent again, our customers may benefit from lower transaction fees.

When spending from a non-native address using SegWit, one must add around 20 bytes of overhead. When using native SegWit-style addresses (Bech32), this overhead is no longer necessary. The absence of this overhead generates the savings.

In the below tables we have quantified the blockweight savings. As one can see, based on our example 1 input 2 output transaction, in terms of blockweight, native SegWit spends save around 37% compared to pre-SegWit style spends and 17% compared to non-native SegWit spends.

Typical transaction sizes for a 1 input 2 output transaction (Illustrative figures)

Input redemption type

Witness size (bytes)

Witness size
(virtual bytes)

Total transaction size (bytes)

Total transaction size (virtual bytes)

P2PKH

110
110
220
220

P2SH SegWit

110
28
240
167

SegWit (Native)

110

28

220

138

(Source: BitMEX Research)

Typical percentage savings for a 1 input 2 output transaction (Illustrative figures)

Input redemption type

Witness size (bytes)

Witness size
(virtual bytes)

Total transaction size (bytes)

Total transaction size (virtual bytes)
P2SH SegWit compared to P2PKH
0%
75%
(9%)
24%

SegWit (Native) compared to P2PKH

0%

75%

0%

37%

SegWit (Native) compared to P2SH SegWit 

0%

0%

8%

17%

(Source: BitMEX Research)

Since the savings are generated by the witness discount on the signature/scripts, the more inputs a transaction has, the higher the percentage savings. Therefore larger transactions, with more than one input, will typically experience higher savings that those in the above table.

Future BitMEX Wallet Upgrades

The next upgrade priority for the BitMEX wallet is enabling SegWit (non-native), compared to our current non-SegWit P2SH multi-signature wallet solution.

As explained above, SegWit can result in significant blockweight savings of around 25% to 40%, however in the case of BitMEX, the savings will be even higher. A BitMEX withdrawal is a 3 of 4 multi-signature P2SH transaction, each input therefore requires three digital signatures and four public keys. Currently, a typical 2 input 2 output BitMEX withdrawal can be as large as 1,200 bytes. The benefits of applying the witness discount to these large transactions is far greater than for typical non-BitMEX transactions. Therefore BitMEX would benefit from a blockweight saving of around 65% by adopting SegWit.

If you would like to help develop our Bitcoin wallet technology, please consider applying here to join the team.