MasterChef

The MasterChef is the reward distributor.

For now, we have 5 types of the reward distribution

  • Stake VIN, reward IN (from 50% of the protocols income)

  • Stake ARV, reward IN (from 20% of the treasury income)

  • Stake ( IN / ? )LP, reward VIN (400 VIN per day, distribute 180 days)R

  • Lock VIN, reward ARV and IN (the IN reward is shared with the Stake VIN pool, the ARV reward is base on the ARV distribution rule. )

  • Borrow IN, reward VIN (see the VIN Boost rule)

Constructor(address,address,address,address,uint256)

Parameter
Description

_arv

The address of the ARV

_vin

The address of VIN

_in

The address of IN

_lp

The address of LP

startTimestamp

The timestamp of the reward timestamp

Pool Ids

uint256 public constant LOCK_POOL = 0;//Lock VIN, reward ARV
uint256 public constant VIN_POOL = 1;//Stake/Lock VIN, reward IN
uint256 public constant ARV_POOL = 2;//Stake ARV, reward IN
uint256 public constant LP_POOL = 3;//Stake ( IN / ? )LP, reward VIN

Write Functions

deposit

deposit VIN/ARV/LP to the pool.

Parameters

Name
Type
Description

_pid

uint256

the id of the staking pool. see Pool Ids

_amount

uint256

the token amount that you want to deposit,you should approve to the masterChef first.

depositLock

deposit VIN to the lock pool, VIN will be lock for 21 days.

Parameters

Name
Type
Description

_amount

uint256

the token amount that you want to lock,you should approve to the masterChef first.

withdraw

withdraw VIN/ARV/LP from the pool.

Parameters

Name
Type
Description

_pid

uint256

the id of the staking pool. see Pool Ids

_amount

uint256

the token amount that you want to withdraw

withdrawLock

withdraw the locked VIN from the lock pool. see getUnlockableAmount to get the unlockable amount.

Parameters

Name
Type
Description

_amount

uint256

the token amount that you want to unlock.

claimPending

claim pending rewards of the pool, if the pool is the VIN Boost pool, the rewards need to vest by calling the function vestingPendingReward

vestingPendingReward

vesting the VIN Boost reward, it will be vesting for 21 days. after vesting, call the function claimVestingReward to claim rewards

claimVestingReward

claim all claimable VIN Boost rewards

updateRewardPerBlock

update the VIN Boost reward of the pool

add

add a VIN Boost pool

addRewardToPool

add rewards to the ARV/VIN staking pool, basicly only the Cauldron will call this function. but if someone is charitable, it can let them to donate to the ARV/VIN staking pool.

emergencyWithdraw

emergency withdraw the token without any rewards

View Functions

getUnlockableAmount

get user's unlockable VIN amount

Parameters

Name
Type
Description

user

address

user's address

Return Values

Name
Type
Description

amount

uint256

user's unlockable VIN amount

getLockAmount

get user's total locked VIN amount

Parameters

Name
Type
Description

user

address

user's address

Return Values

Name
Type
Description

amount

uint256

user's locked VIN amount

getLockInfo

get user's VIN lock info

Parameters

Name
Type
Description

user

address

user's address

Return Values

Name
Type
Description

locks

LockDetail[]

user's VIN lock list

userVestingInfo

get user vesting VIN info

Parameters

Name
Type
Description

user

address

user's address

Return Values

Name
Type
Description

vesting

VestingInfo[]

user's vesting VIN list

pendingReward

get the amount of user's pending rewards

userPendingReward

get the amount of user's rewards that is not vesting

totalStake

get the amount of pool's stake token

estimateARVCirculatingSupply

estimate the ARV circulating supply, include the amount that is not claimed by user.

cauldronPoolInfo

get the pool id of cauldron

Last updated