Skip to content

Offers could exist below MinimumTotalValue #49

Open
@pengocat

Description

@pengocat

Description

It seems like the intention of MinimumTotalValue is that all offers are above this value. However, there can be a scenario where this is not true. (comment from code: @notice Sets the minimumTotalValue value. All offers in existence must have a total value greater than this.)

Scenario

When the COO updates MinimumTotalValue, there is no check to see if there are existing bids that are below the new updated valued of MinimumTotalValue. This can create a situation where there are valid bids in the system that were created based on the old MinimumTotalValue, and the new bids don't satisfy the criteria of being higher than MinimumTotalValue.

The comment in OffersConfig.sol for function setMinimumTotalValue says 'All offers in existence must have a total value greater than this.' This may not hold in this situation.

Impact

Medium/Low

Reproduction

Set the MinimumTotalValue to say 0.0001 ETH. Create a bid for 0.0002 ETH for a token. Set MinimumTotalValue to 0.0005. There's now a valid bid in the system that falls below MinimumTotalValue.

Fix

When the COO calls this function, there should be a check on all active and valid bids. If these bids fall below the new MinimumTotalValue, they should be canceled.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions