Written so a reviewer does not have to find the gaps by reading source. Everything below is checkable in this repo.
contract/src/lib.rs is the whole milestone-1
mechanism in one file, with no dependency beyond near-sdk: the four-phase
lifecycle (Open, Resolved, Settled, Voided), resolver-only resolution,
pro-rata pari-mutuel settlement, a last-winner dust sweep, and a
permissionless void escape hatch. cargo test runs 23 unit tests against
it on the NEAR unit-testing harness, offline.cargo build --release --target
wasm32-unknown-unknown produces a 205 KB WASM contract. That is the
artifact a testnet deploy would upload. Building it is proof the contract
compiles for the NEAR runtime, not just for host tests.settlemint/model.py reimplements the
same settlement arithmetic in Python. tests/test_parity.py asserts the exact
payout literals the Rust unit tests assert (150/50 pro-rata, 1/1/3 dust sweep,
140/100 liability, and the refund and void cases), so the on-chain and
off-chain math cannot drift without failing a test on one side. 32 Python
tests pass.scripts/record_run.py drives a
full market lifecycle through the offline client and writes docs/run.json.
tests/test_run_fixture.py asserts the committed run conserves value to the
last yocto, ends Settled with zero escrow, and reproduces exactly on a fresh
run. ui/index.html renders that same data, so nothing on the page is a typed
placeholder.tests/test_near_adapter.py proves LiveNearClient refuses a mainnet RPC URL
and any non-testnet host, and that build_client() falls back to the keyless
offline backend when no credentials are set.docs/run.json is produced by the offline NEAR client, which runs the same
arithmetic as the contract but does not touch a network. It is a genuine
execution of the settlement math, but there is no public block explorer link
for it, because no funded testnet key is shipped in this repo. The live backend
(settlemint/near.py) targets NEAR testnet given NEAR_RPC_URL and a signer;
producing a public-testnet run with a real deploy transaction is the explicit
next step, committed for milestone 1’s on-chain verification, not something
already done here.
agent_core (milestone 3), and the forkable template
(milestone 4) are scoped out. agent_core is vendored ready for milestone 3
but the milestone-1 core does not depend on it.We would rather a reviewer read this section first. The claim is narrow and true: the NEAR settlement core is written, compiles to a testnet WASM, and is tested to 55 passing checks with cross-language parity, today.