Repository Public
1{2 "schema": "qyvora-review/1",3 "title": "Multi-chain upgrade — EVM networks and the shared wallet machinery (limits, mainnet gate, network mode, cold envelope, watch-only package, account binding, persistence, endpoints, address validation)",4 "reviewed_revision_base": "08b6c46",5 "reviewer": "area agent EVM-and-multichain-service (internal audit, not an independent review)",6 "date": "2026-12-05",7 "method": "Line-by-line reading of everything changed since 36bfa4c in the files of the area (EVMFees.swift, ERC20.swift built-in lists, Networks.swift EVM and limits sections, EthereumRPC.swift, HTTP.swift endpoint configuration, Indexers.swift, Chains.swift, ChainTypes.swift, ChainPersistence.swift, WalletService+Chains / +Send / +Cold / +Ethereum, the multi-chain parts of WalletService.swift, +Onboarding.swift, +Market.swift, SyncPersistence.swift, WalletTypes.swift); differential tests against eth-account 0.14.0, eth-keys, pyrlp, eth-abi, eth-utils and pycryptodome; conformance of the tables against the chain registry; property tests; eleven fuzz targets on M5M36; regression tests for each fix, each checked to fail on the code before its fix.",8 "limits": "The family services (WalletService+Solana, +Tron, +UTXOCoins) and their protocol modules belong to three other areas: only their use of the shared machinery was checked here. App/Sources was not reviewed (being rebuilt): what the interface must do is recorded as open application findings. No live network call was made; every transport in the tests is a stub. Expected values of the network table and of the token lists come from the reviewer's knowledge of public registries and from the copy in eth-utils, not from a live query.",9 "entries": [10 {11 "construct": "EthereumNetwork.chainID (14 networks)",12 "location": "Sources/QyvoraCore/Networks.swift:478",13 "verdict": "safe",14 "note": "Every identifier equals ethereum-lists/chains (transcribed by the reviewer) and exists in the registry shipped with eth-utils 6.0.0; lookups by an unsupported identifier give nil. Tests: EVMChainsVectors.networkTableMatchesTheChainRegistry, EVMChainsDifferential.chainIdentifiersExistInTheRegistryOfEthUtils."15 },16 {17 "construct": "EthereumNetwork.nativeSymbol / nativeDecimals",18 "location": "Sources/QyvoraCore/Networks.swift:696",19 "verdict": "safe",20 "note": "ETH on Ethereum, Base, Arbitrum, OP; POL on Polygon and Amoy; BNB on BNB Smart Chain and its test network (the registry names the test coin tBNB: the wallet shows the main ticker and marks the network as a test one); AVAX on Avalanche and Fuji. 18 decimals on all fourteen, as in the registry."21 },22 {23 "construct": "EthereumNetwork.explorerTransactionURL / explorerAddressURL",24 "location": "Sources/QyvoraCore/Networks.swift:799",25 "verdict": "safe",26 "note": "A link is built only for 0x + 64 (or 40) hexadecimal digits, so no text of a server reaches a URL path; the host is a constant of the table. Fuzzed by network-table."27 },28 {29 "construct": "MainnetPolicy.configure / mainnetEnabled",30 "location": "Sources/QyvoraCore/Networks.swift:540",31 "verdict": "safe",32 "note": "Process-wide state under a lock; mainnetEnabled = auditCompleted || (internalBuild && userOptIn). Both conditions are needed. The service is the only caller outside tests (WalletService.init and setMainnetOptIn)."33 },34 {35 "construct": "MainnetPolicy.limits, evmLimits, utxoLimits, solanaLimits, tronLimits",36 "location": "Sources/QyvoraCore/Networks.swift:584",37 "verdict": "safe",38 "note": "Every main network of every family has a value ceiling and a fee ceiling: Bitcoin and ether in their own unit, the others as 150 USD (5 USD of fee on POL, BNB, AVAX; base-unit fee ceilings on the UTXO coins, Solana and TRON). No switch has a default that means unlimited: utxoLimits is exhaustive over UTXOCoin and returns nil only for test networks. Test: MainnetPolicyTests.everyMainNetworkHasCeilingsAndNoTestNetworkHasAny. No figure was raised by this audit."39 },40 {41 "construct": "MainnetPolicy.Ceiling.allows(wei:usdPrice:)",42 "location": "Sources/QyvoraCore/Networks.swift:835",43 "verdict": "safe",44 "note": "nil (cannot be verified) on a missing, zero, negative or non-finite price; callers refuse on nil. The rule cannot tell a wrong price from a right one: see QYV-SVC-082 for the floor added in front of it."45 },46 {47 "construct": "MainnetPolicy.minimumPlausibleUSDPrice / isPlausibleUSDPrice",48 "location": "Sources/QyvoraCore/Networks.swift:902",49 "verdict": "fixed",50 "note": "Added by this audit: a price under the floor of a native coin is no price. Bounds what one transaction can move at 150 USD / floor coins whatever the price source answers.",51 "finding_id": "QYV-SVC-082"52 },53 {54 "construct": "MainnetPolicy.nativeCeiling(usd:priceUSD:decimals:)",55 "location": "Sources/QyvoraCore/Networks.swift:456",56 "verdict": "safe",57 "note": "Double arithmetic guarded: non-finite or negative inputs give nil, a result at or above 2^63 saturates instead of trapping in the conversion. Test: QyvoraCoreTests.EVMChainsAuditRegressionTests.ceilingsNeverAllowWhatCannotBeValued."58 },59 {60 "construct": "EVMFeeRules.gasFees",61 "location": "Sources/QyvoraEthereum/EVMFees.swift:89",62 "verdict": "safe",63 "note": "Every endpoint figure is an argument and is bounded: base fee, priority fee and gas price below 10 000 gwei, computed max fee below 100 000 gwei, multiplications and additions with overflow reporting, priority ≤ max fee always, Polygon's 30 gwei floor, the eth_gasPrice floor on BNB Smart Chain (missing or zero gas price refused), a zero priority fee raised to 1 wei (Arbitrum). Property test: 20 000 / 200 000 hostile cases; fuzz target evm-fee-quotes."64 },65 {66 "construct": "EVMFeeRules.maximumFee / maximumCost / sendMaxValue",67 "location": "Sources/QyvoraEthereum/EVMFees.swift:136",68 "verdict": "safe",69 "note": "nil on overflow, nil when the balance does not exceed the fees: send-max value + gas limit × max fee + L1 fee equals the balance exactly, never more. Property test costsAndSendMaxNeverExceedTheBalance."70 },71 {72 "construct": "OPStackGasOracle.address / getL1FeeSelector / getL1FeeCall",73 "location": "Sources/QyvoraEthereum/EVMFees.swift:153",74 "verdict": "safe",75 "note": "Address 0x420000000000000000000000000000000000000F and selector 0x49948e0e checked against the OP-Stack predeploy list (reviewer's knowledge) and against Keccak-256 of pycryptodome; the call data equals eth-abi's encoding for 311 / 3 011 payloads."76 },77 {78 "construct": "OPStackGasOracle.decodeFee",79 "location": "Sources/QyvoraEthereum/EVMFees.swift:165",80 "verdict": "safe",81 "note": "Exactly one 32-byte word strictly below 0.1 ETH; anything else is no fee (the caller then fails: never a fee of zero). Stricter than a strict ABI decoder, which accepts trailing bytes (policy difference recorded in the differential test)."82 },83 {84 "construct": "OPStackGasOracle.withMargin",85 "location": "Sources/QyvoraEthereum/EVMFees.swift:173",86 "verdict": "safe",87 "note": "fee + fee/4, saturating. The margin is what is shown, reserved for send-max and counted in the fee ceiling; the network charges the real figure."88 },89 {90 "construct": "EIP1559Transaction.unsignedPayload / sign (chain id inside the signed payload)",91 "location": "Sources/QyvoraEthereum/Transaction.swift:97",92 "verdict": "safe",93 "note": "Type 2 only: there is no code path that produces a legacy (pre-EIP-155) or EIP-2930 transaction, and decodeUnsigned refuses every first byte but 0x02. Byte-identical to eth-account 0.14.0 on 27 distinct chain identifiers (the 14 of the table and boundary values up to 2^64 − 1) (payload, hash, r, s, yParity, raw, transaction hash, sender)."94 },95 {96 "construct": "ERC20.decodeUInt / decodeCall / decodeString",97 "location": "Sources/QyvoraEthereum/ERC20.swift:99",98 "verdict": "safe",99 "note": "Exact lengths (32 bytes; 68 bytes for a call), zero bytes above an address required, strings bounded to 64 characters without control characters. Unchanged since the audited base."100 },101 {102 "construct": "BuiltInTokens tables (six new networks)",103 "location": "Sources/QyvoraEthereum/ERC20.swift:299",104 "verdict": "safe",105 "note": "A row is kept only when its address is written with its exact EIP-55 checksum; every row survives (checked) and every address equals eth-utils' checksum form; decimals of 35 well-known tokens equal the issuers' documentation as the reviewer knows it (6 for Circle and Tether tokens, 18 for the Binance-Peg tokens, 8 for wrapped bitcoin, 18 for BTCB). One symbol is one contract per network."106 },107 {108 "construct": "EthereumRPC.quantity / data",109 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:115",110 "verdict": "safe",111 "note": "A JSON string \"0x\" + 1…64 hexadecimal digits or an error: numbers, empty text, signs, 65 digits (2^256 and beyond) are refused without trap. Property test quantitiesFromAnEndpointAreStrict (20 000 / 200 000 texts)."112 },113 {114 "construct": "EthereumRPC.verifyChain / quorum",115 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:128",116 "verdict": "safe",117 "note": "eth_chainId asked of every endpoint; all that answer must agree and equal the table's identifier, at least one must answer. Checked for every ordered pair of the 14 networks (QyvoraNetworkingTests.EVMChainsAuditRegressionTests.chainIdentityIsCheckedForEveryPairOfNetworks). An endpoint that does not answer is not counted: with one endpoint down the other decides alone (recorded in endpoint_impact)."118 },119 {120 "construct": "EthereumRPC.feeData",121 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:240",122 "verdict": "safe",123 "note": "First endpoint that answers; base fee, priority fee and (BNB Smart Chain) gas price bounded below 10 000 gwei, a zero gas price refused there. Not cross-checked between endpoints (QYV-SVC-014, open, info)."124 },125 {126 "construct": "EthereumRPC.FeeData.maxFee",127 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:232",128 "verdict": "fixed",129 "note": "Fallback addition trapped on large figures built through the public initializer; now saturates.",130 "finding_id": "QYV-SVC-083"131 },132 {133 "construct": "EthereumRPC.l1DataFee",134 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:264",135 "verdict": "safe",136 "note": "Zero without any request on a network that charges no L1 fee; on Base and OP networks the oracle's answer through decodeFee or an error (never zero by default). Property test l1DataFeeIsNeverSilentlyZero: 18 answers × 14 networks, endpoint down included."137 },138 {139 "construct": "EthereumRPC.nativeTransferGas",140 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:274",141 "verdict": "safe",142 "note": "21 000 where it is a constant; on Arbitrum the endpoint's estimate inside [21 000, 30 000 000]. Note: the service does not call this function (it estimates with its own bounds, margin and the 200 000 ceiling)."143 },144 {145 "construct": "EthereumRPC.finalizedBlockNumber / confirmations",146 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:284",147 "verdict": "safe",148 "note": "Never above the head, never negative; a missing tag falls back to head − finalityConfirmations; confirmations saturate. Display only."149 },150 {151 "construct": "EthereumRPC.sendRawTransaction",152 "location": "Sources/QyvoraNetworking/EthereumRPC.swift:309",153 "verdict": "safe",154 "note": "Sent to every endpoint; success when one accepts or already knows it. The identifier returned is compared with the one computed locally (broadcastMismatch): a lying identifier from the last endpoint that answers turns a broadcast that happened into an error, never into a second signature (same nonce, same bytes)."155 },156 {157 "construct": "EthereumIndexer.dialect(of:) and page()",158 "location": "Sources/QyvoraNetworking/Indexers.swift:63",159 "verdict": "safe",160 "note": "Dialect chosen from the configured base (path ending in /api: Etherscan-compatible), never from an answer. Both dialects: bounded text (symbol 16, name 48, method 64 in the Etherscan dialect), decimals 0…36 for holdings, unsigned numbers without trap, unix time inside 2015…2100. The account is validated as 0x + 40 hexadecimal digits before it is put in a URL. Rows are not capped in number: the transport bounds one answer at 32 MiB."161 },162 {163 "construct": "EthereumIndexer Blockscout rows: from / to / hash not validated",164 "location": "Sources/QyvoraNetworking/Indexers.swift:166",165 "verdict": "note",166 "note": "In the Blockscout dialect the address and hash texts are kept as the server wrote them (the Etherscan dialect validates them). The service validates hashes and compares addresses by value when it builds the history (WalletService+Ethereum.buildHistory), so nothing malformed reaches a snapshot; recorded as a difference between the two dialects, without finding."167 },168 {169 "construct": "EndpointConfiguration.init(from:) (schemas 1 and 2)",170 "location": "Sources/QyvoraNetworking/HTTP.swift:190",171 "verdict": "safe",172 "note": "Tolerant by design: a schema-1 value gains the defaults of the networks it could not name, a schema-2 value is taken as stored. Decoding does not validate URLs or counts; the service does when a configuration is set (applyEndpoints: every URL acceptable, at most 400 URLs of at most 300 characters, known network names, fresh authentication), and the clients keep acceptable URLs only (urls()). A profile file edited outside the wallet is therefore filtered at use, not at load. Property test endpointConfigurationDecoding; fuzz target endpoint-config."173 },174 {175 "construct": "EndpointConfiguration.isAcceptable",176 "location": "Sources/QyvoraNetworking/HTTP.swift:342",177 "verdict": "safe",178 "note": "https to any host; http only to localhost, .local, .onion or a private IPv4 literal (10/8, 172.16/12, 192.168/16, 127/8); never a URL with user or password. IPv6 literals and other schemes (ws, wss) are refused. https to a private host is accepted (a personal node). Test QyvoraNetworkingTests.EVMChainsAuditRegressionTests.endpointAcceptanceRule (10 accepted, 24 refused); fuzz target endpoint-config (selector b)."179 },180 {181 "construct": "applyEndpoints: error text names the refused URL",182 "location": "Sources/QyvoraWallet/WalletService.swift:550",183 "verdict": "note",184 "note": "The refused URL, credentials included when the user typed some, is in the error text returned to the caller that supplied it. Nothing in the service logs it; failure summaries of requests name the host only. The interface should not write this error to a log."185 },186 {187 "construct": "EVMEndpointDefaults.rpc / indexer",188 "location": "Sources/QyvoraNetworking/HTTP.swift:411",189 "verdict": "safe",190 "note": "Two https endpoints of two operators per network (so that the chain identifier and the nonce are agreed by two parties), no credentials; seven networks ship without indexer and say so. Checked by EVMChainsVectors."191 },192 {193 "construct": "WalletService.init: stored profile cannot widen the policy",194 "location": "Sources/QyvoraWallet/WalletService.swift:237",195 "verdict": "safe",196 "note": "MainnetPolicy is configured only by a build that declares mainnet testing; while mainnet is not enabled the primary networks are moved to their test counterparts and the mode to test before anything is restored. Test MainnetPolicyTests.aHostileStoredProfileDoesNotOpenTheGate."197 },198 {199 "construct": "requireAllowed (three overloads)",200 "location": "Sources/QyvoraWallet/WalletService.swift:340",201 "verdict": "safe",202 "note": "One rule for the four families: a network that is not a test network needs MainnetPolicy.mainnetEnabled. Reached from every entry point through activeKind, the family account accessors and the verified clients (list in mainnet_gate.entry_points)."203 },204 {205 "construct": "WalletService.activeKinds / activeKind",206 "location": "Sources/QyvoraWallet/WalletService+Chains.swift:98",207 "verdict": "safe",208 "note": "A main network is never returned while mainnet is not enabled; activeKind applies the gate before it answers chainNotActive, so a main identifier is refused with mainnetDisabled whatever is enabled."209 },210 {211 "construct": "setNetworkMode",212 "location": "Sources/QyvoraWallet/WalletService+Chains.swift:210",213 "verdict": "fixed",214 "note": "Needs mainnetEnabled and a fresh authentication; the authentication was skipped when the stored mode already said main while a primary network was on a test network.",215 "finding_id": "QYV-SVC-080"216 },217 {218 "construct": "setBitcoinNetwork / setEthereumNetwork / setActiveNetworks",219 "location": "Sources/QyvoraWallet/WalletService.swift:513",220 "verdict": "fixed",221 "note": "The 1.0 setters moved a primary network to a main network without fresh authentication.",222 "finding_id": "QYV-SVC-080"223 },224 {225 "construct": "setMainnetOptIn",226 "location": "Sources/QyvoraWallet/WalletService.swift:604",227 "verdict": "safe",228 "note": "Turning the user switch on needs a fresh authentication; turning it off moves every chain back to its test network at once. The switch is stored in the profile file, which is not authenticated (QYV-SVC-011, residual): on an internal build a party able to write the application container can set it."229 },230 {231 "construct": "applyEndpoints",232 "location": "Sources/QyvoraWallet/WalletService.swift:538",233 "verdict": "safe",234 "note": "Fresh authentication when anything changes; every URL of every family must be acceptable; bounded counts and lengths; unknown network names refused; persisted snapshots of a chain whose endpoints changed are forgotten and chain identity is verified again (verifiedChains reset)."235 },236 {237 "construct": "verifiedRPC (chain identity once per session and per endpoint list)",238 "location": "Sources/QyvoraWallet/WalletService.swift:459",239 "verdict": "safe",240 "note": "Gate, cold mode, then eth_chainId on every endpoint before anything they say is used; the cache key holds the network and its endpoint list. A custom endpoint configured for network A that answers the chain identifier of B is refused (wrongChain) on every one of the 14 networks: EVMNetworkWalletTests.wrongChainIsRefusedOnEveryTestNetwork, MultiChainTests.anEndpointOfAnotherChainIsRefusedPerChain."241 },242 {243 "construct": "SendReview / EthereumSendReview / BitcoinSendPlan (review objects)",244 "location": "Sources/QyvoraWallet/WalletService+Send.swift:119",245 "verdict": "safe",246 "note": "Every stored property is `let` and no initializer is public: a caller outside the module cannot build or alter a review. Signing does not rely on that: each family re-derives what it signs from the transaction bytes and applies gate, structure and limits to them (MainnetPolicyTests.anAlteredEVMReviewIsNotSigned builds altered reviews with the internal initializer: larger value, larger fee, larger gas, other chain identifier, other network, other account, undecodable data, approval, access list, creation — all refused)."247 },248 {249 "construct": "signAndBroadcast (uniform)",250 "location": "Sources/QyvoraWallet/WalletService+Send.swift:582",251 "verdict": "safe",252 "note": "Full wallet, unlocked vault and fresh authentication before any request; then the family path, each of which applies the gate (account accessor), the binding to the vault's account, the limits on the bytes and a check of the signed result."253 },254 {255 "construct": "prepareSend (uniform)",256 "location": "Sources/QyvoraWallet/WalletService+Send.swift:402",257 "verdict": "safe",258 "note": "activeKind (gate) first, then the one address validation of every family (checkAddress), then the family's builder. Balances are read again on chain by the account families; UTXO payments need a snapshot of this session."259 },260 {261 "construct": "evmToken (token of a uniform payment)",262 "location": "Sources/QyvoraWallet/WalletService+Send.swift:368",263 "verdict": "fixed",264 "note": "The description of a token comes from the wallet's list first; a detected token is used only when this session read it on chain.",265 "finding_id": "QYV-SVC-084"266 },267 {268 "construct": "checkAddress (single validation of every family)",269 "location": "Sources/QyvoraWallet/WalletService+Send.swift:253",270 "verdict": "safe",271 "note": "Bounded to 120 bytes; per family: the chain's own parser, then a refusal that names what the text is (wrongFamily, wrongNetwork, invalidChecksum, missingPrefix, zeroAddress, unsupported). The result carries what the interface must show: canonical form, own-address flag, notes (no checksum on EVM, no checksum at all on Solana, off-curve Solana address, legacy Bitcoin Cash form). No text is valid for two families (property test over 29 networks; fuzz target check-address). Test networks share version bytes across coins: recorded in QYV-APP-082."272 },273 {274 "construct": "buildEthereumReview (EVM, every network)",275 "location": "Sources/QyvoraWallet/WalletService+Ethereum.swift:543",276 "verdict": "safe",277 "note": "Nonce agreed by every endpoint (latest and pending); fees through EVMFeeRules; balance read again; gas estimated where it is not a constant (Arbitrum, contract recipient, tokens) with a margin and the 200 000 ceiling; token call simulated; on OP-Stack the L1 data fee is asked for this very transaction, an oracle failure is an error, the fee with its margin is in maximumFee, in the total checked against the balance, in the fee ceiling and is taken out of a send-max amount; the review is consistent with the transaction (maximumCost == total) before it is returned."278 },279 {280 "construct": "checkSignable",281 "location": "Sources/QyvoraWallet/WalletService+Ethereum.swift:710",282 "verdict": "safe",283 "note": "The chain identifier of the bytes must be the network's; no contract creation, no access list, priority ≤ max fee below 100 000 gwei, gas inside [21 000, 200 000], call data at most 4 096 bytes, a token transfer never to the zero address nor to the token contract."284 },285 {286 "construct": "enforceUnauditedEthereumLimits",287 "location": "Sources/QyvoraWallet/WalletService+Ethereum.swift:738",288 "verdict": "safe",289 "note": "Applied to the transaction itself at prepare (with the L1 fee), at sign (hot and cold) and, since this audit, at the broadcast of a cold-signed transaction. Ether networks: 0.05 ETH and 0.01 ETH without any price. Other coins: 150 USD and 5 USD at a fresh, plausible price or refusal. Tokens: a contract of the wallet's list with a price identifier, 150 USD at a fresh price; an unknown token, an approval that is not a revocation and undecodable call data are refused. Token prices have no floor: QYV-SVC-087 (open)."290 },291 {292 "construct": "signEthereum",293 "location": "Sources/QyvoraWallet/WalletService+Ethereum.swift:783",294 "verdict": "safe",295 "note": "The account must be the one the vault vouches for, the key derived must give that address, the signed bytes must decode to the same transaction and recover the same sender. The private key buffer is zeroed and the derived key wiped (defer order checked)."296 },297 {298 "construct": "broadcastSignedEthereum",299 "location": "Sources/QyvoraWallet/WalletService+Ethereum.swift:964",300 "verdict": "fixed",301 "note": "Canonical encoding, valid signature of this account, chain identifier of an active network, structural rules, nonce not already used; the limits were not applied again.",302 "finding_id": "QYV-SVC-081"303 },304 {305 "construct": "coldNetwork(chainID:)",306 "location": "Sources/QyvoraWallet/WalletService+Ethereum.swift:893",307 "verdict": "safe",308 "note": "The network of a cold EVM transaction is the chain identifier inside the bytes, never a label: an identifier that is not an active network of the wallet is a chainMismatch (a main network while the gate is closed included)."309 },310 {311 "construct": "cold EVM review (coldReview)",312 "location": "Sources/QyvoraWallet/WalletService+Ethereum.swift:899",313 "verdict": "safe",314 "note": "Decoded from the payload bytes only; the canonical re-encoding must equal the bytes received; the summary states the network with its chain identifier, and on OP-Stack networks that the L1 data fee is not included and cannot be computed offline."315 },316 {317 "construct": "classify (cold envelope qyvtx1|u/s|<chain>|<payload>)",318 "location": "Sources/QyvoraWallet/WalletService+Cold.swift:67",319 "verdict": "safe",320 "note": "Exactly four parts, marker u or s, payload at most 40 000 characters, chain through activeKind (unknown identifier, inactive network and closed gate refused). Another version (qyvtx2) is not an envelope: the text is read as a PSBT and refused as one. Linear in the length of the text (the property test refuses six megabyte-sized texts and asserts a bound on the time). The envelope carries no descriptive field at all: label and payload only."321 },322 {323 "construct": "cold Solana / TRON review and signature",324 "location": "Sources/QyvoraWallet/WalletService+Cold.swift:110",325 "verdict": "note",326 "note": "The payload must decode canonically as a transaction of the labelled family, paid and signed by this wallet's account alone; everything shown is decoded from the payload. The family label binds (a Solana payload under a TRON label and the reverse are refused as invalid payloads). The network label does not bind and cannot: a Solana or TRON transaction names no network and the account key is the same on every network of the chain. The Solana and TRON areas recorded this and added warnings to the cold review (their findings, e.g. QYV-SVC-022); main-network payments of both chains cannot be cold-signed by an unaudited build at all (no fresh price offline)."327 },328 {329 "construct": "broadcastSigned (envelope and EVM)",330 "location": "Sources/QyvoraWallet/WalletService+Cold.swift:292",331 "verdict": "safe",332 "note": "A signed result is verified before any request: valid signature of this wallet's account, canonical encoding, limits of an unaudited build. It is not compared with a prepared payload kept by the online device (none is kept): substituting the signed text on its way back needs another transaction validly signed by the cold key, which the attacker cannot make; an old signed transaction of the same account is stopped by its nonce, blockhash or expiration."333 },334 {335 "construct": "exportWatchOnlyPackage / importWatchOnly(package:)",336 "location": "Sources/QyvoraWallet/WalletService+Onboarding.swift:469",337 "verdict": "fixed",338 "note": "Public material only (account keys parsed as public, private versions refused, addresses validated per family); main-network coin accounts left out while the gate is closed; chains named by the package are enabled only when the package carried an account of their family; version 1 still read. The Bitcoin account's network is now validated before anything is created.",339 "finding_id": "QYV-SVC-086"340 },341 {342 "construct": "watch-only package: authenticity",343 "location": "Sources/QyvoraWallet/WalletService+Onboarding.swift:553",344 "verdict": "open",345 "note": "The package is not authenticated. A fingerprint of every account it carries exists since this audit; the screens must show and compare it.",346 "finding_id": "QYV-APP-080"347 },348 {349 "construct": "AccountBinding (vault record, versions 1 and 2)",350 "location": "Sources/QyvoraWallet/WalletService+Onboarding.swift:168",351 "verdict": "safe",352 "note": "Kept in a vault record (authenticated by the vault key): the account keys of every UTXO network, the EVM address, and since version 2 the Solana and TRON addresses. Read strictly (format marker, version 1 or 2, at most 16 KiB, a parseable EVM address; an unparseable Solana or TRON address counts as absent and is derived again). A version-1 record is completed from the recovery phrase at the next unlock without touching what it already vouched for; an unknown future version is treated as no record and replaced by a derivation from the phrase. Property test: every family's account swapped in the profile is restored from the vault and counted."353 },354 {355 "construct": "verifyAccountBinding",356 "location": "Sources/QyvoraWallet/WalletService+Onboarding.swift:243",357 "verdict": "safe",358 "note": "After every unlock the profile's public account data is compared with the vault's; on a difference the vault's is put back and everything read for the other account is forgotten (indices, frozen coins, snapshots, persisted files). Signing compares the derived key with the vault's record, not with the profile."359 },360 {361 "construct": "SolanaChainRecord.validated / TronChainRecord.validated",362 "location": "Sources/QyvoraWallet/ChainPersistence.swift:113",363 "verdict": "safe",364 "note": "A persisted record must carry the identity of this account, network and endpoint list, a version 1…current, bounded counts (holdings 1 200 / 200, history 500, notes 50), decimals in range and tokens of its own chain; otherwise the file is ignored and removed. Read with a size bound (4 MiB; EVM 8 MiB). Restored data is flagged isFromPreviousSession. File names are constants built from enum raw values (13 names), never from text of a file or an endpoint. Property and fuzz tests through the service's own loaders."365 },366 {367 "construct": "restoredEthereum / restoredSolana / restoredTron",368 "location": "Sources/QyvoraWallet/ChainPersistence.swift:240",369 "verdict": "safe",370 "note": "A main-network file is not restored while the gate is closed. What is restored is display data: every account-family payment reads balance, nonce, fees, blockhash or reference block again on chain, and a UTXO payment needs a snapshot of this session. The one path from a restored file to a review (token description) is closed by QYV-SVC-084."371 },372 {373 "construct": "freshUSDPrice",374 "location": "Sources/QyvoraWallet/WalletService+Market.swift:102",375 "verdict": "fixed",376 "note": "The single function every family converts a dollar ceiling with. One price source; a stale or missing quote is fetched, an unusable one refuses the transaction; a price under the floor of a native coin is now refused as well.",377 "finding_id": "QYV-SVC-082"378 },379 {380 "construct": "ChainDescriptor.explorerTransactionURL / explorerAddressURL",381 "location": "Sources/QyvoraWallet/Chains.swift:212",382 "verdict": "fixed",383 "note": "UTXO links were built from any alphanumeric text, without host on a network without explorer.",384 "finding_id": "QYV-FUZ-080"385 },386 {387 "construct": "ChainRegistry tables and ChainID",388 "location": "Sources/QyvoraWallet/Chains.swift:284",389 "verdict": "safe",390 "note": "29 networks in fixed tables; an identifier outside them has no kind and every entry point answers unknownChain. The fallbacks of id(_:) and descriptor(_:) are unreachable for kinds built from the tables. Fuzz target network-table."391 }392 ],393 "endpoint_impact": [394 {395 "capability": "Answer another chain identifier (an endpoint of chain B configured for network A)",396 "what_the_wallet_does": "Refuses the network: eth_chainId is asked of every endpoint and must equal the table's identifier before anything else is used; two endpoints that differ are a disagreement.",397 "impact": "None beyond unavailability of that network.",398 "mitigation": "Sources/QyvoraNetworking/EthereumRPC.swift:130",399 "residual_risk": "An endpoint that does not answer is not counted: with the second endpoint down, one endpoint passes the check alone. It must still claim the right identifier, and the identifier that is signed comes from the table, never from the endpoint."400 },401 {402 "capability": "Lie about the balance (eth_getBalance) or a token balance (eth_call balanceOf)",403 "what_the_wallet_does": "Shows it (first endpoint that answers). A payment prepared on an inflated balance is refused by the chain; on a deflated one the wallet refuses to prepare.",404 "impact": "Wrong figures on screen; denial of sending. No loss.",405 "mitigation": "Sources/QyvoraWallet/WalletService+Ethereum.swift:691",406 "residual_risk": "Not cross-checked between endpoints (QYV-SVC-014, open, info). A send-max on a deflated balance sends less than everything: the review shows the amount."407 },408 {409 "capability": "Lie about the nonce (eth_getTransactionCount)",410 "what_the_wallet_does": "For a payment every endpoint that answers must report the same value, with one retry; otherwise nothing is prepared.",411 "impact": "With two endpoints: refusal. With one endpoint answering: a transaction that fails (nonce too low) or stays pending (nonce too high) until it is replaced.",412 "mitigation": "Sources/QyvoraWallet/WalletService+Ethereum.swift:228",413 "residual_risk": "A stuck transaction blocks the account until replaced (replacePending). No loss of funds."414 },415 {416 "capability": "Inflate the base fee, the priority fee, the gas price or the gas estimate",417 "what_the_wallet_does": "Bounds each figure (10 000 gwei per figure, 100 000 gwei of max fee, gas at most 200 000 after the margin) and, on an unaudited mainnet build, the maximum fee of the transaction (0.01 ETH, or 5 USD of POL, BNB or AVAX).",418 "impact": "Mainnet today: at most the fee ceiling, shown in the review. Test networks: up to about 8 coins of fee for a 200 000-gas call (2 × base + 2 × tip at the per-figure bounds), shown in the review; the base-fee part is refunded by the chain when the real base fee is lower, the priority part is paid.",419 "mitigation": "Sources/QyvoraEthereum/EVMFees.swift:109",420 "residual_risk": "Fee figures come from the first endpoint (QYV-SVC-014). The general bounds are wide on purpose (congestion); only the mainnet ceilings are tight."421 },422 {423 "capability": "Lie about the L1 data fee (eth_call to the GasPriceOracle on Base and OP networks)",424 "what_the_wallet_does": "Over-reported: the answer must be one word below 0.1 ETH; with its margin it is counted in the fee ceiling, so on mainnet a quote above 0.008 ETH refuses the payment. Under-reported (zero included): the review shows less than the network will charge. An error or a malformed answer refuses the payment: the fee is never assumed to be zero.",425 "impact": "The L1 fee is not in the signed transaction: the network charges its own figure whatever the wallet displayed. An under-reporting endpoint gains nothing for itself; the user pays the real L1 fee (set by the chain, typically far below the L2 fee ceiling) instead of the smaller one shown, and a send-max then fails for insufficient funds instead of over-spending. An over-reporting endpoint makes a send-max send up to 0.125 ETH less (shown) on a test network, or denies the payment on mainnet.",426 "mitigation": "Sources/QyvoraWallet/WalletService+Ethereum.swift:675",427 "residual_risk": "The displayed L1 fee is a quote of one endpoint, and nothing in the engine can bound what the network really charges. The review labels it as quoted with a margin and says it is not a field of the transaction; the interface must present it as an estimate (QYV-APP-082)."428 },429 {430 "capability": "Forge token metadata (decimals, symbol) or the indexer's token list",431 "what_the_wallet_does": "Built-in tokens: decimals are pinned in the list, re-read on chain once per session and a mismatch is shown instead of a balance. Indexer symbols and decimals are ignored: a detected token is described by the chain and kept apart from the list. Custom tokens: read on chain when added, flagged as custom.",432 "impact": "Built-in tokens: none on the amount signed or shown in a review. Custom and detected tokens: the description is one endpoint's word, so the amount shown can differ from the token's real scale on a test network or an audited build; on an unaudited mainnet build such tokens cannot be sent (no price identifier).",433 "mitigation": "Sources/QyvoraWallet/WalletService+Ethereum.swift:132",434 "residual_risk": "eth_call is not cross-checked (QYV-SVC-014). The interface must mark custom and detected tokens (ChainToken.isCustom, detectedTokens)."435 },436 {437 "capability": "Forge the history (indexer, both dialects) or eth_call results of approvals",438 "what_the_wallet_does": "Displays it, with bounded text; hashes are validated; token rows are marked verified only when the token is the wallet's.",439 "impact": "A wrong history. One security-relevant effect: a forged \"sent\" entry to an address suppresses the first-payment warning for that address.",440 "mitigation": "Sources/QyvoraWallet/WalletService+Ethereum.swift:536",441 "residual_risk": "The first-payment warning depends on the indexer's word (already noted in QYV-APP-010). Seven EVM networks ship without indexer: there the warning always shows."442 },443 {444 "capability": "Censor or misreport a broadcast (eth_sendRawTransaction)",445 "what_the_wallet_does": "Sends to every endpoint; compares the returned identifier with the locally computed one.",446 "impact": "With one honest endpoint the transaction reaches the network. A liar can turn a successful broadcast into a broadcastMismatch error; signing again gives the same bytes (same nonce), so nothing is paid twice.",447 "mitigation": "Sources/QyvoraWallet/WalletService+Ethereum.swift:811",448 "residual_risk": "Censorship by every configured endpoint cannot be detected by the wallet; track() reports pending."449 },450 {451 "capability": "Lie about a price (price API, one source)",452 "what_the_wallet_does": "Uses it to convert the dollar ceilings of an unaudited mainnet build and to value balances. A price under the floor of a native coin is refused.",453 "impact": "Native coins: one transaction is bounded by 150 USD / floor coins whatever the source says (QYV-SVC-082, fixed). Tokens: no bound (QYV-SVC-087, open, high).",454 "mitigation": "Sources/QyvoraWallet/WalletService+Market.swift:114",455 "residual_risk": "Between the real price and the floor the ceiling is enlarged by that ratio. Valuations on screen follow the source."456 }457 ],458 "replay_protection": {459 "statement": "EVM: every transaction the wallet signs is type 2 (EIP-1559); the chain identifier is the first field of the signed payload and comes from the network table, never from an endpoint. The same account key serves the fourteen networks, so the chain identifier is the only thing that separates them, and it is sufficient: a signature made for one network, attached to the same fields under any other of the thirteen identifiers, recovers another account here and in eth-keys (differential campaign evm-cross-chain-replay: every ordered pair, 182 pairs per round). No legacy (pre-EIP-155) transaction is produced or accepted for signing: decodeUnsigned refuses every type byte but 0x02 and the cold path re-encodes canonically.",460 "chain_identity": "Before signing or broadcasting, the endpoints of the network must answer its chain identifier (verifiedRPC → verifyChain); the review, the transaction and the network of signEthereum are tied by checkSignable (tx.chainID == network.chainID), and a review of another network or account is a stalePlan.",461 "cold_mode": "A cold EVM transaction names its network by the chain identifier in its bytes (coldNetwork); a label cannot change it. Solana and TRON transactions name no network: see the Solana and TRON areas.",462 "nonce_replay": "Within a chain the account nonce prevents the replay of a transaction; broadcastSignedEthereum refuses a nonce below the account's.",463 "residual_risks": [464 "A chain that reuses the chain identifier of a supported network (a fork, a private network configured as a custom endpoint) accepts the same signatures: the wallet cannot tell two chains with one identifier apart beyond what eth_chainId says.",465 "The key is shared by every EVM network: publishing one transaction on any of them publishes the public key for all (stated by the Quantum Shield exposure text)."466 ],467 "evidence": [468 {469 "ref": "Sources/QyvoraEthereum/Transaction.swift:90",470 "contains": ".uint(chainID), .uint(nonce), .uint(maxPriorityFeePerGas), .uint(maxFeePerGas), .uint(gasLimit),"471 },472 {473 "ref": "Sources/QyvoraWallet/WalletService+Ethereum.swift:711",474 "contains": "guard tx.chainID == network.chainID else { throw EthereumRefusal.chainMismatch(expected: network.chainID, found: tx.chainID) }"475 },476 {477 "ref": "Sources/QyvoraEthereum/Transaction.swift:119",478 "contains": "guard payload.first == 0x02 else { throw Error.notType2 }"479 },480 {481 "ref": "security/tests/Tests/DifferentialAuditTests/EVMChainsDiffTests.swift:147",482 "contains": "@Test func aSignatureDoesNotCarryOverToAnotherChain() throws {"483 }484 ]485 },486 "mainnet_gate": {487 "rule": "A network that is not a test network needs MainnetPolicy.mainnetEnabled = auditCompleted || (internal build declaration && user switch). The declaration is passed by the application at creation (Info.plist key QYInternalMainnet); the user switch is setMainnetOptIn, which needs a fresh authentication to be turned on.",488 "entry_points": [489 {490 "entry": "synchronize(chain:), synchronize(chains:), track(chain:id:), addCustomToken(chain:…), prepareSend(chain:…)",491 "check": "activeKind → requireAllowed(kind)",492 "evidence": {493 "ref": "Sources/QyvoraWallet/WalletService+Chains.swift:118",494 "contains": "try requireAllowed(kind)"495 }496 },497 {498 "entry": "reviewColdTransaction, signColdTransaction, broadcastSigned (envelope)",499 "check": "classify → activeKind(ChainID(label))",500 "evidence": {501 "ref": "Sources/QyvoraWallet/WalletService+Cold.swift:74",502 "contains": "let kind = try activeKind(ChainID(parts[2]))"503 }504 },505 {506 "entry": "EVM: syncEthereum / syncEVM, prepareEthereumSend, revokeApproval, signAndBroadcastEthereum, trackEthereumTransaction, cold review / sign / broadcast",507 "check": "ethereumAccount(network) and verifiedRPC(network) → requireAllowed(network); coldNetwork(chainID:) only answers an active network",508 "evidence": {509 "ref": "Sources/QyvoraWallet/WalletService.swift:362",510 "contains": "try requireAllowed(network ?? profile.ethereumNetwork)"511 }512 },513 {514 "entry": "EVM clients",515 "check": "verifiedRPC",516 "evidence": {517 "ref": "Sources/QyvoraWallet/WalletService.swift:459",518 "contains": "func verifiedRPC(_ network: EthereumNetwork) async throws -> EthereumRPC {"519 }520 },521 {522 "entry": "Bitcoin: account, addresses, sync, prepare, sign, PSBT",523 "check": "bitcoinAccount(network) and verifiedEsplora → requireAllowed(network)",524 "evidence": {525 "ref": "Sources/QyvoraWallet/WalletService.swift:345",526 "contains": "func bitcoinAccount(_ network: BitcoinNetwork? = nil) throws -> BIP84Account {"527 }528 },529 {530 "entry": "Litecoin, Dogecoin, Bitcoin Cash: account and indexer accessors",531 "check": "requireAllowed(network) in WalletService+UTXOCoins (two accessors)",532 "evidence": {533 "ref": "Sources/QyvoraWallet/WalletService+UTXOCoins.swift:83",534 "contains": "try requireAllowed(network)"535 }536 },537 {538 "entry": "Solana: account and verified client",539 "check": "requireAllowed(.solana(network))",540 "evidence": {541 "ref": "Sources/QyvoraWallet/WalletService+Solana.swift:71",542 "contains": "try requireAllowed(.solana(network))"543 }544 },545 {546 "entry": "TRON: account and verified client",547 "check": "requireAllowed(.tron(network))",548 "evidence": {549 "ref": "Sources/QyvoraWallet/WalletService+Tron.swift:78",550 "contains": "try requireAllowed(.tron(network))"551 }552 },553 {554 "entry": "setNetworkMode(.main)",555 "check": "mainnetEnabled, then fresh authentication",556 "evidence": {557 "ref": "Sources/QyvoraWallet/WalletService+Chains.swift:213",558 "contains": "guard MainnetPolicy.mainnetEnabled else { throw WalletError.mainnetDisabled(WalletError.mainnetText) }"559 }560 },561 {562 "entry": "setBitcoinNetwork, setEthereumNetwork, setActiveNetworks",563 "check": "requireAllowed, then fresh authentication when leaving a test network (QYV-SVC-080)",564 "evidence": {565 "ref": "Sources/QyvoraWallet/WalletService.swift:518",566 "contains": "if !network.isTest, profile.ethereumNetwork.isTest { try await requireFreshAuthentication() }"567 }568 },569 {570 "entry": "importWatchOnly (key by key, and the package)",571 "check": "a main-network key or network is refused or left out while the gate is closed",572 "evidence": {573 "ref": "Sources/QyvoraWallet/WalletService+Onboarding.swift:484",574 "contains": "guard b.network.isTest || MainnetPolicy.mainnetEnabled else { throw WalletError.mainnetDisabled(WalletError.mainnetText) }"575 }576 },577 {578 "entry": "WalletService.init (stored profile)",579 "check": "primary networks and mode forced to test while the gate is closed",580 "evidence": {581 "ref": "Sources/QyvoraWallet/WalletService.swift:238",582 "contains": "if !MainnetPolicy.mainnetEnabled {"583 }584 },585 {586 "entry": "restored snapshots",587 "check": "a main-network file is not restored while the gate is closed",588 "evidence": {589 "ref": "Sources/QyvoraWallet/ChainPersistence.swift:246",590 "contains": "MainnetPolicy.mainnetEnabled || record.network.isTest, let snapshot = record.snapshot() else {"591 }592 },593 {594 "entry": "chainSnapshot / chainSnapshots / activeChains",595 "check": "activeKinds never contains a main network while the gate is closed",596 "evidence": {597 "ref": "Sources/QyvoraWallet/WalletService+Chains.swift:107",598 "contains": "if let kind, kind.isTest || MainnetPolicy.mainnetEnabled { out.append(kind) }"599 }600 }601 ],602 "not_gated_by_design": "checkAddress (validation of text, no chain access), supportedChains (static data), explorer links, watchOnlyFingerprint.",603 "tests": [604 {605 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:280",606 "contains": "@Test func everyFamilyIsBehindTheGateAtEveryEntryPoint() async throws {"607 },608 {609 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:327",610 "contains": "@Test func aHostileStoredProfileDoesNotOpenTheGate() async throws {"611 },612 {613 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:70",614 "contains": "@Test func leavingTheTestNetworksAlwaysNeedsAFreshAuthentication() async throws {"615 },616 {617 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:459",618 "contains": "@Test func aReviewDoesNotSurviveAChangeOfNetworkMode() async throws {"619 }620 ]621 },622 "wallet_audit_items": [623 {624 "id": "WA-EVM-01",625 "title": "EVM network table: chain identifiers, native coins and decimals of the fourteen networks",626 "group": "replay-protection",627 "verdict": "pass",628 "scope": "service",629 "rationale": "The chain identifier signs for a chain and the decimals scale what is shown: both equal the public chain registry for the seven main and seven test networks (transcribed by the reviewer, and compared with the registry shipped in eth-utils); an identifier the wallet does not support names no network.",630 "evidence": [631 {632 "ref": "Sources/QyvoraCore/Networks.swift:482",633 "contains": "case .base: return 8_453"634 },635 {636 "ref": "Sources/QyvoraCore/Networks.swift:696",637 "contains": "public var nativeDecimals: Int { 18 }"638 },639 {640 "ref": "security/tests/Tests/ConformanceAuditTests/EVMChainsVectors.swift:85",641 "contains": "@Test func networkTableMatchesTheChainRegistry() {"642 },643 {644 "ref": "security/tests/Tests/DifferentialAuditTests/EVMChainsDiffTests.swift:186",645 "contains": "@Test func chainIdentifiersExistInTheRegistryOfEthUtils() throws {"646 }647 ]648 },649 {650 "id": "WA-EVM-02",651 "title": "EIP-1559 signing on every EVM network, identical to an independent library",652 "group": "replay-protection",653 "verdict": "pass",654 "scope": "service",655 "rationale": "Unsigned payload, signing hash, RFC 6979 signature (r, s, yParity), raw transaction, hash and sender are byte-identical to eth-account 0.14.0 for random transactions on the fourteen identifiers of the table and on boundary identifiers up to 2^64 − 1; a signature relabelled for another network never recovers the signer. Only type-2 transactions are produced.",656 "evidence": [657 {658 "ref": "Sources/QyvoraEthereum/Transaction.swift:97",659 "contains": "public var unsignedPayload: Bytes { [0x02] + RLP.list(fields).encoded }"660 },661 {662 "ref": "security/tests/Tests/DifferentialAuditTests/EVMChainsDiffTests.swift:103",663 "contains": "@Test func eip1559AcrossChainIdentifiers() throws {"664 },665 {666 "ref": "security/tests/Tests/DifferentialAuditTests/EVMChainsDiffTests.swift:147",667 "contains": "@Test func aSignatureDoesNotCarryOverToAnotherChain() throws {"668 }669 ]670 },671 {672 "id": "WA-EVM-03",673 "title": "EVM fee rules bound every figure an endpoint supplies",674 "group": "fees-nonces-utxos",675 "verdict": "pass",676 "scope": "service",677 "rationale": "maxPriorityFeePerGas ≤ maxFeePerGas always; base fee, priority fee and gas price below 10 000 gwei, max fee below 100 000 gwei, checked arithmetic; Polygon's minimum tip and BNB Smart Chain's zero base fee handled; gas limit at most 200 000; on an unaudited mainnet build the maximum fee of a transaction is capped (0.01 ETH, or 5 USD of POL, BNB, AVAX).",678 "residual_risk": "Fee figures come from the first endpoint that answers (QYV-SVC-014). On test networks only the general bounds apply.",679 "evidence": [680 {681 "ref": "Sources/QyvoraEthereum/EVMFees.swift:109",682 "contains": "guard !o1, !o2, !maxFee.isZero, maxFee < maxFeePerGasCeiling, tip <= maxFee else { throw .outOfRange }"683 },684 {685 "ref": "security/tests/Tests/PropertyAuditTests/EVMChainsProperties.swift:98",686 "contains": "@Test func feeRulesHoldForEveryEndpointFigure() {"687 },688 {689 "ref": "security/tests/Sources/FuzzTargets/Targets+EVMChains.swift:109",690 "contains": "\"evm-fee-quotes\", \"EVM fee rules on figures of a hostile endpoint: priority ≤ max fee, ceilings, network floors, cost and send-max arithmetic without overflow\","691 }692 ]693 },694 {695 "id": "WA-EVM-04",696 "title": "OP-Stack L1 data fee: quoted for the transaction, never assumed zero, counted in the fee, the total and send-max",697 "group": "fees-nonces-utxos",698 "verdict": "partial",699 "scope": "service",700 "rationale": "On Base and OP networks the L1 data fee is read from the GasPriceOracle predeploy for the very transaction; the answer must be one 32-byte word below 0.1 ETH, a failure refuses the payment; the fee with a margin of one quarter is in the maximum fee, in the total checked against the balance, in the fee ceiling of an unaudited build, and is taken out of a send-max amount. A cold device states that it cannot compute it.",701 "gap": "The L1 fee is not a field of the signed transaction: the figure shown is a quote of one endpoint and the network charges its own. The engine cannot bound the real charge; the interface must present the figure as an estimate (QYV-APP-082).",702 "finding": "QYV-APP-082",703 "evidence": [704 {705 "ref": "Sources/QyvoraEthereum/EVMFees.swift:166",706 "contains": "guard let fee = ERC20.decodeUInt(returned), fee < feeCeiling else { return nil }"707 },708 {709 "ref": "Sources/QyvoraWallet/WalletService+Ethereum.swift:684",710 "contains": "value = value - l1DataFee"711 },712 {713 "ref": "security/tests/Tests/PropertyAuditTests/EVMChainsProperties.swift:287",714 "contains": "@Test func l1DataFeeIsNeverSilentlyZero() async throws {"715 },716 {717 "ref": "security/tests/Tests/DifferentialAuditTests/EVMChainsDiffTests.swift:206",718 "contains": "@Test func opStackOracleCallAndReturnData() throws {"719 }720 ]721 },722 {723 "id": "WA-EVM-05",724 "title": "Chain identity of the endpoints of every EVM network",725 "group": "network",726 "verdict": "pass",727 "scope": "service",728 "rationale": "Before anything an endpoint says is used, every endpoint of the network must answer the chain identifier of the table (checked once per session and per endpoint list, again after any change of endpoints). An endpoint of another chain configured for a network is refused on each of the fourteen networks.",729 "residual_risk": "An endpoint that does not answer is not counted; a chain that shares an identifier cannot be told apart.",730 "evidence": [731 {732 "ref": "Sources/QyvoraNetworking/EthereumRPC.swift:130",733 "contains": "guard id == UInt256(network.chainID) else { throw NetworkError.disagreement("734 },735 {736 "ref": "Sources/QyvoraWallet/WalletService.swift:464",737 "contains": "let key = \"eth|\\(network.rawValue)|\" + (profile.endpoints.ethereumRPC[network.rawValue] ?? []).joined(separator: \",\")"738 },739 {740 "ref": "Tests/QyvoraNetworkingTests/EVMChainsAuditRegressionTests.swift:100",741 "contains": "@Test func chainIdentityIsCheckedForEveryPairOfNetworks() async throws {"742 }743 ]744 },745 {746 "id": "WA-EVM-06",747 "title": "Built-in token lists of the EVM networks: pinned decimals, checksummed contracts, unknown tokens kept apart",748 "group": "fraud-protection",749 "verdict": "pass",750 "scope": "service",751 "rationale": "A built-in row is accepted only with its exact EIP-55 checksum; decimals are pinned in the list and compared with the contract once per session; tokens the indexer reports are described by the chain and quarantined in detectedTokens; a token without a price identifier cannot be sent on an unaudited mainnet build.",752 "residual_risk": "Custom and detected tokens are described by one endpoint (QYV-SVC-014).",753 "evidence": [754 {755 "ref": "Sources/QyvoraEthereum/ERC20.swift:302",756 "contains": "guard let a = EthereumAddress(row.3), a.checksummed == row.3 else { return nil }"757 },758 {759 "ref": "security/tests/Tests/ConformanceAuditTests/EVMChainsVectors.swift:186",760 "contains": "@Test func builtInTokenDecimals() {"761 },762 {763 "ref": "security/tests/Tests/DifferentialAuditTests/EVMChainsDiffTests.swift:267",764 "contains": "@Test func builtInTokenAddressesCarryTheirChecksum() throws {"765 }766 ]767 },768 {769 "id": "WA-MC-01",770 "title": "Limits table: a ceiling for every main network of every family, applied to the bytes at prepare and at sign",771 "group": "mainnet-gate",772 "verdict": "partial",773 "scope": "service",774 "rationale": "Each of the thirteen main networks has a value ceiling and a fee ceiling (no default that means unlimited); they are applied to the transaction itself when it is prepared, again when it is signed (hot and cold), and at the broadcast of a cold-signed transaction. A review object altered after the review, a review of another network mode, a price that moved, a transaction signed elsewhere above the ceiling are all refused. Dollar ceilings of native coins hold whatever the price source says (price floors).",775 "gap": "The 150 USD ceiling of a token transfer depends on the price of one source without floor (QYV-SVC-087, high, open).",776 "finding": "QYV-SVC-087",777 "evidence": [778 {779 "ref": "Sources/QyvoraCore/Networks.swift:439",780 "contains": "public static func utxoLimits(_ network: BitcoinNetwork) -> UTXOLimits? {"781 },782 {783 "ref": "Sources/QyvoraWallet/WalletService+Ethereum.swift:790",784 "contains": "try await enforceUnauditedEthereumLimits(tx, network: network)"785 },786 {787 "ref": "Sources/QyvoraWallet/WalletService+Market.swift:106",788 "contains": "guard MainnetPolicy.isPlausibleUSDPrice(q.price, priceID: id) else { throw implausible }"789 },790 {791 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:386",792 "contains": "@Test func anAlteredEVMReviewIsNotSigned() async throws {"793 },794 {795 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:350",796 "contains": "@Test func everyMainNetworkHasCeilingsAndNoTestNetworkHasAny() async throws {"797 },798 {799 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:149",800 "contains": "@Test func aPriceCloseToZeroDoesNotLiftTheDollarCeilings() async throws {"801 }802 ]803 },804 {805 "id": "WA-MC-02",806 "title": "Mainnet gate on every family and every entry point",807 "group": "mainnet-gate",808 "verdict": "pass",809 "scope": "service",810 "rationale": "Both conditions (build declaration and user switch) are required by one rule that every family's entry points reach: synchronization, preparation, signature, broadcast, tracking, token management, the cold envelope by its label and the EVM cold payload by its chain identifier, watch-only import, restored snapshots. A stored profile cannot open the gate. No request leaves the device on a refused call.",811 "residual_risk": "The user switch is stored in the unauthenticated profile file (QYV-SVC-011): on an internal build, write access to the application container sets it.",812 "evidence": [813 {814 "ref": "Sources/QyvoraWallet/WalletService.swift:340",815 "contains": "func requireAllowed(_ kind: ChainKind) throws {"816 },817 {818 "ref": "Sources/QyvoraWallet/WalletService+Chains.swift:118",819 "contains": "try requireAllowed(kind)"820 },821 {822 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:280",823 "contains": "@Test func everyFamilyIsBehindTheGateAtEveryEntryPoint() async throws {"824 },825 {826 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:327",827 "contains": "@Test func aHostileStoredProfileDoesNotOpenTheGate() async throws {"828 }829 ]830 },831 {832 "id": "WA-MC-03",833 "title": "Leaving the test networks needs a fresh authentication, through every setter",834 "group": "authentication",835 "verdict": "pass",836 "scope": "service",837 "rationale": "setNetworkMode(.main), setBitcoinNetwork, setEthereumNetwork and setActiveNetworks require a credential verified within the authentication window when a network goes from test to main; turning the user switch on does as well. Going back to test networks asks nothing.",838 "evidence": [839 {840 "ref": "Sources/QyvoraWallet/WalletService+Chains.swift:215",841 "contains": "if profile.networkMode != .main || profile.bitcoinNetwork.isTest || profile.ethereumNetwork.isTest { try await requireFreshAuthentication() }"842 },843 {844 "ref": "Sources/QyvoraWallet/WalletService.swift:498",845 "contains": "if !network.isTest, profile.bitcoinNetwork.isTest { try await requireFreshAuthentication() }"846 },847 {848 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:70",849 "contains": "@Test func leavingTheTestNetworksAlwaysNeedsAFreshAuthentication() async throws {"850 }851 ]852 },853 {854 "id": "WA-MC-04",855 "title": "Cold-mode envelope: strict form, family bound, review decoded from the payload, signed result verified",856 "group": "fraud-protection",857 "verdict": "partial",858 "scope": "service",859 "rationale": "qyvtx1|u or s|chain|payload with exactly four parts, a known and active chain, a canonical payload of that family paid and signed by this wallet's account alone; nothing descriptive travels next to the payload, so the cold device can only show what it decodes; the limits and the gate are applied on the cold device; a signed result is verified (signature of this account, canonical, limits) before any request. An EVM transaction travels without envelope and names its network by the chain identifier in its bytes.",860 "gap": "The network label of a Solana or TRON envelope cannot bind: such a transaction names no network and the key is the same on every network of the chain (recorded by the Solana and TRON areas, which added warnings to the cold review).",861 "evidence": [862 {863 "ref": "Sources/QyvoraWallet/WalletService+Cold.swift:71",864 "contains": "guard parts.count == 4, parts[1] == \"u\" || parts[1] == \"s\", parts[3].utf8.count <= 40_000 else {"865 },866 {867 "ref": "Sources/QyvoraWallet/WalletService+Ethereum.swift:909",868 "contains": "guard tx.unsignedPayload == payload else { throw WalletError.invalidPayload(\"The transaction encoding is not canonical.\") }"869 },870 {871 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:254",872 "contains": "@Test func theEnvelopeBindsFamilyNetworkAndPayload() async throws {"873 },874 {875 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:379",876 "contains": "@Test func anEVMPayloadNamesItsNetworkItself() async throws {"877 },878 {879 "ref": "security/tests/Sources/FuzzTargets/Targets+MultichainWallet.swift:258",880 "contains": "\"cold-envelope\", \"Cold-mode transaction text on a cold wallet with every chain enabled: the qyvtx1 envelope (Solana, TRON), the 0x02 payload (EVM), a PSBT; review, then signature of what was reviewed\","881 }882 ]883 },884 {885 "id": "WA-MC-05",886 "title": "Watch-only package v2: public material only, strict reading, chains limited to the accounts received",887 "group": "key-storage",888 "verdict": "partial",889 "scope": "service",890 "rationale": "The package holds account public keys and addresses only (checked against every private form of the test phrase); a private key in a package is refused; a chain is enabled only when the package carried an account of its family; main-network accounts are left out while the gate is closed; a refused package leaves no wallet.",891 "gap": "The package is not authenticated. A fingerprint of its accounts exists (watchOnlyFingerprint) but the screens of both devices must show and compare it (QYV-APP-080, high, open).",892 "finding": "QYV-APP-080",893 "evidence": [894 {895 "ref": "Sources/QyvoraWallet/WalletService+Onboarding.swift:403",896 "contains": "guard let parsed = try? ExtendedKey.parse(text.trimmingCharacters(in: .whitespacesAndNewlines)), !parsed.version.isPrivate else {"897 },898 {899 "ref": "Sources/QyvoraWallet/WalletService+Onboarding.swift:553",900 "contains": "public nonisolated static func watchOnlyFingerprint(package input: [String]) throws(WalletError) -> String {"901 },902 {903 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:436",904 "contains": "@Test func thePackageHoldsPublicMaterialOnlyAndIsReadStrictly() async throws {"905 },906 {907 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:247",908 "contains": "@Test func aWatchOnlyPackageIsValidatedBeforeAnythingIsCreated() async throws {"909 }910 ]911 },912 {913 "id": "WA-MC-06",914 "title": "Vault account binding v2: the accounts of every family are vouched for by the vault",915 "group": "key-storage",916 "verdict": "pass",917 "scope": "service",918 "rationale": "The public account data of every family (UTXO account keys by network, EVM, Solana and TRON addresses) is kept in a vault record and compared with the profile file at every unlock; a difference is repaired from the vault and counted; the key derived for a signature is compared with the vault's record. A version-1 record is completed from the recovery phrase; a damaged or future record is rebuilt from the phrase.",919 "evidence": [920 {921 "ref": "Sources/QyvoraWallet/WalletService+Onboarding.swift:170",922 "contains": "static let currentVersion = 2"923 },924 {925 "ref": "Sources/QyvoraWallet/WalletService+Ethereum.swift:786",926 "contains": "if let trusted = await trustedPublicData(), trusted.ethereum != from {"927 },928 {929 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:576",930 "contains": "@Test func theBindingRecordIsReadStrictlyAndRepairsTheProfile() async throws {"931 }932 ]933 },934 {935 "id": "WA-MC-07",936 "title": "Persisted chain snapshots: validated, bounded, tied to account, network and endpoints, never used to build a payment",937 "group": "data-protection",938 "verdict": "pass",939 "scope": "service",940 "rationale": "One file per network under a constant name; a file of another account, network, endpoint list or version, oversized or with a value out of range is ignored and removed; restored data is flagged as coming from a previous session; payments read their figures again on chain (or need a snapshot of this session on UTXO chains), and token descriptions of a restored file are not used for a review.",941 "evidence": [942 {943 "ref": "Sources/QyvoraWallet/ChainPersistence.swift:113",944 "contains": "func validated(identity expected: String, address expectedAddress: String) -> SolanaChainRecord? {"945 },946 {947 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:375",948 "contains": "if let snapshot = evmSnapshots[network], !snapshot.isFromPreviousSession,"949 },950 {951 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:657",952 "contains": "@Test func persistedChainFilesAreValidatedBoundedAndTiedToTheirAccount() async throws {"953 },954 {955 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:213",956 "contains": "@Test func aDetectedTokenOfARestoredSnapshotIsNotUsedForAPayment() async throws {"957 }958 ]959 },960 {961 "id": "WA-MC-08",962 "title": "Address validation across families: one entry point, no address valid for two families",963 "group": "fraud-protection",964 "verdict": "partial",965 "scope": "service",966 "rationale": "checkAddress is called by prepareSend on every chain; an address of another family or network is refused with a reason that names what it is; the result carries the notes the interface needs (no checksum, off-curve Solana address, legacy Bitcoin Cash form, own address); no text is accepted by two families on any of the 29 networks.",967 "gap": "The notes are produced by the engine and must be displayed (QYV-APP-082). On test networks an address of one test coin is a valid address of another (shared version bytes): only the network badge tells them apart.",968 "finding": "QYV-APP-082",969 "evidence": [970 {971 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:253",972 "contains": "func checkAddress(_ text: String, kind: ChainKind) throws -> AddressCheck {"973 },974 {975 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:407",976 "contains": "let check = try checkAddress(to, kind: kind)"977 },978 {979 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:118",980 "contains": "@Test func noAddressIsValidForAnotherFamily() async throws {"981 },982 {983 "ref": "security/tests/Sources/FuzzTargets/Targets+MultichainWallet.swift:445",984 "contains": "\"check-address\", \"Address validation of every network of every family on arbitrary text: canonical form, own-address detection, and no text valid for two families\","985 }986 ]987 },988 {989 "id": "WA-MC-09",990 "title": "Endpoint configuration: https, private hosts only over http, no credentials, bounded, set with a fresh authentication",991 "group": "network",992 "verdict": "pass",993 "scope": "service",994 "rationale": "A configuration is accepted only when every URL of every family is https, or http to the device itself or a private network, without user or password; counts, lengths and network names are bounded; the change needs a fresh authentication, forgets what was read from the previous endpoints and verifies chain identity again. A stored configuration is filtered by the same rule when the clients are built.",995 "evidence": [996 {997 "ref": "Sources/QyvoraNetworking/HTTP.swift:342",998 "contains": "public static func isAcceptable(_ text: String) -> Bool {"999 },1000 {1001 "ref": "Sources/QyvoraWallet/WalletService.swift:552",1002 "contains": "guard all.count <= 400, all.allSatisfy({ $0.utf8.count <= 300 }) else {"1003 },1004 {1005 "ref": "security/tests/Tests/PropertyAuditTests/EVMChainsProperties.swift:443",1006 "contains": "@Test func endpointConfigurationDecoding() throws {"1007 },1008 {1009 "ref": "Tests/QyvoraNetworkingTests/EVMChainsAuditRegressionTests.swift:83",1010 "contains": "@Test func endpointAcceptanceRule() {"1011 }1012 ]1013 }1014 ],1015 "masvs_coinspect_evidence": [1016 {1017 "item": "MASVS-NETWORK-1",1018 "adds": "Fourteen EVM networks and the endpoints of three more families go through the same transport (https; http only to local or private hosts; no credentials in URLs; no redirects, cookies or cache) and every chain's endpoints must prove their chain before use. What one lying EVM endpoint can do is bounded and recorded (endpoint_impact).",1019 "evidence": [1020 {1021 "ref": "Sources/QyvoraNetworking/HTTP.swift:342",1022 "contains": "public static func isAcceptable(_ text: String) -> Bool {"1023 },1024 {1025 "ref": "Sources/QyvoraNetworking/EthereumRPC.swift:128",1026 "contains": "public func verifyChain() async throws {"1027 },1028 {1029 "ref": "security/tests/Tests/PropertyAuditTests/EVMChainsProperties.swift:338",1030 "contains": "@Test func whatOneEndpointDecidesAlone() async throws {"1031 }1032 ]1033 },1034 {1035 "item": "MASVS-AUTH-3",1036 "adds": "Moving any chain to its main network, turning the mainnet switch on, changing endpoints of any family and signing on any family need a fresh authentication.",1037 "evidence": [1038 {1039 "ref": "Sources/QyvoraWallet/WalletService+Chains.swift:215",1040 "contains": "if profile.networkMode != .main || profile.bitcoinNetwork.isTest || profile.ethereumNetwork.isTest { try await requireFreshAuthentication() }"1041 },1042 {1043 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:587",1044 "contains": "try await requireFreshAuthentication()"1045 },1046 {1047 "ref": "Tests/QyvoraWalletTests/EVMChainsAuditRegressionTests.swift:70",1048 "contains": "@Test func leavingTheTestNetworksAlwaysNeedsAFreshAuthentication() async throws {"1049 }1050 ]1051 },1052 {1053 "item": "MASVS-CODE-4",1054 "adds": "Every new untrusted input of the area has a strict reader, a property test and a fuzz target: fee figures, oracle return data, both indexer dialects, endpoint configuration, network lookups, the cold envelope, the watch-only package, persisted snapshots, addresses of every family, the account binding record; the wallet-sync target now synchronises four more families against hostile answers.",1055 "evidence": [1056 {1057 "ref": "security/tests/Sources/FuzzTargets/Targets+EVMChains.swift:107",1058 "contains": "let evmChainTargets: [FuzzTarget] = ["1059 },1060 {1061 "ref": "security/tests/Sources/FuzzTargets/Targets+MultichainWallet.swift:256",1062 "contains": "let multichainWalletTargets: [FuzzTarget] = ["1063 },1064 {1065 "ref": "security/tests/Sources/FuzzTargets/Targets+Wallet.swift:346",1066 "contains": "func multiChainSync(_ service: WalletService, mode: Int) async {"1067 }1068 ]1069 },1070 {1071 "item": "MASVS-PLATFORM-3",1072 "adds": "The engine gives the interface what it must show on the new chains (L1 data fee line and note, address notes, critical warnings, cold summaries decoded from the bytes, watch-only fingerprint); showing them is the interface's part (QYV-APP-080, QYV-APP-082, open).",1073 "evidence": [1074 {1075 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:560",1076 "contains": "lines.append(SendFeeLine(label: \"L1 data fee (with a margin of one quarter)\", amount: inner.l1DataFee))"1077 },1078 {1079 "ref": "Sources/QyvoraWallet/WalletService+Onboarding.swift:553",1080 "contains": "public nonisolated static func watchOnlyFingerprint(package input: [String]) throws(WalletError) -> String {"1081 }1082 ]1083 },1084 {1085 "item": "MASVS-STORAGE-1",1086 "adds": "Version 2 of the account binding extends the vault's vouching to the Solana and TRON addresses and to the accounts of the other UTXO coins; persisted snapshots of the new chains hold public chain data only and are validated on reading.",1087 "evidence": [1088 {1089 "ref": "Sources/QyvoraWallet/WalletService+Onboarding.swift:168",1090 "contains": "struct AccountBinding: Codable, Equatable {"1091 },1092 {1093 "ref": "Sources/QyvoraWallet/ChainPersistence.swift:89",1094 "contains": "struct SolanaChainRecord: Codable, Equatable, Sendable {"1095 }1096 ]1097 },1098 {1099 "item": "WSC-5.1",1100 "adds": "Cross-chain replay protection on thirteen more EVM networks: type-2 transactions only, chain identifier from the table inside the signed payload, relabelled signatures recover another account (differential test on every pair of networks).",1101 "evidence": [1102 {1103 "ref": "Sources/QyvoraEthereum/Transaction.swift:97",1104 "contains": "public var unsignedPayload: Bytes { [0x02] + RLP.list(fields).encoded }"1105 },1106 {1107 "ref": "security/tests/Tests/DifferentialAuditTests/EVMChainsDiffTests.swift:147",1108 "contains": "@Test func aSignatureDoesNotCarryOverToAnotherChain() throws {"1109 }1110 ]1111 },1112 {1113 "item": "WSC-5.3",1114 "adds": "An EVM address with a wrong EIP-55 checksum is refused on every EVM network with the reason invalidChecksum.",1115 "evidence": [1116 {1117 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:235",1118 "contains": "if t.hasPrefix(\"0x\") || t.hasPrefix(\"0X\"), t.utf8.count == 42, Hex.decode(String(t.dropFirst(2))) != nil { return .invalidChecksum(chain: chainName) }"1119 },1120 {1121 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:188",1122 "contains": "prop.check(refusal == .address(.invalidChecksum(chain: \"Ethereum Sepolia\")), \"a wrong EIP-55 checksum gave \\(String(describing: refusal))\")"1123 }1124 ]1125 },1126 {1127 "item": "WSC-5.4",1128 "adds": "An EVM address without checksum (all lower or all upper case) is accepted with a note on every EVM network, through the uniform address check and in the review.",1129 "evidence": [1130 {1131 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:310",1132 "contains": "if !(hasLower && hasUpper) { notes.append(EthereumSendWarning.recipientWithoutChecksum.message) }"1133 }1134 ]1135 },1136 {1137 "item": "WSB-VERI-001",1138 "adds": "Invalid checksums are detected per family (EIP-55, Base58Check of TRON and of the UTXO coins, Bech32, CashAddr); an address of another family is refused by name.",1139 "evidence": [1140 {1141 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:232",1142 "contains": "if let found = foreignFamily(t), found.family != expected { return .wrongFamily(chain: chainName, found: found.name) }"1143 },1144 {1145 "ref": "security/tests/Tests/PropertyAuditTests/MultichainWalletProperties.swift:118",1146 "contains": "@Test func noAddressIsValidForAnotherFamily() async throws {"1147 }1148 ]1149 },1150 {1151 "item": "WSC-4.10",1152 "adds": "The uniform review of an EVM payment on any network shows contract, call, amount with the token's decimals, gas limit, maximum fee and, on OP-Stack networks, the L1 data fee line; a cold review is decoded from the bytes to be signed.",1153 "evidence": [1154 {1155 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:527",1156 "contains": "public func review(for inner: EthereumSendReview) -> SendReview {"1157 },1158 {1159 "ref": "Sources/QyvoraWallet/WalletService+Ethereum.swift:919",1160 "contains": "var summary = [\"Network: \\(network.displayName) (chain \\(tx.chainID))\", \"Nonce: \\(tx.nonce)\"]"1161 }1162 ]1163 },1164 {1165 "item": "WSB-THRE-007",1166 "adds": "Tokens reported by an indexer on any EVM network are quarantined in detectedTokens, described by the chain, never valued, and not usable for a payment from a restored file.",1167 "evidence": [1168 {1169 "ref": "Sources/QyvoraWallet/WalletService+Ethereum.swift:266",1170 "contains": "/// Tokens the indexer attributes to the account, each one read on chain. The indexer's symbol and decimals are ignored."1171 },1172 {1173 "ref": "Sources/QyvoraWallet/WalletService+Send.swift:375",1174 "contains": "if let snapshot = evmSnapshots[network], !snapshot.isFromPreviousSession,"1175 }1176 ]1177 },1178 {1179 "item": "WSC-4.16",1180 "adds": "Explorer links of every chain are built from validated identifiers only and point at the explorer of the network's table; a network without explorer gives no link.",1181 "evidence": [1182 {1183 "ref": "Sources/QyvoraWallet/Chains.swift:212",1184 "contains": "public func explorerAddressURL(_ address: String) -> URL? {"1185 },1186 {1187 "ref": "Sources/QyvoraCore/Networks.swift:799",1188 "contains": "public func explorerTransactionURL(hash: String) -> URL? {"1189 }1190 ]1191 }1192 ],1193 "findings": [1194 "QYV-SVC-080",1195 "QYV-SVC-081",1196 "QYV-SVC-082",1197 "QYV-SVC-083",1198 "QYV-SVC-084",1199 "QYV-SVC-086",1200 "QYV-SVC-087",1201 "QYV-FUZ-080",1202 "QYV-APP-080",1203 "QYV-APP-082"1204 ]1205}1206