{"id":"XE-0280","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":124,"title":"web/dao: DAO tool builds state-chain blocks with a >2^53 timestamp; ~3 in 4 submissions rejected","area":"sdk-docs-web","claimed_tier":"medium","assessed_tier":"minor","verdict":"valid","duplicate_of":null,"tracked":true,"internal_ref":"#1156","internal_url":"https://github.com/xeprotocol/core/issues/1156","status":"awarded","closed_reason":null,"github_state":"","disclosed_at":"2026-11-07T15:59:46.210285+00:00","award_xe":100000000,"award_approved":true,"paid_ref":"","created_at":"2026-11-03T01:47:33.428273+00:00","updated_at":"2026-11-10T11:10:09.962252+00:00","source_created_at":null,"told_at":null,"status_changed_at":"2026-11-07T15:59:50.168597+00:00","url":"https://bounty.xe.network/XE-0280","body":"Suggested tier: **Medium**\r\n\r\n## Target\r\n\r\n- Pinned commit: `978785929bc17a2f4ab30c383e5fc9cf4d634512` (master, `release: testnet-0005 recovery phrase v2`)\r\n- Web tool: `web/assets/dao.js` (DAO tool); node: public `https://ldn.core.test.network`\r\n\r\n## Summary\r\n\r\n`web/assets/dao.js:229` builds `timestamp: Date.now() * 1_000_000` as a JS Number (>2^53, so rounded to a multiple of 64 ns); `web/assets/statechain-block.js` hashes `BigInt(timestamp)` (the rounded double); `dao.js:378-384` submits `timestamp: Number(state.draft.timestamp)` via `JSON.stringify` (shortest round-trip decimal, up to 128 ns off). Go parses the decimal exactly (`statechain/encoding.go:58-61`) and `VerifyBlockHash` (`statechain/crypto.go:42-51`) rejects with \"hash mismatch\". Sibling tools use `BigInt(Date.now()) * 1_000_000n` correctly — this is the outlier.\r\n\r\n## Impact\r\n\r\nEvery DAO member using the web tool hits it; ~75% of submissions are rejected by the node. Not by design, not UI-only (the node rejects the submission).\r\n\r\n## Reproduction (local PoC)\r\n\r\n2000 consecutive `Date.now()` values: **1500 mismatch / 500 exact = 75.0%**, max difference 128 ns; mismatch iff `ms mod 4 != 0`. E.g. `ms=1793634861873`: JSON emits `1793634861873000000`, the tool hashes `1793634861872999936` — 64 ns apart. JS `hashBlock` over the hashed timestamp: `1ab2427a…`; over the submitted timestamp: `35ed2d25…`. Control: Go `HashBlock` over the hashed timestamp equals the JS hash exactly (`1ab2427a…`), proving the JS and Go canonical encodings agree and only the timestamp differs. Node side: `VerifyBlockHash(submitted block) -> hash mismatch: got 1ab2427aa38f5b92b47f962e6ddab207d57305785923697fff1deb3a11ff90ab, want 35ed2d25fb354e77f6654b808b6d7747a4e709fbf0d9cefe283b8c116fdbf008`.\r\n\r\n## Live confirmation (public node `https://ldn.core.test.network`)\r\n\r\nAttempt 1 died on transport (egress proxy closed the socket); attempt 2 paired JSONs: probe → `hash mismatch: got 7b9fea78…, want e6f24569…`, control → `no signatures`. Both rejected, nothing landed. (Attempt-2 script stdout was not saved — record-keeping gap, not an evidence gap.)\r\n\r\n## Duplicate check\r\n\r\nChecked against the public bounty board (re-pulled 2026-11-03). No ticket duplicates this finding. Note: XE-0062 (web DAO tool signs a hash over the op value as typed then submits a different byte string) is a sibling defect in the same tool, different field.\r\n\r\n## Suggested fix\r\n\r\nBuild the timestamp as `BigInt(Date.now()) * 1_000_000n` throughout (as the sibling tools do) so the hashed value and the submitted value are identical.\r\n\r\n## Reporter\r\n\r\nFiled via the XE bounty desk (GitHub sign-in). Full PoC files available on request.","patch_refs":[{"id":245,"repo":"xeprotocol/xe","kind":"pr","ref":"251","title":"","url":"https://github.com/xeprotocol/xe/pull/251","note":"","state":"","author":"","added_by":"token:5","created_at":"2026-11-03T18:36:25.604892+00:00"}],"thread":[]}