четверг, 14 июня 2018 г.

bitcoin_lightning

Lightning Network

Scalable, Instant Bitcoin/Blockchain Transactions

Transactions for the Future

Instant Payments. Lightning-fast blockchain payments without worrying about block confirmation times. Security is enforced by blockchain smart-contracts without creating a on-blockchain transaction for individual payments. Payment speed measured in milliseconds to seconds.

Scalability. Capable of millions to billions of transactions per second across the network. Capacity blows away legacy payment rails by many orders of magnitude. Attaching payment per action/click is now possible without custodians.

Low Cost. By transacting and settling off-blockchain, the Lightning Network allows for exceptionally low fees, which allows for emerging use cases such as instant micropayments.

Cross Blockchains. Cross-chain atomic swaps can occur off-chain instantly with heterogeneous blockchain consensus rules. So long as the chains can support the same cryptographic hash function, it is possible to make transactions across blockchains without trust in 3rd party custodians.

Powered by Blockchain Smart Contracts

Lightning is a decentralized network using smart contract functionality in the blockchain to enable instant payments across a network of participants.

How it Works

The Lightning Network is dependent upon the underlying technology of the blockchain. By using real Bitcoin/blockchain transactions and using its native smart-contract scripting language, it is possible to create a secure network of participants which are able to transact at high volume and high speed.

Bidirectional Payment Channels. Two participants create a ledger entry on the blockchain which requires both participants to sign off on any spending of funds. Both parties create transactions which refund the ledger entry to their individual allocation, but do not broadcast them to the blockchain. They can update their individual allocations for the ledger entry by creating many transactions spending from the current ledger entry output. Only the most recent version is valid, which is enforced by blockchain-parsable smart-contract scripting. This entry can be closed out at any time by either party without any trust or custodianship by broadcasting the most recent version to the blockchain.

Lightning Network. By creating a network of these two-party ledger entries, it is possible to find a path across the network similar to routing packets on the internet. The nodes along the path are not trusted, as the payment is enforced using a script which enforces the atomicity (either the entire payment succeeds or fails) via decrementing time-locks.

Blockchain as Arbiter. As a result, it is possible to conduct transactions off-blockchain without limitations. Transactions can be made off-chain with confidence of on-blockchain enforceability. This is similar to how one makes many legal contracts with others, but one does not go to court every time a contract is made. By making the transactions and scripts parsable, the smart-contract can be enforced on-blockchain. Only in the event of non-cooperation is the court involved – but with the blockchain, the result is deterministic.

Fast as Lightning

With DPoS consensus mechanism, voting and bookkeeping rights can be separated, which prevents abuse or control of the system by any party. Users can maintain the policy discourse as long as they possess coins, thus achieve the true autonomy.

3 seconds per block with 2M blocksize design could support 1,000 to 10,000 transactions per second, and completely solved the most contended bitcoin congestion problem, and increase the adption and utilization.

The original bitcoin holders can claim LBTC at a 1:1 ratio, the rest will be distributed through forging in a convergent manner, while the block rewards halves in every four years.

With built-in smart contract, digital assets can be issued and distributed, and applications can be built on blockchain, making LBTC a valuable and functional token.

Support all kinds of DApp development, including zero knowledge proof (included in the plan), cross-chain atomic transactions.

Lightning Network

Lightning Network is a proposed implementation of Hashed Timelock Contracts (HTLCs) with bi-directional payment channels which allows payments to be securely routed across multiple peer-to-peer payment channels. [1] This allows the formation of a network where any peer on the network can pay any other peer even if they don't directly have a channel open between each other.

Key features

Key features of the Lightning Network proposal include,

  • Rapid payments: payments within an established channel can be made almost as fast as data can travel over the Internet between the two peers.
  • No third-party trust: the two peers in a channel pay each other directly using regular Bitcoin transactions (of which only one is broadcast) so at no point does any third party control their funds.
  • Reduced blockchain load: only channel open transactions, channel close transactions, and (hopefully infrequent) anti-fraud respends need to be committed to the blockchain, allowing all other payments within Lightning Network channels to remain uncommitted. This allows Lightning Network users to make frequent payments secured by Bitcoin without placing excessive load on full nodes which must process every transaction on the blockchain.
  • Channels can stay open indefinitely: as long as the two parties in the channel continue to cooperate with each other, the channel can stay open indefinitely -- there is no mandatory timeout period. This can further reduce the load on the blockchain as well as allow the fees for opening and closing the channel to be amortized over a longer period of time.
  • Rapid cooperative closes: if both parties cooperate, a channel can be closed immediately (with the parties likely wanting to wait for one or more confirmations to ensure the channel closed in the correct state). Non-cooperative closes (such as when one party disappears) are also possible but they take longer.
  • Outsourcable enforcement: if one party closes a channel in an old state in an attempt to steal money, the other party has to act within a defined period of time to block the attempted theft. This function can be outsourced to a third-party without giving them control over any funds, allowing wallets to safely go offline for periods longer than the defined period.
  • Onion-style routing: payment routing information can be encrypted in a nested fashion so that intermediary nodes only know who they received a routable payment from and who to send it to next, preventing those intermediary nodes from knowing who the originator or destination is (provided the intermediaries didn't compare records).
  • Multisignature capable: each party can require that their payments into the channel be signed by multiple keys [2] , giving them access to additional security techniques.
  • Securely cross blockchains: payments can be routed across more than one blockchain (including altcoins and sidechains) as long as all the chains support the same hash function to use for the hash lock, as well as the ability the ability to create time locks.
  • Sub-satoshi payments: payments can be made conditional upon the outcome of a random event, allowing probabilistic payments. [3] For example, Alice can pay Bob 0.1 satoshi by creating a 1-satoshi payment with 10-to-1 odds so that 90% of the time she does this she pays him 0 satoshis and 10% of the time she pays him 1 satoshi for an average payment of 0.1 satoshis.
  • Single-funded channels: when Alice needs to send a payment to Bob and doesn't currently have a way to pay him through the Lightning Network (whether because she can't reach him or because she doesn't have enough money in an existing channel), she can make a regular on-chain payment that establishes a channel without Bob needing to add any of his funds to the channel. Alice only uses 12 bytes more than she would for a non-Lightning direct payment and Bob would only need about 25 more segwit virtual bytes to close the channel than he would had he received a non-Lightning direct payment. [3]

This section attempts to document the most frequently used terms found in Lightning Network literature that may not be familiar to a general technical audience, including both the new terms created by Lightning Network designers as well as pre-existing terms that may not be well known from Bitcoin, cryptography, network routing, and other fields.

The list below should be in alphabetical order. Any commonly-used synonyms or analogs for a term are placed in parenthesis after the term.

  • Bi-directional payment channel:[1] a payment channel where payments can flow both directions, from Alice to Bob and back to Alice. This is contrasted with Spillman-style and CLTV-style payment channels where payments can only go one direction and once Alice has paid Bob all of the bitcoins she deposited in the channel funding transaction, the channel is no longer useful and so will be closed.
  • Breach Remedy Transaction:[1] the transaction Alice creates when Mallory attempts to steal her money by having an old version of the channel state committed to the blockchain. Alice's breach remedy transaction spends all the money that Mallory received but which Mallory can't spend yet because his unilateral spend is still locked by a relative locktime using OP_CSV . This is the third of the maximum of three on-chain transactions needed to maintain a Lightning channel; it only needs to be used in the case of attempted fraud (contract breach).
  • Channel (Lightning channel [1] , payment channel [4] ) a communication channel that allows two parties to make many secure payments between each other in exchange for making only a few transactions on the blockchain.
  • Commitment Transaction:[1] a transaction created collaboratively by Alice and Bob each time they update the state of the channel; it records their current balances within the channel. The Initial Commitment Transaction[1] is the first of these transactions; it records the inital balances within the channel. This is the second of the maximum of three on-chain transactions needed to maintain a Lightning channel; it can be combined with a funding transaction for a new channel under the cooperative conditions necessary to create an exercise settlement transaction.
  • Contract:[5] an agreement between two or more entities to use Bitcoin transactions in a certain way, usually a way that allows Bitcoin's automated consensus to enforce some or all terms in the contract. Often called a smart contract.
  • CSV: ( OP_CheckSequenceVerify , OP_CSV ) [6] a opcode that allows an output to conditionally specify how long it must be part of the blockchain before an input spending it may be added to the blockchain. See relative locktime.
  • Delivery Transaction:[1] not really a transaction but rather the name for the outputs in the commitment transaction which Alice and Bob receive if one of them closes the channel unilaterally in the correct (current) state. If the channel is closed in an old state (indicating possible fraud), a breach remedy transaction will be generated from the output that would have paid the party closing the channel. If the channel is closed cooperatively, they'll create an exercise settlement transaction instead.
  • Dispute period: (dispute resolution period [7] ) the period of time that Alice has to get her breach remedy transaction added to the blockchain after Mallory has an old commitment transaction added to the blockchain. If the dispute period ends without a breach remedy transaction being added to the blockchain, Mallory can spend the funds he received from the old commitment transaction.
  • Dual-funded channel:[3] a channel opened by a funding transaction containing inputs from both Alice and Bob. Compare to a single-funded channel where only Alice's inputs contribute to the balance of the channel.
  • Encumbrance:[8] a generic name for any conditions that must be satisfied before a bitcoin output may be spent. Early Bitcoin transactions placed all their conditions in the scriptPubKey; later the introduction of P2SH allowed conditions to be added in a redeemScript which the scriptPubKey committed to; the introduction of soft fork segwit will add a similar mechanism for detached conditions that the scriptPubKey commits to; in addition, there are even more novel ways to add conditions to outputs that are discussed but rarely used. The term "encumbrance" allows specifying what the conditions do without fussing over exactly where the conditions appear in a serialized transaction.
  • Exercise Settlement Transaction:[1] a form of the commitment transaction created cooperatively by Alice and Bob when they want to close their channel together. Unlike a regular commitment transaction, none of the outputs on an exercise settlement transaction are time locked, allowing them to be immediately respent.
  • Exhausted:[3] (exhausted channel) a payment channel where no additional payments can be made in one direction (such as from Alice to Bob). The person controlling the exhausted side of a Lightning channel loses nothing from fraudulently trying to commit an old channel state, so allowing a channel to become exhausted (or too near to being exhausted) is unpreferable. (Exception: channels can be securely started in an exhausted state, such as a single-funded channel.
  • Full push:[3] when Alice pays the full amount of the channel to Bob in the initial commitment transaction, which exhausts the channel without incentivizing fraud because Alice doesn't have a previous commitment transaction that she can broadcast. This term is used in the context of a single-funded transaction and stands in contrast to an overpayment where Alice deposits more than she pays Bob in that initial payment so that she can continue to use the channel without needing to rebalance.
  • Funding Transaction:[1] (deposit transaction) a transaction created collaboratively by Alice and Bob to open a Lightning channel. In a single-funded channel, Alice provides all the funding; [3] in a dual-funded channel, Alice and Bob both provide some funding. This is the first of the maximum of three on-chain transactions needed to maintain a Lightning channel; it can be combined with a commitment transaction from a previous channel being closed under cooperative conditions.
  • Half-signed:[1] a transaction input which requires two signatures to be added to the blockchain but which only has one signature attached. (More generally, this could be any input that has fewer signatures attached than it needs to be added to the blockchain.)
  • Hash lock:[9] an encumbrance to a transaction output that requires the pre-image used to generate a particular hash be provided in order to spend the output. In Lightning, this is used to allow payments to be routable without needing to trust the intermediaries.
  • HTLC: (Hashed Timelocked Contract [10] ) a contract such as that used in a Lightning Channel where both a hash lock and a time lock are used, the hash lock being used to allow Alice to route payments to Bob even through a Mallory that neither of them trust, and the time lock being used to prevent Mallory from stealing back any payments he made to Alice within the channel (provided Alice enforces the contract).
  • Intermediary:[1] When Bob has one channel open with Alice and another channel open with Charlie, Bob can serve as an intermediary for transferring payments between Alice and Charlie. With Lightning payments being secured with a hash lock, Bob can't steal the payment from Alice to Charlie when it travels through Bob's node. Lightning payments can securely travel through a theoretically unlimited number of intermediaries.
  • Limbo channel:[3] an optional special state for a Lightning channel where it cannot be immediately closed by one or both of the parties unilaterally (it can still be immediately closed cooperatively). This is used in particular for PLIPPs.
  • Multisig:[11] (multisignature, m-of-n multisig) a transaction output that requires signatures from at least one of a set of two or more different private keys. Used in Lightning to give both Alice and Bob control over their individual funds within a channel by requiring both of them sign commitment transactions.
  • Node: (Lightning node [1] ) a wallet with one or more open Lightning channels. This should not be confused with a Bitcoin full node that validates Bitcoin blocks, although a full node's wallet may also be simultaneously used as a Lightning node to the advantage of the Lightning network user.
  • Overfunding:[3] in a single-funded channel, Alice deposits more bitcoins into the channel than she pays Bob in the initial payment, allowing her to make additional payments through the Lightning network. This stands in contrast to a full push where Alice only deposits enough to pay Bob in the initial payment.
  • PILPP: (Pre-Image Length Probabilistic Payments [3] ) a specific type of probabilistic payment within a payment channel where Alice creates string with a random length and Bob guesses the length; if he guesses correctly, Alice has to pay him; if he guesses incorrectly, Alice gets to keep her money.
  • Pre-image:[12] (R [1] ) data input into a hash function, which produces a hash of the pre-image. Inputting the same pre-image into the same hash function will always produce the same hash; Lightning uses this feature to create hash locks.
  • Probabilistic Payment:[13] a payment where Alice only pays Bob if some event outside of Alice's and Bob's control occurs in Bob's favor. Probabilistic payments are usually proposed for scenarios where payments can't conveniently be made small enough for technical reasons (such as not being able to pay less than 1 satoshi) or economic reasons (such as having to pay a transaction fee for every on-chain payment, making small payments uneconomical). See PLIPP for a specific type of probabilistic payment possible within a Lightning channel.
  • R: the variable commonly used [1] in formulas to represent a pre-image.
  • Rebalance:[14] a cooperative process between Alice and Bob when they adjust their balances within the channel. This happens with every payment in a Lightning channel and is only noteworthy because single-directional channels (such as Spillman-style and CLTV-style channels) are unable to rebalance and so must close as soon as Alices has paid Bob all the bitcoins she deposited into the channel. See bi-directional payment channels.
  • Relative locktime:[6] the ability to specify when a transaction output may be spent relative to the block that included that transaction output. Enabled by BIP68 and made scriptable by BIP112. Lightning uses relative locktime to ensure breach remedy transactions may be broadcast within a time period starting from when an old commitment transaction is added to the blockchain; by making this a relative locktime (instead of an absolute date or block height), Lightning channels don't have a hard deadline for when they need to close and so can stay open indefinitely as long as the participants continue to cooperate.
  • Revocable Sequence Maturity Contract (RSMC):[1] a contract used in Lightning to revoke the previous commitment transaction. This is allowed through mutual consent in Lightning by both parties signing a new commitment transaction and releasing the data necessary to create breach remedy transactions for the previous commitment transaction. This property allows Lightning to support bi-directional payment channels, recover from failed HTLC routing attempts without needing to commit to the blockchain, as well as provide advanced features such as PILPPs.
  • Single-funded channel:[3] a channel opened by a funding transaction containing only inputs from Alice. Compare to a dual-funded channel where Alice and Bob both contribute inputs to the initial balance of the channel.
  • Timelock:[15] either an encumbrance to a transaction that prevents that transaction from being added to the blockchain before a particular time or block height (as is the case with nLockTime, or an encumbrance that prevents a spend from a transaction output from being added to the blockchain before a particular time or block height (as is the case of OP_CLTV, consensus enforced sequence number relative locktime, and OP_CSV). In Lightning, this is used to prevent malicious intermediaries from holding other users' funds hostages as well as to allow victims of attempted theft to submit breach remedy transactions before the thief can respend the funds he stole.
  • TTL: (Time To Live [16] ) when Alice pays Bob with a hash locked in-channel payment that's ultimately intended for Charlie, she specifies how long Bob has to deliver the payment (its time to live) before the payment becomes invalid. When Bob pays Charlie with his own in-channel payment that has the same hash lock, Bob specifies a slightly shorter amount of time that Charlie has to reveal the pre-image that unlocks the hash lock before Bob's payment becomes invalid. This ensures that either Bob receives the data necessary to remove the hash lock from the payment he received from Alice or the payment he made to Charlie is invalidated; Alice gets the same guarantee that either the payment she made to Bob ultimate goes through to Charlie or her payment to Bob is invalidated.
  • Unilateral:[1] any action performed by only one of the participants in a channel without requesting or needing permission from the other participant. Lightning allows channels to be closed unilaterally (so Alice can close the channel by herself if Bob becomes unresponsive) and attempted fraud can be penalized unilaterally (so Alice can take any bitcoins Mallory tried to steal when he broadcast an old commitment transaction).
  • UTXO:[17] (Unspent Transaction Output) spendable bitcoins. A transaction output lists a bitcoin amount and the conditions (called an encumbrance) that need to be fulfilled in order to spend those bitcoins. Once those bitcoins have been spent on the blockchain, no other transaction in the same blockchain can spend the same bitcoins, so an Uspent Transaction Output (UTXO) is bitcoins that can be spent.

What is the Bitcoin Lightning Network? A Beginner’s Explanation

Last updated on January 2nd, 2018 at 12:00 am

While the Lightning Network is extremely promising as a cryptocurrency game-changer, it’s also pretty complicated. But don’t worry! As always, we’re here to translate this fascinating aspect of Bitcoin into plain English.

Since Lightning Networks are anchored to “traditional” blockchains, a solid understanding of the basic workings of blockchain technology is helpful in understanding them. If you lack this foundational knowledge, we recommend that you first review our video guides of the Bitcoin blockchain, before continuing with this guide to Lightning Networks.

In a nutshell, the lightning network is an upgrade to the current Bitcoin system (i.e., the protocol) that will allow users to create instant and feeless transactions.

Lightning Network Origins

In his original Bitcoin design, Satoshi Nakomoto included some of the building blocks for fast transactions—which are unlimited by block times or transaction fees, and arranged between cooperating users:

The possibilities of Satoshi’s idea have long been discussed, refined, and extended by numerous developers. These ideas coalesced into a whitepaper authored and presented by Thaddeus Dryja and Joseph Poon back in 2015.

These two young developers significantly advanced Satoshi’s original design by proposing a decentralized network of lightning-fast transactions. Simply put, this network element is capable of connecting any and all users to this “fast and feeless” system, through a routed series of transactions.

It’s important to note that there are various implementations of the Lightning Network protocol in active development. There are at least 6 Lightning Networks. In order to ensure compatibility among these various Lightning Networks, testing is ongoing. The goal of this testing is a cohesive, seamless network.

The Motivation for a Faster Network

For a variety of reasons, bitcoin is great. It puts us in control of our own money, gives us transactions that are not censorable, provides a dependable store of value, and allows us to transact with any connected person on the planet. But like everything else in life, Bitcoin’s blockchain has limitations.

If you’ve ever tried to send a transaction during a particularly busy time, you’ve probably noticed that Bitcoin transactions can be slow and/or expensive. Supporters of various Altcoins will argue that this reason is enough to switch to their preferred coin, but there are some obvious problems with this suggestion:

  1. Their altcoin might be a total scam.
  2. No coin is as widely accepted, trusted, or valuable as Bitcoin.
  3. If their coin ever becomes as popular as Bitcoin, it’ll probably run into exactly the same limitations.

Bitcoin transactions are (almost) never as slow or expensive as traditional fiat systems, such as bank wires or credit cards. However, it’d be great if we could have perfect, instant, and free (or nearly free) transactions. That’s where the Lightning Network comes in, and with SegWit now implemented on Bitcoin, there are no more technical issues to obstruct it.

As a distinct network, Lightning Networks (or LNs for short) are built on top of existing blockchains. They’re primarily designed for lower-value transactions (i.e., micropayments). LNs enable an unlimited number of near-instant and virtually feeless transactions.

The chains of Bitcoin and other cryptos constitute the underlying Layer 1 networks. (Litecoin, Vertcoin, Ethereum and others are all working on their own LN implementations.) As Layer 2 networks, LNs will function on top of these regular blockchains. The security of these secondary “off-chain” layers ultimately depends on the Layer 1 blockchain.

Lightning Network Benefits

In theory, LNs will provide all the security, value, and wide acceptance of Bitcoin (once the ecosystem upgrades). However, it will have none of its drawbacks, such as slow transaction times and high fees.

As an additional bonus, by offloading the bulk of small transactions to LNs, the transactional load on the underlying Level 1 blockchain should be greatly reduced. This extra will improve the transaction times and fee costs of the regular blockchain.

Lightning Network Explained (Part 1): Payment Channels

The basic idea behind the Lightning Network is payment channels. In other words, if I want a transaction with my friend, we open an “off-chain” payment channel between us, which is accomplished by an “opening transaction” on the main blockchain.

From then on, the payment channel is open, and any number of transactions can directly occur between me and my friend—without payments ever touching the main blockchain. Funds can be transferred as quickly as the users’ wallets can communicate over the net.

Once we want to conclude our business, we conduct a “closing transaction” on the main blockchain, and basically settle all of our previous transactions.

The magic of payment channels occurs between these opening and closing transactions on the blockchain. The primary reason that the blockchain remains necessary is that it’s used to both open and close Lightning Network payment channels.

Now let’s take a look at how a Lightning Network transaction comes to life.

Note: In the following explanation, we pretend that each character is manually performing each step. In reality, they only make the high-level decisions, and the actual work is performed by their Lightning Network wallets.

Step 1: Funding

Let’s consider a case where two parties, Cat and Dog, plan to conduct a lot of trades with each other. They’re playing chess online for Bitcoin. Rather than making numerous payments over the blockchain, they decide to save fees and time by setting up a payment channel. As they’ll be making Bitcoin payments back and forth, they require a bidirectional (two-way) payment channel.

Let’s say that Cat and Dog wish to establish a channel with a total value of 1 BTC. In other words, Cat and Dog don’t think that the overall transactions they’ll conduct will surpass 1 BTC. So both animals send an amount of 0.5 BTC over the blockchain to a multi-signature (aka multisig) Bitcoin address.

A multisig address is a Bitcoin address that acts like a lock, which is only unlocked if enough keys—out of a set of predefined ones—decide to unlock it. For example, you can release payment from an address if 2 out of 3 address owners sign off on it.

Multisig addresses start with a “3” (instead of a “1,” for a standard Bitcoin address). In this case, both signatures (derived from the private keys of both Cat & Dog) are required to spend any BTC from this address.

Miners process Cat & Dog’s payment on-chain as usual.

A total of 1 BTC is now locked up in this special multisig address, and the funding process is complete.

Step 2: Setup

Cat creates a transaction, which states that 0.5 BTC is payable to Cat’s own regular Bitcoin address, and that 0.5 BTC is payable to Dog’s address. Dog creates a transaction, stating the exact same thing. However, both transactions are incomplete, as they lack the other’s signature. Remember, both signatures are required to make either transaction valid!

A time constraint is also put in place. It states the following: If nothing further happens, both parties get their 0.5 BTC back at an arbitrary, future point—for instance, 30 days from when the address is set up. This situation prevents one party from vanishing, which would leave the other with permanently locked-up funds.

Cat & Dog exchange these incomplete transactions with each other over the net. Now, if Cat wishes to back out, she only needs her signature on the incomplete transaction from Dog, stating that 0.5 BTC should be sent back to her. She then broadcasts the complete transaction to the miners.

The addition of Cat’s sig validates the transaction, and causes it to be executed. The result is that Cat gets her 0.5 BTC back. Likewise, Dog can cancel the channel out in the same manner.

The only asymmetry here is that whoever adds their signature to the other’s incomplete transaction will have to wait for 1,000 blocks (or about a week) before their funds are returned. However, their counterparty’s funds will be returned immediately. This delay discourages unnecessary cancellations and prevents cheating.

Step 3: Exchanging

Let’s say that Dog wins the first round of chess. The stakes were 0.1 BTC per game. To reflect the updated state of their account, both parties create a new, incomplete transaction. It says that of the 1 BTC total, Dog now owns 0.6 BTC, and Cat owns 0.4 BTC. This new contract is set to expire in 29 days, so it’ll execute before the original contract’s 30 days.

This fresh exchange of incomplete transactions permanently cancels out the initial, establishing exchange (which declares an equal balance of 0.5 BTC on each side). This exchange is achieved by each party, who also signs and exchanges a fraud-protection proof. This proof states the following: Should either attempt to broadcast an outdated or falsified version of the channel’s balance of funds, the entire balance will be paid to their counterparty.

For instance, Cat gets sneaky and broadcasts the old 0.5 BTC. Then she establishes a channel state to wipe out her 0.1 BTC loss. Then Dog has one week to notice Cat’s cheating. Dog can disprove Cat’s fraud, simply by showing miners the most recent (0.6 / 0.4 BTC) transactions. Remember that Cat has signed her copy, so there’s no way that she can deny it…

Dog will then be awarded the full 1 BTC, and Cat will lose all her remaining money. Anyone else observing the matter may also catch Cat out, and receive a small bounty from the total balance for doing so.

Knowing that such a harsh penalty awaits her if caught, Cat is very unlikely to cheat in the first place.

As before, neither animal broadcasts the updated state to the blockchain to be mined, as they intend to keep playing. However, either side has the option to “cash out” the channel at its current account balance whenever they wish—provided they’re willing to wait a week to get paid.

Step 4: Closing

Cat and Dog may continue in this fashion—until they wish to stop playing, and agree to close the channel. Once there’s an agreement between them, a final exchange of transactions occurs, and neither side experiences any delay in the settlement.

If at any time only one side opts to close the channel, they experience the 1,000-block delay, as explained above.

Finally, a channel will also be closed when it reaches the end of the duration that’s set for it.

In any event, the current state of the payment channel is then broadcast to miners. Each party receives a payout to their standard Bitcoin address. No matter how many transactions Cat and Dog have made in-between, only a couple of transactions will appear on the Bitcoin blockchain: the opening and closing.

Note: While the above system is fairly complex (even without getting into the technicalities), the upside is that participants can exchange an unlimited number of transactions as rapidly as they can transmit them—for zero cost, and only 2 on-chain transactions.

Here’s a short video that summarizes all that we just went through:

Lightning Network Explained Part 2: Networked Channels

While bidirectional payment channels are really cool for specific-use cases between cooperating parties, combining multiple channels is what makes Lightning so powerful.

Let’s say Dog & Cat still have their chess-game payment channel open. Dog is getting hungry. So he wants to order a pizza, but doesn’t have a payment channel open with the pizzeria owner, Bird. Cat does have a channel open with Bird. Instead of opening a new channel to Bird, Dog can pay Bird via Cat’s channel.

Dog first asks Bird for a secret. Then he tells Cat to pay Bird the cost of the pizza (let’s say 0.001 BTC) in exchange for the same secret from Bird. Cat then shows this secret to Dog. If it matches the secret that Dog got from Bird, Dog knows that Cat really paid Bird, so it’s safe for him to pay Cat.

This system of chained, conditional payments can be extended out to any number of parties, provided they all share channels with a value greater than the payment being routed. There are also safeguards in place, which ensure that a secret cannot be exchanged without the correct number of coins also being exchanged.

Therefore, the Lightning Network is globally scalable. In order to transact with anyone, you just need to find a path to that someone via other participants in the network. (In other words, it doesn’t matter if that channel goes through a hundred other intermediaries.)

Future Possibilities of Lightning Networks

Under Lightning, all sorts of new payment models will become possible. For example, your smartphone could use Lightning to make automatic micro-transaction payments to WiFi hotspots that it connects to, and you will be able to only pay for a partial video you’ve watched. Then, for example, you can only pay workers for the number of minutes (or even seconds) they’ve worked.

These automated, machine-to-machine transactions for tiny amounts become possible with sufficiently cheap transfers.

An even more tantalizing prospect held out by Lightning is its suitability to retail trade. At the best of times, Bitcoin confirmation times take minutes. And while this feature is great for international payments, it’s simply too slow for paying the cashier at the supermarket.

At least in theory, instant and near-feeless Lightning payments would allow Bitcoin to replace cash, credit cards, and other payment methods for such person-to-person transactions. While Bitcoin has proven extremely useful in the digital realm, Lightning may enable it to make the jump into evermore real-world applications.

Still not understanding the Lightning Network completely? You’re not alone. At the moment, it’s one of the more technical, complex subjects to explain. Here’s a video by Andreas Antonoplos, which offers another very good explanation about the whole system:

Have more questions about the Lightning Network? Let us know in the comment section below.

What is the Bitcoin "Lightning Network?"

  • More on Blockchain and Bitcoin
  • What's the Vice Industry Token—A Crypto for Porn?
  • Governance: Why Crypto Investors Should Care
  • Blockchain-as-a-Service (BaaS)
  • Which FAANG Will Win the Blockchain Wars?

Bitcoin developers and users alike have been looking for a solution to the ongoing problems that have resulted from the rapidly growing interest and demand for the cryptocurrency. August 24, 2017 was seen as a big day for Bitcoin; it was on this day that SegWit was implemented on the Bitcoin network. SegWit is a protocol which will allow the Bitcoin network to expand in order to accommodate surging customer and transaction interest. But so far, SegWit hasn't been widely adopted and hasn't made much of an impact. Now, the focus is on a "Lightning Network," which some developers have suggested could be a revolutionary change for the network. The lightning network is currently in the early stages although it is available for live public tests. It is expected to move toward becoming enterprise-grade in the upcoming months. Here's a little more about what it is and what the changes might mean.

(Check out our new Bitcoin Page for news and real-time price quotes)

A "Game-Changing Innovation"

The Lightning Network would potentially allow for transactions and microtransactions utilizing Bitcoin to take place instantaneously. According to CNBC, Aurélien Menant, the founder and CEO of cryptocurrency exchange Gatecoin, described the network as "a game-changing innovation," saying that it "utilizes smart contract technologies to enable instant micropayments using cryptocurrencies such as Bitcoin."

Analysts view the lock-in and implementation of the SegWit protocol as an essential step toward the implementation of the Lightning Network, which would constitute a sort of added layer of framework which could be grafted on to the existing Bitcoin network. Fran Strajnar, co-founder and CEO of Brave New Coin, explained that "Bitcoin's SegWit means the many well-financed companies researching Lightning solutions can start to test on the main network," possibly allowing the implementation of the Network to take place in the near future.

Years of Anticipation

Companies and developers alike have been waiting for the implementation of Lightning for more than two years. The technology behind the Lightning Network will improve upon the process by which Bitcoin transactions are validated. Currently, the process makes use of mining rigs, requiring that computers solve complicated math problems before the transactions can be recorded on the blockchain ledger. Because of the computing power required, a single transaction can take up to an hour to confirm. With Lightning, however, this process would be significantly sped up. The Lightning Network would require that participants agree to transact on a separate, offline channel, and then the blockchain would update to reflect the external transaction. Thus, the middleman of the mining rig or digital wallet provider could be skipped entirely. The developers of the network have indicated that its speed would enable it to "be used at retail point-of-sale terminals, with user device-to-device transactions, or anywhere instant payments are needed." It is expected that Lightning would help Bitcoin to become competitive with other instant payment platforms and that it could revolutionize the way that peer-to-peer payments are transacted.

Lightning: The Bitcoin Scaling Tech You Really Should Know

"What is bitcoin? Can I buy, like, pizza with it?"

Asked by sports blogger Dave Portnoy in his inaugural video as a bitcoin investor, the comment cuts to the core of a truism about the network: while it's been billed as a "digital currency," it's actually not all that useful for payments today. In short, you're very unlikely to stumble on a bodega that accepts it (should you even want to spend it).

But that's not to say that engineers aren't working on addressing the issue.

That's why one of the most talked about technologies currently in development for bitcoin is the Lightning Network.

Rather than updating bitcoin's underlying software (which has proven to be a messy process), Lightning essentially adds an extra layer to the tech, one where transactions can be made more cheaply and quickly, but with, hypothetically, the same security backing of the blockchain.

Proposed as far back as 2015, Lightning has progressed gradually over the years, migrating from white paper, to prototype, to more advanced prototype.

It's the most recent test, however, that has some looking forward to a not-so-distant future when users can at last transact via Lightning, putting to the test long-held assumptions and criticisms.

As Jack Mallers, developer of Lightning desktop app Zapp, put it:

"It's fairly close to working to the point where the public can test with real money, but not necessarily at the point where people can operate a business on it quite yet."

Step one, the technology

What steps are left before Lightning is usable? Lightning engineers have some ideas.

Though Lightning took a big step early this week, the engineers still need to release software with which real users can make real Lightning transactions. So, the first and most obvious step is to let Lightning out of the cage and to watch and see if users have any issues during this initial stage.

"In the near future most problems will be about getting Lightning to work in practice," Swiss university ETH Zürich researcher Conrad Burchert told CoinDesk.

And, once Lightning's up and running, engineers foresee other subtle technical challenges, such as getting the "network structure" right, Burchert said. Bad actors might be able to halt transactions, for example, or users might want more control over where their transactions are going.

"Whenever you're building a new financial protocol, you want to ensure it's secure as possible, so we're working on various security-related efforts," said Elizabeth Stark, co-founder and CEO of Lightning Labs, one of a handful of startups dedicated solely to the technology.

Mallers agreed that these technical hurdles need to be solved before Lightning can reach the mainstream.

"All of that will need to get ironed out before I would advise a company to start to rely on the Lightning Network for business or money that they can't afford to lose," Mallers said, adding:

"The only thing that could speed it up is more engineers."

Stark concurred, adding that despite the promise of the technology, there are astoundingly few developers working on it right now.

"We need more hours in the day. . There are 10 or fewer full-time developers working across all implementations of Lightning. Getting more contributors and people building out the protocol would certainly help move things along," she told CoinDesk.

Hiding the wires

Another piece of the puzzle is making the Lightning apps easy to use.

It's promising that apps supporting Lightning as a payment method are already cropping up, but so far they're pretty confusing to use. A lot of the wires are still popping out into view.

Zap, a Lightning desktop app, requires users to configure their node and plug in its IP address, for example, a far cry from today's money apps that hide these technical details from users.

"That stuff will definitely be hidden one day," said Mallers, envisioning that Zap will one day look closer to Venmo, an app for sending small amounts of money to friends. "Eventually peers on the network will just look like contacts on your phone."

Maller argues this is happening already.

LND, the Lightning implementation most popular among app developers, for example, recently added a feature that automates creating a channel between the sender and receiver when users deposit money, "so that users don't have to understand what all that means," he said.

That's not to say he thinks it will happen right away, though.

"Baby steps," he continued. "Right now the Lightning Network still probably favors technical users. Slowly but surely we'll abstract a lot of this stuff away, so it's just about paying and receiving money."

"As far as Lightning Network changing the world – where I can wave my phone and pay for things and stuff will show up – I'd say it'll take a year or two," Mallers said.

Chicken-and-egg issue

Then there's the question: Will users actually want to use bitcoin? Even with faster, cheaper Lightning-like transactions in place?

Bitcoin developer Alphonse Pace believes it could be a challenge for Lightning to achieve a "network effect," where users have an incentive to use the technology because other people are using it.

And, who will adopt it first?

"It's a chicken-and-egg problem," said Pace. "Wallets will want people wanting to use it to support it, and people will want wallets to support using it."

Alex Bosworth, developer of Lightning apps HTLC.me and Yalls alluded to a similar problem.

"There is somewhat of a bootstrapping issue. We need to have apps to encourage wallets and wallets to encourage apps," said Bosworth.

And, even if bitcoin transactions become faster and cheaper (because of Lightning) than familiar payment apps, such as Apple Pay, he thinks users will be cautious at first.

"If you ask a normal person what they want to pay with, they would probably go with Apple Pay because that's what they are used to," he said.

In conversation, Lightning developers expect to overcome these hurdles. But, again, they think it will take time.

High expectations

Although it might take time to iron out these issues, developers were mostly optimistic that Lightning would help achieve the dream of making bitcoin a usable payment system. Rome wasn't built in a day, after all. And neither were computers or the internet, which each took decades to reach normal people.

Mallers argued Lightning "will really change the way that we send money to each other on a day to day basis." But he thinks the community might have unreal expectations for how long it will take engineers to achieve that.

"[To these engineers,] I would hope you'd go 'oh take your time, would you like any water?' But the community seems to be like 'Why's it not here tomorrow?' I think users over-estimated Lightning's deadlines," he said.

Bosworth offered a similarly optimistic take: "[The Lightning Network] could be like the WWW was to email. It might take a while to grow, but the more it grows the better it will get."

He added that his dad, Adam Bosworth, led the tech team behind one of the first web browsers in 1995, just as the internet was finally making its way out of research laboratories to normal people.

"I remember that time as being pretty exciting because of all of the opportunities that were going to fall out of web browsers. This reminds me a lot of that."

Inert gas image via Shutterstock

The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

US Search Mobile Web

Welcome to the Yahoo Search forum! We’d love to hear your ideas on how to improve Yahoo Search.

The Yahoo product feedback forum now requires a valid Yahoo ID and password to participate.

You are now required to sign-in using your Yahoo email account in order to provide us with feedback and to submit votes and comments to existing ideas. If you do not have a Yahoo ID or the password to your Yahoo ID, please sign-up for a new account.

If you have a valid Yahoo ID and password, follow these steps if you would like to remove your posts, comments, votes, and/or profile from the Yahoo product feedback forum.

  • Vote for an existing idea ( )
  • or
  • Post a new idea…
  • Hot ideas
  • Top ideas
  • New ideas
  • Category
  • Status
  • My feedback

Improve your services

Your search engine does not find any satisfactory results for searches. It is too weak. Also, the server of bing is often off

I created a yahoo/email account long ago but I lost access to it; can y'all delete all my yahoo/yahoo account except for my newest YaAccount

I want all my lost access yahoo account 'delete'; Requesting supporter for these old account deletion; 'except' my Newest yahoo account this Account don't delete! Because I don't want it interfering my online 'gamble' /games/business/data/ Activity , because the computer/security program might 'scure' my Information and detect theres other account; then secure online activities/ business securing from my suspicion because of my other account existing will make the security program be 'Suspicious' until I'm 'secure'; and if I'm gambling online 'Depositing' then I need those account 'delete' because the insecurity 'Suspicioun' will program the casino game 'Programs' securities' to be 'secure' then it'll be 'unfair' gaming and I'll lose because of the insecurity can be a 'Excuse'. Hope y'all understand my explanation!

I want all my lost access yahoo account 'delete'; Requesting supporter for these old account deletion; 'except' my Newest yahoo account this Account don't delete! Because I don't want it interfering my online 'gamble' /games/business/data/ Activity , because the computer/security program might 'scure' my Information and detect theres other account; then secure online activities/ business securing from my suspicion because of my other account existing will make the security program be 'Suspicious' until I'm 'secure'; and if I'm gambling online 'Depositing' then I need those account 'delete' because the insecurity 'Suspicioun' will program the casino game 'Programs' securities' to be… more

chithidio@Yahoo.com

i dont know what happened but i can not search anything.

Golf handicap tracker, why can't I get to it?

Why do I get redirected on pc and mobile device?

Rahyaftco@yahoo.com

RYAN RAHSAD BELL literally means

Question on a link

In the search for Anaïs Nin, one of the first few links shows a picture of a man. Why? Since Nin is a woman, I can’t figure out why. Can you show some reason for this? Who is he? If you click on the picture a group of pictures of Nin and no mention of that man. Is it an error?

Repair the Yahoo Search App.

Yahoo Search App from the Google Play Store on my Samsung Galaxy S8+ phone stopped working on May 18, 2018.

I went to the Yahoo Troubleshooting page but the article that said to do a certain 8 steps to fix the problem with Yahoo Services not working and how to fix the problem. Of course they didn't work.

I contacted Samsung thru their Samsung Tutor app on my phone. I gave their Technican access to my phone to see if there was a problem with my phone that stopped the Yahoo Search App from working. He went to Yahoo and I signed in so he could try to fix the Yahoo Search App not working. He also used another phone, installed the app from the Google Play Store to see if the app would do any kind of search thru the app. The Yahoo Search App just wasn't working.

I also had At&t try to help me because I have UVERSE for my internet service. My internet was working perfectly. Their Technical Support team member checked the Yahoo Search App and it wouldn't work for him either.

We can go to www.yahoo.com and search for any topic or website. It's just the Yahoo Search App that won't allow anyone to do web searches at all.

I let Google know that the Yahoo Search App installed from their Google Play Store had completely stopped working on May 18, 2018.

I told them that Yahoo has made sure that their Yahoo members can't contact them about anything.

I noticed that right after I accepted the agreement that said Oath had joined with Verizon I started having the problem with the Yahoo Search App.
No matter what I search for or website thru the Yahoo Search App it says the following after I searched for
www.att.com.

WEBPAGE NOT AVAILABLE
This webpage at gttp://r.search.yahoo.com/_ylt=A0geJGq8BbkrgALEMMITE5jylu=X3oDMTEzcTjdWsyBGNvbG8DYmyxBHBvcwMxBHZ0aWQDTkFQUEMwxzEEc2VjA3NylRo=10/Ru=https%3a%2f%2fwww.att.att.com%2f/Rk=2/Es=plkGNRAB61_XKqFjTEN7J8cXA-
could not be loaded because:
net::ERR_CLEARTEXT_NOT_PERMITTED

I tried to search for things like www.homedepot.com. The same thing happened. It would say WEBPAGE NOT AVAILABLE. The only thing that changed were all the upper and lower case letters, numbers and symbols.
Then it would again say
could not be loaded because:
net::ERR_CLEARTEXT_NOT_PERMITTED

This is the same thing that happened when Samsung and At&t tried to do any kind of searches thru the Yahoo Search App.

Yahoo needs to fix the problem with their app.

Yahoo Search App from the Google Play Store on my Samsung Galaxy S8+ phone stopped working on May 18, 2018.

I went to the Yahoo Troubleshooting page but the article that said to do a certain 8 steps to fix the problem with Yahoo Services not working and how to fix the problem. Of course they didn't work.

I contacted Samsung thru their Samsung Tutor app on my phone. I gave their Technican access to my phone to see if there was a problem with my phone that stopped the Yahoo Search App from working. He went to Yahoo and… more

Strike API Now Integrated with the Lightning Network

The Lightning Network, MIT, and Oracles

CoinGate to Implement Lightning Network

Microsoft Looking Towards the Lightning Network for New Identification Platform

A Look at the Lightning Network Eltoo Protocol

The Korona Cryptobank – A Lightning Network Marketplace

Strike API Now Integrated with the Lightning Network

Vendors interested in implementing the Lightning Network can now do so with ease, thanks…

The Lightning Network, MIT, and Oracles

It has been made public this week that US-based MIT has been secretly working…

CoinGate to Implement Lightning Network

The popular online merchant processor CoinGate has announced that they will be implementing the…

Microsoft Looking Towards the Lightning Network for New Identification Platform

While the CEO of Microsoft, Bill Gates, has been vocal on his opposition towards…

A Look at the Lightning Network Eltoo Protocol

The Lightning Network has some impressive capabilities and many in the cryptocommunity are looking…

The Korona Cryptobank – A Lightning Network Marketplace

Great news for Lightning Network users as the Korona Cryptobank has announced that their…

The Lightning Network Meets the Vaultoro Gold Exchange

Crypto-gold fans are celebrating a big win today as the Swiss-based gold exchange Vaultoro…

A Look into the Options the Lightning Network Can Offer Bitcoin Users in the Future

The Lightning Network is considered by many in the cryptomarket as Bitcoin’s best chance…

The Lightning Network and Atomic Swaps

The Lightning Network has been making headlines lately due to its unprecedented adoption in…

The Lightning Network Invades Africa – BitMari

The Lightning Network is making a lasting impression in Africa after this week’s successful…

Real time prices
"vires in numeris."

Receive all Bitcoinist news in Telegram!

Bitcoin Lightning Network Is Coming: Test a Transaction Now

Although Bitcoin has managed to gain credibility and legitimacy in the financial world, skyrocketing transaction fees and long transaction times are becoming an increasingly severe handicap. The good news is that developers are making progress towards the Bitcoin Lightning Network (LN) implementation. LN promises to reduce Bitcoin’s transaction fees dramatically, and achieve near-instant transactions. You can test a Bitcoin LN transaction right now.

Lightning Network Promises to Reduce Transaction Costs and Confirmation Delays

Bitcoin users are unhappy about the high costs of transaction fees. Bitcoin average transaction fees have spectacularly surged from about $0.69 USD in January 2017, to over $28 USD on December 18, as shown in the chart below. BitInfoCharts provide this chart.

Moreover, the Bitcoin network traffic has become clogged due to the rising demand for transactions per block. As a result, confirming Bitcoin transactions is taking an extremely long time. Bitpay explains:

Block sizes are limited, so this means that transactions which exceed the capacity for a block get stuck in a queue for confirmation by bitcoin miners. This queue of unconfirmed transactions is called the bitcoin mempool.

Now, Bitcoin enthusiasts and cryptocurrency experts are centering their hopes on the LN approach to reduce transactions fees and long time-delays.

Solving Bitcoin Scalability Problem

The Bitcoin Lightning Network is essentially a decentralized system where users can set up trustless micropayment channels to conduct one or multiple payment transactions off-blockchain.

These channels reside outside the Bitcoin blockchain. However, once the payment channel is closed, the transactions that occurred between the channels are then broadcast, as a single transaction, to the main blockchain network. Thus, no matter the number of micro-transactions conducted, the blockchain is accessed only twice, when the channel is opened and when the channel is closed. Obviously, this approach would significantly reduce the load on the blockchain.

Presently, three teams are independently working on the LN implementation: ACINQ, Blockstream, and Lightning Labs. In early December 2017, they announced that their respective systems had completed payment tests on the main Bitcoin network. Moreover, these tests achieved interoperability across all three implantations.

Right now, to educate potential LN users, the website https://htlc.me/ allows you try a testnet Bitcoin LN transaction. Reddit user Nabugu provides the details of the test here.

As demand for Bitcoin continues to grow, transaction costs and time delays are bound to get worse. However, many Bitcoin enthusiasts and experts are excited about LN. For example, Ryan Radloff, co-founder, and principal at CoinShares, explicitly told CNBC that LN was the solution, adding:

[LN] is a technological implementation that, later this year, is going to solve this [problem], and we’re very excited about that.

What do you think would be the impact on the cryptocurrency ecosystem when Bitcoin Lightning Network starts allowing users to make cheap micropayments at near-instant speed? Let us know in the comments below.

Images courtesy of AdobeStock, ACINQ, BitInfoCharts

What is the Bitcoin Lightning Network? A Beginner’s Explanation

Last updated on January 2nd, 2018 at 12:00 am

While the Lightning Network is extremely promising as a cryptocurrency game-changer, it’s also pretty complicated. But don’t worry! As always, we’re here to translate this fascinating aspect of Bitcoin into plain English.

Since Lightning Networks are anchored to “traditional” blockchains, a solid understanding of the basic workings of blockchain technology is helpful in understanding them. If you lack this foundational knowledge, we recommend that you first review our video guides of the Bitcoin blockchain, before continuing with this guide to Lightning Networks.

In a nutshell, the lightning network is an upgrade to the current Bitcoin system (i.e., the protocol) that will allow users to create instant and feeless transactions.

Lightning Network Origins

In his original Bitcoin design, Satoshi Nakomoto included some of the building blocks for fast transactions—which are unlimited by block times or transaction fees, and arranged between cooperating users:

The possibilities of Satoshi’s idea have long been discussed, refined, and extended by numerous developers. These ideas coalesced into a whitepaper authored and presented by Thaddeus Dryja and Joseph Poon back in 2015.

These two young developers significantly advanced Satoshi’s original design by proposing a decentralized network of lightning-fast transactions. Simply put, this network element is capable of connecting any and all users to this “fast and feeless” system, through a routed series of transactions.

It’s important to note that there are various implementations of the Lightning Network protocol in active development. There are at least 6 Lightning Networks. In order to ensure compatibility among these various Lightning Networks, testing is ongoing. The goal of this testing is a cohesive, seamless network.

The Motivation for a Faster Network

For a variety of reasons, bitcoin is great. It puts us in control of our own money, gives us transactions that are not censorable, provides a dependable store of value, and allows us to transact with any connected person on the planet. But like everything else in life, Bitcoin’s blockchain has limitations.

If you’ve ever tried to send a transaction during a particularly busy time, you’ve probably noticed that Bitcoin transactions can be slow and/or expensive. Supporters of various Altcoins will argue that this reason is enough to switch to their preferred coin, but there are some obvious problems with this suggestion:

  1. Their altcoin might be a total scam.
  2. No coin is as widely accepted, trusted, or valuable as Bitcoin.
  3. If their coin ever becomes as popular as Bitcoin, it’ll probably run into exactly the same limitations.

Bitcoin transactions are (almost) never as slow or expensive as traditional fiat systems, such as bank wires or credit cards. However, it’d be great if we could have perfect, instant, and free (or nearly free) transactions. That’s where the Lightning Network comes in, and with SegWit now implemented on Bitcoin, there are no more technical issues to obstruct it.

As a distinct network, Lightning Networks (or LNs for short) are built on top of existing blockchains. They’re primarily designed for lower-value transactions (i.e., micropayments). LNs enable an unlimited number of near-instant and virtually feeless transactions.

The chains of Bitcoin and other cryptos constitute the underlying Layer 1 networks. (Litecoin, Vertcoin, Ethereum and others are all working on their own LN implementations.) As Layer 2 networks, LNs will function on top of these regular blockchains. The security of these secondary “off-chain” layers ultimately depends on the Layer 1 blockchain.

Lightning Network Benefits

In theory, LNs will provide all the security, value, and wide acceptance of Bitcoin (once the ecosystem upgrades). However, it will have none of its drawbacks, such as slow transaction times and high fees.

As an additional bonus, by offloading the bulk of small transactions to LNs, the transactional load on the underlying Level 1 blockchain should be greatly reduced. This extra will improve the transaction times and fee costs of the regular blockchain.

Lightning Network Explained (Part 1): Payment Channels

The basic idea behind the Lightning Network is payment channels. In other words, if I want a transaction with my friend, we open an “off-chain” payment channel between us, which is accomplished by an “opening transaction” on the main blockchain.

From then on, the payment channel is open, and any number of transactions can directly occur between me and my friend—without payments ever touching the main blockchain. Funds can be transferred as quickly as the users’ wallets can communicate over the net.

Once we want to conclude our business, we conduct a “closing transaction” on the main blockchain, and basically settle all of our previous transactions.

The magic of payment channels occurs between these opening and closing transactions on the blockchain. The primary reason that the blockchain remains necessary is that it’s used to both open and close Lightning Network payment channels.

Now let’s take a look at how a Lightning Network transaction comes to life.

Note: In the following explanation, we pretend that each character is manually performing each step. In reality, they only make the high-level decisions, and the actual work is performed by their Lightning Network wallets.

Step 1: Funding

Let’s consider a case where two parties, Cat and Dog, plan to conduct a lot of trades with each other. They’re playing chess online for Bitcoin. Rather than making numerous payments over the blockchain, they decide to save fees and time by setting up a payment channel. As they’ll be making Bitcoin payments back and forth, they require a bidirectional (two-way) payment channel.

Let’s say that Cat and Dog wish to establish a channel with a total value of 1 BTC. In other words, Cat and Dog don’t think that the overall transactions they’ll conduct will surpass 1 BTC. So both animals send an amount of 0.5 BTC over the blockchain to a multi-signature (aka multisig) Bitcoin address.

A multisig address is a Bitcoin address that acts like a lock, which is only unlocked if enough keys—out of a set of predefined ones—decide to unlock it. For example, you can release payment from an address if 2 out of 3 address owners sign off on it.

Multisig addresses start with a “3” (instead of a “1,” for a standard Bitcoin address). In this case, both signatures (derived from the private keys of both Cat & Dog) are required to spend any BTC from this address.

Miners process Cat & Dog’s payment on-chain as usual.

A total of 1 BTC is now locked up in this special multisig address, and the funding process is complete.

Step 2: Setup

Cat creates a transaction, which states that 0.5 BTC is payable to Cat’s own regular Bitcoin address, and that 0.5 BTC is payable to Dog’s address. Dog creates a transaction, stating the exact same thing. However, both transactions are incomplete, as they lack the other’s signature. Remember, both signatures are required to make either transaction valid!

A time constraint is also put in place. It states the following: If nothing further happens, both parties get their 0.5 BTC back at an arbitrary, future point—for instance, 30 days from when the address is set up. This situation prevents one party from vanishing, which would leave the other with permanently locked-up funds.

Cat & Dog exchange these incomplete transactions with each other over the net. Now, if Cat wishes to back out, she only needs her signature on the incomplete transaction from Dog, stating that 0.5 BTC should be sent back to her. She then broadcasts the complete transaction to the miners.

The addition of Cat’s sig validates the transaction, and causes it to be executed. The result is that Cat gets her 0.5 BTC back. Likewise, Dog can cancel the channel out in the same manner.

The only asymmetry here is that whoever adds their signature to the other’s incomplete transaction will have to wait for 1,000 blocks (or about a week) before their funds are returned. However, their counterparty’s funds will be returned immediately. This delay discourages unnecessary cancellations and prevents cheating.

Step 3: Exchanging

Let’s say that Dog wins the first round of chess. The stakes were 0.1 BTC per game. To reflect the updated state of their account, both parties create a new, incomplete transaction. It says that of the 1 BTC total, Dog now owns 0.6 BTC, and Cat owns 0.4 BTC. This new contract is set to expire in 29 days, so it’ll execute before the original contract’s 30 days.

This fresh exchange of incomplete transactions permanently cancels out the initial, establishing exchange (which declares an equal balance of 0.5 BTC on each side). This exchange is achieved by each party, who also signs and exchanges a fraud-protection proof. This proof states the following: Should either attempt to broadcast an outdated or falsified version of the channel’s balance of funds, the entire balance will be paid to their counterparty.

For instance, Cat gets sneaky and broadcasts the old 0.5 BTC. Then she establishes a channel state to wipe out her 0.1 BTC loss. Then Dog has one week to notice Cat’s cheating. Dog can disprove Cat’s fraud, simply by showing miners the most recent (0.6 / 0.4 BTC) transactions. Remember that Cat has signed her copy, so there’s no way that she can deny it…

Dog will then be awarded the full 1 BTC, and Cat will lose all her remaining money. Anyone else observing the matter may also catch Cat out, and receive a small bounty from the total balance for doing so.

Knowing that such a harsh penalty awaits her if caught, Cat is very unlikely to cheat in the first place.

As before, neither animal broadcasts the updated state to the blockchain to be mined, as they intend to keep playing. However, either side has the option to “cash out” the channel at its current account balance whenever they wish—provided they’re willing to wait a week to get paid.

Step 4: Closing

Cat and Dog may continue in this fashion—until they wish to stop playing, and agree to close the channel. Once there’s an agreement between them, a final exchange of transactions occurs, and neither side experiences any delay in the settlement.

If at any time only one side opts to close the channel, they experience the 1,000-block delay, as explained above.

Finally, a channel will also be closed when it reaches the end of the duration that’s set for it.

In any event, the current state of the payment channel is then broadcast to miners. Each party receives a payout to their standard Bitcoin address. No matter how many transactions Cat and Dog have made in-between, only a couple of transactions will appear on the Bitcoin blockchain: the opening and closing.

Note: While the above system is fairly complex (even without getting into the technicalities), the upside is that participants can exchange an unlimited number of transactions as rapidly as they can transmit them—for zero cost, and only 2 on-chain transactions.

Here’s a short video that summarizes all that we just went through:

Lightning Network Explained Part 2: Networked Channels

While bidirectional payment channels are really cool for specific-use cases between cooperating parties, combining multiple channels is what makes Lightning so powerful.

Let’s say Dog & Cat still have their chess-game payment channel open. Dog is getting hungry. So he wants to order a pizza, but doesn’t have a payment channel open with the pizzeria owner, Bird. Cat does have a channel open with Bird. Instead of opening a new channel to Bird, Dog can pay Bird via Cat’s channel.

Dog first asks Bird for a secret. Then he tells Cat to pay Bird the cost of the pizza (let’s say 0.001 BTC) in exchange for the same secret from Bird. Cat then shows this secret to Dog. If it matches the secret that Dog got from Bird, Dog knows that Cat really paid Bird, so it’s safe for him to pay Cat.

This system of chained, conditional payments can be extended out to any number of parties, provided they all share channels with a value greater than the payment being routed. There are also safeguards in place, which ensure that a secret cannot be exchanged without the correct number of coins also being exchanged.

Therefore, the Lightning Network is globally scalable. In order to transact with anyone, you just need to find a path to that someone via other participants in the network. (In other words, it doesn’t matter if that channel goes through a hundred other intermediaries.)

Future Possibilities of Lightning Networks

Under Lightning, all sorts of new payment models will become possible. For example, your smartphone could use Lightning to make automatic micro-transaction payments to WiFi hotspots that it connects to, and you will be able to only pay for a partial video you’ve watched. Then, for example, you can only pay workers for the number of minutes (or even seconds) they’ve worked.

These automated, machine-to-machine transactions for tiny amounts become possible with sufficiently cheap transfers.

An even more tantalizing prospect held out by Lightning is its suitability to retail trade. At the best of times, Bitcoin confirmation times take minutes. And while this feature is great for international payments, it’s simply too slow for paying the cashier at the supermarket.

At least in theory, instant and near-feeless Lightning payments would allow Bitcoin to replace cash, credit cards, and other payment methods for such person-to-person transactions. While Bitcoin has proven extremely useful in the digital realm, Lightning may enable it to make the jump into evermore real-world applications.

Still not understanding the Lightning Network completely? You’re not alone. At the moment, it’s one of the more technical, complex subjects to explain. Here’s a video by Andreas Antonoplos, which offers another very good explanation about the whole system:

Have more questions about the Lightning Network? Let us know in the comment section below.

Комментариев нет:

Отправить комментарий

Related Posts Plugin for WordPress, Blogger...