Same on all chains
Same on all chains
Same on all chains except Polygon
The following codes are for ETH mainnet which you can find here:

State Variables

AccessControl (Inherited)

Staking specific

mapping (address => User) public users
To store user's data
uint256 public rewardTillNowPerToken
Used to adjust reward calculation
uint256 public lastUpdatedBlock
This is the number of last block in which function update() is called
uint256 public rewardPerBlock
Used to adjust staking APY
uint256 public scale
Used for math calculations
uint256 public particleCollector
When users call claim(),sum of daoShare and earlyFoundersShare is added to this variable
uint256 public daoShare
Denotes the share of DAO
uint256 public earlyFoundersShare
Denotes the share of early founders
address public daoWallet
Denotes the wallet of DAO
address public earlyFoundersWallet
Denotes the wallet of early founders
uint256 public totalStakedToken
Denotes the all tokens which is staked (LP tokens)
address public stakedToken
Address of token which can be staked
address public rewardToken
Addess of reward token (DEUS)
bytes32 private constant REWARD_PER_BLOCK_SETTER
AccessControl role for the reward per block setter
bytes32 private constant TRUSTY_ROLE
AccessControl role for the trusty


User {uint256 depositAmount; uint256 paidReward;}


Restricts actions to the trusty wallet( DAO agent/multisig wallet), e.g. set variables

View Function

pendingReward(address _user) external view returns (uint256 reward)
Returns the amount of reward which user can claim until the current block

Public Functions

update() public
Updates reward variables of the pool to be up-to-date. It is called when someone deposit or withdraw his/her LP tokens
deposit(uint256 amount) external
Called when user wants to stake his/her LP tokens
depositFor(address _user, uint256 amount) public
Called when user wants to stake his/her LP tokens for a specific address
withdraw(uint256 amount) external
It is called for two purposes: 1. Claiming reward (if amount = 0) 2. Withdrawing LP tokens + Claiming reward (if amount > 0)
withdrawParticleCollector() public
Transfers daoShare and earlyFoundersShare to daoWallet and earlyFoundersWallet. It can be called by anyone
emergencyWithdraw() external
Withdraws LP tokens without caring about rewards. EMERGENCY ONLY

Restricted functions

withdrawAllStakedtokens(address to) external onlyTrusty
Add temporary withdrawal functionality for owner(DAO) to transfer all tokens to a safe place.
setStakedToken(address _stakedToken) external onlyTrusty
Sets stakedToken address
setWallets(address _daoWallet, address _earlyFoundersWallet) external onlyTrusty
Sets daoWallet and earlyFoundersWallet
setShares(uint256 _daoShare, uint256 _earlyFoundersShare) external onlyTrusty
Sets daoShare and earlyFoundersWallet
setRewardPerBlock(uint256 _rewardPerBlock) external
Sets rewardPerBlock


withdrawStakedtokens(uint256 totalStakedTokens, address to)
Emitted when withdrawAllStakedtokens() is called
StakedTokenSet(address _stakedToken)
Emitted when setStakedToken() is called
SharesSet(uint256 _daoShare, uint256 _earlyFoundersShare)
Emitted when setShares() is called
WithdrawParticleCollectorAmount(uint256 _earlyFoundersShare, uint256 _daoShare)
Emitted when withdrawParticleCollector() is called
WalletsSet(address _daoWallet, address _earlyFoundersWallet)
Emitted when setWallets() is called
Deposit(address user, uint256 amount)
Emitted when diposit() or depositFor() is called
Withdraw(address user, uint256 amount)
Emitted when withdraw() is called
EmergencyWithdraw(address user, uint256 amount)
Emitted when emergencyWithdraw() is called
RewardClaimed(address user, uint256 amount)
Emitted when withdraw() is called
RewardPerBlockChanged(uint256 oldValue, uint256 newValue)
Emitted when setRewardPerBlock() is called