Repository navigation
v3.7.0: Unlocked Sell Value and Position Valuation Fixes
Highlights
- Tightens unresolved sell-share accounting so only prior value unlocked by a later buy from another user can be sold.
- Prevents unresolved position values from inheriting inactive historical market volume, closing the reported path where a small current position could quote or sell for an inflated amount.
- Keeps
/v0/sell/quoteand/v0/sellaligned: both price against the unlocked sellable cap while retaining the existing public DTO shapes and422 NO_POSITIONcontract for value that is not sellable yet. - Adds backend-provided user guidance for unsellable-but-present shares, so clients can explain that a later buy from another user is required before the position can be sold.
Sell-Share Fixes
- Added DBPM per-row payout and sellable-position calculation for unresolved markets.
- Reworked the integration scenario so
A buys 1, A cannot sell yet,B buys 1, and A can then sell only the DBPM-rounded value unlocked by B's follow-up buy. - Added tests for no-sellable-share rejection, unlocked sellable caps, transaction-scoped sellable reads, handler error copy, and the reported inflated-cashout regression.
- Preserved dust semantics: gross sale value reduces position value, retained dust stays with the market, and only net proceeds are credited.
Operations and Dependencies
- Made Docker Buildx GitHub Actions cache exports best-effort for staging and release image builds, so optional cache reservation failures no longer block otherwise successful deploy/image workflows.
- Updated backend Go module dependencies through Dependabot, including
golang.org/x/cryptoandgolang.org/x/net.
Validation From Merged PRs
JWT_SIGNING_KEY=test-secret-key-for-testing go test ./...- Focused backend sell, market, repository, handler, and position-math tests.
npm run build:reportnode --check integrationtest/scripts/sell-shares-two-share-cap.mjs- Local HTTP integration scenario:
sell-shares-two-share-cappassed 44/44 checks against a branch backend.
Excluded
- PR #775, the frontend stale-summary display fix, is not included in this release because it was not merged into
mainwhen this release was cut.
Full changes since v3.6.0: v3.6.0...v3.7.0