There is a lot of language native to submarine swaps
Submarine Swap - an atomic on-chain to off-chain swaps of cryptocurrencies. REDSHIFT currently supports swaps of on-chain assets like Bitcoin, Ether, or DAI for Lightning Bitcoin. Also referred to as just "swap".
HTLC (Hash Time Lock Contract) - A type of transaction that puts on-chain funds in escrow until someone unlocks them with a preimage or the timelock expires.
Preimage - A string of characters returned when successfully paying a Lightning Network invoice. Think of it as a password. It is used to unlock on-chain funds that are locked up in an HTLC.
Liquidity Provider - The counter-party to a swap that will pay the Lightning Invoice in exchange for an on-chain asset like Bitcoin, Ether, or DAI.
Quote - The price a liquidity provider returns when asked to pay an invoice. Denominated in the requested asset.
WaitingForFundingTx - The HTLC has been created and is waiting for an on-chain funding transaction.
WaitingForFundingTxConfirmation - An on-chain funding transaction has been broadcasted but has not been confirmed.
WaitingForAdditionalFundingTxConfirmation - An on-chain funding transaction has been confirmed but has not met the confirmation threshold required to complete the swap. Wait for more confirmations and the order will move to Funded.
PartiallyFunded - The transaction has been partially funded, meaning a transaction has been sent but the total amount of funds sent has not reached the quote amount. Another transaction must be sent so that the total amount of funding is equal to the amount given in the quote.
Funded - The HTLC has been funded to the correct amount. After quote provider pays the Lightning Invoice, they will receive the preimage to unlock the funds.
WaitingForRefundTx - The swap was not completed successfully and HTLC's timelock has passed. A transaction can be sent to reclaim funds.
AddressBlacklistedWaitingForRefundTx - The transaction cannot be completed because the address is blacklisted. Send a refund transaction to reclaim funds.
WaitingForRefundTxConfirmation - A refund transaction has been broadcast to the network but has not confirmed yet.
Refunded - The refund transaction has been confirmed and the funds have been sent back to the user.
Complete - The swap is complete. The invoice has been paid and the funds from the HTLC have been swept by the liquidity provider.
FundWindowElapsed - The window to fund the HTLC has elapsed. Request a new quote to start the swap process again.
BTC - Bitcoin
ETH - Ether
LBTC - Lightning Bitcoin (Bitcoin locked up in the Lightning Network)
We combine asset abbreviations with an underscore to define markets in REDSHIFT. We currently support the following mainnet market pairs:
BTC_LBTC - Bitcoin to Lightning Bitcoin
ETH_LBTC - Ether to Lightning Bitcoin
When working in a testing environment, we append a "T" to the front of UTXO testnet market asset pairs and "K" to Kovan (testnet) Ether market asset pairs. We support the following testnet markets:
TBTC_LTBTC - Testnet Bitcoin to Lightning Testnet Bitcoin
KETH_LTBTC - Testnet Ether to Lightning Testnet Bitcoin
Like testnet, we append an "S" to the beginning of market assets on simnet. We support the following simnet markets:
SBTC_LSBTC - Simnet Bitcoin to Lightning Simnet Bitcoin
SETH_LSBTC - Simnet Ether to Lightning Simnet Bitcoin
Here is an explanation of the errors you might get returned
OrderNotFound - There is no order in the database with that orderId. Double check that the orderId is correct.
InvalidOrderId - The orderId provided is not a valid UUID. Double check that the orderId is correct.
InvalidRefundAddress - The refund address provided is not a valid Bitcoin address. Double check to make sure the address was input correctly.
InvalidMarket - An invalid market was provided with the request. For valid markets, see Market Documentation.
InvalidOnchainTicker - The asset ticker provided is not valid. For valid tickers, see Asset Abbreviation documentation.
InvalidInvoice - The invoice provided is not a valid Lightning Network invoice. You can decode valid Lightning Network invoices using RADAR ION's invoice decoder.
InvoiceExpiresTooSoon - The invoice provided expires too soon.
InvoiceAmountBelowMinimum - Invoice is below the minimum amount for selected market.
InvoiceAmountAboveMaximum - Invoice is above the maximum amount for selected market.
InvoicePaymentNotRoutable - There is no route between the liquidity provider and the invoice recipient. Usually a result of the invoice recipient not having a well connected Lightning node. Can be resolved by having the invoice recipient open a channel to another well connected node like RADAR ION's.
TooManySwapsInFlight - There are too many swaps happening at once. Can be resolved by waiting and sending another request.
InvalidSignedTxHex - The signed transaction hex is invalid. Double check the transaction hex or generate a different one.
InvalidNetworkOrSubnet - The provided network or subnet is not valid. See
InactiveNetworkOrSubnet - The provided network or subnet is not active.
InternalServerError - There was an error during one of the requests. Retry the request.
NoQuoteProvidersAvailable - There are no quote providers available for the particular market. This is very unusual. Contact support or wait and retry request.
Market
Invoice Minimum
Invoice Maximum
Min Invoice Expiration
BTC_LBTC
30000 satoshis
1000000 satoshis
2400 sec
ETH_LBTC
1 satoshi
1000000 satoshis
900 sec