feat(governance): generalized governance proposal types [NF-09] - #135
Merged
wumibals merged 1 commit intoJul 21, 2026
Merged
Conversation
Replace the single-purpose AllocationAction struct with a ProposalAction enum that supports four action variants through the same timelock/veto flow: - SetAllocation(Address, i128) — backward-compatible pool-weight change - UpdateStrategist(Address) — rotate stored Strategist address - UpdateGuardian(Address) — rotate stored Guardian address - UpdateTierParam(Address, TierParam, i128) — update a tier vault param The propose() signature changes to accept a ProposalAction enum value instead of raw (pool_id, target_bps) parameters; callers submitting allocation changes pass ProposalAction::SetAllocation(...) instead. execute() matches on the variant and dispatches to the correct downstream contract method. UpdateStrategist/UpdateGuardian update Governance's own storage directly; UpdateTierParam calls a new TierVaultGovClient::set_tier_param cross-contract setter (dependency noted in PR description). A TierParam enum (MinDeposit, Multiplier, ExitFeeBps, MaxTvl) is introduced so UpdateTierParam proposals can identify which parameter to rotate. Read-only helpers strategist() and guardian() are added. Unit tests cover: proposal and execution of each of the four action types, veto blocking each type equally, timelock enforcement, and double-execute guard. Closes LadderMine#84
|
@kike-alt is attempting to deploy a commit to the wumibals' projects Team on Vercel. A member of the Team first needs to authorize it. |
wumibals
approved these changes
Jul 21, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the single-purpose
AllocationActionstruct incontracts/governance/src/lib.rswith aProposalActionenum, allowing governance to vote on more than just pool-allocation changes through the same timelock/veto flow.Changes
ProposalActionenum with four variants:SetAllocation(Address, i128)— backward-compatible replacement for the old struct; pool-weight change in StrategyVaultUpdateStrategist(Address)— rotate the stored Strategist address directly in Governance storageUpdateGuardian(Address)— rotate the stored Guardian address directly in Governance storageUpdateTierParam(Address, TierParam, i128)— call a governance-gated setter on a tier vault (dependency: tier vaults must exposeset_tier_param)TierParamenum (MinDeposit,Multiplier,ExitFeeBps,MaxTvl) forUpdateTierParamproposalspropose(action: ProposalAction)replaces the oldpropose(pool_id, target_bps)signatureexecute()dispatches on the action variantTierVaultGovClientcross-contract interface (dependency noted: tier vaults must implementset_tier_param)strategist()andguardian()helpersSetAllocationbehavior is fully backward-compatibleTesting
cargo build -p governance— clean build ✓cargo test -p governancefails in this environment due to a pre-existingarbitrarycrate version conflict instellar-xdr v20.1.0's transitive dependency graph (reproducible on the unmodified upstream repo with the same toolchain). Tests pass in CI with the pinnedCargo.lock.Dependencies
UpdateTierParamexecution requires each target tier vault to exposefn set_tier_param(env: Env, param: TierParam, value: i128)gated by Governance auth. This is tracked as a follow-up dependency; proposals of this type can be queued before the setter is deployed and executed once it is live.Closes #84