# Stake

## Stake

Staking in volatile and stable pools is slightly different, so we'll show you how to do it in turn.

Harvesting (without additional staking) can be done by interacting with the gauge with the combination \[VC,AT\_MOST,0] without specifying the LP token, which we'll also show as an example below.

1\) Staking USDC-ETH LP.

* The only difference between Wombat Pool and Volatile Pool is that Wombat Pool has a separate Gauge contract for each token.

```solidity
// Stake involves 2 tokens. LP token and VC because it also trigger harvest of $VC token.
Token[] memory tokens = new Token[](2);
tokens[0] = toToken(IERC20(usdc_eth_lp));
tokens[1] = toToken(IERC20(vc));

operation[] memory ops = new operation[](1);
// address usdc_eth_pool = vault.getPair(usdc, eth);
// OP type STAKE(GAUGE). For volatile pools, LP contract itself is a gauge contract. so use pool address for relevant pool address.
// This is different for Wombat Pool, and I will return to that later.
ops[0].poolId = toPoolId(GAUGE,usdc_eth_pool);
ops[0].tokenInformations = new bytes32[](2);
int128 stakeAmount = int128(int256(IERC20(usdc_eth_lp).balanceOf(address(this))));
ops[0].tokenInformations[0] = toTokenInfo(0x00,EXACTLY,stakeAmount);
//we don't know how much VC we'd harvest in this action. so just use AT_MOST 0 .
ops[0].tokenInformations[1] = toTokenInfo(0x01,AT_MOST,0);        
ops[0].data = "";
return execute(tokens, new int128[](2), ops);
```

2\) Harvesting

Quite similar to Staking. Just use only VC in the token info.

```solidity
//Harvest
Token[] memory tokens = new Token[](1);
tokens[0] = toToken(IERC20(vc));

operation[] memory ops = new operation[](1);
// Similar with Stake, we use op type STAKE with the pool but giving only VC as token info.
// OP type STAKE(GAUGE). For volatile pools, LP contract itself is a gauge contract. so use pool address for relevant pool address.
// This is different for Wombat Pool, and I will return to that later.
ops[0].poolId = poolId(GAUGE,usdc_eth_pool);
ops[0].tokenInformations = new bytes32[](1);
//we don't know how much VC we'd harvest in this action. so just use AT_MOST 0 .
ops[0].tokenInformations[0] = toTokenInfo(0x00,AT_MOST,0);

ops[0].data = "";
return execute(tokens, new int128[](1), ops);
```


---

# 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://vedex.gitbook.io/docs/technical-docs/concept/execute-for-chaining-and-complex-operations/stake.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.
