UFarm Referral Program
This mechanism is integrated into the UFarm contract.
function _harvest(uint256 _pid) internal { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender];
1
if (user.amount > 0) {
2
uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);
3
uint256 masterBal = pool.rewardToken.capfarm().sub(totalLocks[pool.rewardToken]);
4
if (pending > masterBal) {
5
pending = masterBal;
6
}
7
if(pending > 0) {
8
uint256 referAmountLv1 = pending.mul(percentForReferLv1).div(100);
9
uint256 referAmountLv2 = pending.mul(percentForReferLv2).div(100);
10
_transferReferral(_pid, referAmountLv1, referAmountLv2);
11
uint256 amount = pending.sub(referAmountLv1).sub(referAmountLv2);
12
uint256 lockAmount = amount.mul(pool.percentLockReward).div(100);
13
pool.rewardToken.mint(msg.sender, amount.sub(lockAmount));
14
farmLock(msg.sender, lockAmount, _pid);
15
user.rewardDebtAtBlock = block.number;
16
emit SendReward(msg.sender, _pid, amount, lockAmount);
17
}
18
user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);
19
}
Copied!

Commission:

  • 1-Tier: 7%
    25% of them will be distributed to participants instantaneously, 75% of them will be locked for 1 year and will be distributed continuously block by block after that
  • 2-Tier: 3%
    25% of them will be distributed to participants instantaneously, 75% of them will be locked for 1 year and will be distributed continuously block by block after that

How to join UFarm Referral Program?

  • You need to have 100 UBU tokens in your balance to activate 1-Tier of Referral Program and 1,000 UBU tokens in your balance to activate 2-Tier of Referral Program.
    These token remain unlocked in your wallet. If you transfer/remove these token, then your Referral Link will be inactive immediately and you can no longer receive Referral Commission
  • Access to UFarm: https://ubu.finance/ufarm and Connect to Metamask.
  • Copy the referral link and share it with your friends.

​

Last modified 1yr ago