Skip to main content

On-Chain API Reference

All Tilt vaults implement the ERC-4626 standard plus additional functions for portfolio management.

Read Functions

Vault State

FunctionReturnsDescription
totalAssets()uint256Total vault value in tiltUSDC (base asset + held tokens at oracle prices)
sharePrice()uint256NAV per share (18 decimals)
totalSupply()uint256Total outstanding shares
baseAsset()addressBase asset address (tiltUSDC)
name()stringVault name
symbol()stringVault share token symbol
curator()addressCurator (fund manager) address

Portfolio

FunctionReturnsDescription
getTargetWeights()TokenWeight[]Array of (token, weightBps) target allocations
getCurrentWeights()TokenWeight[]Array of (token, weightBps) actual allocations
getHeldTokens()address[]List of all token addresses held by the vault
getVaultConfig()VaultConfigFee configuration (entry, exit, management, performance BPS)

User Balances

FunctionReturnsDescription
balanceOf(address)uint256Share balance of an account
convertToShares(uint256 assets)uint256How many shares a given deposit would mint
convertToAssets(uint256 shares)uint256How much tiltUSDC a given share count is worth

Write Functions

Investor Operations

FunctionParametersDescription
deposit(uint256 assets, address receiver)Amount in tiltUSDC, recipient of sharesDeposit and receive vault shares
withdraw(uint256 assets, address receiver, address owner)Amount in tiltUSDC, recipient, share ownerWithdraw a specific tiltUSDC amount
redeem(uint256 shares, address receiver, address owner)Share count, recipient, share ownerBurn shares and receive proportional tiltUSDC
depositWithPermit(...)Amount + EIP-2612 permit signatureGasless approval + deposit in one transaction

Fund Manager Operations

FunctionParametersDescription
allocateIdleAssets()NoneDeploy idle tiltUSDC into target positions (permissionless)
rebalance()NoneSell over-weight and buy under-weight tokens to match targets

Data Types

struct TokenWeight {
    address token;
    uint16 weightBps;  // Weight in basis points (10000 = 100%)
}

struct VaultConfig {
    uint16 entryFeeBps;
    uint16 exitFeeBps;
    uint16 managementFeeBps;
    uint16 performanceFeeBps;
    uint256 rebalanceThresholdBps;
}

Factory Functions

UserVaultFactory

FunctionDescription
createUserVault(string name, string symbol, address[] tokens, uint16[] weights, uint16 curatorFeeBps, uint256 seedDeposit, string metadataURI)Deploy a new vault (payable — requires creation fee)
vaultCreationFee()Returns the ETH fee required to create a vault
minSeedDeposit()Returns minimum tiltUSDC seed deposit
getApprovedTokens()Returns list of tokens eligible for vault inclusion
getAllVaults()Returns addresses of all vaults created by this factory

Registry Functions

VaultRegistry

FunctionDescription
getAllVaults()Returns all registered vaults with metadata
getVaultInfo(address vault)Returns a single vault’s registration info
getVaultsByType(uint8 vaultType)Filter by type (0 = politician, 1 = user)
getVaultsByCurator(address curator)Filter by curator address
totalVaults()Total number of registered vaults