The "flaw" in bitcoin transactions is speed.
Reasonably, Team Nakamoto back in 2009, when designing the DLT (Distributed Ledger Technology) dedicated to Bitcoin, i.e. the Blockchain have imposed certain situations in order to make security as high as possible.
As I said before, however, transactions are not fast at all, especially if you compare them to a credit card.
In order to overcome this impasse, another network has been created above the blockchain, but it remains in direct contact.
This network is called the Lightning Network.
In order to access it, a special transaction must be created on the Bitcoin Blockchain: from this moment on, all transactions are recorded on the LN and not on the Blockchain.
Once you get access to the LN, a direct channel opens between you and the address you're transacting with.
Obviously, the problem of double spending is controlled in a timely manner by a smart-contract.
At any time you can pass to the Blockchain the balances of the two addresses, but the transactions made off-chain do not appear.
Warning the fact that they are not visible on the Blockchain, does not mean that they are lost or unrecorded!
As the name itself says (Lightning) transactions are very fast, in fact you don't need to wait for the block validation.
The transaction is immediately registered and the appropriate controls are activated in order to avoid double charges and other incorrect behaviors.
Positive aspects of LN
Regarding scalability I have spoken at the beginning of the article: with LN the transaction speed is immediate.
So the problem of scalability is solved.
Keep in mind that also Ethereum uses a form of LN called Plasma.
Another very important aspect of Bitcoin is the transaction costs.
Obviously, Miners evade first the transactions that are willing to pay the highest price compared to the others.
However, the argument becomes untenable when the transaction costs exceed (if not sometimes double) the amount to be sent.
In these situations, therefore in the micropayments, it turns out exploitable, if not absolutely necessary the net LN.
On the LN network the transactions don't have cost, in fact no block must be validated!
If we make a check on the blockchain, as I said above, we will find a transaction that refers us to the LN.
From here you can see the transactions only and exclusively if the channel holders allow it.
Warning: in this case we have the clear difference between a "private" transaction and a "secret" transaction.
If you remember, in some articles ago, about Cypherpunk I made this distinction.
Who remembers it?
In this first part I explained in a general way how the LN network works, in the next part we will deepen the technical part with the Multisig and the Hash TimeLock Contract (HTLC).
For any note or question use the comments!