stackernews / stacker.news

Internet communities that pay you Bitcoin
https://stacker.news
MIT License
434 stars 112 forks source link

send paid action #1591

Open huumn opened 4 days ago

huumn commented 4 days ago

Send paid action's (eg account withdrawal) are unique in that no invoice paid to SN's node is generated. Because of this, we can't use the paid action state machine as-is (which transitions invoices and foreign key constrained related records).

To implement paid action's that don't involve an invoice paid to SN, we'll probably want to create another state machine that transitions purely based on Withdrawl records (as opposed to Invoice records).

Other than withdrawals, this is need for:

huumn commented 2 days ago

Problems:

(Withdrawals are pretty straightforward on a relative basis.)


Options:

  1. don't support these things
  2. support them but don't show if they're paid or not, put up a disclaimer about it on every such send, and don't support comments/notifications if the send isn't proxied
  3. support them and proxy these payments anyway
    • for lnurlp (a), the stacker would choose between receiving fee credits OR sats with a proxy fee
    • when a stacker is sending (b), the stacker would pay the proxy fee upfront

I suspect (3) will be unpopular even if we drop the proxy fee to closely match the network fee, ie 1-3%. I suspect (2) will be confusing (... and lnurlp shouldn't be shown as a notification).

So IMO, either we do (1) and don't support these actions or we do (2).

ekzyis commented 2 days ago

We can't determine if non-custodial receives (lnulp) that aren't proxied have been paid. We know the bolt11, but we have no idea whether it's been paid.

Why not? Most (if not all) wallets support a method to lookup if an invoice has been paid, examples:

etc.

isn't this what we need here?

same applies to (b)

huumn commented 2 days ago

For lnurlp we don't know who paid or with what wallet and don't have creds to make api calls.