bitcoinsearch / chat-btc

A conversational AI based on technical bitcoin sources
https://chat.bitcoinsearch.xyz/
MIT License
16 stars 13 forks source link

Alby as a Fallback Payment Option for Rate Limiting #76

Open kouloumos opened 7 months ago

kouloumos commented 7 months ago

We've integrated an L402 middleware in our server to manage rate limits on user requests effectively. When users hit this limit, they're prompted to make a payment to continue accessing the app, with payments processed through the Lightning Network to our node. However, this system faces a potential challenge if our Lightning node encounters issues, disrupting the user experience.

To ensure uninterrupted service, we can add a fallback payment option. One solution is to utilize Alby, a custodial service that offers a straightforward invoices API, somewhat similar to the one used for LND nodes. While this introduces the downside of being custodial, its ease of integration and reliability make it an attractive option for maintaining our service's accessibility during node outages.

Implementation Considerations:

This fallback approach is designed as a quick and effective solution to keep our service running smoothly, ensuring users can continue to use the app without interruption, even if our primary Lightning node payment system is down.