Docs: Threat model

Security

Threat model

What can go wrong, who could do it, and what bounds the damage. Each answer points at the code that enforces it.

Passkeyfull controlHipAccount on ElysiumrpId, counter, scopes, capsdelay, refuse, capped gascannot sign as yousitebundlerowner keypm signersession key
Trust boundaries. Only the passkey can sign without limits. The account contract checks every signature against rules on Elysium. Everything in the outer ring can delay, refuse or spend capped sponsor gas, but cannot produce a signature the account accepts.

Lost device

A synced passkey (iCloud Keychain, Google Password Manager) comes back on a new device signed in to the same platform account, and nothing changes on-chain. A device-bound passkey or hardware key is lost along with that device. Two on-chain paths cover that case:

  • A second passkey. An account holds up to 8 passkeys. Any of them signs for the account. Add one from another device with addPasskey; removePasskey never removes the last one.
  • Guardian recovery. A passkey sets a guardian address with setGuardian. The guardian can propose one new passkey with proposeRecovery. After a 2 day delay anyone can call executeRecovery, which deactivates every current passkey and installs the proposed one. Until then, any current passkey cancels with cancelRecovery.

With no synced passkey, no second passkey and no guardian, a lost device means the account cannot be reached. Nobody, including the HIP-ID team, has a key that could recover it.

Guardian misuse

Who
A guardian that turns hostile or loses its own key.
Can
Propose its own key as the new passkey, and finalise it after 2 days if nobody cancels.
Cannot
Move funds, act as the account, or shorten the delay. The guardian has no other power.
Bound
The 2 day window: any current passkey cancels, and setGuardian replaces the guardian and clears the proposal. Recovery does not revoke session keys; after a recovery, revoke any session you do not recognise.

Phished domain

Who
A look-alike site that gets you to press Face ID.
Can
Ask your browser for a passkey assertion. The browser shows no passkey for that site, because passkeys are bound to their rpId and the look-alike is not on HIP-ID's related origins list.
Cannot
Get a signature that this account accepts. The browser refuses to use a passkey for another rpId. If an assertion for another rpId were produced anyway, its authenticatorData would carry a different rpIdHash, and the account compares authenticatorData[0:32] with the sha256(rpId) it stored for that passkey.
Bound
Two independent checks, browser and contract. Tested by test_otherRpIdFails. See rpId binding.

Compromised site

Who
Someone who controls the code served on the site's own domain or a subdomain under its rpId.
Can
Ask your passkey to sign any operation for your account. The prompt names the site, not the operation, so a malicious page can present a drain as a routine action.
Cannot
Sign without you. User verification is required for every signature, and the private key never leaves the authenticator.
Bound
None on-chain for passkey-signed operations: this is the main trust assumption of every passkey wallet that runs in a browser. Operations signed by a session key stay within its scopes. Approve a passkey prompt only for an action you started.
Who
Someone who can change what https://hipid-green.vercel.app/.well-known/webauthn returns.
Can
Add an origin to the list. Browsers with Related Origin Requests then let pages on that origin ask for assertions under the rpId hipid-green.vercel.app, which every account made before the move to hipid.app uses.
Cannot
Sign without you, or reach a passkey bound to hipid.app: the list on the old domain only widens who may ask for old-domain passkeys. User verification is still required for every signature.
Bound
The list is served by this site's own deployment and names exactly three origins: https://hipid.app, https://www.hipid.app and https://hipid-green.vercel.app (the host serving it leaves its own origin out). Changing it takes the same deploy access as changing the site itself, so it adds no new party to trust; see compromised site. New accounts are bound to hipid.app and need no list. See domains and related origins.

Bundler operator

Who
Whoever runs or takes over the bundler service.
Can
Censor or delay your operations, refuse to sponsor, report wrong status, and return a tampered operation from pm_sponsorUserOperation in the hope that the client signs it.
Cannot
Produce a passkey or session-key signature, change an operation after you signed it (the userOpHash covers every field except the signature), or spend sponsor gas beyond the paymaster's on-chain caps.
Bound

Your signed operation is valid for any submitter: you can call handleOps on the EntryPoint yourself from any funded address. Without the HIP-ID paymaster approval, the account pays its own gas from its HYPE balance. The rate-window check reads block.timestamp in validation, so public ERC-7562 bundlers may refuse session-key operations; direct submission still works.

A tampered sponsorship is refused before the passkey is asked: the SDK's sponsor, which this site uses, checks that the sender, nonce, deployment fields and call came back unchanged and recomputes the hash locally (details).

Paymaster signer theft

Who
Someone who steals the key that signs paymaster approvals.
Can
Approve gas for operations of HIP-ID accounts, including their own, and so spend the sponsor's EntryPoint deposit on gas.
Cannot
Sign for any account, sponsor accounts that the HIP-ID factory did not create, sponsor calls to the paymaster, or raise any cap.
Bound
The on-chain caps: at most 0.02 HYPE per UTC day across all accounts at the current setting, and never more than 0.5 HYPE per day whatever the setting. The owner rotates the signer with setSigner, and the bundler refuses to start with a signer the contract does not trust.

Owner compromise

The owner of HipPaymaster and HipStake is the deployer EOA. There is no timelock, and the owner address is immutable in both contracts, so it cannot be transferred; replacing it means deploying new contracts. The full list is on Contracts and owner powers.

Can

  • Set the paymaster signer to any address.
  • Change the daily limits, each at most its hard maximum, or set them to zero.
  • Add, unlock and withdraw the paymaster's EntryPoint stake.
  • Sweep the paymaster's EntryPoint deposit and any HYPE it holds. This stops sponsorship; it is sponsor money, not user money.
  • Set the HipStake token once. It is unset today, so a stolen owner key could set a wrong token; nothing is staked, and the fix is a redeploy.
  • Sweep tokens HipStake holds above what stakers are owed.

Cannot

  • Touch any account, its funds, passkeys, guardian or sessions. Accounts and the factory have no owner and no admin function.
  • Upgrade anything. No contract is a proxy; accounts are EIP-1167 clones of a fixed implementation.
  • Raise a paymaster limit above its hard maximum.
  • Take staked tokens or delay an unstake.
  • Sign or submit operations as a user.

Leaked session key

Who
Anyone who obtains a session private key, for example through a compromised page.
Can
Send operations within that key's scopes until it expires or is revoked.
Cannot
Exceed the cumulative caps or the rate, call any unscoped contract or function, call the account itself or the EntryPoint, or send plain HYPE.
Bound
The grant itself, the expiry enforced by the EntryPoint, and revokeSession in one passkey-signed call. See Session keys.

RPC limits and lies

Who
The public Elysium RPC, when it rate-limits (HTTP 429), fails, or returns wrong data.
Can
Slow operations down, make pages show stale or wrong balances, or return a wrong account address for a passkey.
Cannot
Make the account accept a bad signature or change what an operation does. Validation happens on-chain.
Bound
The bundler retries every RPC call with backoff and caches the gas price for one second, so a busy RPC delays operations instead of failing them. Pages that read the chain keep working when the bundler is down. The account address is a CREATE2 address that can be recomputed from the factory, the implementation and the passkey.

Front-run account creation

Who
Anyone who sees your first operation and calls createAccount first.
Can
Pay for deploying your account.
Cannot
Change its key or address. The CREATE2 salt is keccak256(abi.encode(x, y, rpIdHash, salt)), initialize runs in the same transaction, and createAccount returns the existing account if it is already deployed.
Bound
Harmless. Your pending operation with initCode then fails with AA10 (sender already constructed); the client rebuilds it without initCode, which the SDK does whenever code exists at the address.

Cloned authenticator

Who
An attacker who copies a device-bound authenticator's key material.
Can
Produce valid P-256 signatures with an old counter value.
Cannot
Have them accepted once the real authenticator has moved the counter forward: the account requires a strictly higher counter whenever either side is non-zero.
Bound
WebAuthn clone detection, tested by test_signCountMustIncrease. Synced passkeys report a counter of 0, so for them the check does not apply and security rests on the platform account that syncs them.