# BeefyMaiUSDCeStrategy

## Overview

The BeefyMaiUSDCeStrategy contract is a strategy that supplies USDCe into the MAI-USDCe Curve pool and stakes the LP tokens in a Beefy Vault to earn yield. It inherits from BaseBeefyCurveStrategy and provides custom implementation for investment logic.

## Constants

No additional constants defined in this contract.

## State Variables

No additional state variables beyond those inherited from BaseBeefyCurveStrategy.

## Functions

### Internal Core Functions

#### \_invest

```solidity
function _invest(uint256 amount, uint256 minOutputAfterInvestment) internal override returns (uint256)
```

Invests assets through multiple steps:

1. Validates investment amount
2. Adds liquidity to MAI-USDCe Curve pool
3. Stakes LP tokens in Beefy vault

Parameters:

* `amount`: Amount of USDCe to invest
* `minOutputAfterInvestment`: Minimum expected Beefy vault shares

Returns:

* Amount of Beefy vault shares received

Key Features:

* Uses Curve's add\_liquidity function with USDCe
* Enforces maximum single trade limit
* Verifies minimum output requirements
* Tracks share balances before/after deposit
* Emits investment events


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devs.maxapy.io/maxapy-erc4626/strategies/polygon-usdc.e/beefy/beefymaiusdcestrategy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
