Open 0o-de-lally opened 3 months ago
This task involves making changes to the Proof of Fee design to improve the user experience (UX) for validators in the 0L blockchain network. The main goal is to simplify how validators place their bids by allowing them to bid directly with the net reward they are willing to accept, instead of using internal percentage-based variables.
Net Reward Formula: In the network, after each epoch, a reward is distributed to the validators in that epoch, called the epoch reward. The net reward is defined as the epoch reward minus the entry fee.
Update Transaction APIs: Modify the proof_of_fee.move
file in the Move smart contract to accept the net reward as a variable. This is the key improvement that will allow validators to specify the lowest reward they are willing to accept directly.
Convert Net Reward to Percentage: Internally, convert the net reward variable to a percentage bid so that existing internal calculations can still be used. This allows the system to maintain backward compatibility while simplifying the bidding interface.
Create View Functions: Add view functions to the smart contract so that explorers (blockchain explorers or any front-end interfaces) can display each validator’s preferred net reward. This makes it easier for validators and others to see the bids in terms of actual rewards rather than abstract percentages.
Update Rust CLI Tools: Modify the Rust-based CLI transaction tools to make the net reward variable the default mode of bidding. This simplifies the process for validators using the CLI, aligning with the goal of improving UX.
Validator Bids with Net Reward:
Bid Conversion to Percentage:
Validator Selection:
View Functions Display Net Reward:
CLI Tool Submission:
Epoch Reward Distribution:
Edge Case - Multiple Validators with Same Bid:
Edge Case - Validator Entry/Exit:
Edge Case - Minimum Net Reward:
Invalid Net Reward Bids:
Bid Submission Failures:
Validator Misconfiguration:
Insufficient Funds for Entry Fee:
Tie in Bids but Insufficient Slots:
Invalid CLI Input:
Network Issues During Bidding:
The Proof of Fee design called for the bids to be set with units of coins (either the fee to enter, or the expected net reward).
This feature was never implemented. For expediency the internal variables of the auction (percentage of nominal reward) was exposed to the validators. This interface is a common source of confusion for validators.
Migrating to the default setting being Net Reward will be an improvement in the UX for the validators.
With the changes proposed below it would be easier to reason about the auction.
The auction picks the validators willing to receive the lowest net reward. And as such now the validators can bid with that variable, (instead of using the internal calculation variables). The validator then must submit a bid that effectively answers: "What's the lowest reward I'm willing to receive as a validator?". How much are other validators willing to receive.
Changes:
txs
tools so that the net_reward variable is the default mode of bidding.