Powered by LibFi

# AutoFi SP500 Vault (afSP500)

Broad Market Exposure

---
config:
  theme: neutral
---
flowchart TB


    subgraph SP500Vault[afSP500 Plasma Vault]
        V4[ERC-4626 Vault<br/>Base Asset: USDC]
    end

    subgraph SharedFuses[Shared Fuse Set]
        ERC[SupplyFuseERC4626]
        Bal[BalanceFuseERC4626]
        Swap[SwapFuseUniversal]
    end


    subgraph IndexToken[Index]
        tSPLG[tSPLG S&P500]
    end

    V4 --> SharedFuses --> IndexToken

    Raindex[(Raindex)]
    SharedFuses --> Raindex

# What It Is

afSP500 provides exposure to the S&P 500 index through a single tokenized ETF (tSPLG). This is the simplest way to gain diversified US equity exposure through a single vault.

# How It Works

Your USDC deposit is converted entirely to tSPLG, a tokenized version of the SPDR Portfolio S&P 500 ETF. The underlying fund holds 500 of the largest US companies, weighted by market capitalization. Dividends are reinvested automatically.

# Target Returns

S&P 500 index performance (historically ~10% annually, long-term average, not guaranteed)

# Who It’s For

  • Long-term investors seeking broad market exposure
  • Those who prefer index investing over stock picking
  • Users wanting the simplest possible equity exposure
  • Investors who believe in US market growth

# Benefits

Broad Diversification: The S&P 500 contains 500 companies across all sectors: technology, healthcare, financials, consumer goods, industrials, and more.

Proven Track Record: The S&P 500 has delivered strong long-term returns over decades, surviving wars, recessions, and crises.

Low Complexity: No rebalancing decisions, no sector bets, no individual stock research.

Onchain Access: Gain S&P 500 exposure without brokerage accounts or geographic restrictions.

# Risk Profile

Medium Risk: While diversified, the S&P 500 can experience significant drawdowns (30-50% in severe recessions). However, it has historically recovered from every decline. Suitable for investors with multi-year time horizons.

# Stock Vault Rebalancing Flows

---
config:
  theme: neutral
---
sequenceDiagram
    participant Alpha as Alpha Bot
    participant Vault as Plasma Vault
    participant Pyth as Pyth Oracle
    participant Raindex
    participant Tokens as Wrapped ST0x

    Note over Alpha: Monthly or threshold-based rebalance

    Alpha->>Vault: get current token balances
    Alpha->>Pyth: get all token prices
    Alpha->>Alpha: calculate current weights
    Alpha->>Alpha: compare to target weights

    loop For each token needing adjustment
        alt Token overweight
            Alpha->>Vault: withdraw wrapped token
            Alpha->>Vault: swap token to USDC
            Vault->>Raindex: takeOrder sell
        else Token underweight
            Alpha->>Vault: swap USDC to token
            Vault->>Raindex: takeOrder buy
            Alpha->>Vault: deposit wrapped token
        end
    end

    Alpha->>Vault: verify final weights
    Alpha->>Alpha: log rebalance complete

# Stock Corporate Action Handling

---
config:
  theme: neutral
---
flowchart TB
    subgraph Monitoring[Corporate Action Monitor]
        CA[Check Corporate Action ID]
        Oracle[Compare Token vs Oracle CA ID]
    end

    subgraph Actions[Response Actions]
        Pause[Pause Trading]
        Wait[Wait for Sync]
        Resume[Resume Normal Ops]
    end

    subgraph Types[Corporate Action Types]
        Split[Stock Split<br/>Wrapped token adjusts automatically]
        Dividend[Dividend<br/>Reinvested in wrapped token]
        Merger[Merger/Spinoff<br/>Manual intervention]
    end

    CA --> Oracle
    Oracle -->|Mismatch| Pause
    Oracle -->|Match| Resume
    Pause --> Wait
    Wait -->|Synced| Resume

    Types --> CA