Bitcoin Forum
April 30, 2024, 09:35:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: lightning network, basic questions  (Read 282 times)
fourna (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
June 20, 2021, 07:28:26 PM
Last edit: June 20, 2021, 08:41:24 PM by fourna
 #1

hey

I've got a few questions I can't seem to find an answer on the internet.
Am I understanding it correctly that I have to pay upfront a certain amount on the lightning network i.e. funds will be frozen?
ie: it will keep getting subtracted or just the normal way of paying?

Also how correct is this paragraph

Quote
https://archive.is/7DAA3

2) Remaining online for long exposes Nodes to Attack.

It is obligatory to keep the nodes on bitcoin’s Lightning Network online
all the time.
Only that way one can send and receive payments. Even
though cold storage of coins is the safest method of storing, this
network doesn’t allow that. This requirement makes the network prone to
hack and theft.

Going offline has its downsides on the Lightning Network. This
technology is still vulnerable to some loopholes. The design makes it
possible for one of the two parties from a channel to take away the
funds while the other is out. This theft is known as Fraudulent Channel
Close. There are ways to object to the closing of a channel within a
period. However, the prolonged absence of one party can lead to the
expiration of that period.

What makes this network so rigid is the increased centralization,
resulting from concentrating funds in only specific nodes within the
network. If any node goes offline, the user’s fund is locked up. Also,
as every node is connected, one server outrage can result in disruption
across the network. This means a large number of users have to face
inconvenience as their funds will get frozen too.

techbullion.com/bitcoins-lightning-network-can-be-a-big-threat-to-your-funds/

https://archive.is/7DAA3


how does the lightning network work
how does lightning network work
how to open lightning channels
lightning network, basic questions
lightning channels, basic questions
1714469709
Hero Member
*
Offline Offline

Posts: 1714469709

View Profile Personal Message (Offline)

Ignore
1714469709
Reply with quote  #2

1714469709
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714469709
Hero Member
*
Offline Offline

Posts: 1714469709

View Profile Personal Message (Offline)

Ignore
1714469709
Reply with quote  #2

1714469709
Report to moderator
1714469709
Hero Member
*
Offline Offline

Posts: 1714469709

View Profile Personal Message (Offline)

Ignore
1714469709
Reply with quote  #2

1714469709
Report to moderator
Charles-Tim
Legendary
*
Offline Offline

Activity: 1526
Merit: 4831



View Profile
June 20, 2021, 07:40:47 PM
 #2

Like on Electrum wallet, if you want to open a channel, you will be warned how lightning on Electrum is experimental, which is the reason of the advice not to put large amount of bitcoin on lightning channels. So, making use of it with just little amount of Bitcoin is better, even on any other wallet because the lightning network is still in its experimental stage till now. You will need to learn more about lightning network, you can read these guides:

A Beginner's guideline to Bitcoin Lightning Network
The Lightning Network FAQ
Electrum Lightning Network walkthrough

Lightning network will be good to pay on stores and places you visit often in which you trust the owner of the store and places and allows you to open a channel with them. You buy what you want to buy like coffee, and you will pay right at the moment even before leaving the coffee shop, I do not think this should be a problem. And you can decide to close your channel anytime you want in which your Bitcoin will be transferred into your on-chain wallet address and be stored on blockchain.

.
HUGE
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
fourna (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
June 20, 2021, 07:52:15 PM
 #3

alright so more or less what I thought.

and I yea I suppose only the receiver needs to remain online 24/7. ?
which is kinda obvious if.
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
June 20, 2021, 08:01:19 PM
 #4

node going offline is only a problem if it's more than a few minutes/hours. Most internet outages don't last more than a few hours.

to steal funds from you, your node needs to be offline for weeks (i.e. after the timeout period in the part of the contract where 1 node closes the channel on their own). Who gets disconnected from the internet for that long? Maybe only if you can't pay your ISP bill, but it sounds like you've got more serious problems in your life than your lightning node


future improvements to lightning will make these problems less serious anyway, but for now, just make sure your node is running ok and that your bills are paid.

Vires in numeris
fourna (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
June 20, 2021, 08:07:26 PM
 #5

@carlton bank
wait this applies to the sender too?
Charles-Tim
Legendary
*
Offline Offline

Activity: 1526
Merit: 4831



View Profile
June 20, 2021, 08:19:47 PM
 #6

Assuming Alice and Bob wants to make use of lightning network, Bod is the owner of one coffee shop, Alice is the customer. Both of them will have to open a channel, the channel is just a 2-of-2 multisig, which means both of them will have the knowledge the transfer of any particular amount they both agreed upon.

If they both agree to put 0.005 btc each on the channel

Alice: 0.005 btc
Bod: 0.005 btc

That means they both have 0.005 btc + 0.005 btc = 0.01 btc on the channel. Assuming Alice went to Bob's shop for coffee and he or she paid 0.0001 btc, the money will be deducted from Alice btc to Bob Btc on the channel. Which means Alice will have 0.0049 btc as 0.0001 btc is transferred by her on the channel while Bob will have 0.0051 btc for the coffee Alice paid for and so on until anyone of them closes the channel.

You can try use Electrum wallet and use very low amount of Bitcoin with your friend to understand this better using this guide.

@carlton bank
wait this applies to the sender too?
Go and read the links above, irrespective of the sender or the receiver, both parties have an opened channel.

Note that on-chain miners fee will be demanded for while opening and closing a channel, but you can open and close channel when fee is low. Lightning network fee is very low after you have opened a channel already.

.
HUGE
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
June 20, 2021, 08:29:38 PM
 #7

wait this applies to the sender too?
Yes, it applies to both parties in a channel. If either party tries to fraudulently close a channel by broadcasting a previous commitment transaction while the other peer is offline, then they have to wait whatever the two peers set the delay period to when they first opened the channel. This can be a maximum of 2016 blocks, which works out to 2 weeks at average block times. However, users are disincentivized to do this, as the other peer can come back online at any time and broadcast a penalty transaction, which means the dishonest peer would lose all their coins.
fourna (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
June 20, 2021, 08:39:26 PM
 #8

alright. thank you all for clarifying

and thx for that bestchange link @charles-tim
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
June 21, 2021, 12:02:37 AM
 #9

If you are worried about your node going down then you can set up a watchtower on some cheap VPS or a Raspberry Pi at a different location. The watchtower can publish a penalty transaction if the other party attempts to cheat while your node is offline. By default, one has to wait 144 blocks (~ 1 day) before an uncooperative channel close can be settled. Mobile wallets usually force the other party to wait 2016 blocks (~2 weeks).

Also, you don't need to run your own node. If you are comfortable with using a custodial wallet then you can consider using BlueWallet. You wouldn't have to worry about launching your wallet every now and then since you wouldn't be managing channels on your own. It's not a good choice if you want to minimise trust or want to earn money through payment routing.

This can be a maximum of 2016 blocks, which works out to 2 weeks at average block times.

It can be more than that if the remote peer changes that default maximum value. Still, ~2 weeks is more than enough.
franky1
Legendary
*
Offline Offline

Activity: 4200
Merit: 4451



View Profile
June 25, 2021, 01:28:55 AM
 #10

Lightning network will be good to pay on stores and places you visit often in which you trust the owner of the store and places and allows you to open a channel with them. You buy what you want to buy like coffee, and you will pay right at the moment even before leaving the coffee shop, I do not think this should be a problem. And you can decide to close your channel anytime you want in which your Bitcoin will be transferred into your on-chain wallet address and be stored on blockchain.

^ there describes the opening of another flaw

people cannot predict what they may want to buy in the next week or month.
so the supposed opening a channel with a coffee shop and then closing a channel premise is flawed because it ends up being spending 2 onchain(open+close) just to buy coffee

the real thing is people dont end up having lots of small channels with their temporary retailer.
instead they have channels a few hub/spoke/hops away and hop the path to their temporary retailer has value and is online at the point of purchase
this requires the trust and ideals of several people inbetween

also users wont want to set up dozens of accounts splitting up their funds for the hopes of multiple paths. because they end up having to close channels more often to rebalance the funds

EG if you only trust $200..
and a coffee is $4 thats only 50 coffees in a 1 channel route.
but its only 10 coffess if you split your funds over 5 channels.
thus costing you more onchain to open 5 channels of only 10 coffees each. and then close them to move funds to the channels that have good routes
(you cant predict the goodroute vs bad route before hand)
studies have seen 50-90% of payments fail due to not having viable routes.
this study showed a 60% success rate for a single $4 coffee
buying 2 coffees is a 50% chance of success
buying 10 coffees for colleagues in your office.. 10% chance of success


what people end up doing is getting rid of the headaches of multi channal fund splitting hop model network.
and instead deposit funds into a service and let the service manage the channels offchain and reaggregate funds offchain as the funds are with the manager.

this will result in centralisation

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
franky1
Legendary
*
Offline Offline

Activity: 4200
Merit: 4451



View Profile
June 25, 2021, 01:40:46 AM
 #11

Note that on-chain miners fee will be demanded for while opening and closing a channel, but you can open and close channel when fee is low. Lightning network fee is very low after you have opened a channel already.

^ there opens another flaw
most onchain locks are LOCKED. with a time period. meaning you cant exactly just close channels on a whim

LN wallets dont have a chat feature to discuss when someone wants to agree on a settlement. so most of the time people are on autopilot where the settlement is done when the time period expires

so forget being lucky to settle when fee's are low. unless you have good contact/communication with your favourite coffee shop to get them to agree to settle

if they see that you have settled early without their consent. they can see that as a violation of the channel contract.
so yea beg and plead and be nice to your starbucks manager.

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
ndalliard
Full Member
***
Offline Offline

Activity: 154
Merit: 177



View Profile
July 05, 2021, 09:49:33 AM
Merited by Rath_ (2), Symmetrick (1)
 #12

this will result in centralisation

i certainly can see where this can happen, that is why it is important to selfhost

i draw the comparison to email, which is decentralized as a protocol, but got centralized (not completely) because people tend to use google or microsoft for that, that is why i have my own mailserver and let my family use it too

i will do the same with the lightning node i am setting up right now
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
July 05, 2021, 04:10:03 PM
 #13

i will do the same with the lightning node i am setting up right now

You can reach out to me once you have set up your node. I am willing to maintain channels with other forums members. What implementation have you chosen?
ndalliard
Full Member
***
Offline Offline

Activity: 154
Merit: 177



View Profile
July 05, 2021, 05:28:34 PM
 #14

You can reach out to me once you have set up your node. I am willing to maintain channels with other forums members.

will send you a pm in some minutes

What implementation have you chosen?

c-lightning (there are enough people using lnd imo)
kxwhalexk
Member
**
Offline Offline

Activity: 98
Merit: 173


View Profile
July 06, 2021, 07:06:01 AM
Last edit: July 06, 2021, 07:25:47 AM by kxwhalexk
Merited by Rath_ (2)
 #15

funds will be frozen?


Assuming Alice and Bob wants to make use of lightning network, Bod is the owner of one coffee shop, Alice is the customer. Both of them will have to open a channel, the channel is just a 2-of-2 multisig, which means both of them will have the knowledge the transfer of any particular amount they both agreed upon.

If they both agree to put 0.005 btc each on the channel

Alice: 0.005 btc
Bod: 0.005 btc

That means they both have 0.005 btc + 0.005 btc = 0.01 btc on the channel. Assuming Alice went to Bob's shop for coffee and he or she paid 0.0001 btc, the money will be deducted from Alice btc to Bob Btc on the channel. Which means Alice will have 0.0049 btc as 0.0001 btc is transferred by her on the channel while Bob will have 0.0051 btc for the coffee Alice paid for and so on until anyone of them closes the channel.

I think the freeze mentioned by OP is not what you explained

You are right, there must be a pool of funds before Alice and Bob can trade on the Lightning Network. But injecting funds into the fund pool in advance does not mean freezing.

After both parties have determined the allocation of funds in the fund pool, both of them can take out their own funds at any time (this step needs to be recorded on the chain)

Code:
The freezing in the Lightning Network should refer specifically to HTLC,

Hashed Time Lock Contract,This is similar to a time-limited transfer.
Through a smart contract, both parties agree that the transferor will first freeze a certain amount of money (send bitcoin to a multi-signature address),
and will be locked by the ultimate recipientthe through the H(R) of a password R .

If the recipient knows the password R within a certain period of time,
so that its H(R) adaptation (actually means that the transferor authorized the recipient to withdraw cash),
then the money is transferred to the recipient.

If the recipient does not know the password R within the agreed time,
the transfer party can retrieve the frozen funds.


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!