masa-finance / masa-oracle

Masa Oracle: Decentralized Data Protocol 🌐
https://developers.masa.ai/docs/masa-protocol/welcome
MIT License
24 stars 19 forks source link

feat: Reward calculation mechanism #382

Open mudler opened 4 months ago

mudler commented 4 months ago

As part of our spike in #329 we have decided on the terms that should be part of calculating the reward for the workers (see note in: https://github.com/masa-finance/masa-oracle/issues/329#issuecomment-2197120216).

This card is an implementation card about using our #380 to store the rewards of the nodes such can be distributed later on via a mechanism that allows to link the rewards to the smart contracts deployed in different chains.

Per #329 the initial features essential to rewards are:

To calculate rewards for these actors we will need to update the nodeData model according to 4 in this resolution.

Necessary Metric Additions/Modifications
Coefficients

These are more static values that can be stored as static variables in the functions used to calculate utility.

Validators should be able to calculate an utility for the worker that is then reflected as an award for their work. The work have to be tracked in the ledger or in the #381 to make sure it can be syncronized with the smart contracts deployed in the other chains.

Additional context

329

Blocked by #380

Acceptance criteria

teslashibe commented 3 months ago

@mudler I think this still has more work to be done in the oracle code itself.

mudler commented 3 months ago

@mudler I think this still has more work to be done in the oracle code itself.

It should be depending indeed on https://github.com/masa-finance/roadmap/issues/66 and https://github.com/masa-finance/masa-oracle/issues/496 (not yet groomed)

mcamou commented 1 day ago

We need a strict definition for "uptime". I'm putting some thoughts regarding that in Notion.