feat(economic): the DLV market-leg token-policy conjunct — enforced at three layers - #752
Merged
Merged
Conversation
…t three layers Zero DLV value operations consulted the token policy of any asset they moved, at any layer: the four ops fell through build_token_policy_context's wildcard, dlv.create accepted any 32 random bytes as a funding leg, and a non-transferable token that online Transfer fully blocks funded, traded, folded and drained through markets freely. SoFi places the "applicable token policy" conjunct on every market successor and every release (Def 4.1, Req 4.4, Req 4.6, 6.25, 21.10/21.14); it is now enforced. The model, owner-frozen: token anchors are PUBLIC identifiers (the CoinGecko model) — discovery external, adoption open, rooting the precondition of interaction. Policy bytes come from a device's OWN rooting, never a counterparty's evidence: the new ProvenanceResolver::anchored_policy_bytes serves the verifier's local anchoring or a fetch from the authoritative content-addressed path, re-hashed under TAG_DSM_POLICY against the authenticated commit before anything trusts a byte — a locator, never authority. Unavailable is Incomplete (root, then retry). ERA and dBTC are pre-rooted on every device, the sole exceptions. allowlist_device_ids is issuance-recipient-scoped and has NO market meaning; transferable is the one movement-relevant commitment, and a non-transferable asset is not a market leg in any role. One matrix (check_market_leg_permitted) and one leg extraction (market_leg_commits), three layers: a central conjunct in advance_validated — central rather than per-arm, so fund and close are foreign-verifiable despite their SameTransitionMove credits carrying no evidence channel, with zero wire changes; the advance-funnel twin from local rooting, covering every caller; and fetch-and-root pre-flights at dlv.create / dlv.unlockRouted / dlv.reconcile / dlv.close, the only network-touching layer. Proofs: the conjunct driven through the FULL validation stack with a real DlvFund witness (rooted transferable validates; ERA+dBTC validates against an EMPTY anchor store — builtins never consult the resolver; non-transferable, unrooted, and wrong-hash bytes each refused by name); three route refusal shapes with a positive control; a DIRECT funnel drive bypassing all routes. Two mutation controls red-then-restored: the lineage conjunct neutralized lets reserve encumbrance of a non-transferable asset VALIDATE, and the funnel neutralized lets the same asset sail to the balance check. The shared funded_vault_fixture now roots real transferable policies — its arbitrary byte-pair was the hole itself, and 20 tests fired on it as designed. Deferred honestly: settle/reconcile/close dedicated route drives arrive with the PR6 e2e fixtures (the shared helper is proven at create and the funnel covers those ops for every caller); the 0x0026/0x0027 addressing defect stays with the PR5/PR6 producer cuts. Boards on the final tree: workspace --release 3934/0 across 72 suites (REAL_EXIT=0), node --release 270/0, make lint exit 0, production safety exit 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The token-policy conjunct SoFi places on every market successor and every
release (Def 4.1, Req 4.4, Req 4.6, 6.25, 21.10/21.14) — enforced. Before
this, zero DLV value operations consulted the token policy of any asset they
moved, at any layer: a non-transferable token was fully blocked on online
Transfer yet funded, traded, folded and drained through markets freely, and
dlv.createaccepted any 32 random bytes as a funding leg.The model (owner-frozen, 2026-08-30)
Token anchors are PUBLIC identifiers — the CoinGecko model. Discovery is
external, adoption is open: anyone holding the anchor may root to the token,
and rooting is the precondition of interacting with it at all. Consequently:
verifier holding a
V_n-authenticated commit IS a holder of the anchor, sofetching the bytes from the authoritative content-addressed path and
re-hashing them against the commit is legitimate rooting — the resolver
locates, it never authorizes. No evidence bundle grows a policy field.
allowlist_device_idsis issuance-recipient-scoped (who may be mintedto — 0x0029's rule) and has NO market meaning. An allowlisted-issuance
asset trades freely once issued.
transferableis the one movement-relevant commitment a policycarries, and a market successor moves control between parties — so a
non-transferable asset is not a market leg, in any role. Admitting it would
bypass the committed mint/burn-only restriction through the market door.
exceptions, never consulting any store.
Three layers, one matrix
check_market_leg_permitted+market_leg_commits(one leg extraction forall four DLV ops) live in core; every layer runs the same decision:
advance_validated): a new central conjunctverifies every DLV successor's legs through the new
ProvenanceResolver::anchored_policy_bytes— re-hash to the committedleg, parse, matrix. Central rather than per-arm, so fund and close are
foreign-verifiable too, despite their
SameTransitionMovecreditscarrying no evidence channel — the rooting model made the PR5-deferred
carriage question disappear. Unrooted ⇒
Incomplete(root, then retry);wrong bytes ⇒ refused.
execute_on_relationship_inner): the DLV twin ofenforce_policy_for_operation, from local rooting — covering EVERYcaller, not just routes (the mint-gate lesson).
dlv.create/dlv.unlockRouted/dlv.reconcile/dlv.close): fetch-and-root pre-flights — the only layer allowed to touchthe network. A trader may root a pair for the first time at settle;
dlv.createnow refuses a leg that is not a real, rooted asset at all.Tests
DlvFundwitness: rooted transferable leg validates; ERA+dBTC pair validates with an
EMPTY anchor store (builtins never consult the resolver); non-transferable
refused by name; unrooted fails closed as
Incomplete; bytes that do notre-hash refused.
non-transferable refused by name, rooted transferable passes the policy
gate (positive control pinned to the balance check).
DlvCreateFundedV2advance — no route — refused byname.
⇒ reserve encumbrance of a non-transferable asset VALIDATES (red); the
funnel gate neutralized ⇒ the same asset sails to the balance check (red).
derives its pair from their commits — its old arbitrary byte-pair was
exactly the hole this closes, and 20 tests fired on it as designed. One
wire-shape test kept fixed byte patterns (its naive tag scan reads raw
bytes a real hash can legitimately contain).
Notes
proven at create; their dedicated route-level drives arrive with the
PR6 e2e fixtures. The funnel covers those operations for every caller
meanwhile.
PR5/PR6 producer cuts (this cut did not touch those evidence sections).
bounded blob, boolean composition.
Verification (exact gate commands, pinned 1.98.0)