Reserved IP Address°C
03-09-2025
BSV
$33.65
Vol 15.38m
-5.31%
BTC
$83502
Vol 18848.47m
-3.52%
BCH
$369
Vol 211.25m
-4.8%
LTC
$100.22
Vol 543.56m
-3.8%
DOGE
$0.17
Vol 1095.01m
-8.02%
Getting your Trinity Audio player ready...

This post was first published on Medium.

nChain
Vanity Address

Previously, we have shown a novel and private way to purchase Bitcoin vanity addresses, using Zero-Knowledge Key-Statement Proof. In practice, it has one drawback: after the buyer verifies the proof in step 7, he can abort the exchange protocol and the seller wastes resources to find an answer but does not get paid.

To overcome this drawback, we conduct the exchange entirely on chain using a smart contract. It only pays out if a private key is provided such as the derived/combined public key/address meets the vanity pattern. Full code is shown below.

 

To compute point addition (Line 16) and multiplication (Line 13) efficiently, we leverage the same technique as before. After we have the combined public key, we validate its corresponding address meets the predefined vanity pattern at Line 19.

Extension

We have only showed how to verify the derived address has certain prefix. But it is straightforward to extend it to have the address or the public key meet any arbitrary requirement.

Watch: CoinGeek New York presentation, Smart Contracts & Computation on Bitcoin

Recommended for you

Building a solid ecosystem: Babbage to host BSV Hackathon in Texas
The US$55,000 prize money is up for grabs at the inaugural BSV Hackathon in Austin, Texas, which Babbage will host...
March 3, 2025
GPT-4.5 is not the AGI moment OpenAI teased
While he previously called for lower expectations over GPT-4.5, Sam Altman was lured into dubbing it the closest step to...
March 3, 2025
Advertisement
Advertisement
Advertisement