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
receipt
Constraints: N/A.
Impact: The approved and signed by Redeemer data necessary to perform transaction.
takerSignature
Constraints: There is a check that the
order
hash was signed bybenefactor
.Impact: The benefactor signature of the order.
makerSignature
Constraints: There is a check that the
receipt
hash 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.benefactor
andreceipt.order.baseAmount
.Impact: Burn the
baseAmount
of eUSD tokens frombenefactor
.