Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsquaredleland/303a917bc8f328b97bfcfde15638b74e to your computer and use it in GitHub Desktop.
Save lsquaredleland/303a917bc8f328b97bfcfde15638b74e to your computer and use it in GitHub Desktop.
From CryptoKittiesSalesAuction Contract - 0xb1690c08e213a35ed9bab7b318de14420fb57d8c
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