Class SmartContractStateMachine

java.lang.Object
net.finmath.smartcontract.statemachine.SmartContractStateMachine

public class SmartContractStateMachine extends Object
State Machine Modeling of the Smart Derivative Contract.

This state machine models a smart derivative contract using a loop of the following core states:

  • a pre-funding test (Guard),
  • an active state (State) (representing the time until the settlement has to occurs),
  • a settlement state (State),
  • a settlement test (Guard),
  • a maturity test (Guard),
See also SmartContractStateMachine.States and SmartContractStateMachine.Events.

Most of the time, a smart derivative contract is in the ACTIVE state. If a SETTLE event occurs the contract moves to the SETTLEMENT state.

A settlement can be partial or successful. A partial settlement will lead to termination.

After settlement, the machine checks the success of the settlement, checks for maturity, checks for pre-funding for the next period, then returns to the active state.

Hence, there are three different termination states.

Author:
Christian Fries