Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

How to Architect a Capital Pool for Solvency

A developer-focused guide on designing a resilient decentralized insurance capital pool. Covers risk-adjusted capital allocation, diversification strategies, and methods for calculating and maintaining target solvency ratios.
Chainscore Ā© 2026
introduction
DESIGN PRINCIPLES

How to Architect a Capital Pool for Solvency

A technical guide to designing capital pools that remain solvent under market stress, covering core mechanisms, risk parameters, and smart contract patterns.

A capital pool is a smart contract-managed reserve of assets that provides liquidity or absorbs risk for a protocol, such as for lending, insurance, or derivatives. The primary architectural goal is solvency: ensuring the pool's liabilities never exceed its assets. This requires designing mechanisms for deposit/withdrawal, asset allocation, loss absorption, and risk-based pricing. Unlike simple token vaults, a solvency-focused pool must dynamically manage its capital adequacy ratio and have clear rules for handling insolvency events, often modeled after traditional finance concepts like the Basel Accords.

The foundation is a robust accounting system. Implement an internal ledger that tracks each user's share of the pool's total assets using an ERC-4626 vault standard or a similar shares-based model. Calculate the pool's solvency ratio (e.g., Total Value Locked / Value at Risk) on-chain using price oracles like Chainlink. Key parameters to define are the minimum collateralization ratio, liquidation thresholds, and maximum leverage for any position the pool underwrites. For example, a lending pool like Aave maintains solvency by allowing liquidations when a borrower's health factor falls below 1.

Risk must be distributed and isolated. Use tranched capital structures (Senior/Junior) or vault modules to separate risk-bearing capital from protected liquidity. Junior tranches (e.g., stakers in Synthetix) absorb losses first, protecting senior depositors. Architect circuit breakers and withdrawal queues (like EigenLayer) to prevent bank runs during volatility. Code example: a simple guard that pauses withdrawals if the solvency ratio drops below a threshold:

solidity
require(solvencyRatio() >= MIN_RATIO, "Pool undercollateralized");

Continuous solvency requires active management logic. Implement keeper bots or governance-controlled functions to rebalance assets, adjust risk parameters, or recapitalize the pool. Use time-weighted average prices (TWAP) from DEX oracles to mitigate oracle manipulation during liquidations. Design insurance or backstop mechanisms, such as a protocol-owned reserve or a decentralized coverage pool like Nexus Mutual, to serve as a final layer of protection. The architecture must be transparent, with all solvency metrics publicly verifiable on-chain.

Finally, stress test the design against historical and hypothetical scenarios: a 50% drop in collateral value, a flash crash, or a correlated default. Use simulation frameworks like Foundry's fuzzing or Gauntlet's agent-based models to verify the pool remains solvent. The architecture is complete when it can demonstrably protect user funds through automated mechanisms, without relying on frequent manual governance intervention. This creates a trust-minimized and resilient financial primitive for DeFi.

prerequisites
PREREQUISITES AND CORE CONCEPTS

How to Architect a Capital Pool for Solvency

This guide covers the foundational principles for designing a secure and sustainable capital pool, focusing on solvency, risk management, and protocol architecture.

A capital pool is a smart contract-managed reserve of assets that provides liquidity or insurance for a protocol's operations. Solvency—the ability to meet all financial obligations—is its primary design goal. This requires a robust architecture that balances asset inflows (deposits, premiums, fees) with potential outflows (claims, withdrawals, slashing). Key components include the treasury module for asset custody, the actuarial engine for risk assessment, and the liquidity management layer for asset deployment. Understanding these elements is a prerequisite for building a resilient system.

The core risk to solvency is under-collateralization, where liabilities exceed assets. This can occur from rapid claim spikes, asset devaluation, or smart contract exploits. Architecting for solvency involves implementing multiple safeguards: over-collateralization ratios (e.g., maintaining 150% collateral against liabilities), risk-based capital requirements that scale with exposure, and diversification across asset types and chains to mitigate correlation risk. Protocols like Aave (for lending) and Nexus Mutual (for insurance) exemplify these principles in production.

Smart contract design directly impacts solvency. The capital pool's logic must enforce time-locked withdrawals or staking periods to prevent bank runs, implement circuit breakers to pause operations during extreme volatility, and utilize decentralized oracles like Chainlink for accurate, tamper-proof price feeds. Code must also manage re-entrancy risks and properly handle ERC-20 token approvals. A solvency-focused architecture is not a single feature but a system of interconnected, fail-safe mechanisms.

Capital pools require active liquidity management to remain productive and solvent. Idle assets lose value to inflation, so protocols often deploy portions into yield-generating strategies like lending on Compound, providing liquidity on Uniswap V3, or staking in proof-of-stake networks. However, each strategy carries its own smart contract risk and impermanent loss. The architecture must include a risk-adjusted return framework and possibly a governance-controlled whitelist for approved strategies to balance yield pursuit with capital preservation.

Finally, transparency and verifiability are non-negotiable for trust. The architecture should enable real-time, on-chain verification of the pool's solvency ratio. This is typically achieved through publicly accessible view functions that calculate totalAssets() / totalLiabilities(). Projects like MakerDAO publish this data via their Dai Stability Dashboard. Transparent accounting, regular audits by firms like Trail of Bits, and a bug bounty program are essential operational prerequisites for any capital pool expecting to hold significant value.

risk-modeling-foundation
ARCHITECTING A CAPITAL POOL

Step 1: Establish a Risk Modeling Foundation

A capital pool's solvency is determined by its ability to cover liabilities under stress. This step defines the core financial model that quantifies risk and guides asset allocation.

A risk model is the mathematical framework that translates market volatility and protocol behavior into potential financial loss. For a capital pool, the primary output is Value at Risk (VaR) or Expected Shortfall (ES), which estimates the maximum expected loss over a specific time horizon and confidence level (e.g., 95% over 7 days). This quantifies the "cushion" of capital required to remain solvent. Without this foundation, asset selection is guesswork.

Building this model requires defining key parameters: the time horizon (how long capital is locked), confidence interval (95% is common for DeFi), and the risk factors to simulate. For a lending pool, primary risk factors are collateral asset price drops and borrower default rates. For a validator pool, they include slashing penalties and MEV extraction variance. Tools like historical Monte Carlo simulation or parametric models using volatility (σ) and correlation (ρ) data are used.

Implement a basic Monte Carlo simulation in Python to model portfolio loss. This script simulates potential future prices of two assets (e.g., ETH and a stablecoin) based on historical volatility and correlation, calculating the portfolio's Value at Risk.

python
import numpy as np
import pandas as pd

# Example parameters
portfolio_value = 1000000  # $1M pool
eth_weight = 0.7           # 70% ETH
stable_weight = 0.3        # 30% Stablecoin
eth_volatility = 0.25      # 25% annual vol
correlation = -0.1         # Slight negative correlation
horizon_days = 7
confidence = 0.95
simulations = 10000

# Generate correlated random returns
cov_matrix = np.array([
    [eth_volatility**2, correlation * eth_volatility * 0.01],
    [correlation * eth_volatility * 0.01, 0.01**2]
]) * (horizon_days/365)

mean = np.array([0, 0])
returns = np.random.multivariate_normal(mean, cov_matrix, simulations)

# Calculate portfolio P&L
portfolio_returns = (eth_weight * returns[:,0]) + (stable_weight * returns[:,1])
portfolio_pnl = portfolio_value * portfolio_returns

# Calculate 95% VaR
var_95 = -np.percentile(portfolio_pnl, (1-confidence)*100)
print(f"7-day 95% VaR: ${var_95:,.2f}")

The model must be backtested against historical crises (e.g., March 2020, LUNA collapse, FTX failure) to check its predictive accuracy. A model that didn't predict a 40% drawdown during a historical 30% drop is undercapitalized. Furthermore, integrate forward-looking indicators like funding rates, futures open interest, and on-chain exchange flows to adjust volatility assumptions in real-time, moving beyond purely historical data.

Finally, this risk model directly dictates the capital allocation policy. The calculated VaR becomes the minimum required surplus capital. If the model shows a 7-day 95% VaR of $150,000, the pool must maintain at least that much in low-volatility assets (e.g., short-term Treasuries via Ondo Finance, or high-quality stablecoin yield) to absorb losses without becoming insolvent. This creates a clear, quantitative rule: Allocate X% of the portfolio to hedging assets to cover the modeled VaR.

CAPITAL ADEQUACY

Key Factors for Capital Requirement Calculation

Core variables and methodologies for determining the minimum capital needed to cover protocol liabilities under stress.

Calculation FactorStatic ReserveDynamic ModelHybrid Approach

Base Reserve Ratio

10% of TVL

5-15% of TVL

8% of TVL + Buffer

Value-at-Risk (VaR) Confidence Level

95%

99% (Customizable)

99%

Stress Test Scenarios

Pre-defined (3 scenarios)

On-chain oracle + market data feeds

Pre-defined + Real-time volatility triggers

Liquidity Coverage Ratio (LCR) Period

30 days

7-90 days (Dynamic)

30 days (with 7-day high-liquidity buffer)

Counterparty Risk Weighting

Not applied

Applied via credit scores (e.g., Chainlink Proof of Reserve)

Applied for non-collateralized exposures only

Gas Cost Contingency

Fixed 0.5 ETH buffer

Dynamic based on 30d avg gas price + 2σ

Dynamic, capped at 1% of pool capital

Smart Contract Risk Buffer

2% flat fee

Risk-scored per audit (e.g., 0.5-5%)

2% base + slashing insurance premium

Recalibration Frequency

Quarterly

Continuous (per epoch/block)

Monthly or on volatility breach

asset-allocation-strategy
ARCHITECTING THE CAPITAL POOL

Step 2: Design the Asset Allocation Strategy

This step defines the core financial architecture of your capital pool, determining how funds are deployed across different asset classes and protocols to achieve target returns while managing risk and ensuring solvency.

An asset allocation strategy is the blueprint for your capital pool's solvency. It specifies the target percentage of the pool's total value to be deployed into different asset classes, such as stablecoins, liquid staking tokens (LSTs), or yield-bearing strategies. The primary goal is to construct a portfolio where the aggregate risk-adjusted yield exceeds the promised yield to depositors, creating a sustainable profit margin. This involves calculating the solvency buffer—the surplus capital generated from yields that protects the pool against market volatility and smart contract risks. A well-architected strategy explicitly defines acceptable protocols (e.g., Aave, Compound, Lido), asset types (e.g., USDC, stETH), and concentration limits.

Effective allocation requires modeling different yield scenarios. You must analyze the base yield of each asset (e.g., USDC lending at 5% APY on Aave) and factor in potential rewards from governance tokens or liquidity incentives, which can be volatile. A common framework involves a core-satellite approach: a core holding of low-risk, stable yield (like money market deposits) provides baseline solvency, while satellite allocations to higher-yield, higher-risk strategies (like LP positions or restaking) aim to boost returns. Each allocation must be stress-tested against market conditions, such as a sudden drop in LST value or a spike in borrowing rates, to ensure the pool remains solvent.

Implementation is done through the pool's smart contract logic, which enforces the allocation rules. For example, a contract might use Chainlink oracles to monitor the value of each position and automatically rebalance if an asset's share of the portfolio drifts beyond a set threshold (e.g., +/- 5%). Code that interacts with a lending protocol to deposit assets might look like this:

solidity
// Example function to allocate to Aave
function allocateToAave(address asset, uint256 amount) external onlyManager {
    IERC20(asset).approve(address(aaveLendingPool), amount);
    aaveLendingPool.deposit(asset, amount, address(this), 0);
}

This enforces the strategy programmatically, removing discretionary human error.

Risk parameters are integral to the allocation design. You must define maximum allocations per protocol (e.g., no more than 40% in any single lending market), asset correlation assumptions, and liquidation thresholds. For instance, using stETH as collateral in a borrowing strategy introduces liquidation risk if its value falls relative to the borrowed asset. The strategy should mandate a conservative loan-to-value (LTV) ratio and possibly integrate with a keeper network for automated position management. Documenting these parameters in a clear risk framework is as important as the smart contract code itself, as it guides future adjustments and informs depositors.

Finally, the strategy must be dynamic. The DeFi landscape and yield opportunities change rapidly. Architect your pool with governance mechanisms—either via a multi-sig or community vote—to allow for strategic re-allocations. However, changes should be slow and deliberate, following a pre-defined process to avoid rash decisions during market stress. The end product is a living document and codebase that systematically pursues yield while prioritizing the permanent solvency of the capital pool above all else.

yield-strategy-options
ARCHITECTING FOR SOLVENCY

Capital Deployment and Yield Strategies

Designing a capital pool requires a structured approach to risk management, liquidity, and yield generation to ensure long-term solvency and performance.

02

Liquidity Management & Slippage

Solvency depends on the ability to exit positions. Key considerations include:

  • Concentrated Liquidity (e.g., Uniswap V3) for capital efficiency versus Passive Liquidity (V2) for simplicity.
  • Slippage tolerance based on pool depth; a $1M swap on a shallow pool can incur >5% slippage.
  • Layer 2 vs. Mainnet liquidity fragmentation; bridging assets adds latency and cost. Use on-chain analytics from Dune or Arkham to monitor real-time liquidity depth across venues.
04

Solvency Monitoring & Circuit Breakers

Implement real-time monitoring to prevent insolvency. Essential tools:

  • Health Factor / Loan-to-Value (LTV) alerts for leveraged positions on lending platforms.
  • Custom dashboards using Chainlink Data Streams or Pyth for sub-second price feeds.
  • Automated circuit breakers that can pause deposits or rebalance via Gelato Network bots if collateral ratios breach thresholds. Proactive monitoring is cheaper than reacting to a liquidation cascade.
05

Capital Efficiency with Leverage

Safely amplify returns using on-chain leverage primitives.

  • Collateral Recycling: Use staked ETH (stETH) as collateral to borrow stablecoins on Aave, then re-deploy.
  • Perpetual Futures: Hedge delta exposure or gain leveraged longs/shorts on dYdX or GMX with up to 50x.
  • Leverage Caps: Limit total leverage to 2-3x pool equity; use stop-loss smart contracts to automatically unwind positions. Leverage magnifies both gains and impermanent loss in liquidity pools.
solvency-ratio-implementation
ARCHITECTING THE POOL

Step 3: Implement Solvency Ratio Monitoring

This section details the implementation of a real-time solvency ratio monitor, a critical circuit breaker for any capital pool.

A solvency ratio is the primary health metric for a capital pool, calculated as Total Assets / Total Liabilities. In a blockchain context, this translates to the pool's available liquidity versus its outstanding debt obligations, such as loans or minted synthetic assets. The goal of monitoring is to prevent the pool from becoming insolvent (ratio < 1), which would make it impossible for all users to withdraw their funds. Continuous, on-chain monitoring acts as an automated risk manager, triggering predefined actions when thresholds are breached.

Architecting this system requires defining the data sources and calculation logic. Total Assets are typically the sum of the pool's balances across supported tokens in its vaults, often priced via a decentralized oracle like Chainlink. Total Liabilities are the sum of all user claims against the pool, such as the principal of active loans or the circulating supply of a stablecoin the pool backs. The calculation must be gas-efficient and resistant to manipulation, often performed in a dedicated keeper or monitor contract that can be called permissionlessly.

Here is a simplified Solidity example of a core monitoring function. This contract would be fed price data by an oracle and liability data from the pool's core contracts.

solidity
// Simplified Solvency Monitor Contract
contract SolvencyMonitor {
    IPoolVault public vault;
    IOracle public priceOracle;
    uint256 public solvencyThreshold; // e.g., 1.1e18 for 110%

    function checkSolvency() public view returns (bool isSolvent, uint256 ratio) {
        uint256 totalAssetValue = vault.getTotalAssetValue(priceOracle);
        uint256 totalLiabilities = vault.getTotalLiabilities();
        
        ratio = (totalAssetValue * 1e18) / totalLiabilities; // Ratio in 18 decimals
        isSolvent = ratio >= solvencyThreshold;
    }
}

The key output is the ratio, expressed with 18 decimals for precision (1e18 = 100%).

Setting the correct solvencyThreshold is a risk parameter decision. A threshold of 1.0 (100%) is the absolute minimum for solvency but offers no buffer for price slippage during liquidations. Most protocols set a target threshold (e.g., 110-150%) and a critical threshold (e.g., 101-105%). When the target is breached, it may signal the need for increased fees or reduced borrowing limits. When the critical threshold is breached, it should trigger emergency actions like pausing new debt issuance or initiating a recapitalization process.

The monitor must be integrated into the pool's operational logic. This is done by having core functions, like borrowing or minting, call checkSolvency() and revert if the critical threshold is not met. For less time-sensitive responses, an off-chain keeper network can watch the ratio via events or periodic checks and execute mitigation actions—such as liquidating undercollateralized positions—when the target threshold is breached. This creates a multi-layered defense system.

Finally, transparency is crucial. The live solvency ratio and historical data should be publicly accessible, either on-chain via view functions or through indexed events. This allows users and external analysts to verify the pool's health independently, building trust. Regular solvency reports that detail asset composition, liability types, and stress test results further demonstrate rigorous risk management, a key component of E-E-A-T (Experience, Expertise, Authoritativeness, Trustworthiness) for DeFi protocols.

mitigating-correlated-risk
ARCHITECTING FOR SOLVENCY

Step 4: Mitigate Correlated and Systemic Risk

Designing a resilient capital pool requires moving beyond simple diversification to actively manage interconnected risks that can cascade through the system.

Correlated risk occurs when multiple assets or positions fail simultaneously due to a common underlying factor. In a lending pool, this could be a broad market crash affecting all crypto assets, or a sector-specific event like a DeFi exploit impacting a basket of related tokens. Systemic risk refers to the failure of a core component—like an oracle, a bridge, or a widely used smart contract library—that can cripple the entire protocol. The 2022 collapse of the Terra ecosystem demonstrated how a single point of failure (its algorithmic stablecoin) triggered correlated liquidations and systemic contagion across interconnected DeFi protocols.

To mitigate these risks, architects must implement layered defenses. First, asset correlation analysis is critical. Instead of just listing accepted collateral, use historical price data and statistical models (like Pearson correlation coefficients) to group assets. Limit exposure to highly correlated asset clusters. For example, a pool might cap the total value of all Ethereum Layer 2 governance tokens or all oracle-dependent synthetic assets. This prevents a single narrative or technological failure from wiping out a disproportionate share of the pool's capital.

Second, design for oracle resilience. Price oracles are a classic systemic risk vector. Implement a multi-oracle system with fallback mechanisms. A common pattern is to use a primary decentralized oracle network like Chainlink, a secondary on-chain DEX TWAP (Time-Weighted Average Price), and an emergency circuit breaker that freezes operations if price deviations exceed a threshold. Smart contract logic should query multiple sources and discard outliers before calculating a median price, as shown in this simplified snippet:

solidity
function getSecurePrice(address asset) internal view returns (uint256) {
    uint256 price1 = OracleChainlink.getPrice(asset);
    uint256 price2 = OracleUniswapTWAP.getPrice(asset);
    // Revert if prices deviate by more than 5%
    require(price1 * 100 / price2 < 105 && price1 * 100 / price2 > 95, "Oracle mismatch");
    return (price1 + price2) / 2;
}

Third, incorporate stress testing and circuit breakers. Model your pool's behavior under extreme but plausible scenarios: a 50% market drop in 24 hours, the failure of a major bridge, or the insolvency of a large, integrated protocol. Set automated circuit breakers that trigger protective measures. These can include temporarily increasing collateralization ratios, pausing withdrawals or liquidations during periods of extreme volatility, or activating a grace period for undercollateralized positions to add funds, preventing a cascade of forced sales.

Finally, ensure dependency management. Audit and minimize external smart contract dependencies. Use upgradeable proxy patterns cautiously, as they introduce admin key risk. For critical integrations like cross-chain bridges, use a multi-bridge architecture where assets are distributed across several trusted bridges (e.g., LayerZero, Axelar, Wormhole) rather than relying on a single one. This limits the damage from any one bridge's compromise. The goal is to create a system where no single shock, whether from market movements or infrastructure failure, can threaten the pool's overall solvency.

SOLVENCY FOCUS

Comparison of Capital Pool Architectures

Trade-offs between different capital pool designs for managing solvency risk in DeFi protocols.

Architectural FeatureSingle-Asset VaultMulti-Asset Pool (Uncorrelated)Multi-Asset Pool (Correlated)Isolated Debt Positions

Solvency Risk Concentration

High

Medium

High

Low

Liquidation Complexity

Low

Medium

High

Low

Capital Efficiency

Low

High

Medium

High

Oracle Dependency

Single

Multiple

Multiple

Single

Liquidation Threshold

85% LTV

75-85% LTV

65-75% LTV

90% LTV

Gas Cost per Operation

Low

Medium

Medium

High

Systemic Risk from Bad Debt

High

Medium

High

Low

Example Protocols

MakerDAO ETH-A

Aave V3

Curve Lending Pools

Euler Finance

CAPITAL POOL ARCHITECTURE

Frequently Asked Questions

Common technical questions and troubleshooting for designing and managing on-chain capital pools, focusing on solvency, risk, and smart contract implementation.

A capital pool is a programmable, on-chain entity with defined rules for asset management, risk parameters, and automated solvency checks. A multi-sig wallet is primarily a custody solution requiring manual signatures for transactions.

Key differences:

  • Automation: Pools use smart contracts to enforce strategies (e.g., automatic rebalancing, yield farming) and solvency conditions. Multi-sigs require manual proposal and execution for every action.
  • Transparency & Composability: Pool state (assets, debt, health factor) is publicly verifiable on-chain and can be integrated by other protocols (DeFi legos). Multi-sig holdings are opaque without explicit disclosure.
  • Risk Management: Pools embed risk parameters like Loan-to-Value (LTV) ratios, liquidation thresholds, and maximum concentration limits directly into their logic. Multi-sigs rely on human discretion.

Use a multi-sig for treasury management. Use a capital pool for active, rule-based deployment of capital where solvency must be continuously maintained.

conclusion-next-steps
ARCHITECTING FOR SOLVENCY

Conclusion and Next Steps

This guide has outlined the core principles for building a capital pool that remains solvent under market stress. The next steps involve implementing these concepts and exploring advanced strategies.

Architecting a capital pool for solvency is an iterative process of design, simulation, and monitoring. The foundational steps include establishing clear risk parameters, implementing robust liquidation mechanisms, and designing a resilient treasury management strategy. Tools like agent-based simulations and historical backtesting against events like the 2022 market downturn are essential for validating your model. Start by deploying a minimal viable pool on a testnet, such as Sepolia or Arbitrum Sepolia, to test the interaction between your smart contracts and real-world price feeds from oracles like Chainlink or Pyth.

For ongoing management, you must establish a framework for continuous risk assessment. This involves monitoring key metrics: Loan-to-Value (LTV) ratios, collateral concentration, liquidity depth on decentralized exchanges, and oracle latency. Setting up automated alerts for when these metrics breach predefined thresholds is crucial. Consider using a dedicated monitoring service like Chainscore or building custom dashboards with The Graph to index your pool's on-chain data. Proactive management, rather than reactive fixes, is the hallmark of a solvent system.

To deepen your understanding, explore existing protocol implementations and their solvency frameworks. Study how Aave manages its Health Factor, how MakerDAO operates its PSM (Peg Stability Module) for DAI stability, or how Compound handles its Reserve Factor and liquidation incentives. Reviewing their publicly available audits and risk reports provides invaluable insights. Engaging with their governance forums can also reveal the ongoing challenges and solutions debated by their communities.

Finally, consider the next evolution of your pool's architecture. Advanced topics include: - Cross-chain solvency using interoperability protocols like LayerZero or Axelar. - Incorporating real-world assets (RWA) as collateral, which introduces new legal and oracle challenges. - Developing insurance or recapitalization mechanisms, similar to Maker's Surplus Buffer, to absorb unexpected losses. The field of decentralized finance is rapidly advancing, and staying informed through research from places like the Chainscore Labs blog or ETH Research forum is key to building pools that are not only solvent today but adaptable for the future.

How to Architect a Decentralized Insurance Capital Pool | ChainScore Guides