Skip to content
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

Idea: use BOLT12 Withdraw Offers to clear outlays #109

Open
farscapian opened this issue Oct 12, 2024 · 0 comments
Open

Idea: use BOLT12 Withdraw Offers to clear outlays #109

farscapian opened this issue Oct 12, 2024 · 0 comments

Comments

@farscapian
Copy link
Collaborator

farscapian commented Oct 12, 2024

Currently, payouts only succeed (and outlays go down) when the member node is online AND when when the node receives a income event on an offer. This feature #94 suggests that we can make it such that the member node only needs to be online to receive payment since payouts occur regularly and on a recurring basis.

A third model would be to employ withdraw offers. Say every two days we check member outlays and issue BOLT12 withdraw offers representing the current member outlay. If the destination is an npub (see #105), then we can encrypt that new withdrawal offer to the npub and send it as either a DM or a replaceable event to the npubs preferred relays (see NIP-05). Withdrawal offers are issued ONLY AFTER any existing offers for the member have expired.

Nostr clients knowing the associated nsec can then decrypt the DM and execute the withdrawal offer to reduce the outlay by the amount specified in the withdrawal offer. Note, any outlays accrued AFTER the withdrawal offer is issued WILL NOT clear.

@farscapian farscapian changed the title To consider: use BOLT12 Withdraw Offers to clear outlays Idea: use BOLT12 Withdraw Offers to clear outlays Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant