> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gizatech.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Protocols

> DeFi lending protocols supported by Giza agents across multiple chains

## Overview

Giza agents optimize yield by deploying capital across **DeFi lending protocols** on multiple blockchains. Users supply assets and earn interest from borrowers.

## Supported Protocols by Chain

<Tabs>
  <Tab title="Base (8453)">
    ### Core Protocols

    | Protocol     | Description                      | Key Features                                       |
    | ------------ | -------------------------------- | -------------------------------------------------- |
    | **Aave**     | Decentralized liquidity protocol | Isolated risk pools, audited, deep liquidity       |
    | **Compound** | Established lending market       | Gas-efficient, single collateral model, composable |
    | **Moonwell** | Base-native lending protocol     | Optimized for Base, community governed             |
    | **Fluid**    | Liquidity protocol               | Efficient capital usage                            |

    ### Morpho Vaults

    Morpho is a lending optimization layer that aggregates liquidity across multiple protocols:

    | Vault                             | Strategy                             |
    | --------------------------------- | ------------------------------------ |
    | **Morpho Gauntlet USDC Prime**    | Gauntlet-managed prime USDC strategy |
    | **Morpho Moonwell Flagship USDC** | Moonwell-backed USDC vault           |
    | **Morpho Seamless USDC Vault**    | Seamless protocol integration        |
    | **Morpho Steakhouse USDC**        | Steakhouse Financial strategy        |
    | **Morpho Universal USDC**         | Universal USDC vault                 |
    | **Morpho Smokehouse USDC**        | Smokehouse strategy                  |

    ### Euler Vaults

    Euler is a non-custodial lending protocol with modular vaults:

    | Vault          | Strategy        |
    | -------------- | --------------- |
    | **Euler USDC** | Core USDC vault |

    **Token:** USDC (6 decimals)
  </Tab>

  <Tab title="Arbitrum (42161)">
    ### Core Protocols

    | Protocol     | Description                    | Key Features                    |
    | ------------ | ------------------------------ | ------------------------------- |
    | **Aave**     | Arbitrum deployment of Aave V3 | Lower gas costs, deep liquidity |
    | **Compound** | Compound V3 on Arbitrum        | Gas-efficient on Arbitrum       |
    | **Fluid**    | Liquidity protocol             | Efficient capital usage         |

    ### Morpho Vaults

    Morpho vaults available on Arbitrum:

    | Vault                                 | Strategy                       |
    | ------------------------------------- | ------------------------------ |
    | **Morpho Gauntlet USDC Core**         | Core Gauntlet strategy         |
    | **Morpho Gauntlet USDC Prime**        | Prime Gauntlet strategy        |
    | **Morpho Clearstar USDC Reactor**     | Clearstar managed vault        |
    | **Morpho Hyperithm USDC**             | Hyperithm strategy             |
    | **Morpho MEV Capital USDC**           | MEV Capital strategy           |
    | **Morpho Steakhouse High Yield USDC** | High yield Steakhouse strategy |

    ### Euler Vaults

    Euler vaults available on Arbitrum:

    | Vault                | Strategy                   |
    | -------------------- | -------------------------- |
    | **Euler USDC**       | Core USDC vault            |
    | **Euler Yield USDC** | Yield-optimized USDC vault |

    **Token:** USDC (6 decimals)
  </Tab>

  <Tab title="Ethereum (1)">
    ### Core Protocols

    | Protocol     | Description              | Key Features                           |
    | ------------ | ------------------------ | -------------------------------------- |
    | **Aave**     | Ethereum mainnet Aave V3 | Original deployment, deepest liquidity |
    | **Compound** | Compound V3 on Ethereum  | Long mainnet history                   |
    | **Fluid**    | Liquidity protocol       | Efficient capital usage                |

    ### Morpho Vaults

    Morpho vaults on Ethereum:

    | Vault                               | Strategy                      |
    | ----------------------------------- | ----------------------------- |
    | **Morpho Usual Boosted USDC**       | Usual protocol integration    |
    | **Morpho Avantgarde USDC Core**     | Avantgarde managed strategy   |
    | **Morpho Turtle USDC**              | Turtle capital strategy       |
    | **Morpho Steakhouse Infinifi USDC** | Steakhouse Infinifi strategy  |
    | **Morpho Smokehouse USDC**          | Smokehouse strategy           |
    | **Morpho Gauntlet USDC Core**       | Core Gauntlet strategy        |
    | **Morpho Yearn OG USDC**            | Yearn Finance strategy        |
    | **Morpho Hakutora USDC**            | Hakutora managed vault        |
    | **Morpho Coinshift USDC**           | Coinshift strategy            |
    | **Morpho Steakhouse USDC**          | Steakhouse Financial strategy |
    | **Morpho Gauntlet USDC Prime**      | Prime Gauntlet strategy       |
    | **Morpho Hyperithm USDC**           | Hyperithm strategy            |
    | **Morpho Re7 USDC**                 | Re7 capital strategy          |
    | **Morpho Gauntlet USDC Frontier**   | Frontier Gauntlet strategy    |
    | **Morpho Clearstar USDC Reactor**   | Clearstar reactor vault       |
    | **Morpho Alpha USDC Core**          | Alpha core strategy           |

    ### Euler Vaults

    Euler vaults on Ethereum:

    | Vault                      | Strategy                  |
    | -------------------------- | ------------------------- |
    | **Euler Rezerve Markets**  | Rezerve managed markets   |
    | **Euler Frontier Yala**    | Yala frontier vault       |
    | **Euler Frontier MMEV**    | MMEV frontier strategy    |
    | **Euler Frontier MHyper**  | MHyper frontier vault     |
    | **Euler Telos Stream**     | Telos streaming strategy  |
    | **Euler R7 Hyperwave**     | R7 hyperwave vault        |
    | **Euler Sentora RLUSD**    | Sentora RLUSD strategy    |
    | **Euler Frontier Falcon**  | Falcon frontier vault     |
    | **Euler Frontier CAP**     | CAP frontier strategy     |
    | **Euler Frontier Strata**  | Strata frontier vault     |
    | **Euler Prime**            | Prime vault strategy      |
    | **Euler Yield**            | Yield-optimized vault     |
    | **Euler Frontier MApollo** | MApollo frontier strategy |

    **Token:** USDC (6 decimals)
  </Tab>

  <Tab title="Polygon (137)">
    ### Core Protocols

    | Protocol  | Description                   | Key Features                               |
    | --------- | ----------------------------- | ------------------------------------------ |
    | **Aave**  | Polygon deployment of Aave V3 | Low fees, fast transactions                |
    | **Fluid** | Liquidity protocol            | Efficient capital usage, Polygon-optimized |

    ### Morpho Vaults

    | Vault                    | Strategy                     |
    | ------------------------ | ---------------------------- |
    | **Morpho Compound USDC** | Compound-backed Morpho vault |

    **Token:** USDC (6 decimals)
  </Tab>

  <Tab title="Plasma (9745)">
    ### Core Protocols

    | Protocol  | Description                  | Key Features                |
    | --------- | ---------------------------- | --------------------------- |
    | **Aave**  | Plasma deployment of Aave V3 | Plasma network optimization |
    | **Fluid** | Liquidity protocol           | Efficient capital usage     |

    ### Euler Vaults

    | Vault                            | Strategy                         |
    | -------------------------------- | -------------------------------- |
    | **Euler Frontier EtherFi USDT0** | EtherFi frontier vault for USDT0 |
    | **Euler Frontier Ethena USDT0**  | Ethena frontier vault for USDT0  |

    **Token:** USDT0 (custom stablecoin on Plasma)
  </Tab>

  <Tab title="HyperEVM (999)">
    ### Core Protocols

    | Protocol      | Description                      | Key Features                   |
    | ------------- | -------------------------------- | ------------------------------ |
    | **Hyperlend** | Native HyperEVM lending protocol | HyperEVM-specific optimization |

    ### Morpho Vaults

    | Vault                           | Strategy                     |
    | ------------------------------- | ---------------------------- |
    | **Morpho Felix USDT0**          | Felix capital USDT0 strategy |
    | **Morpho Felix USDT0 Frontier** | Felix frontier USDT0 vault   |
    | **Morpho Hyperithm USDT0**      | Hyperithm USDT0 strategy     |
    | **Morpho MEV Capital USDT0**    | MEV Capital USDT0 vault      |
    | **Morpho Gauntlet USDT0 Vault** | Gauntlet managed USDT0 vault |

    **Token:** USDT0 (custom stablecoin on HyperEVM)
  </Tab>
</Tabs>

## Supported Tokens by Chain

| Token     | Chains                            | Decimals | Description                           |
| --------- | --------------------------------- | -------- | ------------------------------------- |
| **USDC**  | Base, Arbitrum, Ethereum, Polygon | 6        | USD Coin - primary stablecoin         |
| **USDT0** | Plasma, HyperEVM                  | Variable | Custom stablecoin for specific chains |

## Protocol Selection

### Agent Selection

When activating an agent, you select which protocols it can use:

```typescript theme={null}
await agent.activate({
  owner: userWallet,
  token: USDC_ADDRESS,
  protocols: ['aave', 'compound', 'moonwell'],
  txHash: depositTxHash,
});
```

### Getting Available Protocols

Retrieve supported protocols for a token on your chain:

```typescript theme={null}
const { protocols } = await giza.protocols(USDC_ADDRESS);

console.log('Available protocols:', protocols);
// Output depends on chain:
// Base: ['aave', 'compound', 'moonwell', 'fluid', 'morpho_gauntlet_usdc_prime', ...]
// Ethereum: ['aave', 'compound', 'fluid', 'morpho_usual_boosted_usdc', ...]
```

## Protocol Types

### Core Protocols

Traditional lending markets like Aave, Compound, Moonwell, Fluid, and Hyperlend:

* Direct lending/borrowing
* Pool-based liquidity
* Variable APRs based on utilization
* Audited contracts (for established protocols)

### Morpho Vaults

Optimization layer that aggregates liquidity:

* Built on top of existing protocols
* Managed strategies by firms like Gauntlet, Steakhouse, Felix, etc.
* Can produce higher APRs through optimization
* Additional layer of risk management
* Available on most chains with varying strategies

### Euler Vaults

Modular lending protocol:

* Non-custodial
* Permissionless vault creation
* Flexible risk parameters
* Isolated markets
* Frontier vaults for emerging strategies

## Protocol Risks

<Warning>
  All DeFi protocols carry risk. Giza agents reduce exposure through diversification and optimization, but users should understand what can go wrong:
</Warning>

### Smart Contract Risk

* Protocols are powered by smart contracts
* Bugs or exploits can lead to loss of funds
* **Mitigation**: Audits, time-tested protocols, bug bounties, diversification

### Liquidity Risk

* Sudden large withdrawals can affect availability
* High utilization may delay withdrawals
* **Mitigation**: Diversification across protocols and chains

### Oracle Risk

* Protocols rely on price oracles
* Oracle failures can cause liquidations or losses
* **Mitigation**: Using protocols with reliable oracle systems

### Protocol Governance Risk

* Protocol parameters can change via governance
* Changes may affect yields or security
* **Mitigation**: Monitoring and automatic rebalancing

### Chain-Specific Risks

* Network outages or congestion
* Bridge vulnerabilities (for L2s)
* Chain reorganizations
* **Mitigation**: Choosing established chains

## Protocol Diversification

Giza agents spread capital across protocols to reduce exposure:

1. No single point of failure
2. Access to the best rates across protocols
3. Liquidity spread across multiple pools
4. Protocol-specific risks stay isolated

## Constraints for Protocol Management

Control protocol usage with constraints:

### Minimum Protocols

Ensure diversification:

```typescript theme={null}
{
  kind: 'min_protocols',
  params: { min_protocols: 2 }
}
```

### Maximum Allocation

Cap exposure to any single protocol:

```typescript theme={null}
{
  kind: 'max_amount_per_protocol',
  params: { max_amount: '5000000000' } // 5000 USDC
}
```

### Exclude Protocol

Blacklist specific protocols:

```typescript theme={null}
{
  kind: 'exclude_protocol',
  params: { protocol: 'fluid' }
}
```

### Protocol-Specific Cap

Limit specific protocols:

```typescript theme={null}
{
  kind: 'max_allocation_amount_per_protocol',
  params: {
    protocol: 'morpho_gauntlet_usdc_prime',
    max_amount: '2000000000' // 2000 USDC
  }
}
```

## Protocol Performance

### Protocol Discovery

Get available protocols for a token:

```typescript theme={null}
const { protocols } = await giza.protocols(USDC_ADDRESS);

console.log('Available protocols:', protocols);
// ['aave', 'compound', 'moonwell', 'fluid', ...]

// Select protocols for activation
const selectedProtocols = protocols.slice(0, 3);
```

### Historical Performance

Agents track how capital performs across protocols:

```typescript theme={null}
const { performance } = await agent.performance({ from: '2024-01-01 00:00:00' });

// See allocation across protocols over time
performance.forEach(point => {
  console.log(`${point.date}:`, point.portfolio);
  // { aave: 500, compound: 300, moonwell: 200 }
});
```

## Protocol Updates

### Adding New Protocols

As new protocols launch or existing ones upgrade:

* Giza team evaluates security and liquidity
* Protocols undergo risk assessment
* If approved, added to supported list
* Agents can automatically use new protocols

### Updating Agent Protocols

Change protocols for an active agent:

```typescript theme={null}
await agent.updateProtocols(['aave', 'compound', 'moonwell', 'fluid']);
```

<Warning>
  Updating protocols triggers rebalancing, which incurs gas costs.
</Warning>

## Next Steps

<CardGroup cols={2}>
  <Card title="Optimizer" icon="brain" href="/developers/architecture/optimizer">
    How Giza optimizes across protocols
  </Card>

  <Card title="Smart Accounts" icon="shield-check" href="/developers/architecture/smart-accounts">
    How agents interact with protocols
  </Card>

  <Card title="Constraints" icon="sliders" href="/developers/architecture/constraints">
    Control protocol usage with constraints
  </Card>

  <Card title="Quickstart" icon="rocket" href="/developers/quickstart">
    Get started with your first agent
  </Card>
</CardGroup>
