voidcashdocs

Threat model

The attacks voidcash is designed against, what stops each one, what risk remains, and the limits the design accepts.

Inside the vault, proofs hide who pays whom and how much. The edges stay public: a shield shows the address, the asset and the amount that went in, and an exit shows the address, the asset and the amount that came out. For each attack below: what the attacker tries, what stops them in the code, what is left, and the tests in contracts/test that check it.

For who holds which power, see the Trust model.

Attacks and defences

Forged proof

  • Tries: to prove a spend that the rules forbid: value from nothing, a note that is not in the tree, a note that belongs to someone else, or a negative output that balances a larger one.
  • Stopped by: the circuit and the vault together.
    • The circuit checks that each input note is in the tree under the proof's root, that its owner key is H(nk, wallet key), that value is conserved in each pair (the main pair's inputs equal its outputs plus the exit, the HYPE fee note equals its change plus the fee), that the pad output holds zero, and that every amount fits in 120 bits, so no sum wraps around the field. A token note's commitment includes its token, so it cannot pass as HYPE or as another token, and value cannot move between the two pairs. A zero-value input is a dummy: it skips the membership check but still has its own nullifier.
    • The vault computes every public input itself, refuses a root it does not know, a value outside the field and an amount of 2^120 or more, and takes what leaves out of that asset's backing (totalBacking, or the token's backing), so a spend above what the notes of that asset hold reverts.
    • The verifier is the pinned Barretenberg 5.2.1 build for this circuit; a test fails if its source changes or lacks the small-subgroup opening.
  • Residual risk: a soundness flaw in the circuit, Noir, Barretenberg or the cryptography would let an attacker take HYPE or tokens from the vault. This is the largest risk in the system. An exit above the large-exit threshold still waits 24 hours, a token's exits beyond its window cap wait too, the guardian can pause, and an upgrade can replace the verifier while keeping every note.
  • Tests: the circuit's test_main_pair_not_conserved, test_fee_pair_not_conserved, test_value_cannot_move_between_pairs, test_token_cannot_become_hype, test_token_note_as_hype_fails_membership, test_token_exit_claiming_hype, test_pad_carries_no_value, test_negative_output_via_field_wrap, test_other_wallet_cannot_spend_main_note, test_unknown_root; TransactE2E with a real proof; TransactVerifier; test_invalidProofRejected, test_unknownRootRejected, test_valuesOutsideTheFieldRejected, test_exitAboveTheBackingReverts.

Double spend

  • Tries: to spend the same note twice: in two transactions, twice in one transaction, or in two operations of one bundle.
  • Stopped by: nullifiers. A note's nullifier is H(nk, commitment, leaf index), so two notes with the same contents still have different nullifiers, and the circuit forces the right one. The vault records every nullifier and refuses one it has seen, and refuses a transaction in which any two of its three nullifiers are equal; the circuit requires them distinct as well. In a bundle, the first operation's validation records the nullifiers before the next one is validated.
  • Residual risk: none beyond the proof system's soundness.
  • Tests: the circuit's test_same_note_twice; test_doubleSpendRejected, test_duplicateNullifierRejected, test_realProofCannotBeReplayed, test_sharedNullifierInOneBundleRejected, testFuzz_spentNullifierRejected.

Front-running and changing the recipient

  • Tries: to take a transaction from the mempool, a bundler or a relayer and change where the HYPE goes, raise the gas fee, or submit it first to profit from it.
  • Stopped by: the proof. The recipient, the submitter allowed (ext.caller), the gas fee, the minimum call gas and the four ciphertexts are hashed into a public input, the amounts and the asset leaving are public inputs, and the owner's Spend signature covers them all. Changing any field invalidates the proof. A proof that names a submitter can be sent only by that address; a proof for the ERC-4337 path names the vault and cannot be sent directly. Submitting someone else's transaction unchanged gives the same result, paid to the same recipient.
  • Residual risk: none on content. Elysium orders transactions by priority fee, so someone can still get ahead of you, but only to make their own transaction land first.
  • Tests: test_proofBoundToRecipient, test_proofBoundToExitAmount, test_proofBoundToExitAsset, test_proofBoundToFeeAmount, test_proofBoundToCiphertexts, test_extDataHashBindsEveryField, test_callerRestriction, test_accountProofCannotBeSubmittedDirectly, test_vaultAsCallerRefusedForDirectSubmit.

Replay on another chain, vault or site

  • Tries: to reuse a proof, a spend signature or a key registration somewhere it was not meant for.
  • Stopped by:
    • Spends. The vault's EIP-712 domain separator (name voidcash, version 1, chain ID, the vault's address) is a public input the vault supplies, and the wallet's signature is checked against it in the circuit. A proof made for one vault or chain fails on any other.
    • Keys. The activation message names the site, the chain ID and the vault, so the same wallet has different keys on every vault and chain.
    • Registrations. registerFor takes an EIP-712 signature with a per-owner nonce and a deadline.
  • Residual risk: none known.
  • Tests: test_proofBoundToVault, test_nameIsTheEip712DomainName, testFuzz_registerForRejectsAnotherSigner, testFuzz_registerForRejectsChangedKeys, testFuzz_registerForRejectsAnExpiredSignature.

Stolen keys and a leaked nullifier key

  • Tries: to use your keys, or the signature they come from, to spend or to watch your notes; or to get that signature from a phishing site.
  • Stopped by: the owner key H(nk, wallet key) commits to your wallet's public key, and the circuit requires a fresh Spend signature by that wallet for every spend. The nullifier key, the viewing key and the activation signature can show your notes, but cannot move them. The activation message is a Sign-In with Ethereum message naming voidcash.io, so wallets warn when another site asks for it. Payment links derive from a second signature.
  • Residual risk:
    • The activation signature reveals every note you hold and will hold, for good: the keys are deterministic and cannot be rotated for that wallet. Moving your notes to a new wallet restores privacy for what you do next.
    • The nullifier key alone lets someone recognise your spends: the commitments and leaf indexes are public, so they can compute your nullifiers and watch for them.
    • Both of a sender's signatures let someone take back that sender's unclaimed payment links.
    • Your wallet's key gives everything: whoever holds it derives your keys and signs spends.
  • Tests: the circuit's test_wrong_nullifier_key, test_other_wallet_cannot_spend_main_note; TransactE2E signs with a real wallet key.

Griefing the bundler or the EntryPoint deposit

  • Tries: to make the vault's EntryPoint deposit, or the bundler's own HYPE, pay for operations that pay nothing.
  • Stopped by:
    • An invalid proof fails validation without writing anything and without touching the deposit.
    • Each operation pays its own gas. The gas fee is bound to the proof, must cover the operation's maximum cost (all gas limits times the maximum fee), and goes into the deposit in the same validation. Gas limits or prices inflated past it are refused, so the deposit left by earlier operations never pays for a later one.
    • What is left in the deposit, whoever put it there, goes to the fee collector at the next sweep. Nobody can be paid from notes for gas except through the EntryPoint.
    • Execution cannot be starved: the proof fixes a minimum call gas limit. A recipient that refuses the HYPE, or burns the gas, does not make the operation fail: its exit stays for releaseExit.
    • voidcash's bundler admits only the vault's operations, puts one in each bundle, refuses a zero gas price, simulates each bundle before sending it, and limits sends per client address.
  • Residual risk: someone who spends their own note twice at once, through the bundler and through a direct call, can make one bundle fail on-chain, at the cost of a fresh valid proof each time; the bundler pays that bundle's gas. The per-address limit caps the rate.
  • Tests: test_badProofFailsValidationWithoutWriting, test_badProofCannotDrawOnTheDeposit, test_revertingVerifierFailsValidationWithoutWriting, test_gasFeeBelowMaxCostRejected, test_inflatedPreVerificationGasRejectedUnlessCovered, test_inflatedVerificationGasRejectedUnlessCovered, test_inflatedCallGasAndPriceRejected, test_vaultNeverPaysSomeoneElsesGas, testFuzz_bundleNeverDrawsOnAnEarlierDeposit, test_thirdPartyDepositGoesToTheCollector, test_starvedCallGasRejected, test_refusingRecipientKeepsTheExit, test_gasBurningRecipientKeepsTheExit, test_userOpGasFeeGoesOnlyToTheDepositAndTheCollector.

Censorship and stale proofs

  • Tries: to keep your transaction out: a bundler that refuses it, a sequencer that leaves it out, or someone who fills the tree with new notes so the root your proof uses drops out of the vault's history.
  • Stopped by: any other route in. The SDK can submit an operation to the EntryPoint from a wallet you choose, and the vault's transact can be called from any address that pays its own gas. Against the sequencer, Elysium's delayed inbox on HyperEVM forces inclusion.
  • Residual risk: a direct call reveals the address that pays gas. The vault accepts its 64 most recent roots, and every shield or spend adds one, so 64 insertions after you read the root make your proof stale. Nothing is lost: the transaction fails before it writes anything, and you prove it again. A tree that fills up rolls over to a new one, and its final root stays valid for good.
  • Tests: test_unknownRootRejected, test_rootHistory, test_fullTreeRollsOverAndKeepsFinalRoot.

Malicious RPC node

  • Tries: to deceive the app with false reads: hidden events, a wrong balance, a wrong root, or someone else's keys for an address you pay.
  • Stopped by: the vault, for anything that reaches the chain: it computes the public inputs itself and rejects a proof on a root it does not know. The app checks the note tree it rebuilds against the vault's isKnownRoot.
  • Residual risk: the app reads a recipient's registered keys through the node, and a node that answered with keys of its own would receive a private send to that address. Private addresses and payment links carry their keys in the link and do not depend on that read. A node also sees your IP address, your address when you activate, and the addresses you look up.

Lying indexer

  • Tries: to hide or alter notes, or to link users to their notes.
  • Stopped by: the same event ranges for everyone, with no per-user query, and the root check: on a mismatch, or when the indexer is down, the app reads the chain directly.
  • Residual risk: the root check covers commitments only. An indexer that altered a note's ciphertext, or dropped NullifierSpent or Shielded events, would pass it: the app would miss a note or show a spent one. Funds are not at risk, and reading from the chain gives the right answer. The indexer sees your IP address and when you sync. A swap's note has an empty ciphertext, so the app checks any such note with no swap events against the chain, the 20 newest blocks of them per scan.

Notes written to hurt

  • Tries: to stop a wallet's scan, or to make it show something false. Anyone can write a note to a public view key, with any bytes, for 1 wei.
  • Stopped by: the scan tries each note and drops what does not add up: bytes that do not decrypt, values outside the field, and any note whose commitment does not match what it claims. An empty ciphertext is nobody's note. A settled swap paid to your key shows as received, never as a refund of yours.
  • Residual risk: each such note costs your device one attempt to decrypt it, and takes one leaf in the tree.

Large-exit drain

  • Tries: to take a large amount of HYPE or of a token out at once, through a stolen key, a flaw, or by passing an exit off as a gas fee.
  • Stopped by:
    • The hold. An exit that pays out more than largeExitThreshold (1,000 HYPE at launch; the admin can set it between 1 and 1,000,000 HYPE) waits LARGE_EXIT_DELAY, 24 hours. Meanwhile the guardian can stop it, and a pause stops every payout. The test is on the net payout, after the exit fee.
    • A token's own limits. A token exit waits 24 hours when its net payout is above the token's threshold (5,000,000 VOID for VOID), or when it would take the exits paid at once in the current 24-hour window above the token's cap (25,000,000 VOID). Held exits do not count toward the window. Private sales through the terminal are not bound by these limits: what a sale brings in is HYPE, which leaves only through an exit and its hold, and the guardian's swap pause stops sales.
    • A ceiling on the gas fee. A direct transact refuses any gas fee, and on the ERC-4337 path it is at most maxGasFee, set by the admin between 0.005 and 0.5 HYPE (0.05 HYPE from the upgrade to v3, which sets it in its own call: there is no default, and with none set every operation is refused). Whoever submits an operation sets its gas fields and can have all of the fee paid to themselves as gas, so the ceiling is the limit on what can leave without the exit fee and the hold: 0.05 HYPE per operation at that setting. The exit fee saved on that is 0.0005 HYPE, about what the operation costs in real gas at Elysium's floor of 0.1 gwei. A token exit must take exactly its gas fee from the HYPE fee note, so it cannot carry a HYPE exit with it.
    • Alerts. The keeper raises an alert on every held exit, on any exit above 5% of the HYPE in the vault or of a token's backing, and when the guardian stops or resumes an exit.
  • Residual risk: a HYPE exit at or below the threshold is paid at once, and HYPE has no limit per period, so a drain split into many exits below the threshold is not held. A token's window is fixed, not sliding, so a full cap can be paid at the end of one window and another at the start of the next. A pause stops what follows; it cannot recall what was already paid. A stopped exit stays reserved until the guardian resumes it or an upgrade decides.
  • Tests: test_directLargeExitIsHeld, test_largeExitIsHeldThenReleased, test_holdBoundaryIsTheNetPayout, test_stoppedExitIsNotPayableUntilResumed, test_exitStoppedBeforeExecutionIsNotPaid, test_pauseStopsEveryPayout, test_thresholdChangeDoesNotReleaseAHeldExit, test_gasFeeCannotSkipTheLargeExitHold, test_gasFeeCannotSkipTheExitFee, invariant_heldExitsNeverPaidBeforeTheirTime, invariant_stoppedExitsNeverPaid, invariant_directGasFeesNeverAccepted; for tokens test_tokenExitAboveTheThresholdIsHeld, test_windowCapHoldsThenResets, test_capEqualToThresholdHoldsTheSecondExit, test_guardianStopsAndResumesATokenExit, test_tokenExitStoppedBeforeExecutionIsNotPaid, test_pauseStopsTokenSpendsAndPayouts, test_tokenExitWithAnExtraHypeExitRejected, invariant_tokenWindowWithinItsCap.

Sandwiching the fee collector

  • Tries: to make the fee collector buy VOID at a bad price, by trading before and after its buys, by pushing the price and adding liquidity in the same transaction as collect, or by pointing it at a decoy pool, token or oracle.
  • Stopped by:
    • A price the caller cannot move in one transaction. Each buy is priced from Volta's 10-minute TWAP. A swap makes Volta's hook record the tick it started from, so a price pushed in the same transaction or block does not move the average; holding a pushed price for longer moves it slowly, against arbitrage. A buy must get at least the VOID the TWAP price gives after the pool's swap fee, less 1% (MAX_SLIPPAGE_BPS), or it is halved, over up to 8 sizes, and otherwise not made.
    • No buying into a push. While VOID trades dearer than the TWAP by more than 50 ticks, about 0.5% (MAX_DEVIATION_TICKS), there is no buy.
    • Fixed caps. At most 0.5 HYPE per buy (MAX_BUY), one buy every 12 seconds, and 10 HYPE per 24-hour window (WINDOW_CAP). The size does not depend on the pool's liquidity, so liquidity added for the call changes nothing, and if the TWAP itself were moved the loss is bounded by these caps.
    • A pause. The collector's guardian can stop buying (setBuyingPaused); the HYPE set aside waits, and the team's half is still paid.
    • The caller earns nothing by calling often: only a call that bought is refunded its gas, at no more than twice the base fee and at most 0.5% of what it spent.
    • Only VOID's pool and Volta's oracle. The collector accepts only the pool Volta recorded for VOID, on the PoolManager Volta uses, for a token Volta launched, and only the oracle Volta's PositionManager names. Any other key has another pool id.
  • The previous collector. The first fee collector, 0x1456…4991, sized each buy from the pool's liquidity and took its minimum out from the spot price, both read in the calling transaction. A caller could push the price, add liquidity around it and call collect, so that it spent its whole burn half at the pushed price. This was confirmed on a fork of Elysium: with 10 HYPE waiting to burn, the collector could lose up to 6.7 HYPE. It was replaced on 24 November 2026 by FeeCollectorV2 (0x260e5A151ccC5E4Ff57ffCFb3f4a56F83f823020), and the vault was switched to it in transaction 0xeb20c0f1…f626. The chain shows it was never used that way: the previous collector made 29 buys, 3.13 HYPE in all, the largest 0.59 HYPE, and each was a direct call with one swap and no liquidity change.
  • Residual risk: a buy can fill up to 1% below the TWAP price after the fee. Whoever holds a pushed price long enough to move the TWAP pays arbitrage for it, and can make the collector buy at that price with at most 0.5 HYPE per buy and 10 HYPE per 24 hours, until the guardian pauses buying. HYPE that does not fit waits in the collector for a later call.
  • Tests: on a fork of Elysium, against the live pool and oracle, test_twapIgnoresASameTransactionPush, test_buysAtMostMaxBuyAtTheTwapPrice, test_windowCapsTheSpend, test_noBuyWhileVoidIsDearerThanTheTwap, test_pauseStopsBuying, and test_attackDoesNotPayWith10Hype and test_attackDoesNotPayWith50Hype: the attack above, a push of 0% to 29% in the square-root price with liquidity added for the call, never leaves the attacker a profit, and at most one MAX_BUY is spent. Unit tests: test_noBuyWithoutATwap, test_refusesAnOracleTheHookDoesNotName, test_refusesAnotherPoolManager, test_refusesATokenVoltaDidNotLaunch, test_burnShareIsNeverPaidOut, test_onlyTheGuardianPauses, test_pausedStillPaysTheTeam, test_onlyTheAdminUpgrades.

A listed token that misbehaves

  • Tries: to use a token's own contract against the vault: a fee on transfer that backs notes with less than they claim, a transfer that fails or returns false, a frozen vault address, or a token note passed off as HYPE.
  • Stopped by:
    • The shield's balance check. shieldToken refuses a shield unless the vault's balance grew by exactly the amount (TokenAmountMismatch). Only listed tokens can be shielded.
    • Per-asset books and payouts. Each token has its own backing, pending exits and fees, and every payout is in one asset. A failed token payout in the ERC-4337 step keeps the exit for releaseExit; in a direct transact it reverts that transaction alone. Nothing pays out HYPE or another token in its place.
    • The asset in the commitment. A token note's commitment hashes its token in, so the circuit rejects it as HYPE or as another token.
    • No re-entry. Shields, payouts and sweeps are nonReentrant, and token transfers go through SafeERC20.
  • Residual risk: an issuer who freezes the vault's address or breaks its token stops that token's exits; its holders' notes stay in the vault, unpayable until the token works again or an upgrade decides. Rebasing tokens and tokens with transfer hooks are kept out by the admin's checks before listing, not by the vault.
  • Tests: test_shieldFeeOnTransferTokenRejected, test_shieldUnlistedTokenRejected, test_shieldTokenBounds, test_tokenEntriesPausePerToken, test_revertingTokenTransferKeepsTheExit, test_falseReturningTokenKeepsTheExit, test_directTokenExitTheTokenRefusesReverts, test_tokenExitRules; the circuit's test_token_note_as_other_token_fails_membership, test_token_exit_claiming_other_token.

A bad router or adapter

The router is upgradeable, so its code can change, by mistake or by a stolen key.

Defence. The vault believes nothing the router says. It sends a swap's input, requires its own balance of the asset out to grow by at least the order's minimum in the same frame, and otherwise reverts all of it and returns the input as a note. It grants no allowance. A router can therefore pay as little as the order's minimum and no less, within the limit of 100 HYPE per swap and 500 per 24 hours. It cannot touch notes, or any asset beyond the input. The minimum must not rest on the router's word either, so the app reads its quote from the adapter, which cannot be upgraded. A token it wrongly lists has a book of its own, so a loss stops at that token's holders. A late refund calls neither router nor token, so neither can hold an input back.

Sandwiching a swap

A swap's order is public before it is included, and it trades on a public pool, so someone can trade around it.

Defence. The order's minimum, bound by the proof. The most a trader can take is the slippage the user chose; past it the swap refunds, with no fee. The app warns above 10%.

Filling a window

A swap above the 24-hour window comes back as a note, so someone could try to keep the window full.

Defence. A window counts only what settled, so a swap that fails or never finishes holds none of it. To hold a window full takes real trades, each paying the exit fee and the pool's, both ways. A token's window is shared with its exits, which are held rather than refused when it is full, and can be paid a day later.

A launch that copies a name

Anyone can launch a token called VOID, or anything else, and trade it up so that it looks real.

Defence. The app shows the address in the list and in full on the order, says when other launches use the same symbol, and marks voidcash's own token by its address. It opens on no token by itself. A token someone else sent to your key shows as "Not bought here", with no value in HYPE. The address is the only thing that tells two launches apart.

OTC: a re-proven half under a copied signature

  • Tries: to take a deal's signature from a pending settle, and settle the same deal with one half proven again with other external data: a note ciphertext the counterparty cannot read, say, so that the counterparty cannot find what it was paid. Or to swap in another half, or reuse the signature on another chain or desk.
  • Stopped by: the desk's EIP-712 signature binds the deal id, the deadline, all four commitments of both halves and each half's whole ExtData (caller, recipient, gas fee, data and the four ciphertexts), under a domain that names the chain and the desk's proxy. A re-proven or substituted half has another ExtData hash or other commitments, so it needs a new signature, and the desk checks every half again before it signs. A malleated signature is refused. Besides, the app saves the opening of every note a deal will pay it before it hands a half over, so a note it cannot read is still found.
  • Residual risk: none on content. The relayer submits a deal unchanged, or not at all.
  • Tests: test_reprovenSellerHalfNeedsNewSignature, test_reprovenBuyerHalfNeedsNewSignature, test_substituteHalfNeedsNewSignature, test_alteredCiphertextRefusedBySignature, test_signatureBindsEveryExtField, test_signatureBindsEveryCommitment, test_refusesMalleatedOrCrossChainSignature, test_submitterCannotAlterAHalf; in the SDK, otc-wallet-openings.test.ts.

OTC: one half settled without the other

  • Tries: to settle one side's half and keep one's own notes: submit a half alone, pair it with a half of another deal, let the second half fail after the first, settle a deal twice, or after its deadline.
  • Stopped by: OtcDesk.settle. Each half names the desk as its only submitter, so the vault refuses it from anyone else, and the ERC-4337 path cannot carry it. Both halves must name the same deal and deadline, and each the first note the other creates. Both go to the vault in one transaction: if the second fails, the first reverts. A deal settles once, and not after its deadline.
  • Residual risk: the desk's admin can upgrade OtcDesk to code that submits one half alone, past its deadline and without a signature; the same key can already upgrade the vault. See Trust model.
  • Tests: test_halfCannotBeSubmittedAlone, test_realHalvesCannotSettleAlone, test_halvesOfDifferentDealsRefused, test_counterpartMismatchRefused, test_secondHalfFailingUndoesTheFirst, test_dealSettlesOnce, test_expiredDealRefused, test_deskHalfRefusedAsUserOperation, test_adminUpgradeIsTrusted_canSettleOneHalf.

OTC: a malicious desk server

  • Tries: to make the app sign a half that pays more than the deal: name another desk contract, its own address for the fees, a large gas fee (taken from the seller's side), a deadline far in the future, other terms than the other side sent, or a sign-in message that is really a key-derivation request.
  • Stopped by: the app pins every value itself. The desk contract and the desk's private address come from the app's own configuration; a desk server naming others is refused, and nothing is signed or paid. The gas fee is capped at 3 × 12,000,000 gas at the gas price the app reads from its own RPC. A half's deadline is at most 14 days away and never past its block's or request's end. The note the other side's half pays is checked against the terms on the device, and the payment asset follows from the token. The sign-in message must be exactly the desk's text, for this site and this wallet, issued within 10 minutes, and anything carrying the wording of the wallet's key-derivation or payment-link messages is refused.
  • Residual risk: the desk server can refuse or delay deals, and sees the wallets that sign in and each deal's terms. A half the user handed over can settle until its deadline: past a closing half's 10-minute window the app offers to void it.
  • Tests: in the app, otc-side.test.ts (each pin; 10 mutations of otc-side.ts, each removing one pin, save, sync, reservation or refusal, all caught), otc.test.ts, topup-cap.test.ts; in the SDK, otc-hardening.test.ts, otc-close.test.ts, web-signin-challenge.test.ts.

OTC: linking a party to its wallet

  • Tries: to learn which wallet is behind a listing, an offer, a request or an answer, from the board, from what a counterparty receives, or from the chain: look a party's keys up in the vault's public key registry (KeysRegistered), match the keys of two records of one wallet, or watch the notes a standing half spends until one of them leaves the vault to a public address.
  • Stopped by: every record receives on keys of its own, derived from the wallet's sk and an index given once: never registered, never shared by two records, and underivable from anything public. A standing half spends only a note of its record's keys, moved there first by a private send, so the nullifier a counterparty sees leaves only by a private send. A half's change goes to the main keys, readable only by its owner. The app refuses to send the desk any body naming the main keys, or keys it did not allocate, and never gives two records the same index: it recovers used indexes from the chain on a device with no records, and moves past every index the desk shows for the wallet's own records.
  • Residual risk: the desk service knows which signed-in wallet made each record. An invite-only block names its invited wallets to its seller. A signer held by a service sees the hash of every transaction the wallet signs, and can match them to the chain.
  • Tests: in the SDK, otc-keys.test.ts, otc-deal-keys.test.ts (a whole deal on deal keys with real proofs: no main key shown), otc-wallet-deal-keys.test.ts, otc-deal-recovery.test.ts; in the app, otc.test.ts (no body naming the main keys or unallocated keys, over every route) and otc-side.test.ts (recovery before any allocation, reconciliation with the desk's lists). An end-to-end run on a fork of Elysium checked that none of the keys the desk stored or showed equalled any KeysRegistered entry.

OTC: a compromised desk database

  • Tries: to write the desk's records so that the fee keeper pays out: a refund of a larger amount, or to another address, a fee that was never paid, a deal that never settled, a gas repayment too large.
  • Stopped by: the keeper checks every record on chain before it sends. It copies each fee's amount and refund address into its own ledger the first time it sees it, and pays exactly those; a fee's receipt must open, under the desk's keys, to a note in the vault; a deal is repaid or burned only once OtcDesk.settled says so, its fee note is the desk's and in the vault, and its gas fee is at most 0.05 HYPE. Its ledger lives in tables the desk's database role can only read. Refunds are capped at 30 HYPE a day, gas repayments at 2 HYPE a day, and both together at 10 HYPE a round, with an alarm; burns go only to VoidBurner.
  • Residual risk: the decision to refund or burn is read from the desk's records. A forged decision can turn a burn into a refund to the keys that fee's refund was first recorded for (its listing's or offer's), for the amount it paid, within the caps.
  • Tests: keeper-bounds.test.ts, keeper-pg.test.ts, desk-role-pg.test.ts, keeper-landing.test.ts, keeper-rules.test.ts in services/otc.

OTC: pushing the market price

  • Tries: to move a token's pool so that a % to market block sells cheap, a VOID holder's waiver applies, or VoidBurner buys VOID dear.
  • Stopped by: the desk prices from the median of the last 10 minutes of reads, never one read, and refuses the price while the current price is more than 0.5% from the median, the latest read is more than 30 seconds old, the window is thin or has a gap, or the pool holds under 5.6 HYPE. Only trusted pools count: a launchpad's hook or a named reference pool. VoidBurner prices from Volta's 10-minute TWAP, with the collector's caps: 0.5 HYPE a buy, 10 HYPE a day, 1% below the TWAP price at most, and no buy while VOID is more than 50 ticks dearer than the TWAP.
  • Residual risk: a price held for most of 10 minutes moves the median, against arbitrage. Each accept is checked at its own moment, and the seller's device shows the terms before it signs.
  • Tests: market-price.test.ts in services/otc; on a fork of Elysium, VoidBurnerFork.t.sol (test_twapIgnoresASameTransactionPush, test_attackDoesNotPayWith10Hype, test_attackDoesNotPayWith50Hype).

OTC: griefing the desk

  • Tries: to make the desk do costly work for nothing: flood it with sign-ins, offers or renewals whose proofs it must check on chain, or hold a block's places with offers that never pay.
  • Stopped by: cheap checks first, then the chain: a proof of the wrong length, a bad deadline, a cap or a deal id are refused before the desk asks the chain anything, and the verifier's answer about a half is reused for 300 seconds. Per-wallet limits: 30 chain-reading calls a minute, at most 3 open offers on a block, 3 answers on a request, 5 requests, 5 listings, 6 renewals an hour per offer or answer. Per client, 600 requests a minute; sign-ins and sessions are counted per wallet and per client. An offer or a listing unpaid for an hour lapses, and only a paid offer reaches the seller.
  • Residual risk: many wallets can still load the desk within these limits. Deals already proven settle on chain whatever the desk's load.
  • Tests: desk-bounds.test.ts, limits.test.ts, server-http.test.ts, signin-shared-ip.test.ts, server-limits.test.ts in services/otc.

Misused role keys

  • Tries: to use the vault's roles, held by one address at launch, against users: replace the implementation, pause every spend, stop exits, raise a threshold or a window cap, list a harmful token, or send the fees elsewhere.
  • Stopped by: the limits of each function. A pause or a stopped exit moves no funds; the HYPE threshold stays between 1 and 1,000,000 HYPE; a listed token cannot be removed; each role does only its own job. Every action is public and immediate.
  • Residual risk: the upgrader can install any implementation, with no timelock, and that implementation decides what happens to every note. The guardian can stop every spend for as long as it keeps the vault paused. A token's limits have no upper bound, so the admin can raise them until they hold nothing. See The roles.
  • Tests: test_rolesAreSeparate, test_tokenRolesAreSeparate, test_strangersCannotDoAnything, test_adminSetsTheThresholdWithinItsRange, test_setTokenLimits, test_upgradeKeepsEveryNoteAndExitAndReplacesTheVerifier, test_upgradeCannotReinitialize.
  • Tries: to claim a payment link meant for someone else, by reading it in the message that carried it, on a shared screen or in a browser history.
  • Stopped by: nothing on-chain: a link is a bearer key, and the first claim wins. The key sits in the URL fragment, which browsers never send to a server, so the site and link previews do not see it, and the app sends no referrer.
  • Residual risk: the amount of that link. Share links only with the person you pay, over an end-to-end encrypted channel, and take back links that stay unclaimed: the sender can take a link back until it is claimed.

A payment link is cash

Anyone who sees the full link can claim it before your recipient does. Send it over an end-to-end encrypted channel and take it back if it stays unclaimed.

A bug in the vault

  • Tries: to exploit a flaw in the vault's accounting rather than in the proof.
  • Stopped by: the vault keeps public totals, totalBacking and pendingExitTotal, emits them in VaultUpdated after every change, and holds exactly them plus the fees not yet swept. Each token has the same books in tokenBook, emitted in TokenBookUpdated. Invariant tests check this under random sequences of shields, exits, releases, stops, sweeps and pauses, and check that no HYPE and no token is created or lost. Payouts cannot be re-entered, and the vault accepts HYPE only through shield and from the EntryPoint.
  • Residual risk: the vault has no cap on what it holds. A pause or an upgrade protects what is still inside.
  • Tests: invariant_balanceIsTheSumOfItsBuckets, invariant_pendingExitTotalIsTheSumOfPendingExits, invariant_backingIsShieldsLessExits, invariant_hypeIsConserved, invariant_tokenBalanceIsTheSumOfItsBuckets, invariant_tokenBackingIsShieldsLessExits, invariant_tokenIsConserved, test_upgradeFromV1KeepsEveryStorageSlot, test_receiveRefusesAnyoneButTheEntryPoint, test_recipientCannotReenterDuringADirectPayout, test_recipientCannotReenterDuringRelease, test_recipientCannotReenterDuringExecution.

Accepted limits

  • The privacy set. You are hidden among the other users of the vault. While they are few, especially early on, "who" is weakly protected. The key registry is itself a public list of the addresses that use voidcash.
  • A token's set is smaller. Notes of every asset share one tree, but a token's shields and exits name the token, so its edges are matched among that token's own shields and exits, fewer than HYPE's. A private send of a token takes its gas from a HYPE fee note (exitAmount 0, feeAmount the gas fee, a real fee-pair note). The SDK sends HYPE the same way whenever the wallet holds a spare HYPE note that covers the gas, so those sends cannot be told from token sends. A HYPE send from a wallet without one pays its gas from the main pair (exitAmount the gas fee, feeAmount 0) and is recognisable as HYPE; collecting a payment link or a private address, HYPE only, does the same.
  • Amount and timing. A shield shows the address and the amount; an exit shows the recipient, the amount, the exit fee and the gas fee. An observer can match them. In the whitepaper's model, with ten shields an hour, taking out the same amount you put in a day earlier still leaves a 38% chance of being matched; taking out a different part of a larger balance brings it to 1.4%. Value paid inside the vault never reaches an edge. See Staying private.
  • The gas fee is public. Every private operation shows its gas fee. With the app's default gas settings and the shared bundler, it does not single you out; unusual settings, or a direct submission, can.
  • Metadata. The RPC node, the bundler and the indexer see your IP address and when you act. The RPC node also sees your address when you activate, the addresses you look up to pay, and the exact amount of a trade you are quoted, which then shows on-chain when the vault makes it. A careful user runs their own node, or chooses an RPC they trust, and uses a network that hides their IP address.
  • The OTC desk sees its deals. The desk service knows the wallets that sign in, which wallet made each listing, offer, request and answer, and the token, size and price of each deal it signs. The public and the counterparty see only each record's own keys, never a wallet. On-chain, a deal shows as two private sends, but the desk's burns and gas repayments are public unshields, each adding up the fees of one or more deals. See OTC desk.
  • One ECDSA key per wallet. The circuit checks one secp256k1 signature, so contract wallets and multisigs cannot spend.

On this page