SPB Git

Repository Public

ETHEREUM.md 3.6 KB

# QYVORA — Ethereum and the EVM networks

A short map of the EVM support, pointing at the code. The network table (chain ids, history sources) is in CHAINS.md, recovery in RECOVERY.md, what was verified in STATUS.md.

# Scope

  • Seven chains, each with its test network: Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Smart Chain, Avalanche C-Chain (EthereumNetwork, EVMFamily, Sources/QyvoraCore/Networks.swift).
  • One externally owned account for all of them: m/44'/60'/0'/0/0, secp256k1 ECDSA, EIP-55 address.
  • Transactions: EIP-1559 (type 2) only. The chain id is inside the signed payload and is checked before signing and before broadcasting a cold-signed transaction. Contract creation and access lists are not supported.
  • Tokens: ERC-20 transfers; approvals are signed only to revoke an allowance on mainnet with an unaudited build.

# Where things are

Subject Code
RLP, EIP-1559 encoding and signing, EIP-55 Sources/QyvoraEthereum
ERC-20 call data, built-in token list Sources/QyvoraEthereum/ERC20.swift
JSON-RPC client, fee data, OP-Stack gas oracle Sources/QyvoraNetworking/EthereumRPC.swift
Indexers (Blockscout API v2, Etherscan dialect) Sources/QyvoraNetworking/Indexers.swift
Default endpoints EVMEndpointDefaults, Sources/QyvoraNetworking/HTTP.swift
Synchronization, payments, approvals, cold flow Sources/QyvoraWallet/WalletService+Ethereum.swift
Fee estimate before a payment exists Sources/QyvoraWallet/WalletService+FeeQuote.swift

# Behaviour worth knowing

  • Balances and nonces come from the JSON-RPC node, never from the indexer. The indexer gives the history, a hint of the tokens held (each one is then read on chain; the indexer's symbol and decimals are ignored) and the approvals.
  • Networks without a shipped history source (Base, Arbitrum One, Arbitrum Sepolia, Polygon PoS, Polygon Amoy, BNB Smart Chain and its testnet): balances and payments work; history, token discovery and approvals are unavailable.
  • Fees follow the rules of each network (EVMFeeRules): slow, normal or fast priority fee over the base fee of the block read. Base and OP Mainnet add an L1 data fee quoted by the GasPriceOracle for the transaction itself and reserved with a margin; on Arbitrum the node estimates the gas of a plain transfer.
  • A pending transaction blocks a new one unless the user chooses to replace it (same nonce).
  • A payment to a contract needs an explicit acceptance; a token transfer is simulated before the review.
  • Cold signing: the unsigned 0x02 payload travels as text or QR frames; the cold device decodes it and says what it cannot verify offline (the L1 data fee, a token it does not know).
  • Quantum Shield: the key of the account is recoverable from the signature of any outgoing transaction on any EVM network, and the address cannot be changed. The report measures it per enabled network (account nonce) and lists the open approvals of every enabled network that has a history source, each revocable on its network.
  • Unaudited mainnet: a native value ceiling and a fee ceiling per network (0.05 ETH and 0.01 ETH of fee on Ethereum), 150 USD per token transfer (a dollar-pegged token counts for at least 0.90 USD a unit; any other token needs fresh prices from two sources that agree: MainnetPolicy).

# Not proven

No EVM transaction has been broadcast by this application: encoding and signing are checked against vectors, broadcast against scripted answers. Smart-contract wallets, EIP-7702 and other transaction types are out of scope.

Files main
Menu

Theme