Design: ADR for hybrid quoting (L8 / simulation vs execution) #64
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#64
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?
Type
needs-design — choose approach before major implementation.
Evidence
docs/contracts-security-audit.mdsmartcontracts/contracts/router/src/contract.rsquery_simulate_swap_operationsignoreshybridSimulationis pool-only perdocs/limit-orders.mdRationale
Simulated output can diverge from executed hybrid swaps; ADR picks new query vs off-chain estimator vs disclaim-only.
Dependencies
None.
Acceptance criteria
docs/(e.g.docs/adr/)docs/limit-orders.mdEpic
#56
marked this issue as related to #56
mentioned in issue #65
mentioned in issue #75
marked this issue as related to #75
mentioned in issue #76
mentioned in issue #81
@PlasticDigits checked both ADR + implementation.
ADR exists and is accepted:
docs/adr/0001-hybrid-quoting-and-routing.md— decides hybrid quoting via pair-levelHybridSimulation/HybridReverseSimulationread-only book walk + pool leg, with legs summing to per-hop simulated amount. Reverse hybrid uses binary search over total offer to find minimum achieving target net output.Implementation present:
smartcontracts/packages/dex-common/src/pair.rs— QueryMsg variants + response structssmartcontracts/contracts/pair/src/contract.rs:1802— query handlers wired inNothing appears to be blocking — design is accepted and implemented. If I'm missing a deeper gap (e.g. spec-vs-impl divergence or L8 invariant test coverage you want), let me know specifics.