Skip to content
xDEVS ChainDocs← xdevschain.tech
On this page

The user-safety layer

xDEVS Chain's signature feature is a set of protections built from standard EVM pieces (system contracts at fixed addresses) plus one opt-in node rule and a set of RPC extensions. Together they address the ways ordinary users actually lose money.

The pieces#

ThreatProtectionWhere it livesStatus
Lost seed phraseSmart accounts with passkeys and social recoveryXdevsSmartAccount contractLive on Enclave
Stolen key or deviceGuardian Vault: time-locked transfers with a cancel windowAccount contractLive on Enclave
Thief and owner both hold keysGuardian freezeAccount contractLive on Enclave
Stolen key of an existing MetaMask addressEOA lock (XIP-0001)Account contract + node validity ruleLive on Enclave
Forgotten unlimited approvalsExpiring approvals: XDRC-20, Permit2Expiring, vault allowance policyContractsLive on Enclave
Look-alike names, address poisoningXNS .xdevs names with confusable-skeleton checksXNSRegistry contractLive on Enclave
Look-alike recipient addressesxdevs_checkRecipient RPC; SDK offline helperNode RPC / SDKLive on Enclave
Blind signingxdevs_simulateTransaction: asset changes, approvals, vault outcome and plain-language warningsNode RPC (simulator crate)Live on Enclave
Forgotten approvals, unnoticed vault actionsxdevs_getApprovals, xdevs_getVaultQueue, eth_subscribe("vaultEvents")Node RPCLive on Enclave
Front-running (MEV)Encrypted mempoolConsensus / mempoolPrototype built, off on Enclave (needs a distributed key setup)
Bridge hacksLight-client bridges onlyPolicyPrototype built, not deployed

"Live on Enclave" means the contracts are in the Enclave genesis and the public RPC serves the methods. The contracts are covered by unit, fuzz and invariant tests in Foundry but have not been externally audited, and Enclave is a testnet. The built-in local dev genesis does not contain the contracts.

Try them in the wallet: a passkey account, guardians, the Guardian Vault, approvals, .xdevs names and a simulation preview before every send.

How a protected account fits together#

  1. Get a smart account. A new user creates a passkey account through the factory (no seed phrase at all). An existing MetaMask user delegates their address to the xDEVS Smart Account with an EIP-7702 transaction and keeps the same address.
  2. Add guardians. Friends, a second device, a hardware key or a recovery service. A threshold of them (for example 2 of 3) can recover the account after a delay.
  3. Turn on the Guardian Vault. Everyday small payments stay instant. Anything above your threshold, any approval, and any call to an unknown contract waits out a delay (default 24 h) during which you or your guardians can cancel it.
  4. For a 7702 account, enable the EOA lock. Without it, the old private key could still sign raw transactions that skip the vault. With it, the node accepts only calls that go through the account's own code.
  5. Use expiring approvals and .xdevs names. Approvals die on their own, and names can't be impersonated by look-alikes.

If a key is stolen, the thief is limited to the instant allowance (daily limit). Everything bigger is queued, your guardians can cancel it, freeze the account and recover it to your new device.

Facts and advice#

The safety RPCs separate what the chain says from what the node thinks:

  • Facts are on-chain data: balances, code, the EOA lock, XNS records, live allowances, the vault queue, and what a simulated transaction would move.
  • Advice is everything heuristic: warnings and flags such as "unlimited approval", "first-time recipient" or "looks like an address you paid before". It is labelled advice, not fact in every response. A wallet should present it as a warning to read, never as proof that something is safe or unsafe.

xdevs_simulateTransaction runs the transaction in revm against the current state with the same gas cap and time limit as eth_call, and commits nothing. It reports every asset movement, the approvals it sets (unlimited and never-expiring ones are flagged), contracts it creates, and whether the Guardian Vault would queue the action and until when. Results can differ if the state changes before the transaction is included.

xdevs_checkRecipient reports facts about a recipient (contract, smart account, EOA lock, primary .xdevs name) separately from advice:

  • the sender has not paid this address before;
  • the address shares its first and last characters with an address the sender did pay (address poisoning);
  • the address sent the sender a zero-value transfer (a common address-poisoning trick);
  • the address is the zero address, a precompile or a system contract.

The node only scans recent blocks; wallets combine this with their own history. See the JSON-RPC reference for request and response shapes.

Read the specs#