Skip to content

Instantly share code, notes, and snippets.

@dk14
Last active June 21, 2023 16:52
Show Gist options
  • Save dk14/9c4fbbe701a91afb08ebc35f7de6f8b6 to your computer and use it in GitHub Desktop.
Save dk14/9c4fbbe701a91afb08ebc35f7de6f8b6 to your computer and use it in GitHub Desktop.
EuroCallAddr
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
Let
"strike_ada"
(Constant 1000)
(Let
"premium_ada"
(Constant 100)
(Let
"notional_btc"
(Constant 2)
(Let
"threshold"
(AddValue
(UseValue "strike_ada")
(DivValue
(UseValue "premium_ada")
(UseValue "notional_btc")
)
)
(Let
"margin_ada"
(Constant 300)
(When
[Case
(Deposit
(Address "addr_test1vrudhk63pclytll6vdt6hrda75al5a2jhtlkuqn0mh89ngsr929vf")
(Address "addr_test1vrc79wasc0na5zglchugujuevu9ra9ehfjxwl4x9stgm9uc9dpguq")
(Token "" "")
(MulValue
(UseValue "premium_ada")
(Constant 1000000)
)
)
(When
[Case
(Deposit
(Address "addr_test1vrudhk63pclytll6vdt6hrda75al5a2jhtlkuqn0mh89ngsr929vf")
(Address "addr_test1vrudhk63pclytll6vdt6hrda75al5a2jhtlkuqn0mh89ngsr929vf")
(Token "" "")
(MulValue
(UseValue "margin_ada")
(Constant 1000000)
)
)
(When
[Case
(Choice
(ChoiceId
"DO NOT ENTER, SKIP TO NEXT TIMEOUT INSTEAD"
(Address "addr_test1vrxx3rjangevudlrejgp9m508uc26jd02n7lmdz365n4wrca35y5j")
)
[Bound 0 0]
)
Close ]
1000000100000001
(When
[Case
(Choice
(ChoiceId
"WOLF_BTCADA"
(Address "addr_test1vrxx3rjangevudlrejgp9m508uc26jd02n7lmdz365n4wrca35y5j")
)
[Bound 0 1000000]
)
(Let
"market_ada"
(ChoiceValue
(ChoiceId
"WOLF_BTCADA"
(Address "addr_test1vrxx3rjangevudlrejgp9m508uc26jd02n7lmdz365n4wrca35y5j")
))
(Let
"value_ada"
(MulValue
(UseValue "notional_btc")
(SubValue
(UseValue "market_ada")
(UseValue "strike_ada")
)
)
(Let
"alice_profit"
(SubValue
(UseValue "value_ada")
(UseValue "premium_ada")
)
(If
(ValueLE
(UseValue "value_ada")
(Constant 0)
)
Close
(Pay
(Address "addr_test1vrudhk63pclytll6vdt6hrda75al5a2jhtlkuqn0mh89ngsr929vf")
(Account (Address "addr_test1vrc79wasc0na5zglchugujuevu9ra9ehfjxwl4x9stgm9uc9dpguq"))
(Token "" "")
(MulValue
(UseValue "value_ada")
(Constant 1000000)
)
Close
)
)
)
)
)]
1000000100000002 Close
)
)]
1000000000000002 Close
)]
1000000000000001 Close
)
)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment