Technical framework
Last updated
Last updated
The technical aspects of this process are broken down into simple, digestible parts to provide a clear understanding of how assets move securely and efficiently across any blockchains and the Lightning Network.
Alice generates a secret message (also known as pre-image) and hash it using a cryptographic hash function
Alice generates a USDT Lightning invoice with the hash through her node or her assigned node on Lightning Network.
A HTLC with the same hash is created and Alice funds and locks the required USDT in the HTLC on the Blockchain.
LSP verifies the HTLC funding and Lightning invoice.
LSP pays the Lightning invoice and the pre-image is then revealed first to LSP and then public.
LSP will broadcast the pre-image for LSP to redeem the funds in the HTLC on the Blockchain.
If the LSP fails to pay the invoice, the HTLC will expire after a set duration, and the USDT will be released and refunded to Alice.
Astra utilises HTLC that allows parties to exchange funds or assets simultaneously or in a very short period without the need for a trusted third party. There are a few key unique properties of a HTLC:
When an HTLC is created, the recipient’s address and a cryptographic hash value are specified in the contract.
If the recipient provides the preimage that, when hashed, matches the hash value in the HTLC, the funds are released to the recipient. This ensures that the transfer only occurs if the recipient satisfies the condition.
If the recipient does not reveal the preimage within the specified time frame, the funds are automatically refunded to the sender.
Unlike traditional bridges that rely on centralized intermediaries, this keeps users in control of their assets while ensuring automatic refunds in case of failure. This significantly reduces counterparty risk. Astra drives the crypto space closer to the vision of universal accessibility, efficiency, and scalability. By uniting diverse blockchain communities, it lays the foundation for a truly interconnected financial ecosystem on Lightning that benefits users, protocols, and developers alike.