Staking SDK
Integrate native Bitcoin staking into your own frontend application, allowing your community easy access to all the benefits of LBTC.
Last updated
Integrate native Bitcoin staking into your own frontend application, allowing your community easy access to all the benefits of LBTC.
Last updated
Our TypeScript Staking SDK can be integrated into any frontend application: wallets, portfolio management apps, staking dashboards, custody portals.
If you're interested in integrating our Staking SDK please fill out this Google Form so we can issue you with a referral code.
Firstly, check for an existing Bitcoin deposit address. Each Bitcoin Deposit Address is associated with a destination chain and address (for minting LBTC), and a referral ID.
The user will first need to sign the destination address to prove ownership of their wallet address, as this will be the only place LBTC can be minted to for any deposits to the generated bitcoin deposit address.
Using this signature, generate a new deposit Bitcoin address (note this can take several minutes for the security consortium to validate). Populate the referralId
with the referral code we've provided you:
That's it! You now have an existing, or new, BTC deposit address, specify to the user. This address is a SegWit address for maximum compatibility, so your users can deposit from any wallet or centralized exchange.
It's important to show the user how much LBTC they will receive for any amount of BTC they wish to deposit. In the future we will allow automatic minting, where a small blockchain fee will be introduced to cover our costs.
The user can now send BTC directly to the deposit address.
Note: The minimum amount is 0.0002 BTC (~$10 USD).
After 6 Bitcoin confirmations, our security consortium will notarise the deposit and provide a signature. The user can then mint their LBTC with the signature provided.
There is an unstaking (withdrawal) fee in place to cover the Bitcoin network fee and to prevent malicious individuals from attacking the protocol. Hence, the user must only unstake amounts above this fee. This can be retrieved from the LBTC contract getBurnCommission
function.
Note: This will be added directly to the SDK in the future.
To unstake BTC from Lombard, a user simply unstakes against the ERC20 contract and waits for the 7-day withdrawal period, after which the BTC will be sent to the specified (not original) address.