Function: redeem(Receipt receipt, Signature takerSignature, Signature makerSignature)
Burn eUSD tokens from benefactor and transfer corresponding amount of assets tokens to beneficiary. Function can be called only by owner or Redeemer.
Inputs
receiptConstraints: N/A.
Impact: The approved and signed by Redeemer data necessary to perform transaction.
takerSignatureConstraints: There is a check that the
orderhash was signed bybenefactor.Impact: The benefactor signature of the order.
makerSignatureConstraints: There is a check that the
receipthash was signed by the Redeemer.Impact: The Redeemer signature of receipt.
Branches and code coverage (including function calls)
Intended branches
The expected amount of eUSD was burned from benefactor.
The assets tokens properly transferred to beneficiary.
Negative behavior
The caller is not Redeemer or Owner.
Redeem the receipt with the same nonce twice.
Function call analysis
eUSD.burnFrom(receipt.order.benefactor, receipt.order.baseAmount);External/Internal? External.
Argument control?
receipt.order.benefactorandreceipt.order.baseAmount.Impact: Burn the
baseAmountof eUSD tokens frombenefactor.