Skip to content

Conversation

@greenhat
Copy link
Member

@greenhat greenhat commented Feb 16, 2023

As discovered in ergoplatform/oracle-core#173 :

In their votes, an oracle must specify the reward token amount in the pool box when the update-pool command is initiated. So if the update-pool command is not planned to run in the current epoch, the oracles have to estimate the reward token amount in the pool box in the upcoming epochs. Since the reward tokens are given only to the posting oracles whose data points are within the deviation range, it is pretty hard to precisely estimate the reward tokens amount in the pool box in a few epochs, let alone the next day. This effectively makes the whole prepare-update, vote-update-pool, update-pool process to be run in the shortest time possible, ideally within one epoch. I foresee this would be challenging in a decentralized environment.

What if we request the reward token id and amount from voters and check that the new pool box has it only when a new reward token is minted? Otherwise, check that the reward token is preserved in the update contract.
The whole check could be expressed as "reward tokens in the new pool box should be preserved (poolIn==poolOut) OR exactly as voted for (reward token id and amount in ballot box registers)".

@greenhat greenhat changed the title [EIP23] In update contract check reward tokens are either preserved or voted by ballot boxes [EIP-0023] In update contract check reward tokens are either preserved or voted by ballot boxes Feb 16, 2023
…by ballot boxes;

make reward token id and amount optional in ballot box;
greenhat added a commit to ergoplatform/oracle-core that referenced this pull request Feb 27, 2023
@greenhat greenhat marked this pull request as ready for review March 20, 2023 07:29
@greenhat greenhat requested a review from scalahub June 27, 2023 09:22
@greenhat
Copy link
Member Author

Could you please approve this PR? It was implemented and successfully tested on the testnet pool.

@greenhat greenhat merged commit 2b24dc2 into eip23 Jun 27, 2023
@greenhat greenhat deleted the eip23-update-contract-reward-tokens-check branch June 27, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants