Background
- We are launching ENS Holiday Awards as an ENS Referral Incentive Program starting Dec 1. Details are here: https://discuss.ens.domains/t/rfc-ens-holiday-awards/21359
- The ENSAwards site is planned to serve as the main landing page for the ENS Holiday Awards program. Expected functionality on the ENSAwards site includes the creation of a Leaderboard, showing which referrers are currently the top referrers.
- @lightwalker-eth and @tk-o Are working on a refined data model for ENS registrations and referrals. Once this work is complete the exact SQL query and response data model will need to also be refined, but it's important not to be blocked on this. We should proceed now with a demonstration of the overall proof of concept here using the existing registrations and referrals data model.
- @shrugs Is working to build a new app called ENSApi. Eventually we may want to transition the API discussed in this GitHub issue into ENSApi, but it's also important for the goals in this GitHub issue not to be blocked by the work on ENSApi. Therefore, the work on this issue requires the creation of an all new Hono app dedicated exclusively for this 1 new API that is needed at the moment.
- The database query to calculate the leaderboard of top referrers is expected to be large and slow to execute dynamically for each visitor to the ENSAwards leaderboards. Therefore, here we propose the creation of ENSAnalytics which will implement a caching strategy as described below.
Subtasks
It should get data from a database with query similar to the following, but NOTE that the query below is quick pseudocode and the real query will need to be different.
SELECT
referrer_address,
COUNT(*) AS total_referrals
FROM
referrals
WHERE
referral_time >= '2025-12-01 00:00:00+00'
AND referral_time < '2026-01-01 00:00:00+00'
GROUP BY
referrer_address
ORDER BY
total_referrals DESC;
Background
Subtasks
It should get data from a database with query similar to the following, but NOTE that the query below is quick pseudocode and the real query will need to be different.