Created
May 31, 2018 21:39
-
-
Save lsquaredleland/303a917bc8f328b97bfcfde15638b74e to your computer and use it in GitHub Desktop.
From CryptoKittiesSalesAuction Contract - 0xb1690c08e213a35ed9bab7b318de14420fb57d8c
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 _computeCut(uint256 _price) internal view returns (uint256) { | |
// NOTE: We don't use SafeMath (or similar) in this function because | |
// all of our entry functions carefully cap the maximum values for | |
// currency (at 128-bits), and ownerCut <= 10000 (see the require() | |
// statement in the ClockAuction constructor). The result of this | |
// function is always guaranteed to be <= _price. | |
return _price * ownerCut / 10000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment