Last active
June 20, 2023 21:47
-
-
Save dk14/8ac3cb9c983a34199a642dd70a445734 to your computer and use it in GitHub Desktop.
EuropeanCallOnChain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let | |
"strike" | |
(Constant 100000) | |
(Let | |
"premium" | |
(Constant 100000000) | |
(Let | |
"threshold" | |
(AddValue | |
(UseValue "strike") | |
(DivValue | |
(UseValue "premium") | |
(Constant 1000000) | |
) | |
) | |
(Let | |
"notional_btc" | |
(Constant 1) | |
(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") | |
) | |
) | |
(Let | |
"alice_profit" | |
(SubValue | |
(UseValue "value") | |
(DivValue | |
(UseValue "premium") | |
(Constant 1000000) | |
) | |
) | |
(If | |
(ValueLE | |
(UseValue "value") | |
(Constant 0) | |
) | |
(Pay | |
(Role "Alice") | |
(Account (Role "Bob")) | |
(Token "" "") | |
(MulValue | |
(NegValue (UseValue "value")) | |
(Constant 1000000) | |
) | |
Close | |
) | |
Close | |
) | |
) | |
) | |
)] | |
91687041400572 Close | |
) | |
)] | |
51687041400572 Close | |
)] | |
31687041400572 Close | |
) | |
) | |
) | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment