tx · 3BSG184AxDHa2aSCxV3Q4SfWZ8Y64rKKpkWJssoCXUpS

3MvuSn7KBR39PoLQ9jDM117mDyzFuBJs3qy:  -0.01400000 Waves

2020.01.16 16:01 [856734] smart account 3MvuSn7KBR39PoLQ9jDM117mDyzFuBJs3qy > SELF 0.00000000 Waves

{ "type": 13, "id": "3BSG184AxDHa2aSCxV3Q4SfWZ8Y64rKKpkWJssoCXUpS", "fee": 1400000, "feeAssetId": null, "timestamp": 1579179718860, "version": 1, "sender": "3MvuSn7KBR39PoLQ9jDM117mDyzFuBJs3qy", "senderPublicKey": "4hZyqjUHP9eJzVZcavLKsYDRYgGbGqXnSkJ2SFPg8oL2", "proofs": [ "2F8cmuMgU1sexo1aMCe48YanQh6nftEFPM9VnzbooEc2wB9yhesn35g1AZXqV8BN1yCaMYMrZu7uDCMSZvh65cqG" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEBEgAAAAAOAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAN2aWcAAAAAAAAAADQAAAAACnJpc2tBbW91bnQAAAAAAAAAA+gAAAAADGJldFRocmVzaG9sZAAAAAAAAAAACgAAAAAGYmV0TWluAAAAAAAAAAABAAAAAAZiZXRNYXgAAAAAAAAAAGQBAAAACXExRXh0cmFjdAAAAAAEAAAAAnExAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgUAAAAEdGhpcwIAAAAHcTFfbmV4dAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAHcTFfbmV4dAUAAAAHcTFzdGFydAUAAAACcTEBAAAACXEyRXh0cmFjdAAAAAAEAAAAAnEyAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgUAAAAEdGhpcwIAAAAHcTJfbmV4dAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAHcTJfbmV4dAUAAAAHcTJzdGFydA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spentComplexity": 0 } View: original | compacted Prev: 7hCL9jWbkNpkS5bByZZYYgPWvGEpRSpHPutbQ5V23tEM Next: 9EVbfyu9V2EEVY2QM48RRzTSDopRwR8YTr1b7tdY9vTC Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let q1start = 190
55
66 let q2start = 190
77
88 let vig = 52
99
1010 let riskAmount = 1000
1111
1212 let betThreshold = 10
1313
1414 let betMin = 1
1515
1616 let betMax = 100
1717
1818 func q1Extract () = {
1919 let q1 = if (isDefined(getInteger(this, "q1_next")))
2020 then getIntegerValue(this, "q1_next")
2121 else q1start
2222 q1
2323 }
2424
2525
2626 func q2Extract () = {
2727 let q2 = if (isDefined(getInteger(this, "q2_next")))
2828 then getIntegerValue(this, "q2_next")
2929 else q2start
3030 q2
3131 }
3232
3333
3434 func debtAmount1Extract () = {
3535 let debtAmount1 = if (isDefined(getInteger(this, "debtAmount1")))
3636 then getIntegerValue(this, "debtAmount1")
3737 else 0
3838 debtAmount1
3939 }
4040
4141
4242 func debtAmount2Extract () = {
4343 let debtAmount2 = if (isDefined(getInteger(this, "debtAmount2")))
4444 then getIntegerValue(this, "debtAmount2")
4545 else 0
4646 debtAmount2
4747 }
4848
4949
5050 func calcCoefIfBigBet (event,betAmount,q) = {
5151 let k = (((1 * 100000) - (q * 1000)) / (betMax - betThreshold))
5252 let b = ((1 * 100000) - (k * betMax))
5353 let qCorrected = (((betAmount * k) + b) / 1000)
5454 qCorrected
5555 }
5656
5757
5858 func anothercoef (q,vig) = {
5959 let anothercoef = pow(((vig + 1000) - (100000 / q)), 0, -1, 0, 5, DOWN)
6060 anothercoef
6161 }
6262
6363
6464 func actualNewCoefs (betAmount,debtAmount1,debtAmount2) = if ((0 > debtAmount1))
6565 then {
6666 let k = (((1 * 1000000) - (q1start * 10000)) / riskAmount)
6767 let b = ((1 * 1000000) - (k * riskAmount))
6868 let q1 = (((-(k) * debtAmount1) + b) / 10000)
6969 let q2 = anothercoef(q1, vig)
7070 [q1, q2]
7171 }
7272 else if ((debtAmount1 > 0))
7373 then {
7474 let k = (((1 * 1000000) - (q2start * 10000)) / riskAmount)
7575 let b = ((1 * 1000000) - (k * riskAmount))
7676 let q2 = (((-(k) * debtAmount2) + b) / 10000)
7777 let q1 = anothercoef(q2, vig)
7878 [q1, q2]
7979 }
8080 else {
8181 let q1 = q1start
8282 let q2 = q2start
8383 [q1, q2]
8484 }
8585
8686
8787 @Callable(contextObj)
8888 func bet (event) = {
8989 let betAmount = match contextObj.payment {
9090 case p: AttachedPayment =>
9191 if ((betMin > p.amount))
9292 then throw("low payment")
9393 else p.amount
9494 case _ =>
9595 throw("Payment not attached")
9696 }
9797 let count = if (isDefined(getInteger(this, "count")))
9898 then getIntegerValue(this, "count")
9999 else 0
100100 let event1DebtForThisPlayer = if (isDefined(getInteger(this, (toString(contextObj.caller) + "_event1DebtForThisPlayer"))))
101101 then getIntegerValue(this, (toString(contextObj.caller) + "_event1DebtForThisPlayer"))
102102 else 0
103103 let event2DebtForThisPlayer = if (isDefined(getInteger(this, (toString(contextObj.caller) + "_event2DebtForThisPlayer"))))
104104 then getIntegerValue(this, (toString(contextObj.caller) + "_event2DebtForThisPlayer"))
105105 else 0
106106 let debtAmount1 = debtAmount1Extract()
107107 let debtAmount2 = debtAmount2Extract()
108108 let q1 = q1Extract()
109109 let q2 = q2Extract()
110110 let countNew = (count + 1)
111111 if ((event == 1))
112112 then if ((betThreshold >= betAmount))
113113 then {
114114 let event1DebtForThisPlayerNew = (event1DebtForThisPlayer + (q1 * betAmount))
115115 let debtAmount1New = ((debtAmount1 + betAmount) - ((q1 * betAmount) / 100))
116116 let debtAmount2New = (debtAmount2 + betAmount)
117117 let q1Nextq2Next = actualNewCoefs(betAmount, debtAmount1New, debtAmount2New)
118118 let q1Next = q1Nextq2Next[0]
119119 let q2Next = q1Nextq2Next[1]
120120 WriteSet([DataEntry((toString(contextObj.caller) + "_event1DebtForThisPlayer"), event1DebtForThisPlayerNew), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry("debtAmount1", debtAmount1New), DataEntry("debtAmount2", debtAmount2New), DataEntry("q1_next", q1Next), DataEntry("q2_next", q2Next), DataEntry("count", countNew)])
121121 }
122122 else if (if ((betAmount > betThreshold))
123123 then (betMax > betAmount)
124124 else false)
125125 then {
126126 let q1Corrected = calcCoefIfBigBet("q1_next", betAmount, q1)
127127 let event1DebtForThisPlayerNew = (event1DebtForThisPlayer + (q1Corrected * betAmount))
128128 let debtAmount1New = ((debtAmount1 + betAmount) - ((q1Corrected * betAmount) / 100))
129129 let debtAmount2New = (debtAmount2 + betAmount)
130130 let q1Nextq2Next = actualNewCoefs(betAmount, debtAmount1New, debtAmount2New)
131131 let q1Next = q1Nextq2Next[0]
132132 let q2Next = q1Nextq2Next[1]
133133 WriteSet([DataEntry((toString(contextObj.caller) + "_event1DebtForThisPlayer"), event1DebtForThisPlayerNew), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_Correctedqoef1"), q1Corrected), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("debtAmount1", debtAmount1New), DataEntry("debtAmount2", debtAmount2New), DataEntry("q1_next", q1Next), DataEntry("q2_next", q2Next), DataEntry("count", countNew)])
134134 }
135135 else throw("incorrect bet amount")
136136 else if ((event == 2))
137137 then if ((betThreshold >= betAmount))
138138 then {
139139 let event2DebtForThisPlayerNew = (event2DebtForThisPlayer + (q2 * betAmount))
140140 let debtAmount2New = ((debtAmount2 + betAmount) - ((q2 * betAmount) / 100))
141141 let debtAmount1New = (debtAmount1 + betAmount)
142142 let q1Nextq2Next = actualNewCoefs(betAmount, debtAmount1New, debtAmount2New)
143143 let q1Next = q1Nextq2Next[0]
144144 let q2Next = q1Nextq2Next[1]
145145 WriteSet([DataEntry((toString(contextObj.caller) + "_event2DebtForThisPlayer"), event2DebtForThisPlayerNew), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry("debtAmount1", debtAmount1New), DataEntry("debtAmount2", debtAmount2New), DataEntry("q1_next", q1Next), DataEntry("q2_next", q2Next), DataEntry("count", countNew)])
146146 }
147147 else if (if ((betAmount > betThreshold))
148148 then (betMax > betAmount)
149149 else false)
150150 then {
151151 let q2Corrected = calcCoefIfBigBet("q2_next", betAmount, q2)
152152 let event2DebtForThisPlayerNew = (event2DebtForThisPlayer + (q2Corrected * betAmount))
153153 let debtAmount2New = ((debtAmount2 + betAmount) - ((q2Corrected * betAmount) / 100))
154154 let debtAmount1New = (debtAmount1 + betAmount)
155155 let q1Nextq2Next = actualNewCoefs(betAmount, debtAmount1New, debtAmount2New)
156156 let q1Next = q1Nextq2Next[0]
157157 let q2Next = q1Nextq2Next[1]
158158 WriteSet([DataEntry((toString(contextObj.caller) + "_event2DebtForThisPlayer"), event2DebtForThisPlayerNew), DataEntry((toString(countNew) + "_event"), event), DataEntry((toString(countNew) + "_bettor"), toString(contextObj.caller)), DataEntry((toString(countNew) + "_Correctedqoef2"), q2Corrected), DataEntry((toString(countNew) + "_qoef1"), q1), DataEntry((toString(countNew) + "_qoef2"), q2), DataEntry("debtAmount1", debtAmount1New), DataEntry("debtAmount2", debtAmount2New), DataEntry("q1_next", q1Next), DataEntry("q2_next", q2Next), DataEntry("count", countNew)])
159159 }
160160 else throw("incorrect bet amount")
161161 else throw("incorrect event id")
162162 }
163163
164164
165165
166166 @Callable(contextObj)
167167 func withdraw () = {
168168 let event1amount = match getInteger(this, (toString(contextObj.caller) + "__event1DebtForThisPlayer")) {
169169 case u: Unit =>
170170 0
171171 case i: Int =>
172172 i
173173 case _ =>
174174 throw()
175175 }
176176 let event2amount = match getInteger(this, (toString(contextObj.caller) + "__event2DebtForThisPlayer")) {
177177 case u: Unit =>
178178 0
179179 case i: Int =>
180180 i
181181 case _ =>
182182 throw()
183183 }
184184 let event1 = match getBoolean(this, "result_event_1") {
185185 case u: Unit =>
186186 false
187187 case b: Boolean =>
188188 b
189189 case _ =>
190190 throw()
191191 }
192192 let event2 = match getBoolean(this, "result_event_2") {
193193 case u: Unit =>
194194 false
195195 case b: Boolean =>
196196 b
197197 case _ =>
198198 throw()
199199 }
200200 if (event1)
201201 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event1amount * 1000000), unit)]))
202202 else if (event2)
203203 then ScriptResult(WriteSet([DataEntry((toString(contextObj.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(contextObj.caller, (event2amount * 1000000), unit)]))
204204 else throw("event did not happen or you have zero win")
205205 }
206206
207207

github/deemru/w8io/169f3d6 
60.12 ms