Skip to content

Instantly share code, notes, and snippets.

@johnshearing
Created June 12, 2022 23:40
Show Gist options
  • Save johnshearing/d1d2ea348b5f43173a8f0ca38f0ca90d to your computer and use it in GitHub Desktop.
Save johnshearing/d1d2ea348b5f43173a8f0ca38f0ca90d to your computer and use it in GitHub Desktop.
Let
"LoanAmount"
(Constant 200000000)
(Let
"PaymentAmount"
(Constant 100000000)
(Let
"NumberOfPayments"
(DivValue
(ConstantParam "LoanAmount")
(ConstantParam "PaymentAmount")
)
(When
[Case
(Deposit
(Role "Bank")
(Role "Bank")
(Token "" "")
(UseValue "LoanAmount")
)
(When
[Case
(Deposit
(Role "Bank")
(Role "Borrower")
(Token "" "")
(UseValue "PaymentAmount")
)
(When
[Case
(Deposit
(Role "Bank")
(Role "Borrower")
(Token "" "")
(UseValue "PaymentAmount")
)
(Pay
(Role "Bank")
(Account (Role "Borrower"))
(Token "" "")
(UseValue "LoanAmount")
Close
)]
(TimeParam "PaymentDeadline")
Close
)]
(TimeParam "PaymentDeadline")
Close
)]
(TimeParam "DeadlineBankDeposit")
Close
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment