Jump to content
Tareom

News from across crypto

Bitcoin Bridge Deposit Routing and Locker Recognition

How does a Bitcoin bridge choose which Locker gets a deposit? The app selects an active Locker with enough free collateral, then pays its registered address.

The Tareom Editors5 min read

Bitcoin Bridge Deposit Routing and Locker Recognition

A Bitcoin bridge usually chooses a receiving Locker by selecting an active Locker with enough free collateral for the deposit, then paying Bitcoin to that Locker’s address. In TeleSwap, the relay matches the deposit transaction’s output locking script against the Locker registry; that match tells the contract which Locker backs the teleBTC to be minted.

  • Input: the Bitcoin deposit amount.
  • Selection: active Lockers with enough free capacity.
  • Output: a verified deposit linked to one Locker, against which teleBTC is minted.

Active capacity determines which Locker receives the Bitcoin

The app building the deposit transaction usually picks the Locker from the active Lockers that can cover the requested amount. A Locker’s free capacity is the amount it can still support with its collateral. Since each Locker can mint only up to the amount its collateral allows, the app needs to check capacity before directing the Bitcoin.

The transaction is built to pay the selected Locker’s Bitcoin address. That address corresponds to a locking script: the rules that specify how the Bitcoin output can be spent. Once the deposit is confirmed, a relay verifies the transaction and the contract uses the output’s script to identify the Locker. If the transaction passes verification, teleBTC is minted against that Locker.

The locking script is the on-chain link between the deposit and the Locker registry. The contract compares the script in the deposit output with the scripts registered for Lockers. A matching registered script identifies the Locker responsible for the deposit. The Bitcoin is not assigned by a label in the transaction or by the user’s guess; the registered script provides the match the contract can recognise.

This is why the exact receiving address matters. If Bitcoin goes to an address whose script is not registered to an active Locker, the contract cannot match that output to a Locker for minting. A removed Locker’s former address may no longer have a valid registry entry either. In either case, the deposit does not produce teleBTC through that recognition process. The bridge’s checks depend on the transaction paying the chosen Locker’s registered script.

The teleswap app is where a TeleSwap deposit can be directed to an eligible Locker. The selection connects the amount you want to bridge with the capacity the Locker can still support. After the app builds the Bitcoin transaction, the relay and contract handle verification and recognition on-chain.

A 0.5 BTC deposit needs a Locker with at least that much room

For a 0.5 BTC deposit, the app skips a Locker with only 0.3 BTC of free capacity and selects an eligible Locker with more room. The first Locker cannot support the full amount under its remaining capacity, so paying its address would fail the selection requirement. The Bitcoin transaction instead sends the deposit to the selected Locker’s registered address.

Now imagine the first Locker’s available capacity rises to 0.6 BTC before the app builds the transaction. That change could make it eligible for the 0.5 BTC deposit, depending on the app’s selection among eligible Lockers. What still holds is the recognition step: whichever Locker is chosen, its registered locking script must match the transaction output for the contract to identify it.

The amount drives the capacity check, while the Locker’s status and free collateral determine whether it can receive the deposit. If several Lockers qualify, the selection is made when the deposit transaction is built. The resulting address can therefore differ between transfers as eligible Lockers and their available capacity change.

Locker selection also matters when you withdraw Bitcoin

When you burn teleBTC to receive Bitcoin, the burn request names the Locker that must make the payout. Deposits and withdrawals therefore point to a Locker in different ways: a deposit is recognised from the Bitcoin output’s registered locking script, while a burn request specifies which Locker is responsible for paying out.

This selection model differs from bridges that publish rotating vault addresses. THORChain publishes current vault addresses through its inbound_addresses endpoint, and those addresses change after vault churn. tBTC v2 routes new deposits to its currently active signer wallet. In those systems, a current address is tied to the active vault or signer set, rather than chosen for each deposit from Lockers according to free capacity. Fetch a fresh address before depositing, because a previously used one may no longer be current.

Related

Can I choose the Locker myself?

Usually, the app that builds the deposit transaction selects the Locker by status and available capacity. The address you pay is the one associated with that selected Locker, and the contract later recognises it through the registered locking script. Follow the address provided for the specific deposit so the transaction reaches an eligible Locker.

Why did my bridge deposit address change?

Your deposit address can change because the selected Locker can change as availability and capacity change. In a system with rotating vaults, the current address can change after vault churn or signer-wallet rotation. Use the fresh address supplied for the transfer; the contract’s recognition depends on the Bitcoin going to the script registered for the receiving Locker.