Skip to main content
This guide shows how to redeem the receipt tokens (RT) of a position that you held to expiry. At the end, the wallet has burned its RT and received the payout: the exercise payment, the remaining collateral, or both. Redemption is a direct call to the receipt contract. It has no Bebop quote and no Bebop endpoint, and it needs no approval.

Before you begin

  • Complete the Quickstart. The examples use its settings and send() helper.
  • The wallet that holds the RT sends the transaction. The payout goes to that wallet.
  • Redeem after exerciseDeadline. Before the deadline, the receipt contract burns only the RT that the exercise payment covers, and the rest of the RT stays in the wallet.
1

Find a position with a payout

A position has a payout when redeemable is not null. Choose a position of this wallet with phase post_deadline.
considerationNow estimates the exercise payment that the RT can collect now. collateralAfterDeadline estimates the collateral payout. It is null until phase is post_deadline. Both are in raw units, after the redemption fee in feeBps.
The estimates are not reserved. Other RT holders of the same instrument redeem from the same pool, first come, first served.
2

Redeem the receipt tokens

Call redeem(amount) on the receipt contract. The address is the receipt field of the instrument. Use the wallet’s current RT balance as amount.
3

Verify the result

After Bebop indexes the redemption, the position has status redeemed and rtBalance "0". The totals in redemption show the amounts that the wallet received.
For a call, redeemedConsideration is in USDC and redeemedCollateral is in the underlying. For a put, the two are the other way around.