lightninglabs / lightning-terminal

Lightning Terminal: Your Home for Lightning Liquidity
MIT License
501 stars 87 forks source link

How to handle multiple users on lightning terminal #758

Open weltitob opened 4 months ago

weltitob commented 4 months ago

Hi I'm currently developing an application using lightning-terminal as backend for my users. However running a node 24/7 for each user is not feasable due to too high costs. How would I be able to provide each user with their own node but keeping the costs low. I tought about running a node 24/7 and exchanging the root folder (with macaroons and everything else) depending on the user for each usersession. So basically the node would run 24/7 and whenever a user needs some resources he'd connect to the node a session would start and when he leaves the app and his last invoice expiers it would shut down. However I feel like this leaves much room for problems. I want to have multiple users while being cost efficient how can I handle it? I think there might be a functionality to have multiple users for one lightning balance however when it comes to the taproot assets protocol this wouldnt work again so I'm kind of stuck.

I would even appreciate a meeting with someone whos an expert / someone from inside the company. You can contact me via weltitob@gmail.com for a 1o1 meeting where I can explain my applicaiton setup in more detail. Please help I'm stuck on this issue for weeks now.

ViktorTigerstrom commented 4 months ago

Hi @weltitob, thanks for reaching out!

An initial question: Is the application custodial or non-custodial? If it's custodial, I think the accounts system will be of interest to you: https://docs.lightning.engineering/lightning-network-tools/lightning-terminal/accounts

Like you say, it doesn't support taproot assets yet, but it would be good to know if there's demand to support that.

Furthermore, I'll forward your request internally within Lightning Labs!

weltitob commented 4 months ago

there's demand to support

First of all, the application is supposed to be non-custodial while I will run the litd nodes for the users. I was planning on encrypting the root folder with the private key and make it downloadable for each user to have security when it comes to the self custody. Basically custodial but being non-custodial, having no drawbacks for the users. I plan on opensourcing the code at some point.

And yes not being able to have multiple users on one node in self custody with taproot assets is my exact issue there definitely is demand to support that.

In general I think for real adaption of taproot assets it will be critical to have the multiple users feature, otherwise I don't see any way for any third party to build a platform on top of it that can be profitable.

Other lightningwalletproviders are always custodial wallets

I also struggle to see how I would make use of the accounts feature propely via the api for my application. Thanks for forwarding my request ❤️ I'd be happy to get in conatct and show you guys what I've been working on.

Greets Tobi

weltitob commented 4 months ago

@ViktorTigerstrom

ViktorTigerstrom commented 4 months ago

Ok, thanks for the clarification!

Awesome, we'd love to learn more about what you've been working on :)! Just FYI. Someone else will reach out to you via email.