Skip to content

Investment Status Transition

This document defines the state machine for the Investment entity. It governs the lifecycle of an investment commitment, tracking it from the initial application, through legal and financial confirmation, to its final closing or cancellation.

Lifecycle Diagram

The investment lifecycle follows a primary success path, but includes several paths for cancellation depending on when the action is taken.

Primary Flow: NEWCONFIRMEDLEGALLY_CONFIRMEDSUCCESSFULLY_CLOSED

Alternative Paths:

  • NEWCANCELLED_BY_INVESTOR (Cancellation before submission)

  • CONFIRMED / LEGALLY_CONFIRMEDCANCELLATION_REQUESTED (Request after submission)

  • CANCELLATION_REQUESTEDCANCELLED_BY_MANAGER (Admin approval of cancellation)

  • LEGALLY_CONFIRMEDUNSUCCESSFULLY_CLOSED ( Offer fails)

Status Definitions

StatusDescription
NEWThe initial status when an Investment record is first created as a user progresses through the investment steps. The application has not yet been submitted.
CONFIRMEDThe investor has successfully completed all steps of the investment flow and submitted the application for processing.
LEGALLY_CONFIRMEDThe investor's profile has passed all necessary KYC and Accreditation checks required for this specific offer, and the payment process has been initiated.
SUCCESSFULLY_CLOSEDThe investment is complete, and the parent offer was successfully funded. Funds have been transferred to the issuer.
UNSUCCESSFULLY_CLOSEDThe parent offer was not successfully funded. The investment has been terminated, and funds have been refunded to the investor.
CANCELLATION_REQUESTEDThe investor has requested to cancel their investment after submitting it. This requires manual review and approval by an administrator.
CANCELLED_BY_INVESTORThe investor cancelled the investment before completing the final submission step.
CANCELLED_BY_MANAGERThe investment has been cancelled by an administrator, either by request or for other operational reasons.

Key Transitions

  • Submit Investment (NEWCONFIRMED)

    • Trigger: An investor successfully completes the final "Review" step of the investment flow.

    • Action: The system updates the status to CONFIRMED and sets the submitted_at timestamp. The investment appears in the user's portfolio.

  • Confirm Legal Readiness (CONFIRMEDLEGALLY_CONFIRMED)

    • Trigger: An automated system check confirms the investor's Profile has passed all required KYC and Accreditation checks for the associated Offer.

    • Action: The status is updated to LEGALLY_CONFIRMED. The system initiates the payment transfer.

  • Pre-Investment Legal Readiness (NEWLEGALLY_CONFIRMED)

    • Trigger: An automated system check confirms the investor's Profile has passed all required KYC and Accreditation checks for the associated Offer before the investment was submitted.

    • Action: The status is updated to LEGALLY_CONFIRMED. The system initiates the payment transfer.

  • Finalize Success (LEGALLY_CONFIRMEDSUCCESSFULLY_CLOSED)

    • Trigger: The parent Offer that this investment is linked to closes successfully.

    • Action:

      • The system updates the investment status to SUCCESSFULLY_CLOSED.
      • This triggers the release of funds to the issuer.
      • The system initiates tokens distribution.
  • Finalize Failure (LEGALLY_CONFIRMEDUNSUCCESSFULLY_CLOSED)

    • Trigger: The parent Offer that this investment is linked to closes unsuccessfully.

    • Action: The status is updated to UNSUCCESSFULLY_CLOSED, and the refund workflow is initiated to return funds to the investor.

  • Request Cancellation (CONFIRMED / LEGALLY_CONFIRMEDCANCELLATION_REQUESTED)

    • Trigger: The investor clicks the "Cancel Investment" button after submitting their application.

    • Action: The status is updated to CANCELLATION_REQUESTED, and the investment is flagged in the admin panel for manual review.

  • Approve Cancellation (CANCELLATION_REQUESTEDCANCELLED_BY_MANAGER)

    • Trigger: An administrator manually approves an investor's cancellation request.

    • Action: The status is updated to CANCELLED_BY_MANAGER. The system initiates the cancellation of the payment transfer, triggering a refund if necessary.