feat(factory): governance-set pair-creation fee to treasury (#276) #754
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!754
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/276-pair-creation-fee"
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 #276, your "100 LUNC creation fee to treasury, governance-settable" direction.
Permissionless
CreatePairwas free — the one-per-block gate was the only cost to spam pairs.Fix (factory):
pair_creation_fee_ulunaonConfig+InstantiateMsg+ConfigResponse,#[serde(default)]= 100 LUNC (DEFAULT_PAIR_CREATION_FEE_ULUNA) so 1.3.x stored configs migrate cleanly;CONTRACT_VERSION1.3.0 -> 1.4.0.execute_create_paircharges the fee: rejects stray denoms (UnexpectedPairCreationFunds), requires>= feeuluna attached (InsufficientPairCreationFee),BankMsg::Sends the fee toconfig.treasury, refunds any overpay to the sender. Atomic with the pair instantiate — if instantiate fails the tx reverts and no fee is charged.SetPairCreationFee { fee_uluna }governance setter, so the cost can be raised if spam is observed (per your note).Tests:
create_pair_charges_fee_to_treasury_and_gov_can_set_it— empty attachment rejected, exact fee credits the treasury, governance raises the fee (shows in Config), non-governance blocked. Existing factory tests instantiate with fee 0 (behavior unchanged). Contract suite 416/0.Heads up (flagged in the plan): no in-repo precedent for a contract
BankMsg::Sendto treasury — worth a careful look at the fund handling. And the frontend ripple is a laptop follow-up:createPairmust attach the uluna fee and the CreatePair page should surface it; off-chain scripts calling CreatePair with no funds will start failingInsufficientPairCreationFee(intended). No closing keyword.mentioned in issue #276
mentioned in commit
244e8a2e62mentioned in merge request !762
mentioned in merge request !763