SDK FAQ
Frequently asked questions and answers about Lombard SDK and its functionality.
When using signStakeAndBake
, do I also need to pay a mint fee?
signStakeAndBake
, do I also need to pay a mint fee?No, the signStakeAndBake
fee already includes the cost of mining. The current fee can be obtained via getStakeAndBakeFee
.
How is the stake and bake fee calculated?
The getStakeAndBakeFee
checks the fee amount stored in the contract. The fee is updated periodically on-chain based on market conditions.
What does isDelayed
mean in the response of getNetworkFeeSignature
?
isDelayed
mean in the response of getNetworkFeeSignature
?isDelayed
is a flag that determines whether the current gas costs are higher than the approved fee. If so, it causes the auto-mint operation to be delayed until the gas costs fall below the approved fee amount.
What happens when the network fee signature expires?
If the signature expires (for example, due to prolonged high gas prices), the LBTC can be claimed manually via the claimLBTC
function or by providing a new valid signature.
Is the network fee signature valid for multiple deposits?
Yes, the network fee signature remains valid until its expiration date and will be used to auto-mint all deposits within the valid period.
If I make multiple deposits, will they be combined into one auto-mint transaction?
Our relayer checks every 10 minutes for unclaimed deposits and claims them if the signature is valid. The actual correlation between a BTC transaction and a claim (auto-mint) transaction can be obtained via generateDepositBtcAddress
.
Is the stake and bake signature valid for multiple deposits?
No, the stake and bake signature (also known as the permit signature) can only be used once.
What happens if I obtain a new network fee signature?
All signatures need to be stored. For network fee signatures, please use storeNetworkFeeSignature
, and for stake and bake signatures, please use storeStakeAndBakeSignature
. Any stored signature replaces any previously stored.
How is the fee calculated in getLBTCMintingFee
?
getLBTCMintingFee
?The fee amount is stored on-chain and is updated by our an operator every 4 hours based on current gas costs.
Does generateDepositBtcAddress
generate a new address for a new signature?
generateDepositBtcAddress
generate a new address for a new signature?No, the generateDepositBtcAddress
generates a deposit address based on the destination EVM address and chain ID. The signature used in this function is proof of ownership of the destination address.
What happens if I have both a "network fee signature" and a "stake and bake" signature valid and stored?
The stake and bake signature has higher priority.
What are the steps to ensure the stake and bake operation succeeds?
First, sign the transaction with signStakeAndBake
, then store the signature with storeStakeAndBakeSignature
. Next, check for the deposit address via getDepositBtcAddress
. If you don’t have an address, generate one with generateDepositBtcAddress
(using the stake and bake signature as proof of address). Make sure the signature is stored with getUserStakeAndBakeSignature
. Once the signature is stored and you have a deposit address, proceed with the deposit. The deposited amount will be claimed and staked to the chosen vault automatically.
Is there a delay for unstaking LBTC?
Users can unstake their BTC at any time to a chosen recipient address. A withdrawal period of 9 days is required by Lombard (due to the daily rebalancing cycle) and 7 days for Babylon (due to the unbonding period). After that, your BTC will be available.
Last updated