When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) Close)) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000),(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000),(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Very deep constant parameter for test") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party2") (Account (Role "CounterpartyX")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Even deeper constant param for test") ) Close ) ) Close ) ))] (TimeParam "Deeply nested time param for test") Close ) ))] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) ) ) Close ) ))] (TimeParam "Second window deadline") Close ) ))] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) ) ) Close ) ))] (TimeParam "Second window deadline") Close ) ) )] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) ) ) Close ) ))] (TimeParam "Second window deadline") (When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party")) (When [ (Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty")) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "First window beginning") (When [ (Case (Choice (ChoiceId "Price in first window" (Role "Oracle")) [ (Bound 0 1000000000)]) (When [(Case (Choice (ChoiceId "Everything is alright" (Role "Buyer")) [ (Bound 0 11)]) Close)] (TimeParam "Second window beginning") (When [ (Case (Choice (ChoiceId "Price in second window" (Role "Oracle")) [ (Bound 0 1000000000)]) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty")) Close)) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle")))) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle"))) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle")))) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party")) (UseValue "Increase in price") (ConstantParam "Amount paid by party")) Close)) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000),(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000),(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Party") (Role "Party") (Token "" "") (ConstantParam "Amount paid by party") ) (When [(Case (Deposit (Role "Counterparty") (Role "Counterparty") (Token "" "") (ConstantParam "Amount paid by counterparty") ) (When [] (TimeParam "First window beginning") (When [(Case (Choice (ChoiceId "Price in first window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (When [] (TimeParam "Second window beginning") (When [(Case (Choice (ChoiceId "Price in second window" (Role "Oracle") ) [(Bound 0 1000000000)] ) (If (ValueGT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Decrease in price" (SubValue (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Pay (Role "Counterparty") (Account (Role "Party")) (Token "" "") (Cond (ValueLT (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) (UseValue "Decrease in price") (ConstantParam "Amount paid by counterparty") ) Close ) ) (If (ValueLT (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) ) (Let "Increase in price" (SubValue (ChoiceValue (ChoiceId "Price in second window" (Role "Oracle") )) (ChoiceValue (ChoiceId "Price in first window" (Role "Oracle") )) ) (Pay (Role "Party") (Account (Role "Counterparty")) (Token "" "") (Cond (ValueLT (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) (UseValue "Increase in price") (ConstantParam "Amount paid by party") ) Close ) ) Close ) ))] (TimeParam "Second window deadline") Close ) ))] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) ) ) Close ) ))] (TimeParam "Second window deadline") Close ) ))] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) ) ) Close ) ))] (TimeParam "Second window deadline") Close ) ) )] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) ) ) Close ) ))] (TimeParam "Second window deadline") Close ) ))] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) )))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close) )) Close)))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close))) Close)))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close) )) Close)))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close) ) ))] (TimeParam "First window deadline") Close ) ))] (TimeParam "Counterparty deposit deadline") Close ))] (TimeParam "Party deposit deadline") Close ) )))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close) )) Close)))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close))) Close)))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close) )) Close)))] (TimeParam "Second window deadline") Close)))] (TimeParam "First window deadline") Close)))] (TimeParam "Counterparty deposit deadline") Close))] (TimeParam "Party deposit deadline") Close