mistyped Bech32 address

5 replies 466 views
Posts: 12 · Reputation: 123
#1Oct 30, 2017, 11:57 PM
What are the odds of mistakenly sending satoshis to a wrong (yet active) BTC address if just one character is typed incorrectly in a Bech32 (SegWit) address? Thanks!
2 Reply Quote Share
SwiftMinerSenior Member
Posts: 259 · Reputation: 1036
#2Oct 31, 2017, 04:36 AM
Actually the chances are very thin based on the fact that most times we use copy and paste or just scan the QR code. For copy pasting most wallets automatically carry out a quick checksum to ensure you don't send coins to a void address. However in  very rare cases if the check sum is valid it could go to a wrong already existent wallet. One thing that can also contribute is where the error was made. Depending on the type of address they usually have a common format and an error within the first for characters will be easy to detect and very obvious.
2 Reply Quote Share
leo.wolfHero Member
Posts: 540 · Reputation: 2813
#3Oct 31, 2017, 07:30 AM
The chances of this happen is very high very close to zero I will say since you said a typo, bitcoin address are a pubkeyHash encoded in base58 with something called a checksum and version value. You will need the typo address to actually have a valid checksum before the wallet client can even allow you to send the transaction.  Because this checksum is actually a 32 bits after a double hash of the PubKeyHash. So for the miss type address to actually be valid, the 32 bits (checksum) must still decode to a valid PubKeyHash and this is like a 1 chance in billions of possible combinations. If not the wallet client it self wouldn’t allow t he transaction to through. A mistyped address error is therefore not common but not utterly not impossible I will say, the most common is a wrong copied and paste address
5 Reply Quote Share
pixel2014Hero Member
Posts: 857 · Reputation: 4132
#4Oct 31, 2017, 02:28 PM
The chance is very small if it is Bech32 address. You will see the address not valid in nearly all cases. This is more about legacy addresses and not segwit. Base58 addresses are the P2PKH and P2SH. OP is asking about Bech32 and not Base58, but you are right about the explanation. Bech32 is more advanced in checksum than base58, which means the chance of sending to wrong addresses because of typo is significantly lower in Bech32 than in base58 addresses. Edit: Why not just copy and paste the address instead? You can check and recheck the address characters in case you want to avoid clipboard malware or just use QR code  which is resistant to clipboard malware. Also avoid malware generally.
1 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#5Oct 31, 2017, 05:22 PM
I'm not sure about Bech32, but for legacy Bitcoin addresses, there's a 1 in 4 billion chance of creating a valid address by making a typo. The chance of losing Bitcoin because of a typo is tiny compared to the chance of losing your Bitcoin because of clipboard malware. Verify the address before sending.
4 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#6Oct 31, 2017, 09:40 PM
For Bech32, there's a table in BIP-0173 containing the chances of certain number of wrong characters to create a valid SegWit address. Link: github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#checksum-design It looks complicated because its checksum isn't based from a few bytes from a hashed result. @OP since you're asking about "1 character"; based from the table above, there's zero chance that it'll be valid.
0 Reply Quote Share

Related topics