Closed etherSky111 closed 3 months ago
At this point, the getPartialFill function reverts when the auction is not settled, as in the EMP.
getPartialFill
auction
settled
EMP
function getPartialFill(uint96 lotId_) external view returns (bool hasPartialFill, PartialFill memory partialFill) { _revertIfLotInvalid(lotId_); _revertIfLotNotSettled(lotId_); // here partialFill = _lotPartialFill[lotId_]; hasPartialFill = partialFill.bidId != 0; return (hasPartialFill, partialFill); }
However, in EMP, the partial fill state was determined when the auction is settled, while in FPB, the partial fill state can be determined when the total capacity is covered by bids.
partial fill state
FPB
total capacity
bids
function _bid( uint96 lotId_, address bidder_, address referrer_, uint256 amount_, bytes calldata ) internal override returns (uint64) { data.totalBidAmount += amount_; uint256 baseScale = 10 ** lotData[lotId_].baseTokenDecimals; uint256 newFilledCapacity = Math.fullMulDiv(data.totalBidAmount, baseScale, data.price); if (newFilledCapacity < lotCapacity) { return bidId; } if (newFilledCapacity > lotCapacity) { _lotPartialFill[lotId_] = _calculatePartialFill( bidId, lotCapacity, newFilledCapacity, amount96, baseScale, data.price ); data.totalBidAmount -= _lotPartialFill[lotId_].refund; } lotData[lotId_].conclusion = uint48(block.timestamp); return bidId; }
Anyway, this is a minor issue.
At this point, the
getPartialFill
function reverts when theauction
is notsettled
, as in theEMP
.However, in
EMP
, thepartial fill state
was determined when theauction
issettled
, while inFPB
, thepartial fill state
can be determined when thetotal capacity
is covered bybids
.Anyway, this is a minor issue.