Skip to main content

Master Chef

The MasterChef.sol 👨‍🍳 🍷 contract is the contract that handles APW rewards for liquidity providers. Liquidity providers deposit their LP Tokens in the MasterChef contract to get APW rewards.

The MasterChef contract is derived from Sushi V1 MasterChef contract.

APWine's MasterChef contract doesn't mint APW tokens. Tokens are provisioned to the contract to get distributed.

Methods#

getMultiplier#

function getMultiplier(uint256 _from, uint256 _to)

pendingAPW#

function pendingAPW(uint256 _pid, address _user)

Get the number of APW rewards available for _user for LP Tokens with _pid.

massUpdatePools#

function massUpdatePools()

Update pool reward state for all pools registered in the contract.

⚠️ Can be expensive in gas

updatePool#

function updatePool(uint256 _pid)

Update pool reward state for pool with id _pid.

deposit#

function deposit(uint256 _pid, uint256 _amount)

Deposit _amount of LP Tokens corresponding to pool with ID _pid.

withdraw#

function withdraw(uint256 _pid, uint256 _amount)

Withdraw _amount of LP Tokens corresponding to pool with ID _pid.

emergencyWithdraw#

function emergencyWithdraw(uint256 _pid)

Withdraw LP tokens for pool with id _pid without rewards.

⚠️ For emergency only