💲

# Energy-reward conversion

Energy is a value between 0 to 100 (%) that indicates what percentage of the user's total rewards will be earned in the current game iteration. Currently, the rewards users recieve are modified by a factor of 0.01. So, users get 1% of the daily rewards they earnt.
A game iteration is a 24-hour period between 00:00:00 UTC and 23:59:59 UTC.
Energy is a relative value: the same amount of energy would result in different rewards based on the NFT pet collection power, which is calculated from the following parameters:
• Number of virtual pets
• NFT virtual pet Ranks and Levels
• Randomness (to be implemented at later stages)

### Reward calculation

Rewards for each individual pet: `PetReward = (Health/100)(RankReward * (1 + 0.01*Level))`, where `RankReward` is determined by the NFT `Rank` and `Level` (a number between 1 and 10 that represents your NFT Level) and `Health` is your pet's health.
Rewards for all pets are the sum of individual pet rewards: `TotalPetReward = sum(PetRewards)`
Total Reward is calculated through multiplying by the total boost (referral and staking) and the energy: `TotalReward = TotalPetReward*(1 + DailyRefBoost)* (Energy/100)`,where `DailyRefBoost is a` percentage described in the game that is divided by 100.
Realized Reward is calculated by subtracting charity donations, as well as adding first-line and second-line referral rewards: `RealizedReward = TotalReward*(1 - Charity)+ (0.02 * FirstLineRefRewards) + (0.01 * SecondLineRefRewards)`, where `Charity` is a percentage devided by 100 and `FirstLineRefRewards` and `SecondLineRefReward` are the rewards earned from first-line and second-line referees.
Finally, the calculated reward is modifed by the unlock rate: `FinalReward = (UnlockRate/100)*RealizedReward`
If the energy balance exceeds 60, the user's energy is zeroed and converted into \$VIGUP rewards for every player at `00:00 UTC`. Otherwise, it is halved and the remaining energy balance is retained in the next game iteration.