feat(factory): bounded SetLpAdminAll/Batch; drop unbounded rotation fanout (#277) #760
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!760
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/277-bounded-lp-admin-rotation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up on #277 — bounded FALLBACK (
SetLpAdminAll/SetLpAdminBatch); PRIMARY (LP admin=factory at instantiate, no fanout) remains an alternative.Summary
execute_update_configno longer fansSetLpAdminto every pair (unbounded gas DoS as the factory grows). Governance rotates factory config in one tx; operators propagate LP CW20adminexplicitly viaSetLpAdminAll(≤10 pairs) or paginatedSetLpAdminBatch, mirroringSetDiscountRegistryAll/Batch.Merge fix (this push): Rebased onto current
main— resolved import conflict with pair-creation fee paths (BankMsg,CosmosMsg,Uint128). Documented LP admin rollout indocs/contracts-terraclassic.mdandskills/AGENTS_TERRACLASSIC_GAS.md.Verification checklist
factory/contract.rsimports)git merge origin/maincd smartcontracts && cargo test -p cl8y-dex-testsmake test-contractsmake lint-contractscargo test factory_lp_adminpython3 scripts/check_fee_discount_tier_docs.pyFINDINGS: 0medium+)Issue #277 acceptance
UpdateConfigfanout removed; All/Batch capped).UpdateConfigO(1); LP admin viaSetLpAdminBatchpagination).Closes #277
Security review (automated)
Commit reviewed:
1b2e6f6758e2857cbd2ad94d2e394574d3cfc8fcScope: Factory
SetLpAdminAll/SetLpAdminBatch; removal of unboundedUpdateConfig→SetLpAdminfanout (smartcontracts/contracts/factory/src/contract.rs,error.rs,dex-commonfactory msgs, rotation test).Outcome:
FINDINGS: 0medium+What was checked
ensure_governancebefore work; pair-sideSetLpAdminstill requiresinfo.sender == pair_info.factory, so only the factory can rotate LP-token admin on a pair.adminisaddr_validated on the factory; pair re-validates beforeWasmMsg::UpdateAdmin.SetDiscountRegistryAll/Batchpattern (calc_limit, cap error, paginated cursor).SetLpAdminAllrejection is covered in tests.Notes (not reported as findings)
SetLpAdminAllallows any validatedadmin, not onlyconfig.governance; that is explicit governance power, not an external bypass.Inline threads: none (no medium+ issues on this diff).
added 24 commits
PlasticDigits:main5b4845d2- merge(main): resolve import conflict; document bounded LP admin rotation (#277)Compare with previous version
changed the description
Security review (automated)
Commit reviewed:
5b4845d21cd38fe9b1dd6d7eada98253cef1e931Scope: Factory bounded
SetLpAdminAll/SetLpAdminBatch; removal of unboundedUpdateConfig→SetLpAdminfanout (smartcontracts/contracts/factory,dex-commonfactory msgs, rotation test); docs/skills (#277); cosmeticLimitOrderLadderPanelformatting.Outcome:
FINDINGS: 0medium+What was checked
SetLpAdminAllandSetLpAdminBatchcallensure_governancebefore any work. PairSetLpAdminstill requiresinfo.sender == pair_info.factory, so only the factory can rotate LP-token admin on a pair.adminisaddr_validated on the factory; the pair re-validates beforeWasmMsg::UpdateAdmin.SetDiscountRegistryAll/Batchpattern (calc_limit,LpAdminAllTooManyPairs, paginatednext_start_after).SetLpAdminAllrejection is covered in tests.Notes (not reported as findings)
docs/contracts-terraclassic.md).SetLpAdminAllallows any validatedadmin, not onlyconfig.governance; that is explicit governance power, not an external bypass.max_spread.rsdiff is formatting-only; no logic change.Inline threads: none (no medium+ issues on this diff).
Security review: no medium+ findings on this diff.
mentioned in commit
091ca26061