{
  "dashboard": {
    "title": "Tokenization System Dashboard",
    "tags": ["tokenization", "hyperledger", "fabric", "besu"],
    "timezone": "browser",
    "schemaVersion": 16,
    "version": 1,
    "refresh": "30s",
    "panels": [
      {
        "id": 1,
        "title": "Tokenization Operations Rate",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(tokenization_operations_total[5m])",
            "legendFormat": "{{operation}}"
          }
        ],
        "yaxes": [
          {
            "format": "ops",
            "label": "Operations/sec"
          }
        ]
      },
      {
        "id": 2,
        "title": "Reserve Ratio",
        "type": "gauge",
        "targets": [
          {
            "expr": "tokenization_reserve_backed_amount / tokenization_reserve_total_amount",
            "legendFormat": "Reserve Ratio"
          }
        ],
        "thresholds": [
          {
            "value": 0.95,
            "color": "red"
          },
          {
            "value": 1.0,
            "color": "green"
          }
        ]
      },
      {
        "id": 3,
        "title": "Settlement Time (P95)",
        "type": "graph",
        "targets": [
          {
            "expr": "histogram_quantile(0.95, tokenization_settlement_duration_seconds_bucket)",
            "legendFormat": "P95 Settlement Time"
          }
        ],
        "yaxes": [
          {
            "format": "s",
            "label": "Seconds"
          }
        ]
      },
      {
        "id": 4,
        "title": "Success Rate",
        "type": "stat",
        "targets": [
          {
            "expr": "sum(rate(tokenization_operations_total{status=\"success\"}[1h])) / sum(rate(tokenization_operations_total[1h]))",
            "legendFormat": "Success Rate"
          }
        ],
        "format": "percentunit"
      },
      {
        "id": 5,
        "title": "Active Tokenized Assets",
        "type": "stat",
        "targets": [
          {
            "expr": "tokenization_assets_total{status=\"active\"}",
            "legendFormat": "Active Assets"
          }
        ],
        "format": "short"
      },
      {
        "id": 6,
        "title": "Total Supply vs Backed Amount",
        "type": "graph",
        "targets": [
          {
            "expr": "sum(tokenization_token_total_supply)",
            "legendFormat": "Total Supply"
          },
          {
            "expr": "sum(tokenization_reserve_backed_amount)",
            "legendFormat": "Backed Amount"
          }
        ],
        "yaxes": [
          {
            "format": "short",
            "label": "Amount"
          }
        ]
      },
      {
        "id": 7,
        "title": "Operations by Status",
        "type": "piechart",
        "targets": [
          {
            "expr": "sum by (status) (tokenization_operations_total)",
            "legendFormat": "{{status}}"
          }
        ]
      },
      {
        "id": 8,
        "title": "Fabric Chaincode Operations",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(fabric_chaincode_operations_total[5m])",
            "legendFormat": "{{function}}"
          }
        ],
        "yaxes": [
          {
            "format": "ops",
            "label": "Operations/sec"
          }
        ]
      },
      {
        "id": 9,
        "title": "Besu Contract Operations",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(besu_contract_operations_total[5m])",
            "legendFormat": "{{function}}"
          }
        ],
        "yaxes": [
          {
            "format": "ops",
            "label": "Operations/sec"
          }
        ]
      },
      {
        "id": 10,
        "title": "Cacti Bridge Transfers",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(cacti_bridge_transfers_total[5m])",
            "legendFormat": "{{source_network}} -> {{target_network}}"
          }
        ],
        "yaxes": [
          {
            "format": "ops",
            "label": "Transfers/sec"
          }
        ]
      }
    ]
  }
}
