function _unlockPercent(Contribution memory contribution) private view returns (uint256) {
        if (contribution.withdrawPercent >= 100) {
            return 0;
        }

        uint256 baseTimestamp = contribution.contributeTime;

        if (contribution.lastWithdrawTime > baseTimestamp) {
            baseTimestamp = contribution.lastWithdrawTime;
        }

        
        uint256 period = block.timestamp.sub(baseTimestamp);

        if (period < _unlockPeriod) {
            return 0;
        }

        uint256 unlockPercent = period.div(_unlockPeriod).sub(1).mul(10);

        if (contribution.withdrawPercent == 0) {
            unlockPercent = unlockPercent.add(50);
        } else {
            unlockPercent = unlockPercent.add(10);
        }

        uint256 max = 100 - contribution.withdrawPercent;

        if (unlockPercent > max) {
            unlockPercent = max;
        }

        return unlockPercent;
    }