I recently authored a small app called Satsumo which allows you to essentially toss a coin and potentially receive a payout.
The “coin toss” is perfectly verifiable as it relies on a deterministic randomness function who’s input is a lightning payment’s hash.
After publishing, I noticed that the vast majority of users were just other developers trying to market their own little apps. This motivated me to drop this post, I hope to bring new users to ⚡️
How to use the lightning network ⚡️
*This tutorial assumes you already own a vanilla BTC wallet with balance*
We’ll cover:
Choosing & downloading a lightning wallet ⚡️
Topping up your lightning wallet
Paying an invoice
Generating an invoice
This tutorial does not cover the ins and outs of how the ⚡️ network functions. However I might try and cover that on a follow-up post.
Choosing & downloading a lightning wallet ⚡️
There’s a lot of wallets out there. For this tutorial we’ll use a browser based wallet called Alby - available on Chrome.
I find this one to have a nice UI + joint by the fact that is browser-based it has that metamask-esque vibe to it.
Topping up your lightning wallet
For this we’ll use a service called ZigZag - https://zigzag.io
Type in the amount you want to send. I went for 0.003 BTC which is about $60
Make sure you select BTC as the origin currency
Make sure you select LBTC as the destination currency. It should have the ⚡️ logo
Now open up Alby, select receive and type in the amount you requested in sats. For me that’s 290,950 sats.
Once you submit you should see a screen like this:
Now scan that QR code with your BTC wallet so the funds can be sent over to your new ⚡️ Alby wallet. Once the transaction is initially sent, upon refreshing the page you should see something like this:
PROTIP if you’re using a custodial wallet there might be fees related to the transaction. If the amount of BTC sent is less than the one expected the overall thing will halt and you’ll have to contact support. Make sure the right amount will be received.
I had to contact support and they were responsive so happy days
Paying an invoice
Right now onto the real stuff!
Head over to Satsumo, now:
Select a stake. I went for 10,000 sats
Pick your odds. I went for 1/10. Go big or go home
Click Go
This will then bring you to the second stage where you are prompted to pay an invoice
Invoices in ⚡️are defined by the BOLT 11 standard. You can read more about it here.
On the internet they’ll appear as a QR code you can scan with your wallet, or alternatively, paste the invoice string into.
To pay the invoice:
Click on the QR code, it will now be copied
Open up Alby and select send
Paste in the code and submit
Generating an invoice
Should you win, in order to receive coins you’ll need to generate an invoice. To generate an invoice:
Open Alby again
Select receive
Type in the amount of sats you could potentially win. This will appear on the line below the QR code in Satsumo
Submit, the invoice is now generated
Copy and paste the invoice into the text field below, click outside of the text box if you don’t see a submit button pop straight away
Click on submit
Now the “coin” is being flipped
An outcome of your stake will be based on the randomly generated pre payment hash(think of this as a transaction ID).
You will then be notified of the outcome of the stake and potentially win! That wasn’t my case but I did went for 1/10 odds. Perhaps I’ll go for 1/6 or 1/2 next time 💎
Outro
Lightning is just getting started. I personally hope it will outgrow Ethereum as I find BTC to be the true king of crypto.
If you’d like to check out more apps I’d recommend you to look at the Bolt Fun project directory