Skip to main content
Pool Controllers manage all administrative operations for Balancer Pools including configuration updates, emergency pausing, weight adjustments, and fee modifications. These functions route through timelock governance to prevent immediate changes and enable stakeholder review.

Administrative Functions

createPool
function
Deploy new weighted pool with specified token pair, weight ratio, and swap fee configuration
pausePool
function
Emergency halt of all swap operations for security incidents or market disruptions
unpausePool
function
Resume trading after pause resolution or maintenance completion
setSwapFee
function
Update trading fees charged on swaps, distributed to liquidity providers
updateWeights
function
Gradually shift pool weight ratios over specified timeframe for rebalancing
setMaxSlippage
function
Configure maximum allowed price deviation between AMM and oracle feeds
authorizePool
function
Grant oracle permission to validate prices for specific pool and asset pair

Pool Creation

Deploy pools through the PoolManagerV3 contract with complete configuration in a single transaction. Specify both tokens, their weight distribution, swap fees, and the instance identifier for access control.
// POST https://api.trusset.org/v1/trading/pools/create

const response = await fetch('https://api.trusset.org/v1/trading/pools/create', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    instanceId: "bank-instance-001",
    stockISIN: "US0378331005", // Apple Inc.
    stockToken: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    stableToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
    stockWeight: "800000000000000000", // 80%
    stableWeight: "200000000000000000", // 20%
    swapFee: "30" // 0.3% = 30 bps
  })
});

const { poolId, poolAddress } = await response.json();
Weight values use 18 decimal precision where 1e18 = 100%. Weights must sum exactly to 1e18. Swap fees cannot exceed 5% (0.05e18) to prevent exploitative configurations.

Emergency Controls

Pause pools immediately for security incidents, oracle failures, or regulatory requirements. Pausing prevents all swap operations while maintaining existing liquidity positions—providers can still withdraw funds during paused state.
Common scenarios requiring pool pausing:Oracle Failures: When price feeds become stale or unavailable, pause prevents trading at potentially incorrect prices until feeds restore.Security Incidents: Suspected vulnerabilities in pool contracts or connected systems warrant immediate trading halt until resolution.Regulatory Actions: Court orders, trading halts on underlying securities, or compliance violations may require immediate pool suspension.Extreme Volatility: Unusual price movements or suspected manipulation can trigger temporary pauses for investigation.Market Circuit Breakers: Coordinate with traditional market halts by pausing tokenized security trading during exchange suspensions.Only administrators with proper roles can pause pools. Resume operations through unpausePool after resolving the trigger condition and completing necessary validations.

Fee Management

Adjust swap fees to balance liquidity provider compensation against trading volume incentives. Lower fees encourage higher volume while higher fees increase per-trade revenue for liquidity providers.
Fee RangeUse CaseImpact
5-15 bpsHigh-frequency securities with deep liquidityMaximizes volume, minimal per-trade revenue
20-50 bpsStandard securities with moderate liquidityBalanced approach for typical market conditions
50-100 bpsIlliquid securities with concentrated holdersCompensates liquidity risk, may limit volume
100+ bpsExotic or highly volatile assetsPremium pricing for capital deployment risk
Fee changes apply to all future swaps immediately. Existing LP positions continue earning at new rates without requiring any action from providers.

Weight Adjustments

Gradually shift pool weights over time to rebalance exposure or adapt to changing market conditions. Unlike instant rebalancing that creates arbitrage opportunities, gradual weight updates spread changes across multiple blocks.
// POST https://api.trusset.org/v1/trading/pools/update-weights

await fetch('https://api.trusset.org/v1/trading/pools/update-weights', {
  method: 'POST',
  body: JSON.stringify({
    poolId: "0x1234...abcd",
    newStockWeight: "700000000000000000", // 70%
    newStableWeight: "300000000000000000", // 30%
    updateDuration: 86400, // 24 hours
    startTime: Math.floor(Date.now() / 1000) + 3600 // Start in 1 hour
  })
});
Weight updates proceed linearly from current weights to target weights over the specified duration. Traders can arbitrage small price dislocations as weights shift, naturally driving the pool toward equilibrium.

Slippage Configuration

Set maximum acceptable deviation between AMM-calculated prices and oracle feeds. Transactions exceeding this threshold revert automatically, preventing execution at unfavorable prices.
defaultMaxSlippageBps
uint256
Standard slippage tolerance for normal market conditions (typically 50-100 bps)
staleMaxSlippageBps
uint256
Elevated slippage tolerance when oracle feeds become stale (typically 200-300 bps)
Configure different thresholds for normal versus degraded oracle conditions. When primary feeds fail and backup feeds activate, elevated slippage accounts for increased price uncertainty while maintaining trading availability.
All administrative functions route through TimelockController with minimum delay periods. Proposed changes must wait for the timelock duration before execution, enabling stakeholders to review and potentially cancel harmful updates.

Authorization Management

Pools require explicit authorization to query oracle prices for their asset pairs. This prevents unauthorized contracts from consuming oracle data or triggering price updates.
authorizePool
function
Grant oracle access for specific pool and asset identifier combination
revokePoolAuthorization
function
Remove oracle access, preventing future price queries and swap execution
Authorization links pools to specific asset identifiers (ISINs) in the oracle system. Multiple pools can trade the same asset with shared price feeds while maintaining independent liquidity and configuration.