SPB Git

Repository Public

ETHEREUM.md 3.6 KB 50 lines markdown

1# QYVORA — Ethereum and the EVM networks23A short map of the EVM support, pointing at the code. The network table (chain ids, history sources) is in4[CHAINS.md](CHAINS.md), recovery in [RECOVERY.md](RECOVERY.md), what was verified in [STATUS.md](STATUS.md).56## Scope78- Seven chains, each with its test network: Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Smart Chain, Avalanche9  C-Chain (`EthereumNetwork`, `EVMFamily`, `Sources/QyvoraCore/Networks.swift`).10- One externally owned account for all of them: `m/44'/60'/0'/0/0`, secp256k1 ECDSA, EIP-55 address.11- Transactions: EIP-1559 (type 2) only. The chain id is inside the signed payload and is checked before signing and12  before broadcasting a cold-signed transaction. Contract creation and access lists are not supported.13- Tokens: ERC-20 transfers; approvals are signed only to revoke an allowance on mainnet with an unaudited build.1415## Where things are1617| Subject | Code |18|---|---|19| RLP, EIP-1559 encoding and signing, EIP-55 | `Sources/QyvoraEthereum` |20| ERC-20 call data, built-in token list | `Sources/QyvoraEthereum/ERC20.swift` |21| JSON-RPC client, fee data, OP-Stack gas oracle | `Sources/QyvoraNetworking/EthereumRPC.swift` |22| Indexers (Blockscout API v2, Etherscan dialect) | `Sources/QyvoraNetworking/Indexers.swift` |23| Default endpoints | `EVMEndpointDefaults`, `Sources/QyvoraNetworking/HTTP.swift` |24| Synchronization, payments, approvals, cold flow | `Sources/QyvoraWallet/WalletService+Ethereum.swift` |25| Fee estimate before a payment exists | `Sources/QyvoraWallet/WalletService+FeeQuote.swift` |2627## Behaviour worth knowing2829- Balances and nonces come from the JSON-RPC node, never from the indexer. The indexer gives the history, a hint of30  the tokens held (each one is then read on chain; the indexer's symbol and decimals are ignored) and the approvals.31- Networks without a shipped history source (Base, Arbitrum One, Arbitrum Sepolia, Polygon PoS, Polygon Amoy, BNB32  Smart Chain and its testnet): balances and payments work; history, token discovery and approvals are unavailable.33- Fees follow the rules of each network (`EVMFeeRules`): slow, normal or fast priority fee over the base fee of the34  block read. Base and OP Mainnet add an L1 data fee quoted by the GasPriceOracle for the transaction itself and35  reserved with a margin; on Arbitrum the node estimates the gas of a plain transfer.36- A pending transaction blocks a new one unless the user chooses to replace it (same nonce).37- A payment to a contract needs an explicit acceptance; a token transfer is simulated before the review.38- Cold signing: the unsigned 0x02 payload travels as text or QR frames; the cold device decodes it and says what it39  cannot verify offline (the L1 data fee, a token it does not know).40- Quantum Shield: the key of the account is recoverable from the signature of any outgoing transaction on any EVM41  network, and the address cannot be changed. The report measures it per enabled network (account nonce) and lists42  the open approvals of every enabled network that has a history source, each revocable on its network.43- Unaudited mainnet: a native value ceiling and a fee ceiling per network (0.05 ETH and 0.01 ETH of fee on44  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`).4546## Not proven4748No EVM transaction has been broadcast by this application: encoding and signing are checked against vectors,49broadcast against scripted answers. Smart-contract wallets, EIP-7702 and other transaction types are out of scope.50
Files main
Menu

Theme