User Profile Page

👤 Profile — SmartCache

This page shows everything a user needs to manage their SmartCache activity: the contracts they’ve cached (via UI, CLI, or Rust crate), per-network billing, gas metrics, lifecycle status, and quick verification links to on-chain transactions. All values shown in the UI are live—this document describes the layout and meaning of each element (no hard-coded numbers).


✨ Top-level Summary (user cards)

At the top of the profile page show prominent, glanceable KPI cards for the connected wallet:

  • 🏷 Total Cached Contracts — number of contracts the user has cached (via UI / CLI / Rust crate). (live metric)

  • ✅ Active Contracts — how many cached contracts are currently active (not expired). (live metric)

  • ⚡ Total Gas Saved — aggregated gas savings from all contracts owned by the user (live).

  • 🔥 Total Gas Used (Benchmarking) — total gas benchmarked across user contracts for cached vs uncached runs (live).

These appear as horizontal cards with an icon, bold live value, and a small caption. Use a compact badge for network split (e.g. “Sepolia / One”).


💳 Bid Charges by Network (per-network billing panel)

A prominent panel lists Bid Charges by Network and the aggregated total the user will be charged for automated bids that SmartCache places on their behalf:

  • Each network appears as a separate row/card (e.g., Arbitrum Sepolia, Arbitrum One).

  • For each network show:

    • Network name and icon.

    • Pending / Accrued Bid Charges (live ETH value) — what the user owes for auto-placements.

    • Action button to view detailed billing history or withdraw / top up (if applicable).

  • At the bottom of the panel show Total Bid Charges (all networks) as a single live figure.

This makes fees transparent since SmartCache automates bid placement.


🗂 Your Contracts (main table)

A paginated, searchable table lists every contract owned by the connected wallet. The table columns are:

  • Contract — contract address (clickable to open contract detail). Show an inline “registered via” badge (UI / CLI / Rust crate).

  • Network — which CacheManager this contract belongs to (Sepolia or One).

  • StatusActive / Expired / Pending (badge with color).

  • Gas Metrics — compact two-value display: + <gas saved> (savings) and - <gas used> (benchmark gas used), both live; show tooltip explaining measurement method.

  • Deployed — deployment date/time (local timezone).

  • Expires — current slot expiry date/time (or “N/A” if not cached).

  • Actions — quick icons:

    • View contract details,

    • Open on-chain tx (bid) in explorer (Tx hash link),

    • Force re-check / request manual bid (if allowed),

    • Copy address.

Row behavior: clicking a contract opens its detail page (history, per-call breakdown, bid history and audit trail).


🔍 Contract Detail (modal or detail page summary)

For each contract show a detail header and sections:

  • Header: contract address, network, status badge, short description of how it was registered (UI/CLI/Rust crate), last updated timestamp.

  • Gas comparison: a small two-column block that shows Gas without cache and Gas with cache, plus Savings (absolute & percent) — all live and explain whether values are measured or simulated.

  • Bid history: list of bids placed for this contract (date, bid amount, tx hash link, result).

  • Next expiry & renewal recommendations: if expiry is upcoming show recommended next bid and a one-click “Renew” action (manual or automated toggle).

  • Audit log: full event list (opt-in events, placeBid txs, eviction notices).


🧾 Billing & Charge Details

Under the billing panel provide:

  • Per-network charge breakdown — every bid charge with an associated date, contract, and tx hash.

  • Fee model line — a reminder that the SmartCache fee is outcome-based and applied only when caching yields gas savings (show formula textually, not numeric).

  • Invoice / Export — button to export billing CSV or download a statement for accounting.

Last updated