BitGo, the bitcoin and blockchain asset storage platform, announced today that it is now possible to generate and use native Bitcoin SegWit addresses from the BitGo API to send and receive funds on the Bitcoin network. Native SegWit is an improved, more weight-efficient address format than wrapped SegWit.
Native SegWit addresses are especially interesting for users with a high transaction count or those that are frequently sending and receiving small amounts. It’s possible to immediately save costs by sending all change outputs to native SegWit addresses.
Additional savings can be achieved over time as adoption increases by providing the option to deposit to native SegWit addresses. As this will mainly benefit API users, BitGo will not be offering native SegWit address generation in the web UI at this time.
Native SegWit inputs have a weight of 105 bytes, down from 140 bytes for wrapped SegWit inputs and 297 bytes for non-SegWit Pay-to-Script-Hash (P2SH). That means native SegWit inputs will be 25% cheaper than wrapped SegWit inputs and 65% cheaper than non-SegWit inputs. This makes BitGo’s native SegWit multi-signature inputs cheaper than single-signature Pay-to-Public-Key-Hash inputs. However, native SegWit outputs are slightly larger with 43 bytes, nominally increasing the output size from the 32 bytes of P2SH outputs.
Unfortunately, not all Bitcoin wallet software can send to Native SegWit (Bech32) addresses. Consequently, BitGo wallets will continue to generate wrapped SegWit addresses by default. If desired, users can choose native SegWit when creating a new address by specifying the derivation chain code 20. The type of change address can be specified by setting addressType. The BitGo team recommends updating to the latest BitGo SDK, but anything since BitGoJS 4.34.0 should be able to generate addresses and sign Native SegWit inputs.
SegWit Address Overview
Wrapped SegWit addresses lock funds to a redeem script hash like any other P2SH address. When funds get spent, the owner reveals the redeem script which in turn includes a witness program and provides a witness that satisfies both. This indirection both causes additional data to be written to the blockchain, but also makes wrapped SegWit addresses backward compatible. wrapped SegWit addresses start with a “2” on Testnet and a “3” on Mainnet. They are generated with the derivation chain codes 10 and 11.
Native SegWit addresses lock funds to the hash of a witness program directly. When the owner spends the funds, they only need to provide the witness program and the witness that satisfies it. Native SegWit is more block weight efficient, which makes it cheaper to spend from Native SegWit addresses. However, without the P2SH-wrapper only SegWit-compatible wallets can send to Native SegWit addresses. Native SegWit addresses start with a “tb1” on Testnet and a “bc1” on Mainnet. They are generated with the derivation chain codes 20 and 21.