Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

fix rent payment to have no leftover lamports #7381

Closed
ParthDesai opened this issue Dec 9, 2019 · 0 comments · Fixed by #7396
Closed

fix rent payment to have no leftover lamports #7381

ParthDesai opened this issue Dec 9, 2019 · 0 comments · Fixed by #7396
Assignees

Comments

@ParthDesai
Copy link
Contributor

ParthDesai commented Dec 9, 2019

Problem

Currently, rent payment to validator is as a fraction of collected rent in accordance with their stake weight. Since lamports are atomic, the calculation results in leftover lamports (for N validators, maximum N lamports), which are then lost.

Proposed Solution

Distribute those leftover lamports among the validators from descending order of stake weight.
Each validator gets 1 lamport from the leftover lamports.
Loop will terminate either when we distributed all lamports, or we reached end of validator list.

cc: @mvines @rob-solana

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant