-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should allowances / autopayments be a part of WebLN? #8
Comments
My view: yes, this should be part of webln. One reason is that the application can know in advance how much to ask for in an allowance. For your example of the video, the server could ask for an allowance that covered the entire length of the video, and then take per-second payments. If webln didn't include a mechanism for requesting allowances, the client application (Joule) would have to guess how much of an allowance to ask the user for. |
+1 @jnewbery I feel like it would be great to treat allowance just like typical security tiers on custodial wallets. E.g. Sending > X requires 2FA. Pain points from other networks (e.g ETH)
Quick high level. export interface allowance {
// Global default setting for any interaction. Could set a flag for this to be private or public by default, and/or relative to proximity.
nodeDefault?: number | number;
channelDefault?: string | number; // Specify defaults for repeat usage. E.g. Spotify vs Netflix
allowanceRefresh?: number; // Elapsed time required before a limit can be refreshed.
proximityDefault?: number; // number of hops away request is coming from.
} Any feedback on the following
This already may be solved and sorted as it's almost a month ago since mentioned. Apologies if so, but keep up the awesome work! |
I agree w/ above speakers, automatic/recurring/etc payments is something very needed. Obviously with good security settings and such, but if it's not in place then that would in deed draw people to centralized solutions. And lack of recurring payments is definitely something that has held back payments adoption. Would be super glad to work with you on this and trying it out with Bitrefill. |
@MikeD123 this is all still WIP so thanks for the suggestions. I have some feedback:
I still feel that interface would require a lot more information to be useful for applications to know the bounds of the allowance, so I'd also like to see information to the tune of: export interface Allowance {
total: string; // 64 bit int of amount of money initially setup for the allowance
remaining: string; // 64 bit int of amount of money left before refresh
pubkeyWhitelist?: string[]; // List of node pubkeys that this allowance applies to. If list is undefined, allows transactions to any node.
timeToRefresh?: number; // Time in seconds until the allowance refreshes. Only provided if allowance is configured to auto-refresh.
refreshInterval?: number; // Time in seconds between allowance refreshes. Only provided if allowance is configured to auto-refresh.
} @ziggamon Recurring payments ala subscriptions is totally something I want to tackle as well, but I look at them as being a little different. I think they'll take the shape of a limited access macaroon that the subscription service holds and charges you with every month. It'd be limited to the monthly fee amount. However, I don't think LND is there yet in terms of macaroon generation and customizability. This spec is more about seamless payments, so still the traditional model of click something -> buy something, but without the whole modal / enter password / confirm transaction |
Yup, I agree. Just wanted to get something down to jump-start the feedback. Appreciate you dropping in yours Motivation for allowances to me is
The way that I see it, allowance is at a few levels...
// Am I missing the mark a little? Np if so. 😄 refreshInterval?: number; // Time in seconds between allowance refreshes. Only provided if allowance is configured to auto-refresh. // Should this say is not configured to auto-refresh? Sorry for all the questions, and appreciate the patience if I'm on the wrong page. |
Circling back around to the implementation for this in Joule. Sorry I didn't get to your questions earlier, I had put allowances on the backburner:
This should ideally be opaque from the spec. The WebLN provider can decide how it breaks up allowances, the app should simply ask for what they're allowed. In the case of Joule, I'm going to be doing it per-domain, and seeing if any other noteworthy use-cases arrive. But I expect that should cover the majority of them.
No, my intent here was that if there was no auto-refresh, you wouldn't tell them how frequently. I'm thinking for a first iteration of this though, I'm going to exclude all auto-refresh stuff from it. If multiple clients all come together on what that might look like, we can spec it out together later. |
Dude - Don't sweat it. You're busy, keep crushing it 😊Amazing work for the community (Thank you). web3
Would domain literally be the domain URL? Or Node Channel? Just clarifying... Thank you! |
This is an open discussion as to whether or not some concept of prompting the user to setup an allowance / auto-pay with the app should be handled at the client level, or the WebLN level.
I'll start: I've got an issue open over on Joule joule-labs/joule-extension#42 for adding auto-payments. The WebLN spec actually works no problem with this, since simple
sendPayment
calls can be executed without prompting the user.However, having each client do it differently can cause some uncertainties for apps and what the user experience is going to be. If you wanted to, say, charge a user 1 satoshi per second of video they watched, that would be a terrible experience with the Joule of today. You'd want to make sure the user wasn't constantly getting interrupted. Likewise, it'd be nice for the app to see your allowance, and warn you / remind you to top it off before you get empty and are interrupted in the middle of something.
Open to all feedback!
The text was updated successfully, but these errors were encountered: