Event Flow

Issue

  1. Issuer initialize token-manager
  2. Issuer transfer token to token-manager account

Claim

  1. The recipient transfer funds to the token-manager account
  2. The token-manager transfers the token from escrow to the recipient
  3. The recipient delegates the token account back to the token-manager
  4. The mint manager freezes the recipient token account

Invalidate

  1. Token-manager sends token back to the issuer
  2. Token-manager transfer payment to the issuer
  3. Crank closes token-manager, and token-manager account

An escrow token account for the mint is created to store the token after it is issued. Once issued, the state is set to “issued”.

After being claimed out of escrow, the token is transferred to the claiming party. It's new host token account is simultaneously delegated to the token-manager and frozen by the program to cement the delegacy. Finally, the token manager's state is set to “claimed”.

Payment Feature

The token manager can optionally collect funds throughout its lifecycle and then pay out these funds either upfront or upon invalidation. When accepting funds, the issuer must specify the payment mint (which mint the payment is denominated in) and then add a paid-claim-approver. with the amount specified to ensure it must be paid to claim the token.

Expiration, Invalidation, & Clawback

The protocol has 3 built-in invalidation mechanisms out of the box

  1. Time: The issuer can set a duration, and whether that duration begins at issuance or at the time of claiming