# Technical framework

## How does bridging from any Blockchain to the Lightning Network work?

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.

<figure><img src="https://1244938611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTJcaKwDkY3S9pf1qBWq9%2Fuploads%2FNpQVLOmZ18dB2jouvIZz%2FGIF%20Astra%20Bridge%20Technical%20Animation.gif?alt=media&#x26;token=37fb1b0f-f543-428e-bf5b-6d32b4174f8d" alt=""><figcaption></figcaption></figure>

* 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.

***

## Trust-minimized, Safe & Secure with HTLC

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:

1. When an HTLC is created, the recipient’s address and a cryptographic hash value are specified in the contract.
2. 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.
3. 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.
