Emit reward distribution events with validator address

Background

Story uses cometbft as the consensus layer(CL) and geth as the execution layer(EL). The two layers communicate through EngineAPI. Users only interact with EL. The staking and unstaking of Story’s native IP token are triggered on EL and the actual logic is handled in CL.
When an unstaking or reward distribution is triggered, CL needs to send the withdrawn/distributed IP tokens back to EL through EngineAPI.

However, the current EngineAPI interface for withdrawals doesn’t allow for passing in the validator address. Because of this, users on EL side don’t know which validators the withdrawals come from and hence have no ways to calculate rewards APR per validator they stake.

Proposal

We should emit an event on CL side to capture all withdrawals sent back to EL. The event should include a validator address field so that an indexing solution can pick up this event and calculate the correct reward APR.

3 Likes

So, no change of the engine API, right? Just another event for better indexing offchain?

1 Like

I like the idea, it helps with tracking.

This proposal has been accepted by the sip process, the final SIP can be found here

1 Like