# What is Cube?

**Cube** is a weighted automated market maker (AMM) protocol built natively on **Solana**. It enables the creation of multi-asset liquidity pools with customizable token weights and virtual liquidity, delivering deep pricing with capital-efficient concentration.

Cube is inspired by [Ranges Protocol](https://ranges.fi/) (Balancer V3) and brings the same core concepts — weighted pools, virtual balance leverage, and proportional liquidity — to Solana's high-speed, low-cost runtime.

***

## Key Features

| Feature                      | Description                                             |
| ---------------------------- | ------------------------------------------------------- |
| **Multi-asset pools**        | 2–10 tokens per pool                                    |
| **Custom weights**           | 1%–99% per token (must sum to 100%)                     |
| **Virtual balance leverage** | Amplified pricing depth without extra capital           |
| **Proportional liquidity**   | No tick management, all LPs earn proportionally         |
| **Configurable fees**        | Swap fees from 0.001% to 1%                             |
| **SPL Token & Token-2022**   | Supports both Solana token standards                    |
| **Smart order routing**      | Backend splits swaps across pools for optimal execution |
| **On-chain verification**    | Backend verifies program bytecode before serving data   |

***

## How It Works

1. **Pool creators** deploy pools with chosen tokens, weights, and virtual balances via the on-chain Cubic Pool program.
2. **Liquidity providers** deposit tokens proportionally and receive BPT (pool tokens) representing their share.
3. **Traders** swap between any tokens in a pool. Pricing is determined by the weighted constant-product formula operating on virtual balances.
4. **The backend** indexes pool state, calculates optimal swap routes across multiple pools, and exposes REST APIs for integrators.

***

## Architecture at a Glance

```
Trader / LP / Integrator
        |
   Cube Frontend
        |
   Cube Backend (https://api.cubee.ee)
   - Pool discovery
   - Swap routing (EMP optimizer)
   - TVL / metrics
   - Transaction indexing
        |
   Solana RPC
        |
   Cubic Pool Program (on-chain)
   - Weighted AMM math
   - Virtual liquidity
   - Fee accounting
   - Protocol fees
        |
   Protocol Fees Authority (Treasury)
```

***

## Quick Links

* [Core Concepts](https://docs.cubee.ee/overview/core-concepts) — Understand virtual balances, weights, and leverage
* [Swapping](https://docs.cubee.ee/for-traders/swapping) — How swaps work and how fees are calculated
* [Adding Liquidity](https://docs.cubee.ee/for-liquidity-providers/adding-liquidity) — How to provide liquidity
* [Architecture](https://docs.cubee.ee/technical/architecture) — Smart contract and backend design
* [API Reference](https://docs.cubee.ee/integration/api-reference) — Backend endpoints for integrators
* [Swap Routing](https://docs.cubee.ee/integration/swap-routing) — How the router splits swaps across pools
* [FAQ](https://docs.cubee.ee/faq/faq) — Frequently asked questions
