-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: vote weighting initial contract #127
Conversation
kupermind
commented
Mar 12, 2024
- Vote Weighting initial contract.
test: vote weighting initial testing
L1 -> L2 -> L1
contracts/VoteWeighting.sol
Outdated
/// @param nominee Address of the nominee. | ||
/// @param chainId Chain Id. | ||
/// @param weight New nominee weight. | ||
function changeNomineeWeight(address nominee, uint256 chainId, uint256 weight) external { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not need this
|
||
/// @dev Get Nominee relative weight (not more than 1.0) normalized to 1e18. | ||
/// (e.g. 1.0 == 1e18). Inflation which will be received by it is | ||
/// inflation_rate * relativeWeight / 1e18. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the original specs, if inflation_rate > votes_for_Nominee -> votes_for_Nominee * relativeWeight / 1e18. Dispenser takes care of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will do it, using totalSum from this menthod
return _nomineeRelativeWeight(nominee, chainId, time); | ||
} | ||
|
||
/// @dev Allocate voting power for changing pool weights. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// @dev Allocate voting power for changing pool weights. | |
/// @dev Allocate voting power for changing Nominee weights. |
refactor: accounting for non-evm chains for vote weighting
feat: couple of view methods to get nominees info
Vote weighting fuzzing