Guide: Bridge BTC to LBTC
Acquiring LBTC with the Lombard SDK is as easy as the following 3 steps:
Accept the current minting fee: Users accept the current minting fee (allows Lombard Protocol to deduct this on-chain).
Deposit BTC: Show the user their unique BTC deposit address.
Check status: Keep the user informed as to the status of their deposit.
1. Accept the current minting fee
Show the current minting fee to users, retreived by a call to the getLBTCMintingFee
function. Ask users to sign this with signNetworkFee
and return it to Lombard with storeNetworkFeeSignature
. This authorizes Lombard Protocol to deduct up to the signed amount from the deposit to cover the operational cost of minting the asset.
To-recap:
getLBTCMintingFee
signNetworkFee
orsignLBTCDestinationAddress
if there's no feestoreNetworkFeeSignature
2. Deposit BTC
Generate a BTC deposit address to prompt the user to send funds to. Check if one has already been generated with getDepositBtcAddress
and generate a new address with generateDepositBtcAddress
if needed. Underneath, the Lombard API will provide this based on various input parameters you have provided (i.e. where LBTC will be minted to, its all deterministic!), and the SDK will verify before returning from the function call.
Once you've got the address you can now ask users to send Bitcoin to this address, from anywhere - a browser extension or hardware wallet, or centralized exchange account.
3. Check status
From the moment you've asked the user to deposit, you can start checking for deposits using getDepositsByAddress
! Lombard's API monitor's the Bitcoin mempool for deposits, so we can provide live-tracking to users, through the following steps:
a BTC deposit has been detected for a Lombard Protocol address
the 6 block confirmation's has passed since the block height of the deposit transaction (Lombard's definition of finality; to mitigate any forks)
Lombard's Security Consortium members notorizing the deposit
Lombard's API directly minting the LBTC on-behalf of the user (a complementary service)
Last updated
Was this helpful?