func: function getDividends(address wallet) internal returns(uint256 sum) {
          User storage user = users[wave][wallet];
          for (uint i = 0; i < user.deposits.length; i++) {
              uint256 withdrawRate = dividendRate(tx.origin, i);
              user.deposits[i].withdrawedRate = user.deposits[i].withdrawedRate.add(withdrawRate);
              sum = sum.add(user.deposits[i].amount.mul(withdrawRate).div(ONE_HUNDRED_PERCENTS));
              emit DepositDividendPayed(
                  tx.origin,
                  i,
                  user.deposits[i].amount,
                  user.deposits[i].amount.mul(user.deposits[i].withdrawedRate.div(ONE_HUNDRED_PERCENTS)),
                  user.deposits[i].amount.mul(withdrawRate.div(ONE_HUNDRED_PERCENTS))
              );
          }
          user.lastPayment = now;
          sum = sum.add(user.referBonus);
          user.referBonus = 0;
          totalDividend = totalDividend.add(sum);
      }