How Does the SIP-4 State Machine Work ?
In SIP-4, an agreement is not created and completed in a single step. The documentation describes its lifecycle as a state machine that progresses through a series of predefined states.
When an agreement is created, the initial state is established. At this stage, the execution right, Reservation Fee, Guarantee Deposit, and expiry period are defined together. The rights and obligations of both parties are also established at this point.
While the agreement remains active, the execution right stays valid throughout the expiry period. The holder of the right can call Execute at any time during that window. Once Execute is called, the agreement moves into the settlement process.
Not every agreement ends with execution. If the expiry period is reached before the execution right is exercised, the execution right expires and the agreement comes to an end. Settlement does not occur, the Guarantee Deposit is released, and the rights and obligations arising from the agreement are terminated.
The state machine allows the current status of the agreement to be clearly identified at any moment. Whether the execution right is still valid, whether the settlement process has started, or whether the agreement has already ended can all be determined by its current state.
This structure also ensures that the agreement progresses through its lifecycle in a consistent manner. Each state depends on the outcome of the previous one, preventing the agreement from existing in multiple states at the same time.
In SIP-4, the state machine is one of the core mechanisms that keeps the Reservation Fee, Execute authority, Guarantee Deposit, and expiry period working together within the same agreement.
#
standxblog#
@StandX_Official
@Stander_StandX