Axis-Fi / axis-core

Axis Protocol
https://axis.finance
Other
6 stars 1 forks source link

feat: change EMP min bid size to quote token amount #171

Closed Oighty closed 5 months ago

Oighty commented 5 months ago

Implements #161

We allow the user to specify a quote token amount as the min bid size. We don't allow a min bid size of 0 or greater than type(uint96).max.

Tasks:

@0xJem this removes some protection from overflow of capacityExpended in _getLotMarginalPrice because the minBidSize is no longer tied to capacity. I've thought about calculating a better lower bound that the seller can set this to as the previous MIN_BID_PERCENT * capacity / minPrice to establish this relationship again. What do you think?

Oighty commented 5 months ago

On the topic of the guardrail above, I don't think it protects us from the issue more than a properly set price. At the high end of auction values, it becomes a limitation for bidders when there doesn't need to be one with iterative settlement. Therefore, I think it's ok to have the potential for this, especially given plans to add the abort feature.