diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..a6b917a Binary files /dev/null and b/.DS_Store differ diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 0000000..a3594c1 --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "landing", + "runtimeExecutable": "npm", + "runtimeArgs": ["--prefix", "landing", "run", "dev", "--", "--port", "5173", "--strictPort"], + "port": 5173 + } + ] +} diff --git a/220/220 b/220/220 new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7e67daa --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md index addd99d..15d3fce 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/arkiv/README.md b/arkiv/README.md index 0076fdb..402b88b 100644 --- a/arkiv/README.md +++ b/arkiv/README.md @@ -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. diff --git a/arkiv/friction.md b/arkiv/friction.md index 6a92519..feefefe 100644 --- a/arkiv/friction.md +++ b/arkiv/friction.md @@ -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`. diff --git a/arkiv/how-you-use-arkiv.md b/arkiv/how-you-use-arkiv.md index 5d2e8a4..6c53136 100644 --- a/arkiv/how-you-use-arkiv.md +++ b/arkiv/how-you-use-arkiv.md @@ -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. diff --git a/arkiv/reach.md b/arkiv/reach.md index ebb0231..1908cd1 100644 --- a/arkiv/reach.md +++ b/arkiv/reach.md @@ -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. diff --git a/arkiv/schema.md b/arkiv/schema.md index 417e05b..1bb9e5a 100644 --- a/arkiv/schema.md +++ b/arkiv/schema.md @@ -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. diff --git a/arkiv/swarm.md b/arkiv/swarm.md index ad3bd38..626f740 100644 --- a/arkiv/swarm.md +++ b/arkiv/swarm.md @@ -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 @@ -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. diff --git a/arkiv/why-arkiv.md b/arkiv/why-arkiv.md index aa0cd84..5b68478 100644 --- a/arkiv/why-arkiv.md +++ b/arkiv/why-arkiv.md @@ -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. diff --git a/demo/frontend-switch/README.md b/demo/frontend-switch/README.md new file mode 100644 index 0000000..27d30e1 --- /dev/null +++ b/demo/frontend-switch/README.md @@ -0,0 +1,13 @@ +# Same-URL frontend switch demo + +Run `node demo/frontend-switch/server.mjs a`, and in another terminal start `ngrok http 8081`. Visit the HTTPS URL printed by ngrok. Stop A with Ctrl+C, then run `node demo/frontend-switch/server.mjs b`; keep the ngrok process running. Reload the same URL. Return to A by stopping B and running the first command again. + +Both pages load `/app.js`, but A and B have different bytes. They only ask to connect a wallet; neither sends a transaction. The B label is revealed after connection for demo clarity. Scripts are cached for up to 60 seconds. Wait for that period and reload after switching, or use a fresh browser profile to avoid stale content; verify what is actually served before interpreting a result. + +Compute A's exact SHA-256 in the format used by BOUND: + +```sh +node -e "const fs=require('fs'),crypto=require('crypto'); console.log('sha256-'+crypto.createHash('sha256').update(fs.readFileSync('demo/frontend-switch/a/app.js')).digest('base64'))" +``` + +The extension's frontend evidence uses watcher-published Arkiv records. Adding the hash to ENS as a text record does not currently create that baseline or cause the extension to read it. The existing `demo/hijack-server/seed-frontend.mjs` only accepts loopback origins, so it cannot seed an ngrok hostname. Frontend promotion needs safe scope, three reporter keys and one hour, plus Arkiv publication; see `services/watcher/README.md`. A frontend conflict alone does not guarantee a safe-page redirect; other policy and corroboration conditions apply. Do not represent this two-site fixture as a verified end-to-end detection until the actual ngrok-host baseline and warning have been tested. diff --git a/demo/frontend-switch/a/app.js b/demo/frontend-switch/a/app.js new file mode 100644 index 0000000..b212bf8 --- /dev/null +++ b/demo/frontend-switch/a/app.js @@ -0,0 +1,9 @@ +// Demo A: expected frontend. No transaction is submitted. +document.querySelector('#connect').addEventListener('click', async () => { + const status = document.querySelector('#status'); + if (!window.ethereum) { status.textContent = 'Install a wallet to continue.'; return; } + try { + const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }); + status.textContent = accounts.length ? 'Wallet connected. Demo A loaded.' : 'No account selected.'; + } catch (error) { status.textContent = error.message || 'Wallet connection cancelled.'; } +}); diff --git a/demo/frontend-switch/a/index.html b/demo/frontend-switch/a/index.html new file mode 100644 index 0000000..e42c8d2 --- /dev/null +++ b/demo/frontend-switch/a/index.html @@ -0,0 +1 @@ +BOUND Demo Exchange
BOUND PRESENTATION · DEMO ONLY

Demo Exchange

Connect a wallet to preview a simulated exchange.

No wallet connected.

diff --git a/demo/frontend-switch/b/app.js b/demo/frontend-switch/b/app.js new file mode 100644 index 0000000..4abd4a5 --- /dev/null +++ b/demo/frontend-switch/b/app.js @@ -0,0 +1,9 @@ +// Demo B: changed frontend simulating a hijack. No transaction is submitted. +document.querySelector('#connect').addEventListener('click', async () => { + const status = document.querySelector('#status'); + if (!window.ethereum) { status.textContent = 'Install a wallet to continue.'; return; } + try { + const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' }); + status.textContent = accounts.length ? 'Wallet connected. Demo B (changed script) loaded.' : 'No account selected.'; + } catch (error) { status.textContent = error.message || 'Wallet connection cancelled.'; } +}); diff --git a/demo/frontend-switch/b/index.html b/demo/frontend-switch/b/index.html new file mode 100644 index 0000000..e42c8d2 --- /dev/null +++ b/demo/frontend-switch/b/index.html @@ -0,0 +1 @@ +BOUND Demo Exchange
BOUND PRESENTATION · DEMO ONLY

Demo Exchange

Connect a wallet to preview a simulated exchange.

No wallet connected.

diff --git a/demo/frontend-switch/server.mjs b/demo/frontend-switch/server.mjs new file mode 100644 index 0000000..4d43f11 --- /dev/null +++ b/demo/frontend-switch/server.mjs @@ -0,0 +1,21 @@ +import http from 'node:http'; +import { readFile } from 'node:fs/promises'; +import { fileURLToPath } from 'node:url'; + +const version = process.argv[2]?.toLowerCase(); +const port = Number(process.env.PORT || 8081); +if (!['a', 'b'].includes(version) || !Number.isInteger(port) || port < 1 || port > 65535) { + console.error('Usage: PORT=8081 node demo/frontend-switch/server.mjs a|b'); + process.exit(1); +} +const directory = new URL(`./${version}/`, import.meta.url); +http.createServer(async (req, res) => { + const path = new URL(req.url, 'http://localhost').pathname; + const file = path === '/' ? 'index.html' : path === '/app.js' ? 'app.js' : null; + if (!file) { res.writeHead(404); res.end('Not found'); return; } + try { + const content = await readFile(fileURLToPath(new URL(file, directory))); + res.writeHead(200, { 'Content-Type': file.endsWith('.js') ? 'text/javascript; charset=utf-8' : 'text/html; charset=utf-8', 'Cache-Control': file.endsWith('.js') ? 'public, max-age=60' : 'no-store' }); + res.end(content); + } catch { res.writeHead(500); res.end('Unable to load demo'); } +}).listen(port, '127.0.0.1', () => console.log(`Demo ${version.toUpperCase()}: http://127.0.0.1:${port}`)); diff --git a/hero-bg-img.jpg b/hero-bg-img.jpg new file mode 100644 index 0000000..6c79f6b Binary files /dev/null and b/hero-bg-img.jpg differ diff --git a/landing/package-lock.json b/landing/package-lock.json index b49abb3..4350e20 100644 --- a/landing/package-lock.json +++ b/landing/package-lock.json @@ -8,6 +8,9 @@ "name": "bound-landing", "version": "1.0.0", "dependencies": { + "@gsap/react": "^2.1.2", + "gsap": "^3.13.0", + "konva": "^9.3.22", "lenis": "^1.3.27", "react": "^19.0.0", "react-dom": "^19.0.0" @@ -458,6 +461,16 @@ "node": ">=18" } }, + "node_modules/@gsap/react": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@gsap/react/-/react-2.1.2.tgz", + "integrity": "sha512-JqliybO1837UcgH2hVOM4VO+38APk3ECNrsuSM4MuXp+rbf+/2IG2K1YJiqfTcXQHH7XlA0m3ykniFYstfq0Iw==", + "license": "SEE LICENSE AT https://gsap.com/standard-license", + "peerDependencies": { + "gsap": "^3.12.5", + "react": ">=17" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.67.5", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.67.5.tgz", @@ -904,6 +917,32 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/gsap": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.13.0.tgz", + "integrity": "sha512-QL7MJ2WMjm1PHWsoFrAQH/J8wUeqZvMtHO58qdekHpCfhvhSL4gSiz6vJf5EeMP0LOn3ZCprL2ki/gjED8ghVw==", + "license": "Standard 'no charge' license: https://gsap.com/standard-license." + }, + "node_modules/konva": { + "version": "9.3.22", + "resolved": "https://registry.npmjs.org/konva/-/konva-9.3.22.tgz", + "integrity": "sha512-yQI5d1bmELlD/fowuyfOp9ff+oamg26WOCkyqUyc+nczD/lhRa3EvD2MZOoc4c1293TAubW9n34fSQLgSeEgSw==", + "funding": [ + { + "type": "patreon", + "url": "https://www.patreon.com/lavrton" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/konva" + }, + { + "type": "github", + "url": "https://github.com/sponsors/lavrton" + } + ], + "license": "MIT" + }, "node_modules/lenis": { "version": "1.3.27", "resolved": "https://registry.npmjs.org/lenis/-/lenis-1.3.27.tgz", diff --git a/landing/package.json b/landing/package.json index 5b1a548..5adb58c 100644 --- a/landing/package.json +++ b/landing/package.json @@ -9,6 +9,9 @@ "preview": "vite preview --host 127.0.0.1" }, "dependencies": { + "@gsap/react": "^2.1.2", + "gsap": "^3.13.0", + "konva": "^9.3.22", "lenis": "^1.3.27", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/landing/public/hero-bg.png b/landing/public/hero-bg.png new file mode 100644 index 0000000..3c3556b Binary files /dev/null and b/landing/public/hero-bg.png differ diff --git a/landing/src/arch/Architecture.jsx b/landing/src/arch/Architecture.jsx new file mode 100644 index 0000000..e6289f9 --- /dev/null +++ b/landing/src/arch/Architecture.jsx @@ -0,0 +1,94 @@ +import React, { useEffect, useRef, useState } from 'react'; +import gsap from 'gsap'; +import { ScrollTrigger } from 'gsap/ScrollTrigger'; +import { useGSAP } from '@gsap/react'; +import { NODES, STEPS } from './model.js'; +import Proof from '../proof/Proof.jsx'; +import './arch.css'; + +gsap.registerPlugin(ScrollTrigger, useGSAP); + +export default function Architecture() { + const root = useRef(null); + const canvas = useRef(null); + const diagram = useRef(null); + const [active, setActive] = useState(0); + const [selected, setSelected] = useState(null); + const reduced = typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches; + + const activeRef = useRef(0); + + // Konva is ~300 KB, so it loads on demand instead of with the first paint. An IntersectionObserver + // (not a scroll position) starts the entrance, so it still fires if the page jumps straight here. + useEffect(() => { + let alive = true, d, io; + import('./konvaDiagram.js').then(({ Diagram }) => { + if (!alive || !canvas.current) return; + d = new Diagram(canvas.current, { onSelect: setSelected, reduced }); + diagram.current = d; + d.setStep(activeRef.current); + requestAnimationFrame(() => ScrollTrigger.refresh()); // the canvas just gave the page its real height + io = new IntersectionObserver(([entry]) => { if (entry.isIntersecting) { d.intro(); io.disconnect(); } }, { threshold: 0.12 }); + io.observe(canvas.current); + }); + return () => { alive = false; io?.disconnect(); d?.destroy(); diagram.current = null; }; + }, [reduced]); + + useGSAP(() => { + const q = gsap.utils.selector(root); + // Each step block drives the diagram while it is near the middle of the screen. + q('.ar-step').forEach((el, i) => { + ScrollTrigger.create({ trigger: el, start: 'top 58%', end: 'bottom 58%', onToggle: (self) => { if (self.isActive) { activeRef.current = i; setActive(i); diagram.current?.setStep(i); } } }); + }); + // Entrance: start as soon as the diagram's block is on screen, however the page got here. + ScrollTrigger.create({ trigger: q('.ar-grid')[0], start: 'top 88%', end: 'bottom top', onUpdate: (self) => { if (self.isActive) diagram.current?.intro(); } }); + if (!reduced) { + gsap.from(q('.ar-head > *'), { autoAlpha: 0, y: 24, duration: 0.9, ease: 'expo.out', stagger: 0.1, scrollTrigger: { trigger: q('.ar-head')[0], start: 'top 85%', once: true } }); + } + document.fonts?.ready.then(() => ScrollTrigger.refresh()); + }, { scope: root, dependencies: [reduced] }); + + const jump = (i) => { activeRef.current = i; setActive(i); diagram.current?.setStep(i); }; + const node = selected ? NODES[selected] : null; + + return
+
+
+

A second opinion,
from outside the page.

+

Follow one wallet request from the page to your decision. Scroll the steps, or select any box to see what it does, what it trusts and how it can fail.

+
+ +
+
    + {STEPS.map((s, i) =>
  1. + +

    {s.text}

    + {s.proof.length > 0 && } +
  2. )} +
+ +
+
+
+
+ {node + ? <> +
{node.title}{node.sub}
+
+
What it does
{node.does}
+
What it trusts
{node.trust}
+
How it can fail
{node.fails}
+
+ + :

Select any box to inspect it.

} +
+
+
+
+

This diagram shows the project’s architecture. Live integrations and browser coverage are still being verified, and BOUND adds context to a request rather than guaranteeing it is safe.

+
+
; +} diff --git a/landing/src/arch/arch.css b/landing/src/arch/arch.css new file mode 100644 index 0000000..0a53b79 --- /dev/null +++ b/landing/src/arch/arch.css @@ -0,0 +1,42 @@ +/* ─── Architecture (Konva) ─── */ +.ar { background: var(--paper, #fff); color: var(--ink, #0b0b0c); font-family: var(--serif, "Instrument Serif", Georgia, serif); border-top: 1px solid var(--line, #e6e6e1); } +.ar-inner { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: clamp(72px, 12vh, 150px) 0 clamp(56px, 9vh, 110px); } +.ar-head h2 { margin: 0 0 20px; font-size: clamp(48px, 7vw, 108px); font-weight: 400; line-height: 0.95; letter-spacing: -0.025em; } +.ar-head h2 em { font-style: italic; background: linear-gradient(var(--accent, #ffd500), var(--accent, #ffd500)) no-repeat 0 90% / 100% 38%; } +.ar-head p { max-width: 56ch; margin: 0; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; color: #3d3d39; } + +.ar-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 72px); margin-top: clamp(40px, 7vh, 80px); align-items: start; } +.ar-steps { margin: 0; padding: 0; list-style: none; } +.ar-step { min-height: 52vh; padding: 28px 0 28px 22px; border-left: 2px solid var(--line, #e6e6e1); opacity: 0.42; transition: opacity 0.4s, border-color 0.4s; } +.ar-step:last-child { min-height: 92vh; } /* keeps the sticky diagram on screen while the last step is read */ +.ar-step.is-active { opacity: 1; border-color: var(--accent, #ffd500); box-shadow: -2px 0 0 0 var(--accent, #ffd500); } +.ar-step-btn { display: flex; align-items: baseline; gap: 14px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; } +.ar-num { font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 12px; letter-spacing: 0.1em; padding: 3px 8px; border: 1px solid var(--ink, #0b0b0c); border-radius: 999px; background: var(--paper, #fff); transition: background 0.3s; } +.ar-step.is-active .ar-num { background: var(--accent, #ffd500); } +.ar-step-title { font-size: clamp(28px, 2.9vw, 42px); line-height: 1.05; letter-spacing: -0.015em; } +.ar-step p { max-width: 46ch; margin: 14px 0 14px 0; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.42; color: #2b2b28; } +.ar-step-btn:focus-visible, .ar-canvas:focus-visible { outline: 2px solid var(--ink, #0b0b0c); outline-offset: 4px; border-radius: 6px; } + +.ar-stage { position: sticky; top: 76px; } +.ar-card { border: 1px solid var(--ink, #0b0b0c); border-radius: 22px; background: var(--paper, #fff); padding: 14px 14px 0; box-shadow: 0 30px 60px -38px rgba(11, 11, 12, 0.55); overflow: hidden; } +.ar-canvas { width: 100%; min-height: 520px; } +.ar-canvas canvas { display: block; } +.ar-inspector { margin: 6px -14px 0; padding: 16px 20px 18px; border-top: 1px solid var(--ink, #0b0b0c); background: var(--accent-soft, #fff4b8); min-height: 168px; } +.ar-insp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; } +.ar-insp-head b { font-size: 26px; font-weight: 400; letter-spacing: -0.01em; } +.ar-insp-head span { font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 11px; letter-spacing: 0.06em; color: #55554f; } +.ar-inspector dl { display: grid; gap: 8px; margin: 10px 0 0; } +.ar-inspector dt { font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #55554f; } +.ar-inspector dd { margin: 2px 0 0; font-size: 16px; line-height: 1.32; } +.ar-hint { margin: 0; padding-top: 38px; font-size: 19px; color: #55554f; text-align: center; } +.ar-note { max-width: 74ch; margin: 36px 0 0; font-size: 16px; line-height: 1.4; color: var(--muted, #6b6b64); } + +@media (max-width: 900px) { + .ar-inner { width: calc(100% - 32px); } + .ar-grid { grid-template-columns: 1fr; gap: 28px; } + .ar-stage { position: static; order: -1; } + .ar-step, .ar-step:last-child { min-height: 0; padding: 20px 0 20px 18px; opacity: 1; } + .ar-step.is-active { box-shadow: none; } + .ar-inspector { min-height: 0; } +} +@media (prefers-reduced-motion: reduce) { .ar-step { transition: none; } } diff --git a/landing/src/arch/konvaDiagram.js b/landing/src/arch/konvaDiagram.js new file mode 100644 index 0000000..6169f37 --- /dev/null +++ b/landing/src/arch/konvaDiagram.js @@ -0,0 +1,200 @@ +// Framework-free Konva diagram controller. GSAP drives every animated value; Konva only draws. +// React owns the DOM around it (src/arch/Architecture.jsx) and talks to this through a handful of methods. +import Konva from 'konva'; +import gsap from 'gsap'; +import { NODES, STEPS, layoutFor } from './model.js'; + +const C = { paper: '#ffffff', ink: '#0b0b0c', muted: '#6b6b64', line: '#d4d4cc', zone: '#ecece6', accent: '#ffd500', soft: '#fff4b8', danger: '#d9381e' }; +const SERIF = '"Instrument Serif", Georgia, serif'; +const MONO = 'ui-monospace, "SF Mono", Menlo, Consolas, monospace'; + +const rgb = (hex) => [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16)); +const mix = (a, b, t) => { const [x, y] = [rgb(a), rgb(b)]; return `rgb(${x.map((v, i) => Math.round(v + (y[i] - v) * t)).join(',')})`; }; +const flat = (pts) => pts.flat(); +const segLen = (a, b) => Math.hypot(b[0] - a[0], b[1] - a[1]); + +/** Point at fraction t (0..1) along a polyline, plus the angle of that segment. */ +function along(points, t) { + const lens = points.slice(1).map((p, i) => segLen(points[i], p)); + let d = t * lens.reduce((s, v) => s + v, 0); + for (let i = 0; i < lens.length; i++) { + if (d <= lens[i] || i === lens.length - 1) { + const k = lens[i] ? Math.min(d / lens[i], 1) : 0; + return [points[i][0] + (points[i + 1][0] - points[i][0]) * k, points[i][1] + (points[i + 1][1] - points[i][1]) * k]; + } + d -= lens[i]; + } + return points[0]; +} +const pathLength = (points) => points.slice(1).reduce((s, p, i) => s + segLen(points[i], p), 0); + +export class Diagram { + constructor(el, { onSelect, reduced = false } = {}) { + this.el = el; this.onSelect = onSelect; this.reduced = reduced; + this.stepIndex = 0; this.selected = null; this.mode = null; this.dirty = false; this.introduced = false; + this.stage = new Konva.Stage({ container: el, width: Math.max(el.clientWidth, 280), height: 400 }); + this.layer = new Konva.Layer(); + this.stage.add(this.layer); + this.tick = () => { if (this.dirty) { this.dirty = false; this.layer.batchDraw(); } }; + gsap.ticker.add(this.tick); + this.resizer = new ResizeObserver(() => this.resize()); + this.resizer.observe(el); + this.build(this.modeFor(el.clientWidth)); + // Konva measures text once. Redraw after the serif loads so nothing is laid out with the fallback. + document.fonts?.load('18px "Instrument Serif"').then(() => this.build(this.mode, true)); + } + + modeFor(width) { return width < 600 ? 'narrow' : 'wide'; } + + resize() { + const width = this.el.clientWidth; + if (!width) return; + const mode = this.modeFor(width); + if (mode !== this.mode) this.build(mode, true); + else this.fit(); + } + + fit() { + const scale = Math.min(this.el.clientWidth / this.lay.width, 1.15); + this.stage.width(this.lay.width * scale); + this.stage.height(this.lay.height * scale); + this.layer.scale({ x: scale, y: scale }); + this.el.style.height = `${this.lay.height * scale}px`; + this.dirty = true; + } + + clear() { + this.tweens?.forEach((t) => t.kill()); + this.tweens = []; + this.layer.destroyChildren(); + this.nodes = {}; this.edges = {}; + } + + build(mode, keepState = false) { + this.clear(); + this.mode = mode; + this.lay = layoutFor(mode); + const { zones, boxes, edges, labelAt } = this.lay; + + for (const z of zones) { + const g = new Konva.Group({ listening: false }); + g.add(new Konva.Rect({ x: z.x, y: z.y, width: z.w, height: z.h, cornerRadius: 18, fill: z.accent ? 'rgba(255,244,184,0.28)' : 'rgba(11,11,12,0.018)', stroke: z.accent ? C.ink : C.zone, strokeWidth: z.accent ? 1 : 1, dash: z.accent ? [] : [5, 5] })); + g.add(new Konva.Text({ x: z.x + 16, y: z.y + 10, text: z.label.toUpperCase(), fontFamily: MONO, fontSize: 9.5, letterSpacing: 1.2, fill: z.accent ? C.ink : C.muted })); + this.layer.add(g); + } + + for (const [id, pts] of Object.entries(edges)) { + const arrow = new Konva.Arrow({ points: flat(pts), stroke: C.line, fill: C.line, strokeWidth: 1.3, pointerLength: 7, pointerWidth: 7, lineJoin: 'round', lineCap: 'round', dash: id === 'direct' ? [5, 5] : [], listening: false }); + const label = new Konva.Text({ text: '', fontFamily: MONO, fontSize: 9.5, fill: C.ink, opacity: 0, listening: false, ...(labelAt[id] ? { x: labelAt[id][0], y: labelAt[id][1] } : { visible: false }) }); + const packet = new Konva.Rect({ width: 8, height: 8, offsetX: 4, offsetY: 4, rotation: 45, fill: C.accent, stroke: C.ink, strokeWidth: 1.2, opacity: 0, listening: false }); + this.layer.add(arrow, label, packet); + const e = { id, pts, arrow, label, packet, s: { on: 0, danger: 0 }, t: { v: 0 } }; + e.run = gsap.to(e.t, { v: 1, duration: Math.max(0.9, pathLength(pts) / 190), ease: 'none', repeat: -1, paused: true, onUpdate: () => { const [x, y] = along(pts, e.t.v); packet.position({ x, y }); this.dirty = true; } }); + this.tweens.push(e.run); + this.edges[id] = e; + } + + for (const [id, box] of Object.entries(boxes)) { + const def = NODES[id]; + const g = new Konva.Group({ x: box.x, y: box.y, name: id }); + const ink = def.kind === 'ink'; + const rect = new Konva.Rect({ width: box.w, height: box.h, cornerRadius: 13, fill: ink ? C.ink : C.paper, stroke: C.ink, strokeWidth: 1.2, dash: def.kind === 'untrusted' ? [5, 4] : [], shadowColor: C.accent, shadowBlur: 0, shadowOpacity: 0.9 }); + const title = new Konva.Text({ x: 14, y: 11, text: def.title, fontFamily: SERIF, fontSize: this.lay.mode === 'narrow' ? 21 : 19, fill: ink ? '#fff' : C.ink }); + const sub = new Konva.Text({ x: 14, y: box.h - 20, text: def.sub, fontFamily: MONO, fontSize: 9, fill: ink ? 'rgba(255,255,255,0.7)' : C.muted }); + g.add(rect, title, sub); + if (def.kind === 'bound') g.add(new Konva.Rect({ x: box.w - 20, y: 11, width: 8, height: 8, rotation: 45, offsetX: 4, offsetY: 4, fill: C.accent, stroke: C.ink, strokeWidth: 1 })); + g.on('mouseenter', () => { this.el.style.cursor = 'pointer'; }); + g.on('mouseleave', () => { this.el.style.cursor = ''; }); + g.on('click tap', () => this.select(id)); + this.layer.add(g); + this.nodes[id] = { id, def, box, g, rect, title, sub, ink, s: { on: 0, sel: 0, appear: this.introduced || this.reduced ? 1 : 0 } }; + } + + this.fit(); + for (const n of Object.values(this.nodes)) this.paintNode(n); + for (const e of Object.values(this.edges)) this.paintEdge(e); + this.applyStep(this.stepIndex, true); + if (keepState && this.selected) this.nodes[this.selected] && this.tweenSel(this.nodes[this.selected], 1, true); + } + + paintNode(n) { + const { on, sel, appear } = n.s; + n.g.opacity(appear * (0.4 + 0.6 * on)); + n.g.y(n.box.y + (1 - appear) * 14); + n.rect.fill(n.ink ? mix(C.ink, '#26262a', on) : mix(C.paper, C.soft, on)); + n.rect.strokeWidth(1.2 + on * 0.8 + sel * 1.4); + n.rect.shadowBlur(on * 16 + sel * 10); + this.dirty = true; + } + + paintEdge(e) { + const { on, danger } = e.s; + const stroke = danger ? mix(mix(C.line, C.ink, on), C.danger, danger) : mix(C.line, C.ink, on); + e.arrow.stroke(stroke); e.arrow.fill(stroke); + e.arrow.strokeWidth(1.3 + on * 1.1); + e.label.opacity(on); e.label.fill(danger ? C.danger : C.ink); + e.packet.opacity(on); + e.packet.fill(danger > 0.5 ? C.danger : C.accent); + this.dirty = true; + } + + to(obj, vars, paint) { + if (this.reduced) { Object.assign(obj, Object.fromEntries(Object.entries(vars).filter(([k]) => k in obj))); paint(); return; } + this.tweens.push(gsap.to(obj, { ...vars, onUpdate: paint, overwrite: 'auto' })); + } + + applyStep(index, instant = false) { + const step = STEPS[index]; + for (const n of Object.values(this.nodes)) { + const target = step.nodes.includes(n.id) ? 1 : 0; + if (instant || this.reduced) { n.s.on = target; this.paintNode(n); } + else this.to(n.s, { on: target, duration: 0.55, ease: 'power2.out' }, () => this.paintNode(n)); + } + for (const e of Object.values(this.edges)) { + const active = step.edges.includes(e.id); + const danger = step.danger?.includes(e.id) ? 1 : 0; + if (this.lay.labelAt[e.id]) e.label.text(step.labels?.[e.id] ?? ''); + if (instant || this.reduced) { e.s.on = active ? 1 : 0; e.s.danger = danger; this.paintEdge(e); } + else { + this.to(e.s, { on: active ? 1 : 0, danger, duration: 0.5, ease: 'power2.out' }, () => this.paintEdge(e)); + } + if (active && !this.reduced) e.run.play(); else { e.run.pause(); e.packet.opacity(0); } + if (this.reduced && active) { const [x, y] = along(e.pts, 0.5); e.packet.position({ x, y }); e.packet.opacity(1); } + } + this.dirty = true; + } + + setStep(index) { + if (index === this.stepIndex && this.nodes) { /* still reapply: cheap, idempotent */ } + this.stepIndex = index; + this.applyStep(index); + } + + tweenSel(n, v, instant) { + if (instant || this.reduced) { n.s.sel = v; this.paintNode(n); return; } + this.to(n.s, { sel: v, duration: 0.35, ease: 'power2.out' }, () => this.paintNode(n)); + } + + select(id) { + if (this.selected && this.nodes[this.selected]) this.tweenSel(this.nodes[this.selected], 0); + this.selected = id; + if (id && this.nodes[id]) this.tweenSel(this.nodes[id], 1); + this.onSelect?.(id); + } + + /** Staggered entrance. Called once, when the diagram scrolls into view. */ + intro() { + if (this.introduced) return; + this.introduced = true; + const list = Object.values(this.nodes); + if (this.reduced) { list.forEach((n) => { n.s.appear = 1; this.paintNode(n); }); return; } + this.tweens.push(gsap.to(list.map((n) => n.s), { appear: 1, duration: 0.9, ease: 'expo.out', stagger: 0.07, onUpdate: () => list.forEach((n) => this.paintNode(n)), onComplete: () => { Object.values(this.nodes).forEach((n) => { n.s.appear = 1; this.paintNode(n); }); } })); + } + + destroy() { + gsap.ticker.remove(this.tick); + this.resizer.disconnect(); + this.tweens?.forEach((t) => t.kill()); + this.stage.destroy(); + } +} diff --git a/landing/src/arch/model.js b/landing/src/arch/model.js new file mode 100644 index 0000000..00c5498 --- /dev/null +++ b/landing/src/arch/model.js @@ -0,0 +1,89 @@ +// Architecture diagram data. Names and paths mirror the repository (packages/*, services/*, integrations/*, apps/extension). +// Roles and failure modes are taken from Docs/BOUND_Final_Architecture.md and the code. No node claims more than the repo does. + +export const NODES = { + site: { kind: 'untrusted', title: 'The website', sub: 'untrusted page', does: 'The dApp in your tab. Assume an attacker can control every script it serves, including its buttons, copy and any dialog it draws.', trust: 'Nothing. It is the thing being checked.', fails: 'It can show you anything. A page cannot be allowed to vouch for itself.' }, + wallet: { kind: 'user', title: 'Your wallet', sub: 'EIP-1193 provider', does: 'Holds your keys and shows its own prompt. BOUND never signs or approves for you; it only decides whether the request is passed on.', trust: 'Your own key and wallet. Out of scope for BOUND.', fails: 'Some wallets show an opaque hash for typed data, which is part of why a second opinion helps.' }, + hook: { kind: 'bound', title: 'In-page hook', sub: 'apps/extension', does: 'Patches request, send and sendAsync at document_start, freezes a copy of every value-moving request and takes a digest of it. The request is held, not blocked.', trust: 'Runs before page scripts, in the extension’s own isolated state.', fails: 'A provider reference the page saved before the hook ran bypasses it. BOUND reports that as “bypass possible” and never shows green.' }, + decoder: { kind: 'bound', title: 'Decoder', sub: 'packages/decoder', does: 'Turns calldata and typed data into addresses with roles: rights, destination, called, token. Reads approvals, permits, setApprovalForAll, Permit2 and EIP-7702 authorizations.', trust: 'Pure code. No network, no state.', fails: 'Unknown ABIs and unrecognised typed data (a Safe transaction, for example) become “opaque” and are capped at 65. It does not guess.' }, + policy: { kind: 'bound', title: 'Policy core', sub: 'packages/policy-core', does: 'evaluate() starts at 100 and caps the score for every address that is not trusted for its role. The result is green, amber, red, escalated, or grey when there is nothing to compare against.', trust: 'The evidence it is given: snapshot, drift, witnessed addresses.', fails: 'It checks who, not how much. A trusted contract with an unlimited allowance still scores green.' }, + review: { kind: 'ink', title: 'Review window', sub: 'extension UI', does: 'A window owned by the extension, outside the page. It shows the verdict and reasons. Only a click inside this window can continue or cancel the request.', trust: 'MV3 isolation: the page cannot read or write extension state.', fails: 'Unanswered for ten minutes, a request is handed to your wallet (cancelled for the firewall tier).' }, + ens: { kind: 'evidence', title: 'ENS root', sub: 'integrations/ens', does: 'A name whose record points at the current curator-signed snapshot. The reference lives in ENS, not in the site’s DNS.', trust: 'The curator’s ENS role (assumption A1).', fails: 'If that role is compromised, hostile addresses could be listed as trusted.' }, + swarm: { kind: 'evidence', title: 'Swarm', sub: 'integrations/swarm', does: 'Content-addressed storage for the snapshot bytes (and a safe-page fallback). Any gateway can serve them; the extension checks the digest.', trust: 'Nothing about the gateway: the bytes are verified.', fails: 'With no reachable gateway BOUND uses the cached snapshot until it expires, then goes grey.' }, + arkiv: { kind: 'evidence', title: 'Arkiv', sub: 'integrations/arkiv', does: 'Public, owner-filtered records the watcher writes: infrastructure drift and incident summaries for each site.', trust: 'Only entities written by the watcher’s owner are read.', fails: 'Records can go stale; the extension says when it is using a cached bundle.' }, + anon: { kind: 'evidence', title: 'Anon-RPC', sub: 'integrations/anon-rpc', does: 'A privacy-minded route for eligible chain reads, so checking an address does not tell an RPC provider which site you are on.', trust: 'Chain data, verified where possible.', fails: 'Live integration is still being verified.' }, + curator: { kind: 'producer', title: 'Curator', sub: 'services/curator', does: 'Compiles and signs per-chain snapshots of the addresses each site normally uses, publishes the bytes and writes the ENS root.', trust: 'Key separation and public snapshot diffs. Multi-party signing is future work.', fails: 'A coverage gap: sites the curator never lists have no snapshot, so they score grey.' }, + watcher: { kind: 'producer', title: 'Watcher', sub: 'services/watcher', does: 'Polls DNS over HTTPS, TLS certificates and hosting for each site and writes drift and incident records. Fast signals for registrar and DNS takeovers.', trust: 'Multiple resolvers; corroboration before a drift counts as strong.', fails: 'Coverage and CDN noise. Uncorroborated drift is treated more gently than corroborated drift.' }, +}; + +export const STEPS = [ + { id: 'ask', title: 'A page asks your wallet to act', text: 'Any website can call your wallet’s provider. On a compromised site the request is whatever the attacker wrote: an approval, a permit, a transaction.', nodes: ['site', 'wallet'], edges: ['direct'], labels: { direct: 'request, unchecked' }, proof: ['badger', 'ledger'] }, + { id: 'hold', title: 'BOUND holds the request', text: 'The extension’s hook sits in front of the provider. It freezes a copy of the request and records a digest, so what is reviewed is exactly what would be sent.', nodes: ['site', 'hook'], edges: ['site-hook'], labels: { 'site-hook': 'request' }, proof: [] }, + { id: 'decode', title: 'It reads what the request would do', text: 'The decoder turns raw calldata and signatures into addresses with roles. Shapes it does not recognise are scored low rather than guessed at.', nodes: ['hook', 'decoder'], edges: ['hook-decoder'], labels: { 'hook-decoder': 'bytes' }, proof: ['bybit'] }, + { id: 'evidence', title: 'It asks sources the page cannot edit', text: 'ENS names the current snapshot, Swarm serves its bytes, Arkiv holds the watcher’s drift records, and Anon-RPC reads the chain privately. None of it passes through the site.', nodes: ['ens', 'swarm', 'arkiv', 'anon', 'curator', 'watcher', 'policy'], edges: ['ens-policy', 'swarm-policy', 'arkiv-policy', 'anon-policy', 'curator-ens', 'curator-swarm', 'watcher-arkiv'], labels: { 'ens-policy': 'evidence' }, proof: ['curve', 'squarespace'] }, + { id: 'score', title: 'It scores the request', text: 'Start at 100. Every address that is not trusted for its role lowers the cap. Missing evidence gives grey, which is never shown as safe.', nodes: ['decoder', 'policy'], edges: ['decoder-policy'], labels: { 'decoder-policy': 'roles' }, proof: ['badger'] }, + { id: 'decide', title: 'You decide, outside the page', text: 'The verdict appears in a window the page cannot draw or click. Continue forwards the same request to your wallet; the firewall tier needs a typed confirmation. A page that kept its own provider can still skip all of this.', nodes: ['policy', 'review', 'wallet'], edges: ['policy-review', 'review-wallet', 'direct'], labels: { 'policy-review': 'verdict', 'review-wallet': 'you decide', direct: 'path BOUND cannot see' }, danger: ['direct'], proof: ['bybit'] }, +]; + +const ZONE_LABELS = { page: 'The page · untrusted', bound: 'BOUND · extension, isolated from the page', evidence: 'Evidence · outside the page' }; +const mid = (b) => [b.x + b.w / 2, b.y + b.h / 2]; +const top = (b) => [b.x + b.w / 2, b.y]; +const bottom = (b) => [b.x + b.w / 2, b.y + b.h]; +const left = (b) => [b.x, b.y + b.h / 2]; +const right = (b) => [b.x + b.w, b.y + b.h / 2]; + +function wide() { + const W = 680, colX = [16, 188, 360, 532], w = 132, h = 58, rowY = [44, 176, 336, 484]; + const at = (c, r) => ({ x: colX[c], y: rowY[r], w, h }); + const b = { site: at(0, 0), wallet: at(3, 0), hook: at(0, 1), decoder: at(1, 1), policy: at(2, 1), review: at(3, 1), ens: at(0, 2), swarm: at(1, 2), arkiv: at(2, 2), anon: at(3, 2), curator: at(0, 3), watcher: at(2, 3) }; + const bus = 300, polBottom = bottom(b.policy); + const viaBus = (n) => [top(b[n]), [top(b[n])[0], bus], [polBottom[0], bus], polBottom]; + const e = { + direct: [right(b.site), left(b.wallet)], + 'site-hook': [bottom(b.site), top(b.hook)], + 'hook-decoder': [right(b.hook), left(b.decoder)], + 'decoder-policy': [right(b.decoder), left(b.policy)], + 'policy-review': [right(b.policy), left(b.review)], + 'review-wallet': [top(b.review), bottom(b.wallet)], + 'ens-policy': viaBus('ens'), 'swarm-policy': viaBus('swarm'), 'anon-policy': viaBus('anon'), + 'arkiv-policy': [top(b.arkiv), polBottom], + 'curator-ens': [top(b.curator), bottom(b.ens)], + 'curator-swarm': [right(b.curator), [bottom(b.swarm)[0], right(b.curator)[1]], bottom(b.swarm)], + 'watcher-arkiv': [top(b.watcher), bottom(b.arkiv)], + }; + // Label anchors sit beside or above the line (x, y of the text's top-left). + const labelAt = { direct: [292, 52], 'site-hook': [mid(b.site)[0] + 8, 118], 'hook-decoder': [150, 160], 'decoder-policy': [322, 160], 'policy-review': [494, 160], 'review-wallet': [mid(b.review)[0] + 8, 118], 'ens-policy': [250, 284] }; + const zones = [ + { id: 'page', x: 0, y: 8, w: W, h: 104, label: ZONE_LABELS.page }, + { id: 'bound', x: 0, y: 128, w: W, h: 124, label: ZONE_LABELS.bound, accent: true }, + { id: 'evidence', x: 0, y: 312, w: W, h: 258, label: ZONE_LABELS.evidence }, + ]; + return { mode: 'wide', width: W, height: 584, boxes: b, edges: e, labelAt, zones, node: { w, h } }; +} + +function narrow() { + const W = 340, x = 30, w = 280, h = 50; + const flowY = { site: 34, hook: 138, decoder: 216, policy: 294, review: 372, wallet: 470 }; + const b = {}; + Object.entries(flowY).forEach(([id, y]) => { b[id] = { x, y, w, h }; }); + const evidence = ['swarm', 'curator', 'ens', 'watcher', 'arkiv', 'anon']; + evidence.forEach((id, i) => { b[id] = { x, y: 584 + i * 78, w, h }; }); + const R = 324, L = 14; + const toPolicy = (n) => [right(b[n]), [R, right(b[n])[1]], [R, right(b.policy)[1]], right(b.policy)]; + const e = { + direct: [left(b.site), [L, left(b.site)[1]], [L, left(b.wallet)[1]], left(b.wallet)], + 'site-hook': [bottom(b.site), top(b.hook)], 'hook-decoder': [bottom(b.hook), top(b.decoder)], 'decoder-policy': [bottom(b.decoder), top(b.policy)], + 'policy-review': [bottom(b.policy), top(b.review)], 'review-wallet': [bottom(b.review), top(b.wallet)], + 'ens-policy': toPolicy('ens'), 'swarm-policy': toPolicy('swarm'), 'arkiv-policy': toPolicy('arkiv'), 'anon-policy': toPolicy('anon'), + 'curator-ens': [bottom(b.curator), top(b.ens)], 'curator-swarm': [top(b.curator), bottom(b.swarm)], 'watcher-arkiv': [bottom(b.watcher), top(b.arkiv)], + }; + const zones = [ + { id: 'page', x: 4, y: 6, w: 332, h: 90, label: ZONE_LABELS.page }, + { id: 'bound', x: 4, y: 108, w: 332, h: 328, label: ZONE_LABELS.bound, accent: true }, + { id: 'evidence', x: 4, y: 548, w: 332, h: 490, label: ZONE_LABELS.evidence }, + ]; + return { mode: 'narrow', width: W, height: 1052, boxes: b, edges: e, labelAt: {}, zones, node: { w, h } }; +} + +export const layoutFor = (mode) => (mode === 'narrow' ? narrow() : wide()); +export const EDGE_IDS = Object.keys(wide().edges); diff --git a/landing/src/closing/Closing.jsx b/landing/src/closing/Closing.jsx new file mode 100644 index 0000000..9b25bf5 --- /dev/null +++ b/landing/src/closing/Closing.jsx @@ -0,0 +1,33 @@ +import React, { useRef } from 'react'; +import gsap from 'gsap'; +import { ScrollTrigger } from 'gsap/ScrollTrigger'; +import { useGSAP } from '@gsap/react'; +import { Words } from '../lib/shared.jsx'; +import './closing.css'; + +gsap.registerPlugin(ScrollTrigger, useGSAP); + +export default function Closing() { + const root = useRef(null); + + useGSAP(() => { + const q = gsap.utils.selector(root); + const mm = gsap.matchMedia(); + mm.add('(prefers-reduced-motion: no-preference)', () => { + gsap.fromTo(q('.rv-w'), { opacity: 0, y: 36 }, { opacity: 1, y: 0, ease: 'none', stagger: 0.12, scrollTrigger: { trigger: root.current, start: 'top 75%', end: 'center 50%', scrub: 0.6 } }); + gsap.fromTo(q('.cl-em'), { backgroundSize: '0% 38%' }, { backgroundSize: '100% 38%', ease: 'none', scrollTrigger: { trigger: root.current, start: 'top 55%', end: 'center 40%', scrub: 0.6 } }); + gsap.from(q('.cl-actions > *'), { autoAlpha: 0, y: 20, duration: 0.8, ease: 'expo.out', stagger: 0.1, scrollTrigger: { trigger: q('.cl-actions')[0], start: 'top 92%', once: true } }); + }); + document.fonts?.ready.then(() => ScrollTrigger.refresh()); + }, { scope: root }); + + return
+
+


+
+ Download extension + Back to the beginning +
+
+
; +} diff --git a/landing/src/closing/closing.css b/landing/src/closing/closing.css new file mode 100644 index 0000000..771549f --- /dev/null +++ b/landing/src/closing/closing.css @@ -0,0 +1,15 @@ +/* ─── Closing question ─── */ +.cl { background: var(--paper, #fff); color: var(--ink, #0b0b0c); font-family: var(--serif, "Instrument Serif", Georgia, serif); } +.cl-inner { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: clamp(96px, 18vh, 220px) 0; } +.cl h2 { margin: 0; font-size: clamp(54px, 10vw, 168px); font-weight: 400; line-height: 0.92; letter-spacing: -0.035em; } +.cl h2 em { font-style: italic; } +.cl-em { background: linear-gradient(var(--accent, #ffd500), var(--accent, #ffd500)) no-repeat 0 90% / 100% 38%; -webkit-box-decoration-break: clone; box-decoration-break: clone; } +.cl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: clamp(36px, 6vh, 72px); } +.cl-primary { display: inline-flex; align-items: center; gap: 14px; height: 56px; padding: 0 28px; border-radius: 999px; background: var(--ink, #0b0b0c); color: #fff; font-size: 21px; box-shadow: 0 18px 40px -18px rgba(11, 11, 12, 0.55); transition: transform 0.3s cubic-bezier(.2,.7,.2,1), background 0.2s; } +.cl-primary:hover { transform: translateY(-2px); background: #26262a; } +.cl-secondary { font-size: 21px; padding-bottom: 3px; background: linear-gradient(var(--accent, #ffd500), var(--accent, #ffd500)) no-repeat 0 100% / 100% 2px; } +.cl-secondary span { display: inline-block; transition: transform 0.3s; } +.cl-secondary:hover span { transform: translateY(-4px); } +.cl a:focus-visible { outline: 2px solid var(--ink, #0b0b0c); outline-offset: 4px; border-radius: 6px; } + +@media (max-width: 900px) { .cl-inner { width: calc(100% - 32px); padding: 96px 0 104px; } } diff --git a/landing/src/demo/Demo.jsx b/landing/src/demo/Demo.jsx new file mode 100644 index 0000000..779ac74 --- /dev/null +++ b/landing/src/demo/Demo.jsx @@ -0,0 +1,59 @@ +import React, { useRef } from 'react'; +import gsap from 'gsap'; +import { ScrollTrigger } from 'gsap/ScrollTrigger'; +import { useGSAP } from '@gsap/react'; +import './demo.css'; + +gsap.registerPlugin(ScrollTrigger, useGSAP); + +// A YouTube id comes from VITE_DEMO_VIDEO_ID. Without a valid one the frame says the video is coming, and nothing fake is shown. +const rawId = import.meta.env.VITE_DEMO_VIDEO_ID?.trim(); +const videoId = rawId && /^[A-Za-z0-9_-]{11}$/.test(rawId) ? rawId : null; + +export default function Demo() { + const root = useRef(null); + + useGSAP(() => { + const q = gsap.utils.selector(root); + const mm = gsap.matchMedia(); + mm.add('(prefers-reduced-motion: no-preference)', () => { + gsap.from(q('.dm-head > *'), { autoAlpha: 0, y: 24, duration: 0.9, ease: 'expo.out', stagger: 0.1, scrollTrigger: { trigger: q('.dm-head')[0], start: 'top 85%', once: true } }); + // The frame grows into place as it arrives. + gsap.fromTo(q('.dm-frame'), { scale: 0.9, y: 50, autoAlpha: 0.4 }, { scale: 1, y: 0, autoAlpha: 1, ease: 'none', scrollTrigger: { trigger: q('.dm-frame')[0], start: 'top 95%', end: 'top 45%', scrub: 0.6 } }); + gsap.from(q('.dm-steps li'), { autoAlpha: 0, x: -24, duration: 0.8, ease: 'expo.out', stagger: 0.12, scrollTrigger: { trigger: q('.dm-install')[0], start: 'top 82%', once: true } }); + }); + document.fonts?.ready.then(() => ScrollTrigger.refresh()); + }, { scope: root }); + + return
+
+
+

See the full
story unfold.

+

A closer look at the problem, the proposed approach, and the experience BOUND is working towards.

+
+ +
+ {videoId + ?