Contract Architecture
Tilt Protocol’s smart contracts are organized into five modules: core vaults, factories, oracle, rebalancing, and fee management.System Overview
Directory Layout
Proxy Architecture
All vaults are deployed as BeaconProxy instances. This means:- Each vault type has a single UpgradeableBeacon pointing to the implementation contract
- Individual vaults are lightweight proxy contracts that delegate to the beacon
- The protocol can upgrade all vaults of a type simultaneously by updating the beacon
- Individual vault state is preserved across upgrades
Key Interfaces
| Interface | Purpose |
|---|---|
IBaseVault | Vault lifecycle: TokenWeight struct, config getters |
IPortfolioOracle | getPortfolio(politicianId) → token/weight arrays |
IRebalanceEngine | calculateRebalance(), executeRebalance(), TradeOrder struct |
ITokenRouter | swap(), getQuote(), getTokenPrice(), pair support |
Tech Stack
| Framework | Foundry |
| Solidity | 0.8.24 (optimizer: 200 runs, via-ir) |
| Dependencies | OpenZeppelin Contracts v5, Chainlink |
| Target Chain | Robinhood L2 (Arbitrum Orbit, Chain ID 46630) |
| Proxy Pattern | UpgradeableBeacon + BeaconProxy |
| License | BUSL-1.1 |