I was showing my friend this site the other night, and he had a good question that I can't answer.
When I send 10 sats out to a post here, what is the transaction fee for that, and is there a place like a block explorer that I can see the transaction that shows the wrapped up transaction? I'm having a hard time finding it in the wallet.
I'm still working on understanding the lightening network. I think I have the general idea, but not the details.
322 sats \ 4 replies \ @ek 6 Mar 2023
This website is custodial. There is no LN transaction happening when tipping. Only when depositing and withdrawing.
It's just a number in a database.
But maybe @k00b can add to this.
reply
In the profile i can see my lightning address cryptofolyo@stacker.news I think its not custodial. There should be a lightning wallet inbuilt into this website.
reply
312 sats \ 0 replies \ @ek 6 Mar 2023
You are asking good questions.
But it is custodial. Else SN would have given you private keys to manage your private node. But there is only the SN node over which you have no control. You don't control the channels from/to SN.
The LN address is just for easier depositing and withdrawing.
reply
The custodial part I can see, I don't have private keys for my wallet here.
But is it a database? It kind of looks like a bunch of LN transactions that get wrapped up and verified (confirmed?) on the node that this site writes on? And the node operator eats the onchain fee?
reply
See my comment here: #148317
reply
Lightning is a second layer built on top of Bitcoin. On lightning you only pay routing fees if your payment goes through multiple hops. Those fees will generally be really small, like 5 sats. More for bigger amounts... For many lightning transactions there will be only one or two onchain transactions (those you can see in explorers) - specifically the ones that open and close lightning channel. But in the single channel there can be thousands or millions of lightning transactions.
reply
There are no fees associated with LN
reply
That's not true. On lightning you still paying routing fees when your transaction goes through multiple hops.
reply
Where did you get this idea?
reply
How's that? This article makes it look like there's a base fee and liquidity fee. Are they voluntary? Is StackerNews just running a node with zero fees?
My wallet shows the 10sat spend, but I can't see or breakdown any fee associated with that spend. My understanding is that the LN node pays the fee when it sends all wrapped transactions back on-chain. Is the a record of the fees paid to the LN node?
reply
Which wallet do you mean? The wallet on SN?
reply
Yes, the wallet on SN. I don't have the keys, but it looks like all the posts have a hash, so I assume it's a wallet and not a database.
reply
What hash? Are you talking about OTS? That's something different; nothing to do with LN transactions. See here: https://opentimestamps.org/
I can tell you with a 100% certainty that all tips are just transactions inside a database.
The code is open source, you can setup SN yourself and take a look: https://github.com/stackernews/stacker.news
reply
Yup, thanks for the link to the github. It's right there in the Wallet Transaction Safety section.
And you nailed it with the OTS, I incorrectly assumed it was a hash.
reply
Ah, you already saw it yourself. Nice.
No worries, happy to help.
reply
I realized you don't even need to setup SN yourself. It even says in the README that it's just a database:

wallet transaction safety

To ensure user balances are kept sane, all wallet updates are run in serializable transactions at the database level. Because prisma has relatively poor support for transactions all wallet touching code is written in plpgsql stored procedures and can be found in the prisma/migrations folder.
reply
I hope you used your referral link haha
I always forget that
reply