# ConvexDeposit

### Description

Action that either deposits(wraps) Curve LP into convex, stakes wrapped LP, or does both.

### Action ID

`0xd3652c91`

### SDK Action

```ts
const convexDepositAction = new dfs.actions.convex.ConvexDepositAction(
    from,
    to,
    curveLp,
    amount,
    option
);
```

### Action Type

`STANDARD_ACTION`

### Input Parameters

```solidity
    /// @param from address from which to pull wrapped LP tokens if option is STAKE, otherwise LP tokens are pulled
    /// @param to address that will receive wrapped LP tokens if option is WRAP, otherwise it is the address for which to stake
    /// @param poolId curve pool id according to Convex Booster contract
    /// @param amount amount amount of tokens
    /// @param option DepositOption enum (WRAP, STAKE, WRAP_AND_STAKE)
    struct Params {
        address from;
        address to;
        uint256 poolId;
        uint256 amount;
        DepositOption option;
    }
```

### Return Value

```solidity
return bytes32(transientAmount);
```

### Events and Logs

```solidity
emit ActionEvent("ConvexDeposit", logData);
logger.logActionDirectEvent("ConvexDeposit", logData);
bytes memory logData = abi.encode(params);
```


---

# 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://docs.defisaver.com/actions/convex/convexdeposit.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.
