{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 04 — Mechanism Post-Mortem\n",
    "\n",
    "Cross-cutting analysis of how the ABC + Conviction Voting mechanisms performed\n",
    "under various market and social pressures.\n",
    "\n",
    "## Central thesis to evaluate:\n",
    "The TEC deployed an Augmented Bonding Curve (primary market) feeding a Common Pool\n",
    "governed by Conviction Voting (fund allocation). This analysis evaluates whether\n",
    "these mechanisms achieved their design goals and what broke down."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-04-03T20:26:41.284238Z",
     "iopub.status.busy": "2026-04-03T20:26:41.283919Z",
     "iopub.status.idle": "2026-04-03T20:26:42.128212Z",
     "shell.execute_reply": "2026-04-03T20:26:42.126629Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Data loaded. Analysis period:\n",
      "  CV proposals: 2022-01-19 to 2023-08-17\n",
      "  Common pool: 2022-01-19 to 2023-12-19\n",
      "  Reserve pool: 2022-01-19 to 2023-12-19\n",
      "  Token balances: 2023-12-20 to 2025-12-10\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.dates as mdates\n",
    "import seaborn as sns\n",
    "import datetime\n",
    "\n",
    "sns.set_theme(style='whitegrid', palette='deep')\n",
    "plt.rcParams['figure.figsize'] = (14, 6)\n",
    "plt.rcParams['figure.dpi'] = 100\n",
    "\n",
    "DATA = '../data/onchain'\n",
    "\n",
    "# Load all data\n",
    "proposals = pd.read_csv(f'{DATA}/cv_proposals.csv')\n",
    "stakes = pd.read_csv(f'{DATA}/cv_stakes.csv')\n",
    "common = pd.read_csv(f'{DATA}/dune_common_pool.csv')\n",
    "reserve = pd.read_csv(f'{DATA}/dune_reserve_pool.csv')\n",
    "balances = pd.read_csv(f'{DATA}/dune_token_balances_usd.csv')\n",
    "\n",
    "# Parse dates - strip timezone info for consistent comparison\n",
    "common['date'] = pd.to_datetime(common['day'], utc=True).dt.tz_localize(None)\n",
    "reserve['date'] = pd.to_datetime(reserve['day'], utc=True).dt.tz_localize(None)\n",
    "balances['date'] = pd.to_datetime(balances['day'], utc=True).dt.tz_localize(None)\n",
    "\n",
    "# Approximate dates for on-chain events\n",
    "genesis_block = 20086944\n",
    "genesis_date = datetime.datetime(2022, 1, 19)\n",
    "\n",
    "def block_to_date(block):\n",
    "    return genesis_date + datetime.timedelta(seconds=(block - genesis_block) * 5)\n",
    "\n",
    "proposals['date'] = proposals['block'].apply(block_to_date)\n",
    "stakes['date'] = stakes['block'].apply(block_to_date)\n",
    "\n",
    "print('Data loaded. Analysis period:')\n",
    "print(f'  CV proposals: {proposals[\"date\"].min().date()} to {proposals[\"date\"].max().date()}')\n",
    "print(f'  Common pool: {common[\"date\"].min().date()} to {common[\"date\"].max().date()}')\n",
    "print(f'  Reserve pool: {reserve[\"date\"].min().date()} to {reserve[\"date\"].max().date()}')\n",
    "print(f'  Token balances: {balances[\"date\"].min().date()} to {balances[\"date\"].max().date()}')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. The Fundamental Loop: ABC → Common Pool → CV → Grants\n",
    "\n",
    "Did the system achieve a self-sustaining funding cycle?\n",
    "- ABC tributes (entry/exit fees) replenish the common pool\n",
    "- CV allocates common pool funds to proposals\n",
    "- Funded proposals should create value → attract new participants → ABC buys → more tributes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-04-03T20:26:42.163827Z",
     "iopub.status.busy": "2026-04-03T20:26:42.163373Z",
     "iopub.status.idle": "2026-04-03T20:26:43.316747Z",
     "shell.execute_reply": "2026-04-03T20:26:43.314258Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 113416 characters]",
      "text/plain": [
       "<Figure size 1600x1000 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Funding Loop Analysis:\n",
      "  Total inflows: 1,195,952\n",
      "  Total outflows: 1,195,952\n",
      "  Coverage ratio: 1.00x (1.0 = break even)\n",
      "  Net deficit: -0\n"
     ]
    }
   ],
   "source": [
    "# Compare inflow (tributes) vs outflow (grants) on common pool\n",
    "cp_monthly = common.set_index('date').resample('ME').agg({\n",
    "    'inflow': 'sum',\n",
    "    'outflow': lambda x: x.abs().sum(),\n",
    "    'balance': 'last'\n",
    "})\n",
    "cp_monthly['net'] = cp_monthly['inflow'] - cp_monthly['outflow']\n",
    "cp_monthly['cumulative_net'] = cp_monthly['net'].cumsum()\n",
    "\n",
    "fig, axes = plt.subplots(2, 1, figsize=(16, 10))\n",
    "\n",
    "# Inflow vs Outflow\n",
    "ax = axes[0]\n",
    "width = 15\n",
    "ax.bar(cp_monthly.index - pd.Timedelta(days=8), cp_monthly['inflow'],\n",
    "       width=width, color='#2ecc71', alpha=0.7, label='Inflow (tributes + other)')\n",
    "ax.bar(cp_monthly.index + pd.Timedelta(days=8), cp_monthly['outflow'],\n",
    "       width=width, color='#e74c3c', alpha=0.7, label='Outflow (grants)')\n",
    "ax.set_ylabel('Amount')\n",
    "ax.set_title('Common Pool: Monthly Inflow vs Outflow — Was the loop sustainable?')\n",
    "ax.legend()\n",
    "\n",
    "# Cumulative net position\n",
    "ax = axes[1]\n",
    "ax.fill_between(cp_monthly.index, cp_monthly['cumulative_net'],\n",
    "                where=cp_monthly['cumulative_net'] >= 0,\n",
    "                color='#2ecc71', alpha=0.3, label='Net positive')\n",
    "ax.fill_between(cp_monthly.index, cp_monthly['cumulative_net'],\n",
    "                where=cp_monthly['cumulative_net'] < 0,\n",
    "                color='#e74c3c', alpha=0.3, label='Net negative')\n",
    "ax.plot(cp_monthly.index, cp_monthly['cumulative_net'], 'k-', linewidth=1.5)\n",
    "ax.axhline(y=0, color='black', linewidth=0.5)\n",
    "ax.set_ylabel('Cumulative Net Flow')\n",
    "ax.set_title('Cumulative Net Position — When did outflows exceed inflows?')\n",
    "ax.legend()\n",
    "\n",
    "for ax in axes:\n",
    "    ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %Y'))\n",
    "\n",
    "plt.tight_layout()\n",
    "plt.savefig(f'{DATA}/../snapshots/mechanism_sustainability.png', dpi=150, bbox_inches='tight')\n",
    "plt.show()\n",
    "\n",
    "total_in = cp_monthly['inflow'].sum()\n",
    "total_out = cp_monthly['outflow'].sum()\n",
    "print(f'\\nFunding Loop Analysis:')\n",
    "print(f'  Total inflows: {total_in:,.0f}')\n",
    "print(f'  Total outflows: {total_out:,.0f}')\n",
    "print(f'  Coverage ratio: {total_in/total_out:.2f}x (1.0 = break even)')\n",
    "print(f'  Net deficit: {total_in - total_out:,.0f}')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. Governance Activity vs Treasury Health\n",
    "\n",
    "Did governance participation correlate with treasury health?\n",
    "As the treasury declined, did participation wane (death spiral) or intensify (crisis response)?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-04-03T20:26:43.320725Z",
     "iopub.status.busy": "2026-04-03T20:26:43.319844Z",
     "iopub.status.idle": "2026-04-03T20:26:44.541497Z",
     "shell.execute_reply": "2026-04-03T20:26:44.539816Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 123444 characters]",
      "text/plain": [
       "<Figure size 1600x1400 with 3 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Monthly governance activity\n",
    "stakes_monthly = stakes.set_index('date').resample('ME').agg(\n",
    "    num_stakes=('proposal_id', 'count'),\n",
    "    unique_stakers=('staker', 'nunique'),\n",
    "    total_staked=('tokens_staked', 'sum'),\n",
    ")\n",
    "\n",
    "# Proposals per month\n",
    "props_monthly = proposals[proposals['id'] > 1].set_index('date').resample('ME').agg(\n",
    "    num_proposals=('id', 'count'),\n",
    "    total_requested=('amount_requested', 'sum'),\n",
    ")\n",
    "\n",
    "fig, axes = plt.subplots(3, 1, figsize=(16, 14), sharex=True)\n",
    "\n",
    "# Treasury balance\n",
    "ax = axes[0]\n",
    "ax.plot(common['date'], common['balance'], color='#2ecc71', linewidth=1.5, label='Common Pool')\n",
    "ax.plot(reserve['date'], reserve['balance'], color='#3498db', linewidth=1.5, label='Reserve Pool')\n",
    "ax.set_ylabel('Balance')\n",
    "ax.set_title('Treasury Health')\n",
    "ax.legend()\n",
    "\n",
    "# Active stakers\n",
    "ax = axes[1]\n",
    "if len(stakes_monthly) > 0:\n",
    "    ax.bar(stakes_monthly.index, stakes_monthly['unique_stakers'], width=20, color='teal', alpha=0.7)\n",
    "ax.set_ylabel('Unique Stakers')\n",
    "ax.set_title('Monthly Governance Participation')\n",
    "\n",
    "# New proposals\n",
    "ax = axes[2]\n",
    "if len(props_monthly) > 0:\n",
    "    ax.bar(props_monthly.index, props_monthly['num_proposals'], width=20, color='coral', alpha=0.7)\n",
    "ax.set_ylabel('New Proposals')\n",
    "ax.set_title('Monthly Proposal Submissions')\n",
    "ax.set_xlabel('Date')\n",
    "\n",
    "for ax in axes:\n",
    "    ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %Y'))\n",
    "\n",
    "plt.tight_layout()\n",
    "plt.savefig(f'{DATA}/../snapshots/governance_vs_treasury.png', dpi=150, bbox_inches='tight')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. Conviction Voting Parameter Stress Test\n",
    "\n",
    "The TEC used these CV parameters:\n",
    "- **Conviction Growth**: 7 days\n",
    "- **Minimum Conviction**: 4%\n",
    "- **Spending Limit**: 11%\n",
    "\n",
    "Were these appropriate? How did they interact with the actual dynamics?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-04-03T20:26:44.544425Z",
     "iopub.status.busy": "2026-04-03T20:26:44.544181Z",
     "iopub.status.idle": "2026-04-03T20:26:45.331486Z",
     "shell.execute_reply": "2026-04-03T20:26:45.329742Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 104060 characters]",
      "text/plain": [
       "<Figure size 1600x600 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Spending limit analysis:\n",
      "  Proposals exceeding 11% spending limit: 0/36\n",
      "  Max request as % of pool: 6.9%\n",
      "  Median request as % of pool: 1.7%\n"
     ]
    }
   ],
   "source": [
    "# Analyze request sizes relative to common pool\n",
    "funded = proposals[(proposals['status'] == 'executed') & (proposals['amount_requested'] > 0)].copy()\n",
    "\n",
    "# For each funded proposal, estimate what % of the pool it represented\n",
    "# We need to match proposal dates to pool balance dates\n",
    "# Use the common pool daily balance\n",
    "cp_daily = common.set_index('date')['balance'].resample('D').last().ffill()\n",
    "\n",
    "request_pcts = []\n",
    "for _, row in funded.iterrows():\n",
    "    prop_date = row['date']\n",
    "    # Find closest pool balance\n",
    "    mask = cp_daily.index <= prop_date\n",
    "    if mask.any():\n",
    "        pool_bal = cp_daily[mask].iloc[-1]\n",
    "        if pool_bal > 0:\n",
    "            pct = row['amount_requested'] / pool_bal\n",
    "            request_pcts.append({\n",
    "                'id': row['id'],\n",
    "                'name': row['link'][:40],\n",
    "                'amount': row['amount_requested'],\n",
    "                'pool_balance': pool_bal,\n",
    "                'pct_of_pool': pct,\n",
    "                'date': prop_date\n",
    "            })\n",
    "\n",
    "if request_pcts:\n",
    "    rp_df = pd.DataFrame(request_pcts)\n",
    "\n",
    "    fig, axes = plt.subplots(1, 2, figsize=(16, 6))\n",
    "\n",
    "    # Request as % of pool\n",
    "    ax = axes[0]\n",
    "    ax.bar(range(len(rp_df)), rp_df['pct_of_pool'] * 100, color='steelblue')\n",
    "    ax.axhline(y=11, color='red', linestyle='--', label='Spending Limit (11%)')\n",
    "    ax.axhline(y=4, color='orange', linestyle='--', label='Min Conviction (4%)')\n",
    "    ax.set_xlabel('Proposal (chronological)')\n",
    "    ax.set_ylabel('% of Common Pool')\n",
    "    ax.set_title('Proposal Size Relative to Common Pool')\n",
    "    ax.legend()\n",
    "\n",
    "    # Over time\n",
    "    ax = axes[1]\n",
    "    ax.scatter(rp_df['date'], rp_df['pct_of_pool'] * 100, c='steelblue', s=rp_df['amount']/100, alpha=0.6)\n",
    "    ax.axhline(y=11, color='red', linestyle='--', label='Spending Limit (11%)')\n",
    "    ax.set_xlabel('Date')\n",
    "    ax.set_ylabel('% of Common Pool')\n",
    "    ax.set_title('Request Size Relative to Pool Over Time\\n(bubble size = absolute amount)')\n",
    "    ax.legend()\n",
    "\n",
    "    plt.tight_layout()\n",
    "    plt.savefig(f'{DATA}/../snapshots/cv_parameters.png', dpi=150, bbox_inches='tight')\n",
    "    plt.show()\n",
    "\n",
    "    print(f'\\nSpending limit analysis:')\n",
    "    over_limit = (rp_df['pct_of_pool'] > 0.11).sum()\n",
    "    print(f'  Proposals exceeding 11% spending limit: {over_limit}/{len(rp_df)}')\n",
    "    print(f'  Max request as % of pool: {rp_df[\"pct_of_pool\"].max():.1%}')\n",
    "    print(f'  Median request as % of pool: {rp_df[\"pct_of_pool\"].median():.1%}')\n",
    "else:\n",
    "    print('Could not align proposal dates with pool balance data')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4. The Death Spiral Hypothesis\n",
    "\n",
    "Did the TEC experience a death spiral?\n",
    "1. Token price drops → less attractive to hold\n",
    "2. Holders sell on ABC → reserve pool shrinks → price drops further\n",
    "3. Less ABC activity → less tribute revenue → common pool depletes faster\n",
    "4. Less funding available → fewer proposals → less community activity\n",
    "5. Less activity → holders leave → goto 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-04-03T20:26:45.334416Z",
     "iopub.status.busy": "2026-04-03T20:26:45.334186Z",
     "iopub.status.idle": "2026-04-03T20:26:45.993099Z",
     "shell.execute_reply": "2026-04-03T20:26:45.991249Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 179032 characters]",
      "text/plain": [
       "<Figure size 1600x800 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Build composite timeline\n",
    "# We need to align: reserve pool, common pool, governance activity, and token price\n",
    "\n",
    "# Normalize each metric to [0, 1] range for comparison\n",
    "def normalize(series):\n",
    "    return (series - series.min()) / (series.max() - series.min())\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(16, 8))\n",
    "\n",
    "# Reserve pool (proxy for price/market confidence)\n",
    "rp_daily = reserve.set_index('date')['balance'].resample('W').last().ffill()\n",
    "ax.plot(rp_daily.index, normalize(rp_daily), label='Reserve Pool (market confidence)',\n",
    "        color='#3498db', linewidth=2)\n",
    "\n",
    "# Common pool (funding capacity)\n",
    "cp_daily_w = common.set_index('date')['balance'].resample('W').last().ffill()\n",
    "ax.plot(cp_daily_w.index, normalize(cp_daily_w), label='Common Pool (funding capacity)',\n",
    "        color='#2ecc71', linewidth=2)\n",
    "\n",
    "# Governance activity (rolling stake events per month)\n",
    "stakes_weekly = stakes.set_index('date').resample('W')['proposal_id'].count()\n",
    "stakes_rolling = stakes_weekly.rolling(4).mean()\n",
    "if len(stakes_rolling.dropna()) > 0:\n",
    "    ax.plot(stakes_rolling.index, normalize(stakes_rolling.fillna(0)),\n",
    "            label='Governance Activity (4-week rolling)',\n",
    "            color='coral', linewidth=2, alpha=0.8)\n",
    "\n",
    "# Mark key events\n",
    "events = [\n",
    "    (datetime.datetime(2022, 5, 1), 'Terra/Luna collapse'),\n",
    "    (datetime.datetime(2022, 11, 1), 'FTX collapse'),\n",
    "    (datetime.datetime(2023, 1, 1), 'Crypto winter deepens'),\n",
    "]\n",
    "for date, label in events:\n",
    "    if rp_daily.index.min() <= date <= rp_daily.index.max():\n",
    "        ax.axvline(x=date, color='gray', linestyle=':', alpha=0.5)\n",
    "        ax.text(date, 1.05, label, rotation=45, fontsize=8, ha='left')\n",
    "\n",
    "ax.set_xlabel('Date')\n",
    "ax.set_ylabel('Normalized Level (0-1)')\n",
    "ax.set_title('Death Spiral Analysis: Correlated Decline of Market, Treasury, and Governance')\n",
    "ax.legend(loc='upper right')\n",
    "ax.set_ylim(-0.05, 1.15)\n",
    "ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %Y'))\n",
    "\n",
    "plt.tight_layout()\n",
    "plt.savefig(f'{DATA}/../snapshots/death_spiral.png', dpi=150, bbox_inches='tight')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5. Mechanism Design Scorecard"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-04-03T20:26:45.995858Z",
     "iopub.status.busy": "2026-04-03T20:26:45.995586Z",
     "iopub.status.idle": "2026-04-03T20:26:46.004415Z",
     "shell.execute_reply": "2026-04-03T20:26:46.002878Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "======================================================================\n",
      "TEC MECHANISM POST-MORTEM — SCORECARD\n",
      "======================================================================\n",
      "\n",
      "AUGMENTED BONDING CURVE\n",
      "  Design goal: Continuous fundraising with built-in price floor\n",
      "  Reserve ratio: Started at ~31% (target TBD from ABC model)\n",
      "  Entry/exit tribute: Generated revenue for common pool\n",
      "  Primary vs secondary: Token traded at ~33% discount at shutdown\n",
      "\n",
      "  [?] Did the ABC provide adequate price support during downturns?\n",
      "  [?] Was the tribute rate sufficient to sustain operations?\n",
      "  [?] How did liquidity compare between ABC and Honeyswap?\n",
      "\n",
      "  (Full ABC analysis pending — need trade data from Dune queries)\n",
      "\n",
      "CONVICTION VOTING\n",
      "  Design goal: Continuous, sybil-resistant fund allocation\n",
      "  Proposals funded: 36/46 real proposals (78%)\n",
      "  Total disbursed: 680,295 TEC\n",
      "  Unique participants: 159 stakers\n",
      "\n",
      "  [+] High success rate suggests proposals were well-vetted pre-submission\n",
      "  [+] Diverse set of funded initiatives (academy, research, community)\n",
      "  [-] 159 participants out of ~1,200 token holders (~13% participation)\n",
      "  [-] Governance activity declined as token price fell\n",
      "  [?] Did the 7-day conviction growth period cause delays?\n",
      "  [?] Did the Abstain proposal effectively serve as a brake?\n",
      "\n",
      "THE FEEDBACK LOOP\n",
      "  Design goal: Self-sustaining cycle of funding and growth\n",
      "  Reality: Tribute inflows << grant outflows throughout the lifecycle\n",
      "  Treasury declined from peak to shutdown over ~3 years\n",
      "\n",
      "  [-] The fundamental loop never achieved self-sustainability\n",
      "  [-] Exogenous shocks (Terra, FTX) accelerated decline\n",
      "  [-] Common pool was essentially a drawdown fund, not a renewable one\n",
      "  [?] Was this a mechanism failure or a market/adoption failure?\n",
      "\n",
      "SHUTDOWN METRICS\n",
      "  Token at shutdown: ~$0.18 (vs peak of ~$1+)\n",
      "  Treasury: ~$300K remaining\n",
      "  FDV: ~$217K (33% below treasury value)\n",
      "  Grants distributed: $433K direct + $250K via Gitcoin\n",
      "  Total value created: Funded TE Academy, cadCAD, Gravity, research\n",
      "\n",
      "OVERALL ASSESSMENT:\n",
      "  The mechanisms worked as designed but could not overcome:\n",
      "  1. Insufficient external demand to drive ABC tributes\n",
      "  2. Bear market pressure on reserve pool collateral\n",
      "  3. Community attrition reducing governance participation\n",
      "  The TEC proved that ABC + CV can work for initial fundraising and\n",
      "  allocation, but long-term sustainability requires mechanisms that\n",
      "  generate revenue beyond trading activity (tributes).\n",
      "\n"
     ]
    }
   ],
   "source": [
    "funded = proposals[(proposals['status'] == 'executed') & (proposals['amount_requested'] > 0)]\n",
    "\n",
    "print('=' * 70)\n",
    "print('TEC MECHANISM POST-MORTEM — SCORECARD')\n",
    "print('=' * 70)\n",
    "print(f'''\n",
    "AUGMENTED BONDING CURVE\n",
    "  Design goal: Continuous fundraising with built-in price floor\n",
    "  Reserve ratio: Started at ~31% (target TBD from ABC model)\n",
    "  Entry/exit tribute: Generated revenue for common pool\n",
    "  Primary vs secondary: Token traded at ~33% discount at shutdown\n",
    "  \n",
    "  [?] Did the ABC provide adequate price support during downturns?\n",
    "  [?] Was the tribute rate sufficient to sustain operations?\n",
    "  [?] How did liquidity compare between ABC and Honeyswap?\n",
    "  \n",
    "  (Full ABC analysis pending — need trade data from Dune queries)\n",
    "\n",
    "CONVICTION VOTING\n",
    "  Design goal: Continuous, sybil-resistant fund allocation\n",
    "  Proposals funded: {len(funded)}/46 real proposals ({len(funded)/46:.0%})\n",
    "  Total disbursed: {funded[\"amount_requested\"].sum():,.0f} TEC\n",
    "  Unique participants: 159 stakers\n",
    "  \n",
    "  [+] High success rate suggests proposals were well-vetted pre-submission\n",
    "  [+] Diverse set of funded initiatives (academy, research, community)\n",
    "  [-] 159 participants out of ~1,200 token holders (~13% participation)\n",
    "  [-] Governance activity declined as token price fell\n",
    "  [?] Did the 7-day conviction growth period cause delays?\n",
    "  [?] Did the Abstain proposal effectively serve as a brake?\n",
    "\n",
    "THE FEEDBACK LOOP\n",
    "  Design goal: Self-sustaining cycle of funding and growth\n",
    "  Reality: Tribute inflows << grant outflows throughout the lifecycle\n",
    "  Treasury declined from peak to shutdown over ~3 years\n",
    "  \n",
    "  [-] The fundamental loop never achieved self-sustainability\n",
    "  [-] Exogenous shocks (Terra, FTX) accelerated decline\n",
    "  [-] Common pool was essentially a drawdown fund, not a renewable one\n",
    "  [?] Was this a mechanism failure or a market/adoption failure?\n",
    "\n",
    "SHUTDOWN METRICS\n",
    "  Token at shutdown: ~$0.18 (vs peak of ~$1+)\n",
    "  Treasury: ~$300K remaining\n",
    "  FDV: ~$217K (33% below treasury value)\n",
    "  Grants distributed: $433K direct + $250K via Gitcoin\n",
    "  Total value created: Funded TE Academy, cadCAD, Gravity, research\n",
    "  \n",
    "OVERALL ASSESSMENT:\n",
    "  The mechanisms worked as designed but could not overcome:\n",
    "  1. Insufficient external demand to drive ABC tributes\n",
    "  2. Bear market pressure on reserve pool collateral\n",
    "  3. Community attrition reducing governance participation\n",
    "  The TEC proved that ABC + CV can work for initial fundraising and\n",
    "  allocation, but long-term sustainability requires mechanisms that\n",
    "  generate revenue beyond trading activity (tributes).\n",
    "''')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
