> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thewolfshead.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# System Architecture

> Five modular smart contracts functioning as an automated financial engine

The Wolf's Head ecosystem comprises five modular smart contracts that function as an automated financial engine.

## Value flow

```mermaid theme={null}
flowchart TD
    POOL["Uniswap v4 Trading Pool"] -->|5% Hook Tax| HOOK["WolfHook.sol"]
    HOOK -->|USDG Cash| TREAS["StockTreasury.sol"]
    TREAS -->|Equity Inventory| LIGHT["Lighter Protocol Engine"]
    LIGHT -->|Yields| DEN["TheDen.sol"]
    USER["User $WOLF Stake"] --> DEN
    DEN -->|Emits $esWOLF| VEST["VestingPortal.sol<br/>+ esWolfToken.sol"]
    VEST -->|Enforces 10:1 Ratio| LIQ["Liquid $WOLF Unlocks"]
```

## Core contracts stack

| Contract            | Architectural Role    | Core Execution                                                                                                   |
| ------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `WolfToken.sol`     | Core ERC-20 Asset     | Manages the hard-capped genesis supply of 100,000,000 \$WOLF and core token transfers.                           |
| `WolfHook.sol`      | Uniswap v4 Hook       | Intercepts DEX swaps at `afterSwap`, extracts a flat 5% tax, converts it to USDG, and routes it to the Treasury. |
| `StockTreasury.sol` | Asset Accumulator     | Reads Chainlink oracles, executes automated stock token purchases, and deploys capital into Lighter Protocol.    |
| `TheDen.sol`        | Master Staking Engine | Manages user deposits in The Vanguard Territory and The Apex Territory, tracking reward balances.                |
| `VestingPortal.sol` | Escrow & Lockup Gate  | Manages esWOLF vesting streams and enforces the 10:1 Reserved Capital Lockup rule.                               |

<Note>
  Each contract is single-purpose by design: the hook only taxes, the treasury only accumulates and deploys, The Den only tracks stakes, and the Vesting Portal only gates exits. No contract holds more authority than its role requires.
</Note>
