Skip to content

Instantly share code, notes, and snippets.

@dk14
Last active June 19, 2023 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dk14/649fc46a8c1cd5bef5b8b26245809c4e to your computer and use it in GitHub Desktop.
Save dk14/649fc46a8c1cd5bef5b8b26245809c4e to your computer and use it in GitHub Desktop.
EuropeanCall
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
Let
"strike"
(Constant 100000)
(Let
"premium"
(Constant 100000000)
(Let
"threshold"
(AddValue
(UseValue "strike")
(DivValue
(UseValue "premium")
(Constant 1000000)
)
)
(Let
"notional_btc"
(Constant 2)
(Let
"margin"
(Constant 300000000)
(When
[Case
(Deposit
(Role "Bob")
(Role "Alice")
(Token "" "")
(UseValue "premium")
)
(When
[Case
(Deposit
(Role "Bob")
(Role "Bob")
(Token "" "")
(UseValue "margin")
)
(When
[Case
(Choice
(ChoiceId
"DO NOT ENTER, SKIP TO NEXT TIMEOUT INSTEAD"
(Address "invalid1vrxx3rjangevudlrejgp9m508uc26jd02n7lmdz365n4wrca35y5j")
)
[Bound 0 0]
)
Close ]
51687041400575
(When
[Case
(Choice
(ChoiceId
"WOLF_BTCADA"
(Address "addr_test1vrxx3rjangevudlrejgp9m508uc26jd02n7lmdz365n4wrca35y5j")
)
[Bound 0 1000000]
)
(Let
"market"
(ChoiceValue
(ChoiceId
"WOLF_BTCADA"
(Address "addr_test1vrxx3rjangevudlrejgp9m508uc26jd02n7lmdz365n4wrca35y5j")
))
(Let
"value"
(MulValue
(UseValue "notional_btc")
(SubValue
(UseValue "market")
(UseValue "strike")
)
)
(If
(ValueLE
(UseValue "value")
(Constant 0)
)
(Pay
(Role "Alice")
(Account (Role "Bob"))
(Token "" "")
(MulValue
(NegValue (UseValue "value"))
(Constant 1000000)
)
Close
)
(Pay
(Role "Bob")
(Account (Role "Alice"))
(Token "" "")
(MulValue
(UseValue "value")
(Constant 1000000)
)
Close
)
)
)
)]
91687041400572 Close
)
)]
51687041400572 Close
)]
31687041400572 Close
)
)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment