MasterChef

BNB Smart Chain

0x73feaa1ee314f8c655e354234017be2193c9e24e

Solidity v0.6.12+commit.27d51765

🤖
Query this contract from your AI
Reference: 0x73feaa1ee314f8c655e354234017be2193c9e24e
Sample prompt: “Tell me the current state of bnb/0x73feaa1ee314f8c655e354234017be2193c9e24e”
No AI wired up yet? → mcp.smarts.md

Admin & Risk

Who can change the rules?

Block #100,286,868

Detected ownable controls from the verified ABI.

Ownable

Current controls

Owner
0x6e85689f055b6894803d5135981f7b108c9dafd5 ↗ BscScan → smarts

Overview

Read Functions
14
Write Functions
15
Events
4

Read Functions

Block #100,286,868 · just now
BONUS_MULTIPLIER() view → 1

Returns the current bonus multiplier used to calculate pool reward emissions.✨ AI

Returns

Name Type Description
uint256 Current bonus multiplier value (uint256) used to scale distributed rewards.✨ AI
cake() view → 0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82

Returns the CAKE token contract address.✨ AI

Returns

Name Type Description
address The CAKE token contract address.✨ AI
cakePerBlock() view → 40,000,000,000,000,000,000

Returns the amount of CAKE tokens minted per block by the MasterChef contract.✨ AI

Returns

Name Type Description
uint256 The number of CAKE tokens minted each block, expressed in the token's smallest unit (uint256).✨ AI
devaddr() view → 0xceba60280fb0ecd9a5a26a1552b90944770a4a0e

Returns the address that receives developer rewards.✨ AI

Returns

Name Type Description
address The current developer wallet address that receives the protocol's developer allocation.✨ AI
getMultiplier(_from: uint256, _to: uint256) view

Calculate the reward multiplier for the given block range.✨ AI

Parameters

Name Type Description
_from uint256 Start block number.✨ AI
_to uint256 End block number.✨ AI

Returns

Name Type Description
uint256 Total multiplier to apply to rewards between the two block numbers.✨ AI
migrator() view → 0x0000000000000000000000000000000000000000

Returns the address of the current migrator contract used to migrate liquidity provider tokens.✨ AI

Returns

Name Type Description
address Address of the migrator contract; returns zero address 0x0000000000000000000000000000000000000000 if none is set.✨ AI
owner() view → 0x6e85689f055b6894803d5135981f7b108c9dafd5

Returns the address of the contract owner.✨ AI

dev: Returns the address of the current owner.

Returns

Name Type Description
address The address that holds contract ownership and has privileged permissions.✨ AI
pendingCake(_pid: uint256, _user: address) view

Shows the currently pending CAKE rewards for a user in the given pool.✨ AI

Parameters

Name Type Description
_pid uint256 Pool ID to check pending rewards for.✨ AI
_user address Address of the user to query.✨ AI

Returns

Name Type Description
uint256 Amount of pending CAKE tokens the user can claim from the pool.✨ AI
poolInfo(uint256) view

Return information about a liquidity pool given its index.✨ AI

Parameters

Name Type Description
uint256

Returns

Name Type Description
lpToken address lpToken: address of the pool's LP token contract.✨ AI
allocPoint uint256 allocPoint: allocation points assigned to this pool used to calculate its share of rewards.✨ AI
lastRewardBlock uint256 lastRewardBlock: last block number when rewards were distributed for this pool.✨ AI
accCakePerShare uint256 accCakePerShare: accumulated reward per share for this pool, scaled by the contract's precision factor.✨ AI
poolLength() view → 527

Returns the current number of pools in the MasterChef contract.✨ AI

Returns

Name Type Description
uint256 Total number of pools registered in the contract (uint256).✨ AI
startBlock() view → 703,820

Returns the block number when reward distribution starts.✨ AI

Returns

Name Type Description
uint256 The start block number (uint256) when staking rewards begin to be distributed.✨ AI
syrup() view → 0x009cf7bc57584b7998236eff51b98a168dcea9b0

Returns the address of the Syrup contract that MasterChef uses for staking and rewards.✨ AI

Returns

Name Type Description
address The Syrup contract address used by MasterChef (the contract that holds staking/reward tokens).✨ AI
totalAllocPoint() view → 1

Returns the total allocation points across all pools, used to calculate each pool's share of rewards.✨ AI

Returns

Name Type Description
uint256 Total allocation points for all pools, used to compute each pool's portion of reward emissions.✨ AI
userInfo(uint256, address) view

Returns a user's staked token amount and reward accounting for a specific pool.✨ AI

Parameters

Name Type Description
uint256
address

Returns

Name Type Description
amount uint256 amount: The number of LP tokens the user has deposited in the pool.✨ AI
rewardDebt uint256 rewardDebt: The amount subtracted from user's pending rewards for accounting.✨ AI

Write Functions

add(_allocPoint: uint256, _lpToken: address, _withUpdate: bool) nonpayable

Add a new liquidity pool and assign allocation points, optionally updating all pools first.✨ AI

dev: Returns the addition of two unsigned integers, reverting on overflow. Counterpart to Solidity's `+` operator. Requirements: - Addition cannot overflow.

Parameters

Name Type Description
_allocPoint uint256 Allocation points for the new pool, determining its share of emitted rewards.✨ AI
_lpToken address Address of the liquidity pool (LP) token contract to add.✨ AI
_withUpdate bool If true, update all existing pools' reward variables before adding this pool.✨ AI
deposit(_pid: uint256, _amount: uint256) nonpayable

Deposit LP tokens into a specific pool to start earning rewards and update the caller's reward state.✨ AI

Parameters

Name Type Description
_pid uint256 Identifier of the target pool.✨ AI
_amount uint256 Number of LP tokens to deposit.✨ AI
dev(_devaddr: address) nonpayable

Update the developer address used to receive the developer reward.✨ AI

dev: Callable only by the current dev address (enforced by require(msg.sender == devaddr)).✨ AI

Parameters

Name Type Description
_devaddr address New developer address that will receive developer rewards.✨ AI
emergencyWithdraw(_pid: uint256) nonpayable

Allows a user to withdraw their staked tokens from a pool immediately without claiming rewards.✨ AI

dev: Forfeits any pending rewards, sets the user's staked amount and reward debt to zero, and does not update pool reward variables.✨ AI

Parameters

Name Type Description
_pid uint256 ID of the pool to withdraw from.✨ AI
enterStaking(_amount: uint256) nonpayable

Stake tokens in the MasterChef contract to begin earning staking rewards.✨ AI

Parameters

Name Type Description
_amount uint256 Number of tokens to deposit into the staking pool.✨ AI
leaveStaking(_amount: uint256) nonpayable

Withdraw a specified amount of staked tokens from the staking pool and update the caller's staking balance.✨ AI

Parameters

Name Type Description
_amount uint256 Amount of staked tokens to withdraw, expressed in the token's smallest unit.✨ AI
massUpdatePools() nonpayable

Update all pools' reward variables to the latest block.✨ AI

migrate(_pid: uint256) nonpayable

Migrate LP tokens for the pool identified by _pid using the configured migrator.✨ AI

Parameters

Name Type Description
_pid uint256 Pool identifier whose LP tokens and accounting are migrated.✨ AI
renounceOwnership() nonpayable

Renounce contract ownership, leaving the contract without an owner.✨ AI

dev: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
set(_pid: uint256, _allocPoint: uint256, _withUpdate: bool) nonpayable

Set allocation points for a pool and optionally update all pools' reward states.✨ AI

Parameters

Name Type Description
_pid uint256 Index of the pool to update.✨ AI
_allocPoint uint256 New allocation points determining the pool's share of rewards.✨ AI
_withUpdate bool If true, call massUpdatePools to refresh every pool before applying the change.✨ AI
setMigrator(_migrator: address) nonpayable

Set the migrator contract address used to migrate pools and LP tokens.✨ AI

Parameters

Name Type Description
_migrator address Migrator contract address to enable token and pool migrations.✨ AI
transferOwnership(newOwner: address) nonpayable

Transfers ownership of the contract to the specified new owner address.✨ AI

dev: Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.

Parameters

Name Type Description
newOwner address Address that will become the new owner of the contract.✨ AI
updateMultiplier(multiplierNumber: uint256) nonpayable

Update the global reward multiplier used by the contract to adjust reward emission calculations.✨ AI

Parameters

Name Type Description
multiplierNumber uint256 New multiplier value to apply in reward calculation (uint256).✨ AI
updatePool(_pid: uint256) nonpayable

Update the specified pool's reward variables to the latest values.✨ AI

Parameters

Name Type Description
_pid uint256 ID of the pool to update.✨ AI
withdraw(_pid: uint256, _amount: uint256) nonpayable

Withdraw staked tokens from the specified pool and transfer any pending rewards to the caller.✨ AI

Parameters

Name Type Description
_pid uint256 Pool id to withdraw from.✨ AI
_amount uint256 Amount of staked tokens to withdraw.✨ AI

Events

Deposit(user: address, pid: uint256, amount: uint256)
Name Type Indexed Description
user address
pid uint256
amount uint256
EmergencyWithdraw(user: address, pid: uint256, amount: uint256)
Name Type Indexed Description
user address
pid uint256
amount uint256
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
Withdraw(user: address, pid: uint256, amount: uint256)
Name Type Indexed Description
user address
pid uint256
amount uint256