Settlement (Lightning)
The Lightning Network
Section titled “The Lightning Network”The Lightning Network is a payment layer built on Bitcoin. It enables instant, low-fee payments by creating payment channels between nodes. Instead of recording every transaction on the blockchain, parties exchange signed IOUs and only settle to the chain when channels open or close.
Hash Time-Locked Contracts (HTLCs)
Section titled “Hash Time-Locked Contracts (HTLCs)”Lightning payments use HTLCs:
- The receiver generates a random secret (the preimage)
- The receiver computes
(the payment hash) - The sender locks funds: “I’ll pay you X sats if you reveal the preimage of H within T seconds”
- The receiver reveals the preimage to claim the funds
- If the timeout expires, the sender gets their money back
Froglet’s two-leg model
Section titled “Froglet’s two-leg model”Every paid deal splits into two Lightning payments:
| Leg | Amount | When | Purpose |
|---|---|---|---|
| Base fee | Fixed (e.g., 1000 msat) | Locks on admission | Prevents free-riding |
| Success fee | Fixed (e.g., 4000 msat) | Settles on success | Fair to requester |
Why two legs?
Section titled “Why two legs?”- Requester protection: If the provider fails, the success fee is never charged
- Provider protection: The base fee compensates for reserved resources
- No third-party escrow: The Lightning HTLCs bind the success fee to the requester’s acceptance cryptographically
Interactive: outcomes by scenario
Section titled “Interactive: outcomes by scenario”Compare the three settlement outcomes
Each scenario keeps the protocol flow intact. The difference is how much value actually changes hands.
The two-leg structure separates reservation risk from completion risk. That is the key economic trick in Froglet settlement.
Try it: settlement calculator
Section titled “Try it: settlement calculator”Plug in your own numbers to see how the two-leg model settles under each scenario.
Settlement calculator
Adjust base fee, success fee, and provider cost to explore outcomes, break-even threshold, and profitability.
1 bitcoin = 100,000,000 satoshis (sats)1 satoshi = 1,000 millisatoshis (msat)
Froglet prices in msat.Typical compute deal: 5,000 msat = 5 sats