fix(pair): reject zero and dust-floor belief_price in check_max_spread #1238
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!1238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue/1230"
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
check_max_spreadrejects zero and dust-floorbelief_pricewith typedInvalidBeliefPrice(no Decimal div-by-zero panic, no silent L9 skip).Some(0)is not a skip ofmin_return.swap()serializer, L9/integrators/skills, andmake verify-issue-1230.Fixes #1230
Acceptance
belief_price = 0is a typed contract error, not a panic.offer * (1/bp) == 0) errors even atmax_spread = 1.belief_price: Nonepool-only / hybrid no-belief cases unchanged.belief_price = 0is a query error, not a VM panic.expected_return >= 1.min_returnremains independent when belief is absent.Test plan
make verify-issue-1230(13/13, includes retest)max_spread(zero, reciprocal underflow, dust floor, commission)test_swap_belief_price_*drain skip: hard-blocked (needs-human / high-risk / human topic); remaining continue