Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.44 KB

stateMachine.md

File metadata and controls

51 lines (32 loc) · 1.44 KB

State Machine Model

Bond

stateDiagram-v2
    active: Active
    paidEarly: Paid Early
    defaulted: Defaulted
    paid: Paid

    [*] --> active: Create Bond

    active --> defaulted: Maturity Date Passes
    active --> active: Pay
    active --> paidEarly: Fully Pay
    paidEarly --> paid: Maturity Date Passes
    defaulted --> paid: Fully Pay
    defaulted --> defaulted: Pay

    paid --> [*]
Loading

Not created

  • Allowed addresses can create a bond and move to "Not fully paid and not matured"

Not fully paid and not matured (Active)

  • When maturity date plus the grace period passes, move to "Not fully paid and matured"
  • Anyone can fully pay and move to "Fully paid and not matured"

Fully paid and not matured (PaidEarly)

  • When maturity date passes, move to "Fully paid and matured"

Not fully paid and matured (Defaulted)

  • Anyone can fully pay and move to "Fully paid and matured"

Fully paid and matured (Paid)

  • This state is terminal (no more transitions are possible)

State Modifications

Output from slithers vars-and-auth @ commit https://github.com/alwaysbegrowing/arbor-contracts/commit/6f810e576c26e272c08bbadd5cae7ee3b6c3930d

image

image