Created
November 12, 2017 20:19
-
-
Save skmgoldin/f0805a9d3dc5d69bf849b640aaba7897 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function challengeWinnerReward(Data storage _self) public constant returns (uint) { | |
// Edge case, nobody voted, give all tokens to the challenger. | |
if (_self.voting.getTotalNumberOfTokensForWinningOption(_self.challengeID) == 0) { | |
return 2 * _self.stake; | |
} | |
return (2 * _self.stake) - _self.rewardPool; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment