Changes from HoneyFarm

The CheemscoinFarm contract is a fork of the HoneyFarm contract made by 1Hive for The core functionality is the same but there are some changes.
Note that the HoneyFarm contract is owned by a Governance contract whereas the CheemscoinFarm contract is owned by the developer.


  • Change formatting and comments
  • Allow anyone to call depositAdditionalRewards
  • Remove referral rewards
    • This would give some extra Cheemscoin to whoever made the frontend the deposit was created from whenever the deposit is harvested from.
    • Remove referrer from the DepositInfo struct
    • Remove rewardManager, setRewardManager, _rewardReferrer, Referred and RewardManagerSet
    • Don't require rewardManager to exist in add function
    • Don't set a referrer in createDeposit
    • Don't call _rewardReferrer in closeDeposit or withdrawRewards
  • The contract no longer inherits from an interface (IHoneyFarm) so override is removed from all functions
  • Do not allow no-lock deposits (_unlockTime of0)
  • Add recoverToken function that only the owner can call.
    • The purpose of this is so if a token is accidentally sent to the contract, it can be recovered.
    • When called, it transfers the entire balance of the specified token to the owner
    • The specified token can not be Cheemscoin or any of the LP tokens that you can stake
  • Add multiWithdraw external function
    • calls withdrawRewards on all _depositIds

View Functions

  • Add pragma abicoder v2; (to return structs)
  • Add PoolDetails, ExpiredDeposit and DepositDetails structs
  • Modify getPoolByIndex to return PoolDetails and make it public
  • Add getAllPools function
    • Returns an array of PoolDetails about each pool
  • Add getAccountDeposits function
    • Returns an array of DepositDetails about each deposit the _account owns
  • Add getExpiredDepositIds function
    • Returns an array of ExpiredDeposit
  • Make pendingHsf public