Method
How a replaycounts.
Everything the engine does, in the order it does it. The contract follows the same text.
Nine rules
- 01Recipient is on the blocklistThe recipient is on the blocklist. The blocklist always wins over the allowlist; one address cannot be on both.
- 02Recipient is not on the allowlistThe allowlist is not empty and the recipient is not on it. An empty allowlist allows anyone.
- 03Token is not on the token allowlistThe token allowlist is not empty and the token is not on it. Native HYPE is the zero address.
- 04Sent outside the allowed hours (UTC)The transfer's UTC hour is outside [from, until). From 22 until 6 wraps past midnight; from = until means any hour.
- 05Sent on a day that is not allowed (UTC)The UTC weekday is not selected. No day selected means every day.
- 06Too soon after the previous allowed transferLess time than the cooldown has passed since the last ALLOWED transfer, of any token.
- 07Amount is over the per-transfer capThe amount is larger than the per-transfer cap for that token.
- 08Rolling 24-hour total would pass the daily capAllowed amounts of that token in the 86,400 seconds before (excluding exactly 86,400 s ago) plus this amount exceed the daily cap.
- 09Rolling 7-day total would pass the weekly capSame over 604,800 seconds and the weekly cap.
Every rule is checked. The reason shown first is the first failing rule in this order; the full list of failing rules is kept too (a bit mask, bit = code − 1).
What counts as blocked
Under each rule set, a transfer that fails is treated as blocked: it does not count toward later daily or weekly totals, or the cooldown. So rule set B is judged as if it had been in force from the first transfer.
The history is replayed oldest first; transfers with the same second keep their input order. Caps are in token units per token: no prices, no dollar totals. A token without a cap row has no caps.
Data sources
- Sample data: an invented three-week history, always labelled.
- Files: CSV or JSON read in your browser with the File API; nothing is uploaded. Newest 400 rows are replayed.
- Elysium wallets: the explorer's Etherscan-style API (txlist for HYPE sends with value, tokentx for ERC-20 transfers sent by the wallet), newest 500 of each, then the newest 400 together. The newest HYPE send and the newest token transfer are re-read from the Elysium RPC (transaction and receipt) and shown as a match or mismatch.
- Tokens named by address: HYPE (native), USDC 0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65, WHYPE 0xba876237b0f021a6c6d852d6c26e107997cc5e81. Every other symbol is what its contract reports, marked unverified.
Parity with the contract
EvidisPolicyBook.replayWith(policy, history) is the same algorithm in Solidity. The repository holds one fixture (sample history, seven rule sets covering every rule) that the TypeScript tests write and the contract tests must reproduce bit for bit. On the replay page, your own history can be run through the contract with eth_call (at most 400 transfers).
EvidisPolicyBook is written and tested but not deployed yet. Until it is, the parity check runs this build's compiled contract code through a read-only eth_call.
The policy book
- A book has one owner (two-step hand-over), optional editors and a notice period (0 to 30 days) set when it is created.
- Owner or editors propose versions. A version stores the ABI-encoded rule set and its keccak256 hash, the proposer, the time and an optional note link. Versions are never edited.
- Only the owner activates a proposed version, and only after the notice period; the version it replaces becomes superseded. The owner can record the replay report hash they looked at.
- A proposer or the owner can withdraw a version that was never activated.
- Publishing limits: 64 allowed and 64 blocked recipients, 32 tokens, 32 caps, a 512-character note.
- No payable function, no token calls, no admin of the contract, no upgrade path.
Limits
- A replay is a preview. It never stops, delays or signs a transfer.
- Wallet history covers top-level HYPE sends and ERC-20 Transfer events sent by the wallet, newest 400. HYPE moved by internal contract calls is not covered.
- Caps are in token units per token. There is no dollar conversion and no price feed.
- Times are UTC. The explorer's timestamps are used as given; the newest transfer of each kind is re-read from the RPC.
- A token's symbol is what its contract reports. Only HYPE, USDC and WHYPE are named by address.
- The contract is new and has had no outside security review. It holds no funds by design.
Planned
- ConceptEnforcement module. A wallet module or guard that checks the book's active version before a transfer goes out. Concept only.
- ConceptAlerts on new versions. Notify the people who depend on a book when a version is proposed, before its notice period ends. Concept only.
- Concept$EVIDIS utility. Not defined. If a paid feature ever exists, $EVIDIS may be used for it. Today nothing needs the token.