Discussion Details

Research
Type
ACTIVE

Rewards Calculation Service (RCS) for Cardano

12 comments
Submitted: 24 Apr 2025, 16:45 UTC (Epoch 553)
Updated: 5 May 2025, 16:02 UTC (Epoch 556)
# ID:158
em

emurgo

Budget$1,031,600 (2,063,200 ADA)
ADA Rate$0.5
Preferred CurrencyUnited States Dollar (USD)
Contract TypeMilestone Based Fixed Price

Description

The Rewards Calculation Service (RCS) is a standalone solution designed to compute Cardano staking rewards—along with treasury, reserves, deposits, and fees—from genesis to the current epoch.

RCS provides:

  • Real-Time Calculation of current epoch rewards, derived directly from ledger state transitions.
  • Permanent Historical Storage of rewards accessible for any stake pool at any epoch.
  • Lightweight Infrastructure that does not rely on Cardano-db-sync, significantly reducing sync and query times.

Beyond rewards tracking, RCS can be scaled into a more comprehensive indexer that tracks not only what each block contains but also the evolving internal state of the Cardano ledger at every moment in time. This would provide a deeper level of insight for dApps, advanced analytics platforms, and other Cardano services seeking to leverage complete ledger state.

Problem Statement

Currently, the Cardano blockchain does not store staking rewards, reserves, or treasury history on-chain in a directly accessible form. Instead, these data points are derived from complex calculations built into the node and ledger code. Consequently, tools such as Cardano-db-sync have become the primary source for retrieving historical staking rewards data. However, this approach comes with several challenges:

Long Sync Times and Slow Queries Cardano-db-sync requires extensive synchronization and querying processes, which can be time-consuming and resource-intensive.

Suboptimal Data Schema for Certain Queries The PostgreSQL data schema used in this context is not always optimized for the specific query patterns required, leading to inefficiencies in data retrieval.

Complex Modifications Adjusting or modifying Cardano-db-sync is further complicated by the fact that the service interacting with PostgreSQL is implemented in Haskell, making alterations more challenging, particularly for developers who are not proficient in that language.

These factors combine to create a single point of inefficiency, making it difficult for developers, stake pool operators, and other ecosystem participants to access staking rewards history quickly and reliably.

Proposal Benefit

Who benefits and how?

Developers: Gain access to a real-time and historical rewards calculation API with optimized indexing and faster queries—no reliance on the bulky db-sync approach.

Stake Pool Operators (SPOs): Easily track staking rewards at each epoch without using db-sync or third party API’s. Delegators: Able to access transparent, reliable reward data for their stake pool delegations, promoting trust and engagement.

Cardano Ecosystem: Gains greater decentralization and diversity of infrastructure solutions, reducing dependency on a single tool.

By providing a lightweight reward calculation service, this proposal lowers infrastructure costs, simplifies reward querying, and accelerates data availability. Overall, it aims to enhance developer productivity, reduce operational complexity, and strengthen transparency in Cardano’s staking mechanism.

Moreover, there is a significant opportunity for scaling this service to evolve into a comprehensive indexer in the future. Such an indexer could track not only block contents but also the internal ledger state of a Cardano node at each point in time, thereby providing a richer dataset for dApps, analytics, and advanced tools built on Cardano.

Key Proposal Deliverables

Investigation & Analysis Researching and documenting Cardano’s reward formulas, ledger transitions logic. Deliver a summary document with pseudo-code.

Core Development & Architecture Implementation Developing the project skeleton, i.e. creating docker compose file for local development and setting up the service. Develop core backend functions for block processing, reward updates, and epoch transitions. Integrate with database to persist historical data.

Testing, Optimization, and Deployment Cross-verifying reward calculations with db-sync to ensure accuracy. Implementing restart and rollback handling mechanisms. Developing an API for retrieving rewards history. Deploying and testing.

Milestones:

Milestone 1: Research Successful completion of research from the beginning of rewards up to Conway updates.

Milestone 2: Planning & Design Design and implementation plans have been successfully delivered for the execution.

Milestone 3: Coding Successful delivery of the coded Indexer, transition states, and aggregator implementations.

Milestone 4: Writing Docs Successful delivery of the calculations against the current implementations on DB-Synch and the update of the documentation.

Milestone 5: Testing / Docs Beta version of the rewards calculation project has been successfully launched.

Milestone 6: Beta version Final release of the Rewards Calculation Service has been successfully launched.

Cost Breakdown

Budget Items:

Development Unit: 5 FTE Cost: USD 140,000 Total: USD 700,000

Testing and Support Unit: 3 FTE Cost: USD 80,000 Total: USD 240,000

Infrastructure Unit: 12 Infra Cost: USD 1,800 Total: USD 21,600

Scrum Master Unit: 0.5 FTE Cost: USD 140,000 Total: USD 70,000

Total Cost: USD 1,031,600

Resourcing & Duration

Team Composition: · 1-2 Senior Software Developers experienced with Cardano internals. · 1 DevOps Engineer. · 1 QA Engineer · 1 Lead Developer to coordinate tasks and oversee.

Timeline: · Investigation & Analysis – 3 months · Core Development & Architecture Implementation – 9 months · Testing, Optimization, and Deployment – 3 months

Deliverables:

Milestone 1: Research (USD 171,933) Successful completion of research from the beginning of rewards up to Conway updates.

Milestone 2: Planning & Design (USD 171,933) Design and implementation plans have been successfully delivered for the execution.

Milestone 3: Coding (USD 171,933) Successful delivery of the coded Indexer, transition states, and aggregator implementations.

Milestone 4: Writing Docs (USD 171,933) Successful delivery of the calculations against the current implementations on DB-Synch and the update of the documentation.

Milestone 5: Testing / Docs (USD 171,933) Beta version of the rewards calculation project has been successfully launched.

Milestone 6: Beta version (USD 171,933) Final release of the Rewards Calculation Service has been successfully launched.

Experience

EMURGO is one of the founding entities of the Cardano blockchain and has been developing tools and projects related to the protocol since the very beginning. Between maintaining low-level libraries for dealing directly with the protocol, developing client side wallet applications handling blockchain events, developing Plutus solutions, and running custom backend services for light wallets and numerous dApps aggregating chain data we have a decent understanding of the technical specifics of the ecosystem.

Maintenance & Support

EMURGO will maintain the Rewards Calculation Service (RCS) in the same manner as other EMURGO-led Cardano projects. After the initial development phase, ongoing updates, bug fixes, and feature enhancements will be handled through pull requests—both from internal EMURGO teams and the broader open-source community.

All code changes will undergo review and testing to ensure quality and compatibility with Cardano’s evolving protocols. As with CSL, RCS improvements—including updated calculations, database optimizations, or compatibility with future eras—will be added incrementally to align with Cardano’s roadmap. Regular version releases and release notes will keep developers informed, and any critical issues will be addressed promptly.

Supplementary Endorsement

The Cardano community has repeatedly voiced challenges regarding the speed and complexity of existing solutions (e.g., db-sync). Additionally, internal teams at EMURGO have observed that building or scaling reward-related services around db-sync is time-consuming and often overkill for retrieving historical rewards. A more optimized approach is needed.

Roadmap Alignment

Does your proposal align with any of the Intersect Committees?

Open Source Committee

Does this proposal align to the Product Roadmap and Roadmap Goals?

SPO Incentive Improvements

Administration and Auditing

Would you like Intersect to be your named Administrator, including acting as the auditor, as per the Cardano Constitution?

Yes

Ownership Information

Submitted On Behalf Of

Company

Social Handles

https://x.com/emurgo_io

Key Dependencies

There is no existing dependencies

Created:4/24/2025
Updated:5/5/2025
ID:692
Poll Results
Votes: 49
Should this proposal be funded in the next Cardano Budget round?
YES
9 (18%)
NO
40 (82%)

Comments (12)

May 5, 2025, 04:02 PM UTC

Do not think this is really a need for the community at the moment.

Apr 30, 2025, 08:13 AM UTC

We believe this service may be useful later, but what Cardano really needs today is investment in infrastructure growth and effective marketing.

Apr 30, 2025, 08:13 AM UTC

I can not support funding any projects from Emergo until they provide transparency on what results were obtained from the 2 Billion ada they were given to develop commercial adoption with the genesis funding, what ada is remaining, what do they consider completed and what is unfinished in their initial remit.

To date they have offered little transparency on their funding, KPI completion and ROI vs what they were paid, so giving them more money before this is rectified doesn’t make sense.

Apr 30, 2025, 08:13 AM UTC

I think the proposal title is giving a lot of people the wrong impression of what you are trying to do which is a bit unfortunate given I understand this is a real problem. That being said, I am voting "no" for a different reason: I believe this proposal has duplicate work with some existing working by other companies - notably for example there have been efforts to implement the reward calculation in Amaru which could be read by Dolos and then exposed as a utxorpc endpoint (I know Dingo and I think CF are trying to do similar flows). Although it would be cool to see EMURGO contribute to these efforts since I do think there is some extra help required to get this over the finish line, I do not think doing so will cost 1m thanks to existing progress by other teams

Apr 30, 2025, 08:13 AM UTC

I see this as a useful piece of tooling for taxes and quality of life, but 2 million ada for a rewards calculator? at current prices that is 1.4 million dollars for a niche product.

I do not see this as a priority use of funds, and would hapily vote for it at a lower price tag, or later down the road.

hubworkshop
Apr 30, 2025, 08:13 AM UTC

During the Spanish-language virtual workshop held on March 22, the community voiced its clear opposition to the proposed initiative.

A key argument raised was that founding entities have not received preferential treatment since the signing of the Constitution. From that point onward, their accountability has been grounded in their track record, demonstrated commitment, and responsiveness to the community.

From a governance perspective, the proponent's repeated missteps and perceived lack of engagement have led to genuine and ongoing concern among participants.

Moreover, while the proposed tool might have added value five years ago, it is now both untimely and redundant. The same functionality has already been developed and made available by the Cardano Foundation:

~ https://cardano.org/calculator/

Given these considerations, allocating ADA 2,000,000 in funding for a product that already exists within the ecosystem is unwarranted. This is especially the case when the proposing entity appears disconnected from the current context and the evolving needs of the Cardano community.

yeaok
Apr 30, 2025, 08:13 AM UTC

Just no, if you want to build this Emurgo can use funds from genesis ADA.

emurgo
Apr 30, 2025, 08:13 AM UTC

Hi,

Thank you for all the comments and questions. We’d like to clarify the intentions and details behind our “Rewards Calculation Service (RCS) for Cardano” proposal. Please find detailed explanation in this thread:

https://x.com/emurgo_io/status/1912491331454448005

Thank you.

Apr 30, 2025, 08:13 AM UTC

Voted No. This isn't a priority in my opinion, and similar tooling already exists.

Apr 30, 2025, 08:13 AM UTC

Is this open source software and under which license will you release it?

Apr 30, 2025, 08:13 AM UTC

Understanding Differentiation and Intended Use How does this tool differ from the existing tools provided by the Cardano Foundation?

Just to clarify, is it correct to understand this as an API rather than an explorer interface?

Given that tools like PoolTool already allow SPOs and delegators to quickly and easily access staking rewards and related data, is the primary target audience for this tool developers who would integrate it into their own applications or services?

If developers are indeed the primary target audience for this tool, could you name any specific developers or teams who have already expressed interest in using it?

Having examples of real potential users would help validate the demand and practical utility of the tool — is there any such feedback or commitment so far?

homerj
Apr 30, 2025, 08:13 AM UTC

Can you please provide a couple of sample data queries that someone might have trouble retrieving the data for currently, that your 2.x million Ada solution will allow them to answer? thanks.

Governance Space on Cardano Blockchain

Are You Ready to Participate?

Building Together to Drive Cardano Forward.