P2SH Deposit Address: What a Bitcoin Bridge Uses It For
What is a P2SH Bitcoin address used for in bridge deposits? It locks BTC to a script hash that the spender must later unlock with the matching script.
iCrypto Editorial6 min read
A P2SH deposit address in a Bitcoin bridge is an address that locks BTC to a script hash; the bridge can spend those coins only by revealing the matching script and meeting its conditions.
P2SH means Pay to Script Hash. Bitcoin’s BIP 16, defined in 2012, lets a sender pay to a hash of a script without needing to know what the script requires. On Bitcoin mainnet, P2SH addresses start with 3.
What does a P2SH address represent?
A P2SH address represents the HASH160 of a redeem script: a set of conditions that must be met to spend the BTC. The sender pays to the hash. Later, the spender provides the full script and whatever signatures or other data that script requires.
That difference matters when you look at a deposit in a block explorer. Before the bridge spends from the address, the explorer can show the address and its balance, but the address itself reveals only the script hash. It does not identify who controls the funds or show the full spending conditions.
Say two deposits each have a P2SH address beginning with 3. The prefix tells you they use the same broad address type; it does not tell you that the same person controls them, or that the same script hash sits behind them. Each address commits to its own script hash.
Once a P2SH output is spent, the transaction reveals the redeem script used to unlock it. That gives observers a way to inspect the conditions after spending. Until then, the hash acts like a sealed reference: the spender must produce a script that matches it, or the output cannot be spent.
Why might a bridge give each deposit its own 3 address?
A bridge can create a distinct P2SH address for each deposit by putting unique data into the redeem script while keeping the bridge’s spending key check in the script. RenBridge used this structure with a unique hash placed before a RenVM key check, so each deposit could have its own address while the key check remained part of the spending conditions.
The unique data changes the script and therefore changes its hash. Since the address encodes that hash, the result is a different 3-address for each deposit. The bridge can match incoming payments to deposit-specific data, while spending still requires a script that satisfies the address’s conditions.
For the person sending BTC, the address works like another Bitcoin destination. A wallet can pay to it without understanding the bridge’s script rules. That makes the deposit address easy to use, but it also means the sender depends on having the correct address: if the bridge or another system gives you an address tied to a wrong script hash, the BTC is locked to conditions no one can satisfy.
So the useful distinction is between the deposit address, which is the payment destination, and the redeem script, which defines how those coins can later be spent. Treating them as the same thing can make an address look self-explanatory when its controlling conditions remain hidden until spending.
How is P2SH different from P2WSH?
P2SH and P2WSH both let Bitcoin pay to a hash of spending conditions, but P2WSH is the SegWit version of that idea. P2WSH addresses usually start with bc1q and are longer than P2SH addresses.
The spending difference matters because P2WSH can have lower spending fees than P2SH. The address format alone does not tell you the full cost of a bridge transfer, though: the eventual transaction and its spending conditions matter too. A 3-address and a bc1q address can both represent script-based conditions, but they use different Bitcoin output types.
For a returning bridge user, that means a familiar-looking 3-address is not a label for a person or a wallet. It points to a script hash. A bc1q P2WSH address also points to a script hash, but under the SegWit version of the mechanism.
Can every wallet send to a 3 address?
Most Bitcoin wallets that support mainnet payments can send to a standard 3-address, but a wallet or service may restrict which address formats it accepts. The bridge’s script rules do not need to be understood by the sending wallet; the wallet just creates a payment to the address.
Take two otherwise identical BTC payments: one wallet accepts the 3-address and sends to it, while another rejects that format before sending. The difference is wallet support, not the P2SH script’s spending conditions. Confirm the address format is accepted before initiating a transfer.
How can you verify a deposit address before sending?
Verify the address against the deposit details provided for that transfer and check that the first and last characters match before sending. A 3-prefix indicates a mainnet P2SH address, but it does not prove that the address belongs to the bridge or that its script is correct.
RenBridge is a useful case for separating address format from bridge security: what bonded validators risk through slashing is a concrete example of accountability through stake, because slashing can penalize validators for rule-breaking. A P2SH address, by itself, tells you about the spending conditions’ hash, not who is accountable for a bridge.
Before you send, confirm the exact deposit address through the bridge information you are relying on; the 3-prefix tells you the format, while the exact address determines where the BTC goes.
What do readers ask next?
Does sending to P2SH cost more than to bc1 addresses?
Sending to P2SH can take more space in a Bitcoin transaction than sending to a bc1 address, which can affect the sending fee. The fee also depends on transaction size and network conditions; the later spending fee depends on the script and transaction used to unlock the coins.
Can a P2SH deposit address be reused safely?
A P2SH address can receive more than one payment, but reuse can make it harder to distinguish deposits and can reduce privacy. Whether reuse is safe for a bridge depends on its deposit tracking and script design, so use the address issued for the specific transfer you are making.
How do I decode a redeem script from a spent transaction?
Find the transaction that spends the P2SH output and inspect its input data in a Bitcoin block explorer or with Bitcoin tools. The unlocking data includes the redeem script; compare its HASH160 with the script hash committed to by the original output to confirm it matches.