Update percentage constants

This commit is contained in:
Amir Bandeali
2018-07-13 14:06:48 -07:00
parent 6fb157488c
commit 66ab010055
3 changed files with 18 additions and 17 deletions

View File

@@ -29,9 +29,9 @@ contract MixinWeth is
MWeth
{
uint256 constant internal PERCENTAGE_DENOMINATOR = 10000; // 9800 == 98%, 10000 == 100%
uint256 constant internal MAX_FEE_PERCENTAGE = 500; // 5%
uint256 constant internal MAX_WETH_FILL_PERCENTAGE = 9500; // 95%
uint256 constant internal PERCENTAGE_DENOMINATOR = 10**18;
uint256 constant internal MAX_FEE_PERCENTAGE = 5 * PERCENTAGE_DENOMINATOR / 100; // 5%
uint256 constant internal MAX_WETH_FILL_PERCENTAGE = 95 * PERCENTAGE_DENOMINATOR / 100; // 95%
/// @dev Default payabale function, this allows us to withdraw WETH
function ()

View File

@@ -32,6 +32,7 @@ contract MixinWrapperFunctions is
LibAbiEncoder,
MExchangeCore
{
/// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.
/// @param order Order struct containing order specifications.
/// @param takerAssetFillAmount Desired amount of takerAsset to sell.

View File

@@ -103,20 +103,20 @@ contract LibOrder is
bytes32 takerAssetDataHash = keccak256(order.takerAssetData);
// Assembly for more efficiently computing:
// keccak256(abi.encode(
// order.makerAddress,
// order.takerAddress,
// order.feeRecipientAddress,
// order.senderAddress,
// order.makerAssetAmount,
// order.takerAssetAmount,
// order.makerFee,
// order.takerFee,
// order.expirationTimeSeconds,
// order.salt,
// keccak256(order.makerAssetData),
// keccak256(order.takerAssetData)
// ));
// keccak256(abi.encode(
// order.makerAddress,
// order.takerAddress,
// order.feeRecipientAddress,
// order.senderAddress,
// order.makerAssetAmount,
// order.takerAssetAmount,
// order.makerFee,
// order.takerFee,
// order.expirationTimeSeconds,
// order.salt,
// keccak256(order.makerAssetData),
// keccak256(order.takerAssetData)
// ));
assembly {
// Backup