Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/core/liquidators/impl/LinearAuction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ contract LinearAuction is Auction {

// remainingCurrentSets must be greater than minimumBid or no bidding would be allowed
require(
_startingCurrentSetQuantity >= minimumBid,
"Auction.initializeAuction: Not enough collateral to rebalance"
_startingCurrentSetQuantity.div(minimumBid) >= 100,
"Auction.initializeAuction: Minimum bid must be less than or equal to 1% of collateral."
);

_linearAuction.auction.minimumBid = minimumBid;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "set-protocol-contracts",
"version": "1.3.17-beta",
"version": "1.3.18-beta",
"description": "Smart contracts for {Set} Protocol",
"main": "dist/artifacts/index.js",
"typings": "dist/typings/artifacts/index.d.ts",
Expand Down
10 changes: 10 additions & 0 deletions test/contracts/core/liquidators/impl/linearAuction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,16 @@ contract('LinearAuction', accounts => {
await expectRevertError(subject());
});
});

describe('when there is insufficient collateral to rebalance', async () => {
beforeEach(async () => {
subjectStartingCurrentSetQuantity = gWei(199);
});

it('should revert', async () => {
await expectRevertError(subject());
});
});
});

describe('[CONTEXT] Initialized auction', async () => {
Expand Down