# Strategy Contract Code Analysis
###### tags: `EWE technology`
> *https://github.com/JOYHSU-taiwan/AFIR-feature
> main branch af6cf02452657afbf65ddba9f9bc2d99ff0e2e7b*
## **[Pancakeswap] MasterChefV2** contract related
```solidity
function deposit(uint256 _pid, uint256 _wantAmt) external;
```
:::success
**function in strategy contract include deposit**
1. _farm
2. earn
:::
```solidity
function withdraw(uint256 _pid, uint256 _wantAmt) external;
```
:::success
**function in strategy contract include withdraw**
1. withdraw
:::
## **[Pancakeswap] PancakePair** contract related
```solidity
function token0() external view returns (address);
```
:::success
**function in strategy contract include token0**
1. constructor
:::
```solidity
function token1() external view returns (address);
```
:::success
**function in strategy contract include token1**
1. constructor
:::
## **[Pancakeswap] PancakeRouter2** contract related
```solidity
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
```
:::success
**function in strategy contract include swapExactTokensForTokensSupportingFeeOnTransferTokens**
1. earn
2. _safeSwap
3. addLiquidity
4. buyBack
5. convertDustToEarned
:::
```solidity
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
```
:::success
**function in strategy contract include addLiquidity**
1. addLiquidity
:::
```solidity
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
```
:::success
**function in strategy contract include getAmountsOut**
1. _safeSwap
:::