---
# System prepended metadata

title: Backend Code Analysis
tags: [EWE technology]

---

# Backend Code Analysis

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

> *https://github.com/aries-financial-defi/aries-alternate-api
> master branch 019a079c6ec889b561eb2b1c1d4af4ce797c3a70*

## **TimelockController** contract related
```solidity
function earn(address _stratAddress) public;
```
:::success
**function in backend include earn**

1. earn.js callEarnForEachStrategy
:::  

## **Token** contract related
```solidity
balanceOf
```
:::success
**function in backend include balanceOf**

1. transaction.js getUSDTBalance
2. getAPR.js callGetCakeAPR
3. getBalance.js getBalance
4. asset.js getBalance
:::  

```solidity
transfer
```
:::success
**function in backend include transfer**

1. transaction.js sendUSDT
:::  

```solidity
totalSupply
```
:::success
**function in backend include totalSupply**

1. getAPR.js callGetCakeAPR
::: 

## **AriesPriceProxyLP** contract related
```solidity
function getLpPrice(address _lp) public;
```
:::success
**function in backend include getLpPrice**

1. ariesPriceProxyLP.js getLpPrice
::: 

```solidity
function getRelativePriceMemo(address _token) public;
```
:::success
**function in backend include getRelativePriceMemo**

1. ariesPriceProxyLP.js getRelativePriceMemo
::: 

```solidity
function getPrimaryTokenPrice(address _token) public;
```
:::success
**function in backend include getPrimaryTokenPrice**

1. ariesPriceProxyLP.js getPrimaryTokenPrice
::: 

## **MasterChef** contract related
```solidity
uint256 public cakePerBlock;
```
:::success
**function in backend include cakePerBlock**

1. getAPR.js getCakeAPR
::: 

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

1. getAPR.js getCakeAPR
2. getAPR.js getBiswapAPR
::: 

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

1. getAPR.js callGetBiswapAPR
::: 

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

1. getAPR.js getBiswapAPR
::: 

## **ZapBSW** contract related
```solidity
function getAPR(
    uint256 _allocPoint, 
    uint256 _totalAllocPoint, 
    address lpToken, 
    uint256 _rewardPerBloc
) public;
```
:::success
**function in backend include getAPR**

1. getAPR.js callGetBiswapAPR
::: 

## **ZapEMP** contract related
```solidity
function getAPR(
    uint256 _allocPoint, 
    uint256 _totalAllocPoint, 
    address lpToken, 
    uint256 _rewardPerBloc
) public
```
:::success
**function in backend include getAPR**

1. getAPR.js callGetEmpAPR
::: 


## **EShareRewardPool** contract related
```solidity
uint256 public tSharePerSecond;
```
:::success
**function in backend include tSharePerSecond**

1. getAPR.js getEmpAPR
::: 

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

1. getAPR.js getEmpAPR
::: 

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

1. getAPR.js getEmpAPR
::: 

## **ZapBiswap** contract related
```solidity
function getAPR(
    uint256 _allocPoint,
    uint256 _totalAllocPoint,
    address lpToken,
    uint256 _rewardPerBloc
) public
```
:::success
**function in backend include getAPR**

1. getAPR.js callGetRipaeAPR
2. getAPR.js callGetPlanetAPR
::: 

```solidity
function priceFeed(address token) external;
```
:::success
**function in backend include priceFeed**

1. getBNBPrice.js getBNBPrice
::: 

## **PaeRewardPool** contract related
```solidity
uint256 public paePerSecond = TOTAL_REWARDS / runningTime;
```
:::success
**function in backend include paePerSecond**

1. getAPR.js getRipaeAPR
::: 

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

1. getAPR.js getRipaeAPR
::: 

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

1. getAPR.js getRipaeAPR
::: 

## **PlanetFinance** contract related
```solidity
 function GAMMAPerBlock() public;
```
:::success
**function in backend include GAMMAPerBlock**

1. getAPR.js getPlanetAPR
::: 

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

1. getAPR.js getPlanetAPR
::: 

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

1. getAPR.js callGetPlanetAPR
::: 

## **??** contract related
```solidity
token0
```
:::success
**function in backend include token0**

1. getContractToken.js getContractToken
::: 

```solidity
token1
```
:::success
**function in backend include token1**

1. getContractToken.js getContractToken
::: 

```solidity
getReserves
```
:::success
**function in backend include getReserves**

1. getPairPrice.js getTokenPairPriceInfo
::: 

```solidity
totalSupply
```
:::success
**function in backend include totalSupply**

1. getPairPrice.js getTokenPairPriceInfo
::: 

```solidity
lpPrice
```
:::success
**function in backend include lpPrice**

1. getPriceInfoFromZap.js getPriceInfoFromZap
::: 

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

1. getDeposit.js getDeposit
2. asset.js getDeposit
::: 

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

1. getTotalAllocationPoint.js getTotalAllocationPoint
::: 

```solidity
wantLockedTotal
```
:::success
**function in backend include wantLockedTotal**

1. asset.js getTL
::: 

```solidity
function pendingAFI(uint256 _pid, address _user) external;
```
:::success
**function in backend include pendingAFI**

1. asset.js getReward
::: 

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

1. asset.js getAllocPoint
::: 

## **ERC1155** contract related
```solidity
balanceOf
```
:::success
**function in backend include balanceOf**

1. accounts.js checkNftPassByAddressAndOrigin
2. accounts.js checkNftPassLevel
3. account.js checkNftPassLevel
::: 
