Repository navigation
Description
Background
priceUpdated streams every price for a pair, indefinitely, over a websocket,
with no authentication and no metering. It is the most valuable thing the
service produces — a live feed — and it is the cheapest to take.
A REST caller polling /price every second pays $0.10 a time. A subscriber gets
a better feed, pushed, for nothing.
The subscription itself is well built: withFilter narrows per pair, the
network tagging is correct, and five tests cover it including one proving one
network's prices never reach another's subscriber. The gap is purely commercial.
What to build
- Authenticate the subscription — an API key on the connection init payload is
the usual shape forgraphql-transport-ws. - Meter it. A per-connection or per-message cost that fits whatever L188 decides
for queries; the two should not be separate pricing models. - Limit concurrent subscriptions per key, so one caller cannot open thousands.
- Reject unauthenticated connections at handshake, not after the first message.
Acceptance criteria
- A subscription without valid credentials is refused at connection time
- Subscriptions are metered consistently with queries
- Concurrent subscriptions per key are capped and the cap is configurable
- The existing five subscription tests still pass
- A test covers an unauthenticated connection being refused
Drips Wave · Complexity: Intermediate · 150 points
Repo: Divinity-Labs/Lens. Node + TypeScript, Fastify, mercurius for
GraphQL at POST /graphql, Prisma on Postgres, Redis, Prometheus.
Run the tests: npm test. The tests are vitest, not jest. Running jest
here reports "66 suites, 0 tests" and means nothing. A single file is
npx vitest run src/__tests__/graphqlSubscription.test.ts.
Load test (prices) is already failing on main and has been for some
time. It is not your PR. Everything else should be green.
Read src/__tests__/graphqlSubscription.test.ts before you start. It is the
house pattern for testing this surface and it is good — it drives a real
subscription through a real server and asserts on what a client receives.
This service prices real assets on Stellar mainnet. A wrong number is worse
than a missing one, because the caller cannot tell.
Never elide an address, a contract id or a key in code, comments or test
fixtures. A previous batch shortened a contract id in an issue and five
contributors invented plausible-looking ids to fill the gap. Write it in full or
not at all.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
Activity
collins-uzu commentedon Oct 16, 2026
@collins-uzu has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @collins-uzu to this issue.
drips-wave commentedon Oct 16, 2026
Congratulations, @collins-uzu! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @collins-uzu: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊