Make Nostr Relay that applies limits based on proximity to a group of accounts
I want to run a relay financed by a tiny percentage of its users and strongly believe in the following being a way to align incentives for all clients and relay operators:
For this bounty, the minimum requirement for the resulting relay is:
- relay is as efficient or better than strfry at supported nips, synchronization between instances and handling concurrent connections
- nip42 support
- all read and write operations are metered per connected pubkey: milliseconds spent on queries, query count, events sent, event kBs sent, etc. (If Alice pushes Bob’s events, it gets tallied to her pubkey - the one authenticated via nip42)
- allow managing group of primary (TIER 0 or T0) users via API
- secondary users are those followed by T0 users etc.
- define limits depending on follows distance to primary users, using five tiers: 0 = primary users, 1 = follows, 2 = follows of follows, 3 = follows of follows of follows, inf = all the other pubkeys
- allow configuring hourly, daily and monthly limits per tier
This bounty was created with the goal of actually running a relay with this feature and will not be awarded for a proof of concept that is not a fully functional and performant relay. Strfry is “good enough”. If you want to implement the proposed feature in a different relay, please reach out to discuss first.
This bounty was offered in these places: