Function: fillOrder(SilicaOrder order, bytes signature, uint256 fraction)
This function is used to fill an order with the given parameters.
Inputs
orderControl: Arbitrary.
Constraints: None.
Impact: Order to fill.
signatureControl: Arbitrary.
Constraints: None.
Impact: Signature of the order.
fractionControl: Arbitrary.
Constraints: None.
Impact: Value of the fraction.
Branches and code coverage
Intended branches
Transfers
offeredUpfrontTokenfrom the maker to the caller.Transfers
requestedUpfrontTokenfrom the caller to the maker.Collects surcharge from the caller.
Invokes
_collateralizedMintfor the long shares and the short shares for the maker and the caller.Updates
sFilledFractionfor the order.
Negative behavior
Reverts if this function is called within a reentrant call.
Reverts if the order has already been filled.
Reverts if the order has been canceled.
Reverts if the signature is invalid.
Reverts if the caller is not matched with the taker or the order is not opened for all.
Reverts if the order has expired.
Function call analysis
ISilicaIndex(order.offeredLongSharesParams.index).decimals()What is controllable? Address of
order.offeredLongSharesParams.index.If the return value is controllable, how is it used and how can it go wrong? Manipulating the return value can affect the state of the pool.
ISilicaIndex(order.requestedLongSharesParams.index).decimals()What is controllable? Address of
order.requestedLongSharesParams.index.If the return value is controllable, how is it used and how can it go wrong? Manipulating the return value can affect the state of the pool.