← Back to Pull requests

Decision 0008: three kinds of account, one of each from the start #23

Closed
unknown closed this pull request without merging on Oct 22, 2026 10:17 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 09:57 UTC
Author

<!-- claude-projects-attribution: {"github_login":"b3hr4d"} -->
_Requested by Behrad · project thread_

Before: adding an account meant picking ICP, an ICRC-1 token or Bitcoin, one token per account. A new wallet had no accounts until an owner added one.

After (once built): an account is of one of three kinds. An Internet Computer account holds ICP and every ICRC-1 token the wallet tracks, a Bitcoin account holds bitcoin, and an EVM account holds the native token of every EVM chain the wallet tracks. Every wallet starts with one account of each kind, and adding another becomes a small link. This PR is only the decision and two plan steps; no code changes.

How: [decision 0008](docs/decisions/0008-account-kinds.md) records what you asked for in the thread and recommends the details:

  • One list of tracked assets for the wallet, starting with ICP and Ethereum. Owners add ICRC-1 ledgers and switch EVM chains without approval, since tracking moves nothing.

  • Default accounts made by a timer set in init and post_upgrade, so existing wallets gain them on upgrade.

  • The Bitcoin network as an install setting (bitcoin_network), since the wallet does not know it today. variant { Upgrade } still decodes once Upgrade takes an optional record, and try-local.sh --upgrade would pass regtest.

  • EVM in v1 only on the EVM RPC canister's own chains: Ethereum, Sepolia, Arbitrum One, Base and Optimism, as its interface lists them. Each read needs 2 of 3 providers to agree.

  • The upgrade merges a wallet's ICP and ICRC accounts that share an index into one account. The others' ids lead to it, so audit entries and open transfers still resolve.
  • Worth your review

  • The interface changes: Account.chain becomes Account.kind, and balance and TransferRequest name the asset. Scripts that read Account.chain need updating.

  • Out of scope: ERC-20 tokens, custom EVM chains, ICRC-2 approvals, and sending ICP to a 64-digit account ID. Receiving at an account ID is in.
  • The plan gains step 16 (Internet Computer accounts and the default accounts) and step 17 (EVM accounts). Step 16 builds on the dashboard (#19).

    ---
    _Generated by Claude Code_

    Diff: 296 lines (+222 / -74) across 3 files Reviewer: b3hr4d Review duration: 20m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 296 lines diff across 3 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.341
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #23"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.0% (MEDIUM) · Higher = larger blast radius
    45.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%