Fee-tier UI shows CL8Y discount on pairs with no discount_registry #537
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#537
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Summary
Parent: #535. After the ops sweep, the three economic pairs will be wired; this issue is the dApp mismatch that made the bug look like a working discount.
getTraderDiscountalways queriesVITE_FEE_DISCOUNT_ADDRESS. Swap / Pool / Trade fee copy anduseLimitOrderMakerFeeRatesthen apply that discount to any pair. On-chain,lookup_effective_fee_bps_cacheduses the pair’sDISCOUNT_REGISTRY; when that isNonethe pair charges fullfee_bps(180) and maker place ismaker_fee_bps(180)= 90 bps, regardless of CL8Y tier.Hybrid
HybridSimulationwithtraderon an unwired pair already quotes the full fee. The lie is the fee-tier chrome (strikethrough bps, “your discount”, maker place fee) — takers/makers are shown a fee they do not get. Observed on UST1/USTR after the 1.13.0 migrate: registryget_discount9500/10000 vseffective_fee_bps: 180.Direction
Do not apply or advertise a CL8Y tier discount for a pair unless that pair’s registry is set (and matches the configured fee-discount contract).
Depends on pair
GetDiscountRegistryfrom the CreatePair inherit issue (today the query variant is not on live wasm; raw keydiscount_registryworks). Until that query ships, a raw-state probe or treating missing registry as “no UI discount” is acceptable.Scope
useLimitOrderMakerFeeRateson pair registry being set.fee_bps/ full maker place fee; do not strikethrough a phantom discount.Out of scope
marked as related to #535
mentioned in issue #535
mentioned in merge request !1066
mentioned in commit
395416d03ementioned in commit
c4c2b78dd2mentioned in commit
a5639d8ba9mentioned in issue #536
!1066 merged to
main(c4c2b78d).make verify-issue-5377/7 after merge (29 Vitest).During !1068 conflict resolution, one-sided pool cards were gated on the selected pair (
useFeeDiscountRegistryStatus(pairAddr)/pair?.contract_addr) so zap fee math does not apply a walletget_discounton an unwired pair (I14). AdvancedPoolCardalready usedpair.contract_addr.Left open (not blocking this close):
/trademaker bps vs on-chainuseLimitOrderMakerFeeRatesfeeErrordoes not surface pair-probe errors (behavior is still fail-closed)mentioned in issue #538
mentioned in merge request !1075
mentioned in issue #547
mentioned in issue #559
mentioned in issue #651