-
Notifications
You must be signed in to change notification settings - Fork 4
fix: allow zero-voter distributions (#77) #121
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,9 @@ interface IDistributionManager { | |||||||||||||
| error ZeroAddress(); | ||||||||||||||
|
|
||||||||||||||
| /// @notice Thrown when distribution conditions are not met | ||||||||||||||
| /// @dev Distribution is not ready when voting power is 0 or yield < recipient count | ||||||||||||||
| /// @dev Distribution is not ready when cycle is incomplete, there are no recipients, | ||||||||||||||
| /// or yield is insufficient. Note: MultiStrategyDistributionManager allows | ||||||||||||||
| /// zero-voter distributions for fixed-grant use cases. | ||||||||||||||
|
Comment on lines
+16
to
+18
|
||||||||||||||
| /// @dev Distribution is not ready when cycle is incomplete, there are no recipients, | |
| /// or yield is insufficient. Note: MultiStrategyDistributionManager allows | |
| /// zero-voter distributions for fixed-grant use cases. | |
| /// @dev Readiness conditions vary by implementation. Common reasons include an | |
| /// incomplete cycle, no eligible recipients, insufficient available yield, | |
| /// or other implementation-specific requirements not being satisfied. |
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.
With the
totalVotes == 0gate removed,isDistributionReady()can return true even when configured strategies will revert on zero votes (e.g.,VotingDistributionStrategyreverts withNoVotes). This can cause automation to repeatedly attemptclaimAndDistribute()and revert. Consider either (a) keeping a conservative zero-votes check unless the manager is explicitly configured to allow it, or (b) introducing a strategy-level readiness signal/interface so vote-dependent strategies can block readiness.