LPsLux Proposals
Privacy
LP-3116

Books, Records and the Preparation Record

Draft

What a Lux interface keeps about a transaction it prepared, why a chain record cannot answer for the screen, and the retention, access and reconstruction rules that turn stored fields into a coherent account of one user's session.

Abstract

A chain records that a transaction happened. It does not record what the person was looking at when they agreed to it — the price they were quoted, the tolerance in force, the routes they could reach, the fee they were shown, the disclosure on the screen, or the software that composed the whole of it. An interface that prepares transactions and never sees a broadcast holds that half for a few seconds and then, today, throws it away.

This LP specifies the record that keeps it. The preparation record is one entry per prepared transaction, keyed by the hash the user's wallet returned, carrying what was displayed and where each displayed thing came from. Around it sit the rules that make it worth having: a revision identifier on every shipped disclosure, one retention period, a confined and logged read path, and a reconstruction procedure that assembles the chain record, the preparation record and the registers of lp-3111 and lp-3112 into an account of one session.

The staff statement requires none of this. Its closing paragraph says records may be helpful, and that is the whole of its force. Every requirement below is this corpus's own, adopted because several of the conditions the corpus does undertake cannot be demonstrated after the fact by an interface that kept nothing. Where the requirement pulls the other way — a self-custody product is built to know little about its users, and a record is the thing that starts knowing — this LP specifies the minimum that answers the question and stops.

Standing of this requirement

The statement's closing paragraph, in full, is the only text on records:

Establishing, maintaining, and enforcing policies and procedures relating to the operation of the Covered User Interface and maintaining books and records (such as by utilizing publicly available distributed ledger technology transaction records in coordination with the maintenance of internal, non-public books and records), may be helpful … in demonstrating that it is creating, offering, and/or operating a Covered User Interface as described in this statement.

Read what it does and does not do. It is not among C1..C12; it is not a condition, and failing it fails nothing. It describes a coordination — public ledger records alongside internal non-public ones — and says that coordination helps a provider demonstrate the conduct the statement describes. It is evidential, and it is permissive about form.

The limits of the statement itself travel here as everywhere: staff views rather than a Commission rule, no legal force or effect, and considered withdrawn effective 13 April 2031 absent Commission action. lp-3110 carries them in full and this LP does not restate them.

Nothing here rests on a registered entity's obligations. This venue is not a broker, a dealer, an exchange, an alternative trading system or a transfer agent, and no Form TA-1 has been filed for anything. The records rules that bind registered brokers, dealers and transfer agents do not reach it, and no document, screen or policy may describe the retention below as required by any rule. It is a period this corpus chose.

So why require it. Because a claim about what an interface displayed is unfalsifiable without a record of what it displayed, and several conditions are exactly such claims. C6 is about sorting the user could reach. C7 is about words that were on the screen. C8 is about parameters someone outside could have reproduced. C1 is about a control the user could have used. Each is checkable in the source today and none is checkable about a transaction that has already happened. The record is not the condition; it is the evidence the condition held at a moment that has passed.

Conditions are cited as C1..C12 and excluded activities as X1..X9 on lp-3110's numbering, with the nine disclosures C12 requires cited as D1..D9 on the same document. None is restated here.

MUST, MUST NOT, SHOULD and MAY carry their RFC 2119 meanings. Every rule below is this corpus's own — the citation beside each one names the condition it makes demonstrable, not an authority that imposes it. An implementer who reads a MUST here as a Commission requirement has misread both documents.

What the chain does not hold

The chain is the complete record of the transaction and the interface's knowledge stops before it. The wallet signs and broadcasts; the interface hands over a request and learns a hash. Everything the interface knew that the chain will never know is knowable in that instant and nowhere afterwards:

  • The quote as displayed, and the chain state it was read from. A pool moves every block. Reading slot0 today reproduces today's price, not the one the user saw.
  • The parameters in force and their source. The calldata carries amountOutMinimum; it does not carry whether the bound came from a value the user typed, a constant in the build, or a service that picked one.
  • The routes that were reachable. A transaction to one router says nothing about the alternatives that were offered beside it, which is the entire subject of C5 and C6.
  • The fee as quoted, and whose it was. An address received value. Whether that address was the provider's, an affiliate's or a stranger's, and at what stated rate, is a fact about the interface rather than about the transfer — and it is the fact footnote 12 turns on.
  • The disclosure that was on the screen. Copy is edited. A page as it reads today is not evidence of what it read then.
  • The software that composed the instruction. C8 is a claim about a program. Reproducing it requires knowing which program.

An interface that keeps none of this can describe its present behaviour accurately and can say nothing whatever about a transaction from last quarter. That asymmetry, and not any obligation, is the argument for the record.

The preparation record

The object this LP exists for. Everything else — the revision identifier, the retention period, the access rule, the reconstruction — is a property of this record or a way of reaching it.

Composition and key

A preparation record is one entry describing one transaction this interface prepared, composed from what was on the screen at the moment the user agreed and keyed by the transaction hash the wallet returned.

The key MUST be the transaction hash the wallet returns. It is the only identifier the public record and the internal record already share, so the join needs no correspondence table and no identifier of ours. The statement's closing paragraph describes precisely this coordination.

The record MUST be composed at preparation and written on signature. The fields are knowable when the instruction is built and unknowable afterwards; the key exists only once the wallet answers. Composing late reconstructs, and a reconstruction of what was displayed is not a record of it.

An abandoned preparation MUST NOT be written. A user who reads a quote and does not sign has produced no transaction, so there is nothing for a record to join to and no question anyone can ask of it. Retaining browsing behaviour under the name of a record is a different collection with a different justification, and this LP does not authorise it.

A record MUST NOT be amended. The store is append-only and content-addressed. A correction is a new entry naming the entry it corrects, so an edit is visible rather than silent — the same discipline Conduct.sol applies to disclosure.

The fields

FieldWhat it answersTraceable to
Transaction hashThe join to the public recordClosing paragraph
ChainWhich network's rules and venue set were in forceD4
Quote as displayed — amounts in and out, and the price shownWhat the user agreed toC8, D5
Chain state the price was read at — block height, and the contract addresses readWhether the displayed price can be reproduced by anyoneC8
Each parameter in force, with its source: user, constant in the build, or serviceWhether the bound was chosen, defaulted, or delegatedC1, C8, C11(ii), D9, lp-3111
Route displayed, and the alternatives offered with their quoted amountsWhat was reachable, which is not recoverable laterC5, C6, D8
Venue set enabled at the timeWhat the quote could have consideredC3, D4
Fee as quoted, its recipient, and its origin classificationWhether the provider was paid, and by whomC10, footnote 12, D2
Disclosure revision renderedWhich representations were on the screenC12 prominence and promptness, D1
Software version — release identifier and commitWhich program's behaviour is being reproducedC8, D5
Eligibility verdict per asset, and the revision of the list that produced itWhy the interface prepared, or refused to prepareD4

Every parameter MUST record its source alongside its value. A value alone cannot distinguish a user's deliberate choice from a constant nobody reviewed from a number a service returned by an unpublished method, and lp-3111's reproducibility property is a question about exactly that distinction.

Where a price is read from chain state, the record MUST carry the block height and the addresses read. Without the height the reproduction is not merely harder, it is impossible: the arithmetic is public and its inputs are gone. This is the single field that decides whether C8 survives the moment.

The record MUST carry the alternatives offered, not only the route taken. C5 and C6 are about reachability, and reachability leaves no trace on chain.

The record MUST carry the disclosure revision and the software version, and MUST treat an absent value as a failure rather than as a value. The build already computes both — apps/web/vite.config.mts defines REACT_APP_VERSION_TAG and sets REACT_APP_GIT_COMMIT_HASH from git rev-parse HEAD, falling back to the literal 'unknown' when git is absent. A record storing 'unknown' records nothing, and the write path MUST refuse it.

A record SHOULD be one line of plain JSON, content-addressed. The point is that somebody can read it in ten years with tools that exist now.

What the record must not hold

MUST NOT be written to a product-analytics pipeline. Such a pipeline is sampled, its schema drifts, and it is operated by somebody else — none of which is a property of a record anyone should have to stand behind. The statement's phrase is "internal, non-public books and records", and a third-party stream is neither reliably internal nor reliably complete.

MUST NOT retain the source network address, user agent, or transport headers. They answer no question the record exists to answer. Where the privacy copy represents that an address is not stored long-term or linked to a wallet, writing one alongside a wallet-keyed record makes that representation false at the transport layer, which is the cheapest possible way to break a shipped statement.

MUST NOT hold private key material, a seed, or any signature belonging to a user. X7 is a fact about what the provider has access to, and a stored signature is user authority sitting in the operator's hands.

MUST NOT hold an executed agreement, a data room's contents, or any document belonging to a party. The digest travels; the paper does not. X5 is the condition and pkgs/exchange/src/terms.ts is the pattern — a digest computed by each party from its own copy, so the venue never needs the copy.

MUST NOT hold a second copy of an issuer's filing. Pointers — the index key, the accession numbers, the read time. Holding the document invites a divergence between the venue's copy and EDGAR's and makes the venue look like a republisher of somebody else's disclosure. lp-3120 carries the reporting state that reads those pointers.

MUST NOT carry a field whose only purpose is to identify the user. The test is stated under Knowing little on purpose and it is the one rule here that needs enforcing against ourselves rather than against a regression.

Revision identifiers on shipped disclosure

C12 requires disclosure that is prominent and "promptly updates as necessary". Promptness is a claim about time, and a document with no date cannot evidence it.

Every shipped disclosure set MUST carry a revision identifier and a review date. Two identifiers doing two jobs, and neither substitutes for the other: the revision says which copy, the date says when it was last looked at. A set edited without review has a new revision and an old date, and that is exactly the state a reader should be able to detect.

The revision MUST be computed from the copy, not maintained beside it. A digest over the ordered (id, heading, body) tuples of the set changes when any body changes and cannot be forgotten by a person editing prose. A hand-kept version number is a second thing to update and a first thing to be wrong.

The operator's name MUST be held at a fixed sentinel when the digest is computed. The conduct rules attach to the interface rather than to the brand, so a white-label deployment renders the same representations under a different legal person. Letting the name enter the digest reports a copy change where none occurred, and the reader who cares about copy changes then stops caring.

The record MUST carry the revision that was rendered, not the revision current at read time. The whole value of the field is that it answers about then.

A disclosure set SHOULD be anchored where a later edit is a new version rather than a quiet change. Conduct.sol in luxfi/standard is written for this: it takes the nine disclosure digests per interface address, refuses a publication missing any of them, refuses a backdated one, and at(iface, timestamp) answers what was in force then rather than what is in force now. A disclosure that lives only on a web page is a claim its author can edit afterwards; anchoring removes the ability to change it silently, which is the part that matters when nobody is looking.

Retention

The period is seven years, and it is the same period for every record this venue keeps. lp-3111 chose that figure for parameter reviews and lp-3112 for venue measurements, and a different number here would buy nothing and cost a matrix nobody can apply at write time.

Retention MUST be a decision written down, not a vendor default. A default is a term somebody else chose, for reasons that were theirs, and it becomes this venue's answer only by nobody having given one.

The period MUST run from the record's own date. There is no account, no relationship and no closure event to run from; there is a transaction and a clock.

Deletion at the end of the period is an obligation, not an option. A retention rule that only ever adds is not a retention rule, and a record kept past its stated period contradicts whatever the privacy copy says about it.

The registers MUST remain resolvable for the same period. lp-3111 and lp-3112 keep their history in the file's history, so retention there means the repository stays readable — a record citing a register nobody can resolve is a citation to nothing.

Access

D3 requires disclosure of the use of users' trading information by the provider or its affiliates, and D7 requires the policies protecting that information. The access rule below is what makes both of those disclosures true sentences rather than aspirations.

Read access MUST be confined to the records custodian and to counsel. That office is defined at lp-3110, and the deployment names its holder — no name appears in this corpus and none is implied. Not product, not analytics, not support. A record assembled to answer a regulator's question is not an input to a funnel, and a store readable by a team is a store whose use disclosure has to describe that team.

A deployment with no named custodian MUST NOT write the first record. The access rule is the whole of what makes the D3 and D7 disclosures true sentences, and an unheld office enforces nothing. Naming the holder is cheap; discovering after the fact that everyone could read the store is not.

Every read MUST itself be recorded — who, what, when, and the reason. An access rule with no record of access is a sentence in a document, and the first time it matters is the first time somebody asks whether it held.

The record MUST be treated as personal data. The venue holds no name, but a wallet address that has satisfied an issuer's identity requirement is linked to a verified person at that issuer's registry. Personal data with the name held elsewhere is still personal data.

The store's credentials MUST live in Lux KMS and never in the interface, in a build, or in a repository. Nothing in apps/web or pkgs/lx may hold a credential that can write or read the store; the write path reaches operator infrastructure and stops there.

Reconstruction

A record is a set of fields until a procedure turns it into an account. The procedure takes one transaction hash and returns what was true then.

Sources, each resolved rather than remembered:

  • The chain record — transaction, block, calldata, and the contracts' own events.
  • The preparation record — the fields above.
  • The disclosure copy at the recorded revision, resolved from the repository or from the anchor.
  • The lp-3111 register as it stood on that date, from the file's history.
  • The lp-3112 register as it stood on that date, from the file's history.

The procedure MUST fail loudly on a missing source. Returning what it found produces an account that reads as complete and is not, which is worse than a refusal: a refusal is a known gap, and a partial answer is an unknown one.

The procedure MUST NOT interpret. It assembles and attributes. A verdict about whether a condition was met is somebody's reading of the artifacts, and mixing it into the output destroys the property that makes the output useful — that every line in it came from somewhere nameable.

The procedure MUST NOT depend on a source the operator can silently edit. The chain is the chain. The registers resolve from version history. The disclosure resolves from its revision. The only source the operator holds alone is the preparation record itself, which is why it is append-only and content-addressed — that single property carries the whole integrity argument.

Each artifact MUST carry its read time. An account assembled from sources read at different moments is a fact about those moments, and a reader who does not know them cannot tell a stale source from a current one.

What the procedure cannot do, stated so nobody expects it: it does not reproduce a screen. It reproduces the values that were on one. A layout, a translation, or a component's rendering at a version is outside what is kept, and any claim that the venue can show the user's actual display would be false.

Knowing little on purpose

A self-custody interface with no accounts holds a wallet address, a set of numbers it displayed, and nothing else. No name, no email, no support history, no session tying one address to another. That is not an accident of implementation — it is the same property that makes the custody claim checkable, and it is worth defending against the record rather than trading away for it.

So the record's scope is fixed by the question it exists to answer: what was this person shown when they agreed to this transaction. The key that answers it is a transaction hash, which is already public. The address comes along because the chain already has it. Nothing further about the person is needed, and therefore nothing further is kept.

The minimality test MUST be applied to every field before it is added: could this field be dropped without changing what the reconstruction can say about the transaction? If it could, it is dropped. A field that identifies the user more precisely, correlates one session with another, or describes behaviour that produced no transaction fails the test by construction.

Any privacy representation the product ships MUST be true of the record actually kept. This is not a drafting preference. A shipped statement that a category of information is not collected, while it is being collected, is a false representation on a live surface, and correcting it afterwards corrects nothing that already happened. Where a shipped representation would be made false by the record, the representation MUST be corrected before the first record is written — in an earlier release, not the same one.

What that costs, and who it costs, is worth stating plainly. A records request phrased "produce everything you hold about this person" cannot be answered here, and can be answered at the issuer's identity registry, where the party with the obligation to know a holder also has the means. lp-3105 describes that registry. This design property is a limit worth putting to counsel in those terms rather than working around quietly.

Where the code stands

Cited against the working tree, and stated here rather than in each section above. The conduct pages under compliance/ hold the detail and are not repeated.

RequirementStanding
Preparation recordNot built. No type, no write path, no store. pkgs/exchange/src/record.ts does not exist. compliance/disclosure.md, compliance/routing.md, compliance/trade.md and compliance/boundary.md each reach the same absence from their own surface
Server-side store of trading recordsDeliberately absent today, per compliance/boundary.md. Adding one is a new collection with its own consequences, not a configuration change
Block height on a quoteNot recorded, which blocks the reproduction procedure C8 rests on — compliance/routing.md
Disclosure revision identifierAbsent. The conduct set carries no digest — compliance/disclosure.md
Disclosure review dateAbsent. LEGAL_UPDATED in pkgs/config/src/legal.ts dates the terms and privacy pages and not this set, so promptness under C12 is unevidenced — compliance/disclosure.md
AnchoringConduct.sol exists in luxfi/standard and this repository publishes nothing to it — compliance/trade.md, compliance/custody.md
Software versionAvailable at no cost. apps/web/vite.config.mts:122-123,365,374-376 already computes a commit hash and a version tag at build
Privacy representationWould be made false by the record as specified. The privacy page lists transactions under information not collected — compliance/disclosure.md, which also states the ordering: correct first, write second
Review records under lp-3111 and lp-3112Policies exist; the first review and the first measurement round are both owed

Conformance

Each rule above is checkable. The tests are named so they can be assigned, and marked where they do not exist.

TestAssertsExists
pkgs/exchange/src/record.test.ts — carries the joinA record has the transaction hash, chain, quote as displayed, block height and addresses read, every parameter with its source, the routes displayed, the fee with recipient and origin, the disclosure revision, the software version, and the eligibility verdict with its list revisionno
record.test.ts — refuses an unknown versionA write with 'unknown' for the commit, or an empty revision, throws rather than storingno
record.test.ts — drops the source addressThe write payload has no address, user agent or header field, asserted over the serialized bytes rather than over the typeno
record.test.ts — parameters carry provenanceA parameter constructed without a source fails to typecheck, so the source cannot default. Mutation-checked: widening the type makes a @ts-expect-error unused and fails the buildno
record.test.ts — forbidden shapes are unrepresentableThe record type has no field able to hold a document, a signature, a key, a name or free text. The control is the shape of the type: if it cannot hold prose, no write path can put prose in itno
record.test.ts — abandoned preparation writes nothingA prepared quote that is never signed produces no entryno
record.test.ts — append-onlyA second write for an existing hash appends a correction naming the prior entry and leaves it readableno
record.no-analytics.test.tsStatic over the import graph: no module on the record write path imports an analytics clientno
record.retention.test.tsExactly one retention constant exists and every record type reads it; a second literal period anywhere in the tree failsno
record.reconstruct.test.tsGiven one hash, the procedure returns the chain record, the preparation record, the disclosure at the recorded revision, and both registers as they stood — and throws on a missing source rather than returning the restno
pkgs/config/src/conduct.digest.test.tsThe digest over ordered (id, heading, body) matches a pinned value; altering any body changes it; changing the operator sentinel does notno
pkgs/config/src/conduct.test.ts — review date is freshThe review date exists and is within twelve months of buildno
routing/reproduce.test.tsGiven a recorded quote, re-running getPool, slot0 and quoteExactInputSingle at the recorded block reproduces the displayed amount exactly. Named in compliance/routing.md; blocked until the block height is recordedno
apps/web/e2e/record.spec.tsDriven in a browser with Playwright on a covered chain: preparing and signing writes exactly one entry; the entry's disclosure revision equals the revision the page rendered; the entry's route set equals the rows the comparison panel showed; abandoning the flow writes nothingno
pkgs/config/src/conduct.test.tsThe disclosure set is complete and no body carries a marker addressed to usyes

Nothing in this table passes except the last row, and the last row is about copy.

Rationale

Why the key is the transaction hash

Any identifier would join the two records. Only one candidate is already public and already held on both sides. Keying on an identifier of ours would require a correspondence table mapping our sessions to chain transactions, which is a second record with a strictly worse privacy profile — it would exist only to undo the anonymity the first one did not need to break.

The hash also has the right failure mode. A user who did not sign has no hash, so the design cannot accidentally accumulate a record of browsing; the absence of a key is what enforces the absence of an entry.

Why a digest and not a version number

A version number is maintained by a person and drifts from the thing it names — prose changes in a pull request that nobody thinks of as a release, and the number stays. A digest is computed from the copy and cannot miss an edit. The sentinel for the operator's name is the one deliberate blindness, and it is there because a white-label rename is not a change to a representation's substance and should not read as one.

Why one retention figure

Composition. Two figures produce a decision at write time about which record this is; three produce a matrix; and every one of them is a place to be wrong in a direction nobody notices until a record has already been deleted. lp-3111 and lp-3112 picked seven years for reviews and audits, and matching them costs storage, which is cheap, and saves judgment, which is not.

Why the record is composed early and written late

The fields are facts about a screen and exist only while the screen exists. The key is a fact about a chain and exists only after the wallet answers. Any design that writes once has to pick, and picking early means writing entries for transactions that never happened, while picking late means reconstructing what was displayed from what was signed — which is precisely the reconstruction the record exists to make unnecessary. Composing early and keying late is the only arrangement that keeps both properties.

Why minimality is a rule and not a preference

Every record grows. Each addition is individually defensible — one more field would have answered the last question — and the aggregate is a system that knows who its users are, built by people who each declined to build that. Naming the question the record answers, and testing every field against it, is what makes the aggregate reviewable. It is the same move lp-3111 makes with its four properties: a rule anyone can carry beats a list somebody has to maintain.

Security Considerations

The record is a target that did not previously exist. An interface holding nothing has nothing to lose; one holding what every address traded, when, and at what price is worth attacking, and the risk is created by this document rather than mitigated by it. That belongs stated, not buried: the store is encrypted at rest, its credentials live in Lux KMS, its read path is confined and logged, and records are deleted when the period ends rather than merely kept until it does.

Integrity and confidentiality pull in different directions here. The record is evidence, so it must be tamper-evident — append-only and content-addressed, so an alteration is detectable by someone who does not trust the operator. It is also a user's trading history, so it must be readable by almost nobody. A design that satisfies one and forgets the other fails at the moment it is needed.

The reconstruction procedure is a capability, not a query. Whoever can run it can produce a coherent account of any address's activity on this interface, joining public chain data to internal fields. It is stronger than read access to one row and should be held and logged as such.

Recording the tolerance in force is what makes an extraction answerable later. D7 names transaction ordering and MEV directly, and slippage tolerance is the bound on what reordering can take. A user asking afterwards whether they were extracted from needs the bound that applied, and lp-3111 already records that one of the paths sets it by a method nobody outside can restate. The record makes that failure visible per transaction rather than as a general property.

Dropping the transport address is a control, not a courtesy. A wallet-keyed record written from a browser carries a network address at the transport whether anyone stores it or not. Dropping it at the edge — before it reaches the store — is the difference between a shipped privacy sentence staying true and becoming a false representation on a live page.

Open Questions

Each is for counsel, and each is answerable.

Is seven years right for a venue with no registration? The figure is borrowed from adjacent rules that do not apply. A shorter period may be the better answer for a record whose only purpose is evidential, and the argument for the longer one is convenience rather than law.

Does keeping the record create an obligation that not keeping it would not? Discovery, production, and preservation on notice all attach to what exists. A venue that keeps nothing has a simple answer and a weak demonstration; a venue that keeps this has the opposite. The trade is real and it is not engineering's to make.

Is a wallet-keyed record retained seven years consistent with the privacy representations once those are corrected — and must the correction ship in an earlier release than the first write? This LP requires the earlier release. If that reading is wrong, the requirement is over-strict rather than unsafe, and it should be relaxed deliberately rather than by practice.

Is it acceptable that the venue cannot identify the holder behind an address? The identity sits at the issuer's registry. A request phrased for a person cannot be answered here. Whether that is a defensible design property or a gap depends on who is asking and under what authority.

Does producing a reconstruction waive anything about the internal record? The output joins public data to internal non-public records, which is what the statement's closing paragraph describes. Whether producing the join produces the underlying store is a question about privilege and scope, not about format.

Must the record survive 13 April 2031? The statement is considered withdrawn on that date absent Commission action. Records written to demonstrate conduct described in a withdrawn statement still describe conduct, and a record written now outlives the authority that motivated it. Whether the practice continues past that date, and on what footing, needs deciding before it becomes a habit.

Is an on-chain disclosure anchor itself a publication? Anchoring makes a representation unalterable and public. That is the point, and it may also make the act of publishing a statement in its own right, with consequences the web page does not have.

May the operator read its own record for a product purpose? The access rule says no. Somebody will want to, the reason will be good, and the answer needs to be a decision on the record rather than a first exception.

Copyright and related rights waived via CC0.