Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Divide by 10 instead of subtracting one from exponent. (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
bweick authored Dec 22, 2019
1 parent 00971a7 commit 25349c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/core/liquidators/impl/Auction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ contract Auction {
internal
{
_auction.pricePrecision = calculatePricePrecision(_currentSet, _nextSet);

uint256 minimumBid = calculateMinimumBid(_currentSet, _nextSet, _auction.pricePrecision);

// remainingCurrentSets must be greater than minimumBid or no bidding would be allowed
Expand Down Expand Up @@ -216,7 +216,7 @@ contract Auction {

// Apply order of magnitude to pricePrecision, only want increase if value is >10x so subtract
// one order of magnitude
return MINIMUM_PRICE_PRECISION.mul(10 ** orderOfMagnitude.sub(1));
return MINIMUM_PRICE_PRECISION.mul(10 ** orderOfMagnitude).div(10);
}

return MINIMUM_PRICE_PRECISION;
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/CommonMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ library CommonMath {
// Make sure passed value is greater than 0
require (
_value > 0,
"AllocatorMathLibrary.ceilLog10: Value must be greater than zero."
"CommonMath.ceilLog10: Value must be greater than zero."
);

// Since log10(1) = 0, if _value = 1 return 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ contract('ProtocolViewer', accounts => {
});
});

describe.only('#batchFetchRebalanceStateAsync', async () => {
describe('#batchFetchRebalanceStateAsync', async () => {
let subjectRebalancingSetAddresses: Address[];

let rebalancingSetToken: RebalancingSetTokenContract;
Expand Down

0 comments on commit 25349c3

Please sign in to comment.