---
# System prepended metadata

title: Frontend Code Analysis
tags: [EWE technology]

---

# Frontend Code Analysis

###### tags: `EWE technology`

> *https://github.com/aries-financial-defi/AriesFinancialWeb
> whitelabel-sec branch b59340a3e417870055fc11a9a21e07b964eaf8e2*

## **AFIFarmB** contract related
```solidity
function pendingAFI(
        uint256 _pid,
        address _user
    ) external;
```
:::success
**function in frontend include pendingAFI**

1. Dashboard.jsx gatherRewardBalance
2. YieldFarming.jsx gatherAssets
3. YieldFarming.jsx updateBalance
:::

```solidity
function deposit(uint256 _pid, uint256 _wantAmt) public;
```
:::success
**function in frontend include deposit**

1. Pools.jsx handleStake
:::  

```solidity
function withdraw(uint256 _pid, uint256 _wantAmt) public;
```
:::success
**function in frontend include withdraw**

1. Dashboard.jsx callHarvestBSC
2. Pools.jsx handleProfitOnly
3. Pools.jsx handleUnstake
4. Pools.jsx callHarvestBSC
:::  
```solidity
function stakedWantTokens(
    uint256 _pid,
    address _user
) external;
```
:::success
**function in frontend include stakedWantTokens**

1. YieldFarming.jsx gatherAssets
2. YieldFarming.jsx updateBalance
:::  

```solidity
PoolInfo[] public poolInfo;
```
:::success
**function in frontend include poolInfo**

1. YieldFarming.jsx gatherAssets
2. YieldFarming.jsx updateBalance
:::  


```solidity
uint256 public totalAllocPoint;
```
:::success
**function in frontend include totalAllocPoint**

1. YieldFarming.jsx gatherAssets
2. YieldFarming.jsx updateBalance
:::  

## **Strategy** contract related
```solidity
function wantLockedTotal() external;
```
:::success
**function in frontend include wantLockedTotal**

1. Tvl.jsx getTotalTVL
2. YieldFarming.jsx gatherAssets
3. YieldFarming.jsx updateBalance
:::  

## **[Pancakeswap] LP Token** contract related
```solidity
allowance & approve
```
:::success
**function in frontend include allowance & approve**

1. Pools.jsx handleStake
2. Zap.jsx handleZap
:::  
```solidity
balanceOf
```
:::success
**function in frontend include allowance & approve**

1. YieldFarming.jsx gatherAssets
2. YieldFarming.jsx updateBalance
3. Zap.jsx Zap
:::  

## **[Pancakeswap] MasterChefV2** contract related
```solidity
PoolInfo[] public poolInfo;
```
:::success
**function in frontend include poolInfo**

1. YieldFarming.jsx getPancakeV2APR
2. YieldFarming.jsx getBiswapAPR
3. YieldFarming.jsx getPlanetAPR
4. YieldFarming.jsx getEmpAPR
5. YieldFarming.jsx getRipaeAPR
:::  

```solidity
uint256 public BSWPerBlock;
```
:::success
**function in frontend include BSWPerBlock**

1. YieldFarming.jsx getBiswapAPR
:::  
```solidity
uint256 public totalAllocPoint;
```
:::success
**function in frontend include totalAllocPoint**

1. YieldFarming.jsx getBiswapAPR
2. YieldFarming.jsx getPlanetAPR
3. YieldFarming.jsx getEmpAPR
4. YieldFarming.jsx getRipaeAPR
:::  

```solidity
cakePerBlock?
totalRegularAllocPoint?
totalSpecialAllocPoint?
```
:::success
**function in frontend include ...**

1. YieldFarming.jsx getPancakeV2APR
:::  

```solidity
GAMMAPerBlock?
```
:::success
**function in frontend include GAMMAPerBlock**

1. YieldFarming.jsx getPlanetAPR
:::  
```solidity
tSharePerSecond?
```
:::success
**function in frontend include tSharePerSecond**

1. YieldFarming.jsx getEmpAPR
:::  

```solidity
paePerSecond?
```
:::success
**function in frontend include paePerSecond**

1. YieldFarming.jsx getRipaeAPR
:::  

## **[Pancakeswap] ZapPCS** contract related
```solidity
function getAPR(
    uint256 _allocPoint, 
    uint256 _totalAllocPoint, 
    address lpToken, 
    uint256 _rewardPerBloc
) public;
```
:::success
**function in frontend include getAPR**

1. YieldFarming.jsx getPancakeV2APR
2. YieldFarming.jsx getBiswapAPR
3. YieldFarming.jsx getPlanetAPR
4. YieldFarming.jsx getEmpAPR
5. YieldFarming.jsx getRipaeAPR
:::  
```solidity
function zapInToken(
    address _from,
    uint256 amount,
    address _to
) external;
```
:::success
**function in frontend include zapInToken**

1. Zap.jsx handleZap
:::  
```solidity
function zapIn(address _to) external;
```
:::success
**function in frontend include zapIn**

1. Zap.jsx handleZap
:::  
```solidity
function zapOut(address _from, uint256 amount) external;
```
:::success
**function in frontend include zapOut**

1. Zap.jsx handleZap
:::  