Skip to content

Develop - #158

Merged
Nursca merged 6 commits into
mainfrom
develop
Oct 16, 2026
Merged

Nursca merged 6 commits into
mainfrom
develop

Conversation

@Nursca

@Nursca Nursca commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

OlamideAdesina and others added 6 commits October 16, 2026 15:15
…ion (#8 #10 #12 #13)

- #8: FeeTerms snapshot per market; split_fee rounds protocol up so protocol+LP == fee exactly; sweep_fees routes to the snapshotted recipient; claim_lp_fees + draining claim_pool_remainder; set_protocol_fee_share_bps admin setter.
- #10: per-market circuit breakers (set_default_breaker / breaker_config / breaker_state / would_trip); BandState resets per ledger; 0 disables; errors 21/22.
- #12: buy_v2 / sell_v2 with ledger-timestamp deadline and average-price limit; errors 19/20; amount <= 0 -> InvalidAmount.
- #13: transfer_position / transfer_lp with owner auth, events, and solvency preserved by construction; treasury set_successor + migrate_market (admin-only) move positions and LP role market by market; PoolRemainderClaimed event added.
- scripts/migrate-treasury.sh: deploy successor from the old treasury's live config, set_successor, migrate every market.
…iles on overwrite

The bindings CLI deletes files it does not generate on --overwrite, including the committed package-lock.json, which would make CI's "bindings are stale" diff fail on every run; stash/restore the lockfile around the call. market-core and treasury gain the new entrypoints/errors/events from #8/#10/#12/#13; resolver's diff is spec-entry ordering only (identical interface) from rebuilding with the current toolchain. market-core's lockfile name synced to its package.json name, matching the other three packages.
…-aware sizing (#8 #10 #12)

- model/fpmm_model.py + agents/core/fpmm.ts: price-after helpers and the exact integer limit checks the contracts use (equality passes), with property checks against the pinned reference example (price 5000 -> 5470).
- strategy: optional maxImpactBps clamps trade size by binary search over the FPMM quote; 0 disables (matches the on-chain breaker semantics); missing reserves raise.
- adapter: buy_v2/sell_v2 wrappers, quote_buy, and a mode guard rejecting unknown modes.
- trader CLI: always quotes the contract, derives min_shares_out from SLIPPAGE_BPS, sets limit_price_bps from the fair-value estimate (complement for the NO side) and a DEADLINE_SECS deadline; publishes a trace only on live submission. New trader.test.ts pins the derived bounds.
…ation

architecture.md: fee split/recipient snapshot rationale, breaker semantics (including the no-event-on-revert decision and worst-case lock cost), the v2 trade bounds, the transferability rules, and the migration auth model (agent has no path; destination fixed to Successor; the direct-call invoker rule means no authorize_as_current_contract is needed). frontend-integration.md: min_shares_out/deadline/limit_price guidance with a working example, breaker views, and the transfer entrypoints. README: migrate-treasury.sh and the migration runbook.
The PR template asks for STATUS.md updates when verified/unverified status changes; the workspace test count also moved from 40 to 87. Existing claims are left untouched.
…-and-transfers

feat: fees, breakers, trade bounds, transfers + migration (#8 #10 #12 #13)
Copilot AI balanced review requested due to automatic review settings October 16, 2026 19:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Nursca
Nursca merged commit ef53514 into main Oct 16, 2026
1 check passed
Nursca added a commit that referenced this pull request Oct 16, 2026
Merge pull request #158 from OracleDesk/develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants