Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "landing",
"runtimeExecutable": "npm",
"runtimeArgs": ["--prefix", "landing", "run", "dev", "--", "--port", "5173", "--strictPort"],
"port": 5173
}
]
}
Empty file added 220/220
Empty file.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 BOUND contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,28 @@ BOUND/

## Development & Security Notes

BOUND was built from scratch during ETHGlobal Mumbai, according to the team. The team used Claude and OpenAI Codex as AI coding assistants for development, debugging, and documentation; generated changes require human review and tests. There has been no independent security audit.

The GitHub Actions workflow is configured for local tests and Gitleaks but has not yet run on a hosted runner. Gitleaks Action requires a license for organization-owned repositories; no license or other secret has been provisioned here. Real-wallet and testnet runs are not part of the local suite. Browser end-to-end suites and the required metric reports remain to be integrated.

## Arkiv submission evidence

The testnet writer used for recorded entities is `0xe63393558e36df643347326e7e03ad5fb0e6c867` on Rabdi (chain 7794095). To query its unexpired BOUND records, run from the repository root after `npm ci`:

```sh
node --input-type=module <<'JS'
import {createArkivRpcReader} from './integrations/arkiv/rpc.js';
const reader = createArkivRpcReader({url:'https://rpc.rabdi.db-chain.testnet.arkiv.network',schemaTag:'bound.record.v1'});
const records = await reader.query({owner:'0xe63393558e36df643347326e7e03ad5fb0e6c867'});
console.log(records);
JS
```

Results change as entities expire. A read on 2026-11-07 returned 10 records; this does not demonstrate the extension's user-facing live read. See [schema](arkiv/schema.md), [feedback](arkiv/friction.md), [reach](arkiv/reach.md), [why Arkiv](arkiv/why-arkiv.md), [how we use Arkiv](arkiv/how-you-use-arkiv.md), and [Swarm evidence and remaining gaps](arkiv/swarm.md).

## License

BOUND is licensed under the [MIT License](LICENSE). Third-party components may have their own licenses.
- BOUND is developed with AI-assisted tooling. Generated code and changes require human review and testing.
- Local integration fakes validate application behavior but do not establish that external services work correctly.
- Never commit private keys, funded wallet credentials, or real-user secrets.
Expand Down
15 changes: 15 additions & 0 deletions arkiv/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Arkiv integration status

## ETHGlobal Mumbai submission

BOUND is targeting **Build on Arkiv (from scratch)** as its main Arkiv track, with the **Arkiv + Swarm bonus** as a separate submission. The team reports that BOUND was built during ETHGlobal Mumbai. The main track requires a live testnet write and a user-visible feature that reads Arkiv data; the latter still needs an end-to-end demonstration before qualification can be claimed.

Judging evidence:

- [Arkiv feedback](friction.md): integration friction and reproduction details.
- [Reach](reach.md): intended users, availability and current limitations.
- [Why Arkiv](why-arkiv.md): what public, owned, expiring records add and what stays off Arkiv.
- [How BOUND uses Arkiv](how-you-use-arkiv.md): the read/write flow and user-visible behavior.
- [Schema](schema.md): entity types, query fields, ownership and expiry.
- [Arkiv + Swarm bonus](swarm.md): integration evidence, reproduction and remaining gaps.

The repository's [main README](../README.md) includes the writer address, a runnable query and the team's AI disclosure. The project is [MIT licensed](../LICENSE).

**Status: initial live write/read/expiry demonstrated; full integration remains open.** The selected public test environment is Rabdi, chain ID 7794095. A synthetic baseline create and patch, an observation write, an owner-filtered query, and observation expiry were recorded on 2026-11-06. The public test writer was `0xe63393558e36df643347326e7e03ad5fb0e6c867`. See [read boundary](../integrations/arkiv/README.md) and [transaction evidence](../packages/contracts/feasibility.md). Renewal, rollover, and full watcher-to-extension integration still require live verification.

Keep the writer distinct from curator and user wallets. Never record private keys or access credentials.
Expand Down
6 changes: 6 additions & 0 deletions arkiv/friction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
- The proposed record schema and create/patch path were exercised live; renewal and crash-recovery behavior remain locally tested only. At-least-once queue delivery requires receiver-side operation-ID deduplication.
- Watcher journal storage is single-process and bounded; migration, multi-process coordination, and production operations are not complete.
- The Gitleaks CI job has not run in GitHub. Its action requires a license secret for organization-owned repositories. No secret was added by this change.

## Actionable feedback

**Consistent pagination:** We expected a paginated query to represent one stable view. Pages may span different blocks, so our reader rejects that result rather than returning a potentially inconsistent bundle. Reproduction: run an owner query through `createArkivRpcReader.query` while the queried data or chain changes between pages; see pagination checks in `integrations/arkiv/rpc.js`. A snapshot or block-pinned query and a resumable cursor would make this easier. The timing-dependent failure is not claimed to occur on every run.

**Operation recovery:** A transaction may have been broadcast even if the client loses the response. We expected a straightforward way to determine its final result; our integration persists signed transactions and operation IDs and performs readback before acknowledging. A documented end-to-end recovery recipe for uncertain submissions and idempotency would help. See `integrations/arkiv/sender.js`.
2 changes: 2 additions & 0 deletions arkiv/how-you-use-arkiv.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
The intended path is extension observation queue → watcher intake and deduplication → watcher-owned expiring observation → hourly baseline → owner-verified bundle. Warned events are separate and contain no user decision. Observations during an active incident are excluded. Drift and incidents are separate records; incidents carry a plain Swarm reference and report digest.

The local test `scripts/integration/local.test.js` exercises part of this flow with fake storage and cannot prove the live integration. The Arkiv writer was exercised separately on Rabdi and an hourly watcher scheduler is implemented. The client-side privacy filter, extension consumption, live scheduled flow and a clean end-to-end round trip remain unverified.

The extension has an Arkiv reader and consumes watcher context for warning decisions; a missing baseline is reported as not checked rather than a positive result. This is implemented behavior, not evidence that a live write-to-extension demonstration has passed. The owner and expiry checks and local lifetime choices are described in [schema.md](schema.md). Verify a user-visible decision with a newly written record before presenting the requirement as complete.
2 changes: 2 additions & 0 deletions arkiv/reach.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
Arkiv stores public site-level observations and watcher-owned baseline, drift, incident, and status records. Only watcher-owned records accepted after owner and expiry checks may inform those signals. Any party can publish a lookalike schema. Observations and reporter counts cannot establish trust. Reporter keys are rotating pseudonyms, not verified distinct people; Sybil resistance is absent.

The extension must download seeded records as a bundle. Per-site and uncurated-site reads need the specified Anon-RPC route. The watcher or public nodes may see network metadata. No live extension-to-Arkiv round trip is demonstrated yet.

BOUND is intended for people interacting with wallet-enabled sites and for maintainers investigating suspicious frontend changes. The local prototype can be tried from the repository, but its live user-facing Arkiv flow is not yet demonstrated; no user count or post-event shipping commitment has been verified.
20 changes: 16 additions & 4 deletions arkiv/schema.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# Proposed Arkiv schema
# Arkiv schema

The payload contracts are defined by `packages/contracts/index.js` and examples in `fixtures/contracts/records.json`. Version 1 proposes observation, baseline, drift, incident and status records. Incident payloads contain a report digest and plain unencrypted Swarm reference. The proposed entity contains an indexed `arkiv.schema` string, an indexed `bound.operation` key for retry deduplication, and a `payload` bytes attribute holding UTF-8 JSON. The `writer.js` boundary requires the operation lookup to find and verify a prior write; actual signed create, receipt parsing, indexes and lifetimes still need a live writer and cross-lane agreement. Arkiv documents a 128-byte string limit and 128-KiB bytes limit; see [write transactions](https://docs.arkiv.network/json-rpc/mutating-entities/) and [limits](https://docs.arkiv.network/reference/limits/).
The local watcher uses the Rabdi testnet and `bound.record.v1`. The configured writer owns its entities; the public test writer used in documented tests is `0xe63393558e36df643347326e7e03ad5fb0e6c867`. Arkiv exposes owner, entity key and expiry as metadata. The reader filters by `$owner` and `arkiv.schema`, rechecks owner, schema and expiry, and the operation lookup also filters `operation`; a schema tag alone does not authenticate an entity. `kind` and `operation` are string attributes, and `payload` is UTF-8 JSON bytes. See [codec](../integrations/arkiv/codec.js), [reader](../integrations/arkiv/rpc.js), and [record validation](../packages/contracts/index.js). Site and chain are fields inside the payload and are filtered after reading, not indexed Arkiv attributes.

Arkiv owner, entity key and expiry are metadata. The reader filters on the configured owner and rechecks the returned metadata. A schema tag is not proof of ownership. Observations are not seed trust and do not lift a score cap. Local schema tests are not a live protocol proof.
| Kind | Purpose and selected payload fields | Local intake lifetime (blocks) |
| --- | --- | --- |
| observation | Site/chain, observed address and classification | 345600 |
| baseline | Site/chain, observed counterparties and contracts | 43200 |
| drift | Site/chain and infrastructure drift | 43200 |
| incident | Site/chain, severity, `reportReference`, `reportDigest` | 43200 |
| status | Site/chain, state, `feedReference`, optional incident reference | 43200 |
| frontend | Site/chain and aggregated script hash evidence | 43200 |
| evidence | Published incident/drift evidence | Defaults to drift lifetime |
| trust_snapshot | Curated snapshot data | Defaults to baseline lifetime |
| ens_record | ENS cache data | Defaults to status lifetime |

A proposed incident status may carry a null incident reference while the report is unavailable; clients must retain the warning and disable the report link. This clarification requires shared acceptance. Status writes need idempotent ordering so a retried pending status cannot overwrite the final status.
The exact valid fields are defined by the validators linked above. Lifetimes are block counts, not fixed wall-clock durations; local defaults may differ from other deployments and eligible records can be renewed. See [local configuration](../services/watcher/local-intake.mjs) and [archive](../integrations/arkiv/archive.js). Live create, patch, owner query and expiry evidence is in [feasibility.md](../packages/contracts/feasibility.md); full user-facing live flow has not yet been verified.

An incident's `reportReference` is an unencrypted Swarm reference. Never publish a secret-bearing encrypted Swarm reference in a public Arkiv entity. No live entity linking the demonstrated safe page has yet been established.
14 changes: 12 additions & 2 deletions arkiv/swarm.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Swarm evidence status

**Not yet proven.** The intended Swarm artifacts are canonical snapshot bytes and public incident-report bytes. Arkiv incident records should contain the plain, unencrypted reference and report digest. A secret-bearing or encrypted reference must not be published.
**Arkiv-to-Swarm link not yet proven.** The intended Swarm artifacts include canonical snapshot bytes and public incident-report bytes. Arkiv incident records contain a plain, unencrypted reference and report digest. A secret-bearing or encrypted reference must not be published.

Before this gate can pass, record the test-network configuration, public artifact digests and references, independent second-gateway read and hash, entity key, public link, postage batch lifetime and funding source, Bee service, upload/read code, reproduction commands, timestamp, and observed failure modes. No reference, batch, endpoint, or upload is asserted here until actually verified. Snapshot and Swarm implementations belong to Developer 2; Developer 3 gathers the evidence and integrates through their adapter.
Before this gate can pass, record the test-network configuration, public artifact digests and references, independent second-gateway read and hash, entity key, public link, postage batch lifetime and funding source, Bee service, upload/read code, reproduction commands, timestamp, and observed failure modes. The separate safe-page upload and its available evidence are documented below; an Arkiv entity linking it has not been verified. Snapshot and Swarm implementations belong to Developer 2; Developer 3 gathers the evidence and integrates through their adapter.

## Gateway-only transport

Expand All @@ -21,3 +21,13 @@ const verifiedBytes = await gateway.getVerified(reference, digest);
Host mode omits all postage headers and checks upload read-back against the input digest. It rejects a simultaneously supplied batch ID. `createSwarmAdapter({gatewayUrls})` creates a read-only adapter without an upload endpoint, batch or wallet. Existing response limits, timeouts, redirect rejection and externally anchored digest checks still apply. A digest received from the same untrusted gateway is not a trust anchor. Host-paid postage has operator-controlled availability and retention.

This is byte transport, not a domain lookup database. Signed domain-feed publishing, proof validation, TTL and extension coordination remain the separate domain-cache implementation described in `Docs/swarm-domain-cache-plan.md`. Safe-page collection publication uses `npm run swarm:safe:publish` and verifies all served files separately.

## Demonstrated safe-page upload and reproduction

On 2026-11-07 the separately uploaded public safe-page collection was reachable at [bzz.limo](https://bzz.limo/bzz/2ef102c267b6d62900b8c31c25620405d5fff12e22cd01f79038bd3eea0e682c/). Its reference is `2ef102c267b6d62900b8c31c25620405d5fff12e22cd01f79038bd3eea0e682c`. An earlier read through the upload gateway redirected to `/forbidden`; a successful read on a different gateway does not establish long-term availability.

This upload used the host-paid gateway mode of [`scripts/swarm/publish-safe-page.mjs`](../scripts/swarm/publish-safe-page.mjs), using `https://api.gateway.ethswarm.org`; it supplies no postage batch header. The host controls postage: its actual batch ID and funding wallet are not known from this repository and must be obtained from the provider if the judges require them. The user's own Bee-node funding is not evidence that this gateway upload used that node or its stamp.

To repeat, install dependencies with `npm ci`, run `node apps/safe-page/build.mjs`, then `npm run swarm:safe:check`. To perform an actual public upload, run `npm run swarm:safe:publish`; the command returns a reference only after attempting readback. Gateway availability and publication policy apply. To read an existing upload without uploading again, open the link above or run `curl -L https://bzz.limo/bzz/2ef102c267b6d62900b8c31c25620405d5fff12e22cd01f79038bd3eea0e682c/`. For strict readback against the current locally built files, run `BOUND_SWARM_GATEWAY_URL=https://bzz.limo npm run swarm:safe:publish -- --verify 2ef102c267b6d62900b8c31c25620405d5fff12e22cd01f79038bd3eea0e682c`; a different build can legitimately fail the byte comparison. The adapter's upload and verified-read code is in [`integrations/swarm/index.js`](../integrations/swarm/index.js).

**Qualification gaps:** No verified Arkiv entity key is currently documented that points to this reference; the incident schema has a `reportReference` field, but that is not evidence that this safe-page upload was recorded there. The demo-video timestamp and host postage details still need confirmation. This file must be updated with the actual entity key, the corresponding reference, accessible link, and video timestamp after the linked flow is demonstrated. Do not publish an encrypted reference containing its decryption key in Arkiv.
2 changes: 2 additions & 0 deletions arkiv/why-arkiv.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Why Arkiv

The proposed design uses Arkiv's queryable, wallet-owned, expiring entities for public site observations and status. It keeps these changing signals separate from the curator-controlled snapshot; an Arkiv observation is never a trust anchor. Owner checking is essential because anyone can publish matching attributes. Expiry and write/query behavior must be proven on the selected live network before claiming the integration works.

Compared with an operator-only Postgres instance, Arkiv lets other clients query public, expiring records and verify the publishing wallet independently of our server. This still depends on the configured RPC and trusted owner; it is not a cryptographic state proof. Private keys, signed transaction journals and sensitive user data stay off Arkiv; observations are filtered before publication. Public records are not appropriate for secrets.
Loading
Loading