tx · DSmQDEwe6cvm6JWEPfvNjcZ96G24VNdmTb97JJXL2GCm

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.04400000 Waves

2023.06.28 13:44 [2642408] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "DSmQDEwe6cvm6JWEPfvNjcZ96G24VNdmTb97JJXL2GCm", "fee": 4400000, "feeAssetId": null, "timestamp": 1687949090086, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "44LchAEP2mVH2PFMrc85QpM8gGLAhbTtpVmSRTkULEK621xKX2vi7Z9ws8fcixCdsfKfc4oLW1wuCGEk9s1k5Pr7" ], "script": "base64:BgKYAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg4KDAgICAEEERgYEQEBGBIKCggICAgBBAgBGBIOCgwICAgBBBgYGBgYARgSCwoJCAgBAQEBAQEEagAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAA9DQVBfRkVFX05PX0xPQU4CCWNhcE5vTG9hbgAMQ0FQX0ZFRV9MT0FOAgdjYXBMb2FuABRTVE9QTE9TU19GRUVfTk9fTE9BTgIOc3RvcExvc3NOb0xvYW4ADVNUT1BMT1NTX0xPQU4CDHN0b3BMb3NzTG9hbgAITE9BTl9GRUUCBGxvYW4AC05PX0xPQU5fRkVFAgZub0xvYW4ABk5PX0ZFRQIFbm9GZWUABlNDQUxFOACAwtcvAAdTQ0FMRTEwAIDIr6AlAAdTQ0FMRTE2CQC2AgEAgICE/qbe4REACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFs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eGx5U3RvcExvc3NMb2FuRmVlBRNzdG9wbG9zc0ZlZVdpdGhMb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRFrUG9vbEludGVyZXN0TG9hbgAACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRNrUG9vbEludGVyZXN0Tm9Mb2FuAAAJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQVrUG9vbAUIcG9vbEFkZHIFBHR5cGUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQdzaGFyZUlkBQprU2hhcmVQb29sBQhwb29sQWRkcgkAzAgCCQEMQm9vbGVhbkVudHJ5AgkArAICBQhwb29sQWRkcgUOa1Bvb2xDYW5Cb3Jyb3cFCWNhbkJvcnJvdwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tledx6SS4=", "height": 2642408, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HjN54TVya4jBZ7Gzy6f7nPeWba4tn28dRUWwEmLX84cp Next: G7rzmQHAtsfUpwa9mB74gfth6zoUZETuovY4X2y2dZXb Diff:
OldNewDifferences
8787
8888 let Q = "last_price"
8989
90-let R = "_stop_loss"
90+let R = "_twap5B"
9191
92-let S = "axly_money_box"
92+let S = "_stop_loss"
9393
94-let T = "swopfi_farming_addr"
94+let T = "axly_money_box"
9595
96-let U = "lend_service_addr"
96+let U = "swopfi_farming_addr"
9797
98-let V = "admin_call_pub_key"
98+let V = "lend_service_addr"
9999
100-let W = "price_oracle"
100+let W = "admin_call_pub_key"
101101
102-let X = "exchange_contract"
102+let X = "price_oracle"
103103
104-let Y = "wx_swap_contract"
104+let Y = "exchange_contract"
105105
106-let Z = "swop_id"
106+let Z = "wx_swap_contract"
107107
108-let aa = "wx_id"
108+let aa = "swop_id"
109109
110-let ab = Address(fromBase58String(valueOrErrorMessage(getString(this, S), "No axly moneyBox address")))
110+let ab = "wx_id"
111111
112-let ac = Address(fromBase58String(valueOrErrorMessage(getString(this, X), "No exchange contract address")))
112+let ac = Address(fromBase58String(valueOrErrorMessage(getString(this, T), "No axly moneyBox address")))
113113
114-let ad = Address(fromBase58String(valueOrErrorMessage(getString(this, W), "No price oracle address")))
114+let ad = Address(fromBase58String(valueOrErrorMessage(getString(this, Y), "No exchange contract address")))
115115
116-let ae = Address(fromBase58String(valueOrErrorMessage(getString(this, Y), "No wx swap address")))
116+let ae = Address(fromBase58String(valueOrErrorMessage(getString(this, X), "No price oracle address")))
117117
118-let af = fromBase58String(valueOrErrorMessage(getString(this, Z), "No swop id"))
118+let af = Address(fromBase58String(valueOrErrorMessage(getString(this, Z), "No wx swap address")))
119119
120-let ag = fromBase58String(valueOrErrorMessage(getString(this, aa), "No wx id"))
120+let ag = fromBase58String(valueOrErrorMessage(getString(this, aa), "No swop id"))
121121
122-func ah () = Address(fromBase58String(valueOrErrorMessage(getString(this, U), "Can't get lend service addr")))
122+let ah = fromBase58String(valueOrErrorMessage(getString(this, ab), "No wx id"))
123+
124+func ai () = Address(fromBase58String(valueOrErrorMessage(getString(this, V), "Can't get lend service addr")))
123125
124126
125-func ai () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, V), "Can't get admin addr")))
127+func aj () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, W), "Can't get admin addr")))
126128
127129
128-func aj (ak) = if ((ak.caller == ai()))
130+func ak (al) = if ((al.caller == aj()))
129131 then unit
130132 else throw("Only admin can call this function")
131133
132134
133-func al (ak) = if ((ak.caller == this))
135+func am (al) = if ((al.caller == this))
134136 then unit
135137 else throw("Only contract itself can call this function")
136138
137139
138-func am (ak) = if ((ak.caller == ah()))
140+func an (al) = if ((al.caller == ai()))
139141 then unit
140142 else throw("Only land contract can call this function")
141143
142144
143-func an (ao) = {
144- let ap = ao
145- if ($isInstanceOf(ap, "ByteVector"))
145+func ao (ap) = {
146+ let aq = ap
147+ if ($isInstanceOf(aq, "ByteVector"))
146148 then {
147- let aq = ap
148- assetBalance(this, aq)
149+ let ar = aq
150+ assetBalance(this, ar)
149151 }
150- else if ($isInstanceOf(ap, "Unit"))
152+ else if ($isInstanceOf(aq, "Unit"))
151153 then {
152- let ar = ap
154+ let as = aq
153155 wavesBalance(this).available
154156 }
155157 else throw("Match error")
156158 }
157159
158160
159-func as (at) = $Tuple5(valueOrErrorMessage(getString(at, p), "Can't get pool A asset id"), valueOrErrorMessage(getString(at, q), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(at, n), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(at, o), "Can't get pool B asset balance"), valueOrErrorMessage(getString(at, r), "Can't get share asset id"))
161+func at (au) = $Tuple5(valueOrErrorMessage(getString(au, p), "Can't get pool A asset id"), valueOrErrorMessage(getString(au, q), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(au, n), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(au, o), "Can't get pool B asset balance"), valueOrErrorMessage(getString(au, r), "Can't get share asset id"))
160162
161163
162-func au (at) = {
163- let av = {
164- let aw = invoke(at, "getPoolConfigWrapperREADONLY", nil, nil)
165- if ($isInstanceOf(aw, "List[Any]"))
166- then aw
167- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
164+func av (au) = {
165+ let aw = {
166+ let ax = invoke(au, "getPoolConfigWrapperREADONLY", nil, nil)
167+ if ($isInstanceOf(ax, "List[Any]"))
168+ then ax
169+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
168170 }
169- if ((av == av))
171+ if ((aw == aw))
170172 then {
171- let ax = valueOrErrorMessage({
172- let aw = av[4]
173- if ($isInstanceOf(aw, "String"))
174- then aw
173+ let ay = valueOrErrorMessage({
174+ let ax = aw[4]
175+ if ($isInstanceOf(ax, "String"))
176+ then ax
175177 else unit
176178 }, "Can't get pool A asset id")
177- let ay = valueOrErrorMessage({
178- let aw = av[5]
179- if ($isInstanceOf(aw, "String"))
180- then aw
179+ let az = valueOrErrorMessage({
180+ let ax = aw[5]
181+ if ($isInstanceOf(ax, "String"))
182+ then ax
181183 else unit
182184 }, "Can't get pool B asset id")
183- let az = valueOrErrorMessage({
184- let aw = av[3]
185- if ($isInstanceOf(aw, "String"))
186- then aw
185+ let aA = valueOrErrorMessage({
186+ let ax = aw[3]
187+ if ($isInstanceOf(ax, "String"))
188+ then ax
187189 else unit
188190 }, "Can't get pool LP asset id")
189- let aA = {
190- let aw = invoke(at, "getAccBalanceWrapperREADONLY", [ax], nil)
191- if ($isInstanceOf(aw, "Int"))
192- then aw
193- else throw(($getType(aw) + " couldn't be cast to Int"))
191+ let aB = {
192+ let ax = invoke(au, "getAccBalanceWrapperREADONLY", [ay], nil)
193+ if ($isInstanceOf(ax, "Int"))
194+ then ax
195+ else throw(($getType(ax) + " couldn't be cast to Int"))
194196 }
195- if ((aA == aA))
197+ if ((aB == aB))
196198 then {
197- let aB = {
198- let aw = invoke(at, "getAccBalanceWrapperREADONLY", [ay], nil)
199- if ($isInstanceOf(aw, "Int"))
200- then aw
201- else throw(($getType(aw) + " couldn't be cast to Int"))
199+ let aC = {
200+ let ax = invoke(au, "getAccBalanceWrapperREADONLY", [az], nil)
201+ if ($isInstanceOf(ax, "Int"))
202+ then ax
203+ else throw(($getType(ax) + " couldn't be cast to Int"))
202204 }
203- if ((aB == aB))
204- then $Tuple5(ax, ay, aA, aB, az)
205+ if ((aC == aC))
206+ then $Tuple5(ay, az, aB, aC, aA)
205207 else throw("Strict value is not equal to itself.")
206208 }
207209 else throw("Strict value is not equal to itself.")
210212 }
211213
212214
213-func aC (at,aD) = if ((aD == a))
214- then as(at)
215- else if ((aD == b))
216- then au(at)
215+func aD (au,aE) = if ((aE == a))
216+ then at(au)
217+ else if ((aE == b))
218+ then av(au)
217219 else throw("Wrong pool type")
218220
219221
220-func aE (at,aD,az) = if ((aD == a))
221- then valueOrErrorMessage(getInteger(at, s), "Can't get share asset supply")
222- else if ((aD == b))
223- then valueOrErrorMessage(assetInfo(fromBase58String(az)), "Wrong ShareId").quantity
222+func aF (au,aE,aA) = if ((aE == a))
223+ then valueOrErrorMessage(getInteger(au, s), "Can't get share asset supply")
224+ else if ((aE == b))
225+ then valueOrErrorMessage(assetInfo(fromBase58String(aA)), "Wrong ShareId").quantity
224226 else throw("Wrong pool type")
225227
226228
227-func aF (aG) = valueOrElse(getInteger(this, (aG + A)), 0)
229+func aG (aH) = valueOrElse(getInteger(this, (aH + A)), 0)
228230
229231
230-func aH (aG) = valueOrElse(getInteger(this, (aG + B)), 0)
232+func aI (aH) = valueOrElse(getInteger(this, (aH + B)), 0)
231233
232234
233-func aI (aJ) = (valueOrElse(getInteger(this, (aJ + y)), 0) + 1)
235+func aJ (aK) = (valueOrElse(getInteger(this, (aK + y)), 0) + 1)
234236
235237
236-func aK (aG,aL) = if ((aL == d))
237- then getIntegerValue(this, (aG + I))
238- else if ((aL == c))
239- then getIntegerValue(this, (aG + H))
240- else if ((aL == g))
241- then getIntegerValue(this, (aG + G))
242- else if ((aL == h))
243- then getIntegerValue(this, (aG + F))
244- else if ((aL == i))
238+func aL (aH,aM) = if ((aM == d))
239+ then getIntegerValue(this, (aH + I))
240+ else if ((aM == c))
241+ then getIntegerValue(this, (aH + H))
242+ else if ((aM == g))
243+ then getIntegerValue(this, (aH + G))
244+ else if ((aM == h))
245+ then getIntegerValue(this, (aH + F))
246+ else if ((aM == i))
245247 then 0
246248 else throw("Wrong fee type")
247249
248250
249-func aM () = Address(fromBase58String(valueOrErrorMessage(getString(this, T), "Can't get swopfi farming addr")))
251+func aN () = Address(fromBase58String(valueOrErrorMessage(getString(this, U), "Can't get swopfi farming addr")))
250252
251253
252-func aN (at) = {
253- let aO = Address(fromBase58String(valueOrErrorMessage(getString(at, "%s__factoryContract"), "Can't get WX factory contract addr")))
254- let aP = split(valueOrErrorMessage(getString(aO, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
255- Address(fromBase58String(aP[1]))
254+func aO (au) = {
255+ let aP = Address(fromBase58String(valueOrErrorMessage(getString(au, "%s__factoryContract"), "Can't get WX factory contract addr")))
256+ let aQ = split(valueOrErrorMessage(getString(aP, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
257+ Address(fromBase58String(aQ[1]))
256258 }
257259
258260
259-func aQ (ao) = {
260- let ap = ao
261- if ($isInstanceOf(ap, "ByteVector"))
261+func aR (ap) = {
262+ let aq = ap
263+ if ($isInstanceOf(aq, "ByteVector"))
262264 then {
263- let aq = ap
264- toBase58String(aq)
265+ let ar = aq
266+ toBase58String(ar)
265267 }
266- else if ($isInstanceOf(ap, "Unit"))
268+ else if ($isInstanceOf(aq, "Unit"))
267269 then {
268- let ar = ap
270+ let as = aq
269271 "WAVES"
270272 }
271273 else throw("Not Asset id")
272274 }
273275
274276
275-func aR (ao) = if ((ao == "WAVES"))
277+func aS (ap) = if ((ap == "WAVES"))
276278 then unit
277- else fromBase58String(ao)
279+ else fromBase58String(ap)
278280
279281
280-func aS (ao) = if ((ao == "WAVES"))
282+func aT (ap) = if ((ap == "WAVES"))
281283 then 8
282284 else {
283- let ap = assetInfo(fromBase58String(ao))
284- if ($isInstanceOf(ap, "Asset"))
285+ let aq = assetInfo(fromBase58String(ap))
286+ if ($isInstanceOf(aq, "Asset"))
285287 then {
286- let aT = ap
287- aT.decimals
288+ let aU = aq
289+ aU.decimals
288290 }
289291 else throw("Can't find asset")
290292 }
291293
292294
293-func aU (ao) = pow(10, 0, aS(ao), 0, 0, DOWN)
295+func aV (ap) = pow(10, 0, aT(ap), 0, 0, DOWN)
294296
295297
296-func aV (aW) = {
297- func aX (aY,ao) = {
298- let aZ = ( let aw = invoke(ad, "getTWAP60", [ao, false], nil)
299- if ($isInstanceOf(aw, "(Int, Int)"))
300- then aw
301- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
302- (aY :+ aZ)
298+func aW (aX) = {
299+ func aY (aZ,ap) = {
300+ let ba = getIntegerValue(ae, (ap + R))
301+ (aZ :+ ba)
303302 }
304303
305- let ba = aW
306- let bb = size(ba)
307- let bc = nil
308- func bd (be,bf) = if ((bf >= bb))
309- then be
310- else aX(be, ba[bf])
304+ let bb = aX
305+ let bc = size(bb)
306+ let bd = nil
307+ func be (bf,bg) = if ((bg >= bc))
308+ then bf
309+ else aY(bf, bb[bg])
311310
312- func bg (be,bf) = if ((bf >= bb))
313- then be
311+ func bh (bf,bg) = if ((bg >= bc))
312+ then bf
314313 else throw("List size exceeds 50")
315314
316- bg(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
315+ bh(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(bd, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
317316 }
318317
319318
320-func bh (az) = {
321- let aG = valueOrErrorMessage(getString(this, (az + O)), "Can't find pool addr by share id")
322- let at = Address(fromBase58String(aG))
323- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
324- let bj = aC(at, bi)
325- let ax = bj._1
326- let ay = bj._2
327- let bk = bj._3
328- let bl = bj._4
329- let bm = ( let aw = invoke(ad, "getTWAP60", [ax, false], nil)
330- if ($isInstanceOf(aw, "(Int, Int)"))
331- then aw
332- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
333- let bn = ( let aw = invoke(ad, "getTWAP60", [ay, false], nil)
334- if ($isInstanceOf(aw, "(Int, Int)"))
335- then aw
336- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
337- let bo = aE(at, bi, az)
338- let bp = pow(10, 0, aS(ax), 0, 0, DOWN)
339- let bq = pow(10, 0, aS(ay), 0, 0, DOWN)
340- let br = pow(10, 0, aS(az), 0, 0, DOWN)
341- let bs = (fraction(bk, bm, bp) + fraction(bl, bn, bq))
342- fraction(bs, br, bo)
319+func bi (aA) = {
320+ let aH = valueOrErrorMessage(getString(this, (aA + O)), "Can't find pool addr by share id")
321+ let au = Address(fromBase58String(aH))
322+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
323+ let bk = aD(au, bj)
324+ let ay = bk._1
325+ let az = bk._2
326+ let bl = bk._3
327+ let bm = bk._4
328+ let bn = getIntegerValue(ae, (ay + R))
329+ let bo = getIntegerValue(ae, (az + R))
330+ let bp = aF(au, bj, aA)
331+ let bq = pow(10, 0, aT(ay), 0, 0, DOWN)
332+ let br = pow(10, 0, aT(az), 0, 0, DOWN)
333+ let bs = pow(10, 0, aT(aA), 0, 0, DOWN)
334+ let bt = (fraction(bl, bn, bq) + fraction(bm, bo, br))
335+ fraction(bt, bs, bp)
343336 }
344337
345338
346-func bt (bu) = {
347- func aX (aY,az) = (aY :+ bh(az))
339+func bu (bv) = {
340+ func aY (aZ,aA) = (aZ :+ bi(aA))
348341
349- let ba = bu
350- let bb = size(ba)
351- let bc = nil
352- func bd (be,bf) = if ((bf >= bb))
353- then be
354- else aX(be, ba[bf])
342+ let bb = bv
343+ let bc = size(bb)
344+ let bd = nil
345+ func be (bf,bg) = if ((bg >= bc))
346+ then bf
347+ else aY(bf, bb[bg])
355348
356- func bg (be,bf) = if ((bf >= bb))
357- then be
349+ func bh (bf,bg) = if ((bg >= bc))
350+ then bf
358351 else throw("List size exceeds 20")
359352
360- bg(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
353+ bh(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(bd, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
361354 }
362355
363356
364-func bv (ax,ay,az) = {
365- let bw = aV([ax, ay])
366- let bx = bh(az)
367- let by = [toString(bw[0]), toString(bw[1]), toString(bx)]
368-[StringEntry(Q, makeString(by, ","))]
357+func bw (ay,az,aA) = {
358+ let bx = aW([ay, az])
359+ let by = bi(aA)
360+ let bz = [toString(bx[0]), toString(bx[1]), toString(by)]
361+[StringEntry(Q, makeString(bz, ","))]
369362 }
370363
371364
372-func bz (bi,at,bA,ax,bB,ay,aA,aB) = if ((bi == a))
365+func bA (bj,au,bB,ay,bC,az,aB,aC) = if ((bj == a))
373366 then {
374- let bC = {
375- let aw = invoke(at, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(bA), toString(bB)]], nil)
376- if ($isInstanceOf(aw, "List[Any]"))
377- then aw
378- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
367+ let bD = {
368+ let ax = invoke(au, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(bB), toString(bC)]], nil)
369+ if ($isInstanceOf(ax, "List[Any]"))
370+ then ax
371+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
379372 }
380- if ((bC == bC))
373+ if ((bD == bD))
381374 then $Tuple5({
382- let aw = bC[3]
383- if ($isInstanceOf(aw, "Int"))
384- then aw
385- else throw(($getType(aw) + " couldn't be cast to Int"))
375+ let ax = bD[3]
376+ if ($isInstanceOf(ax, "Int"))
377+ then ax
378+ else throw(($getType(ax) + " couldn't be cast to Int"))
386379 }, {
387- let aw = bC[4]
388- if ($isInstanceOf(aw, "Int"))
389- then aw
390- else throw(($getType(aw) + " couldn't be cast to Int"))
380+ let ax = bD[4]
381+ if ($isInstanceOf(ax, "Int"))
382+ then ax
383+ else throw(($getType(ax) + " couldn't be cast to Int"))
391384 }, {
392- let aw = bC[1]
393- if ($isInstanceOf(aw, "Int"))
394- then aw
395- else throw(($getType(aw) + " couldn't be cast to Int"))
396- }, aQ(bC[2]), {
397- let aw = bC[0]
398- if ($isInstanceOf(aw, "Int"))
399- then aw
400- else throw(($getType(aw) + " couldn't be cast to Int"))
385+ let ax = bD[1]
386+ if ($isInstanceOf(ax, "Int"))
387+ then ax
388+ else throw(($getType(ax) + " couldn't be cast to Int"))
389+ }, aR(bD[2]), {
390+ let ax = bD[0]
391+ if ($isInstanceOf(ax, "Int"))
392+ then ax
393+ else throw(($getType(ax) + " couldn't be cast to Int"))
401394 })
402395 else throw("Strict value is not equal to itself.")
403396 }
404397 else {
405- let bD = $Tuple2(split({
406- let aw = invoke(at, "evaluatePutByAmountAssetREADONLY", [bA], nil)
407- if ($isInstanceOf(aw, "String"))
408- then aw
409- else throw(($getType(aw) + " couldn't be cast to String"))
398+ let bE = $Tuple2(split({
399+ let ax = invoke(au, "evaluatePutByAmountAssetREADONLY", [bB], nil)
400+ if ($isInstanceOf(ax, "String"))
401+ then ax
402+ else throw(($getType(ax) + " couldn't be cast to String"))
410403 }, "__"), split({
411- let aw = invoke(at, "evaluatePutByPriceAssetREADONLY", [bB], nil)
412- if ($isInstanceOf(aw, "String"))
413- then aw
414- else throw(($getType(aw) + " couldn't be cast to String"))
404+ let ax = invoke(au, "evaluatePutByPriceAssetREADONLY", [bC], nil)
405+ if ($isInstanceOf(ax, "String"))
406+ then ax
407+ else throw(($getType(ax) + " couldn't be cast to String"))
415408 }, "__"))
416- if ((bD == bD))
409+ if ((bE == bE))
417410 then {
418- let bE = bD._2
419- let bF = bD._1
420- let bG = parseIntValue(bF[1])
421- let bH = parseIntValue(bE[1])
422- if ((bH > bG))
411+ let bF = bE._2
412+ let bG = bE._1
413+ let bH = parseIntValue(bG[1])
414+ let bI = parseIntValue(bF[1])
415+ if ((bI > bH))
423416 then {
424- let bI = parseIntValue(bF[8])
425- $Tuple5(bA, bI, (bB - bI), ay, bH)
417+ let bJ = parseIntValue(bG[8])
418+ $Tuple5(bB, bJ, (bC - bJ), az, bI)
426419 }
427420 else {
428- let bI = parseIntValue(bF[8])
429- $Tuple5(bI, bB, (bA - bI), ax, bG)
421+ let bJ = parseIntValue(bG[8])
422+ $Tuple5(bJ, bC, (bB - bJ), ay, bH)
430423 }
431424 }
432425 else throw("Strict value is not equal to itself.")
433426 }
434427
435428
436-func bJ (at,bi,bA,ax,bB,ay) = {
437- let bK = [AttachedPayment(aR(ax), bA), AttachedPayment(aR(ay), bB)]
438- if ((bi == a))
439- then invoke(at, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bK)
440- else invoke(at, "put", [1000000, false], bK)
429+func bK (au,bj,bB,ay,bC,az) = {
430+ let bL = [AttachedPayment(aS(ay), bB), AttachedPayment(aS(az), bC)]
431+ if ((bj == a))
432+ then invoke(au, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bL)
433+ else invoke(au, "put", [1000000, false], bL)
441434 }
442435
443436
444-func bL (at,bi,bI,bM) = {
445- let bK = [AttachedPayment(aR(bM), bI)]
446- if ((bi == a))
447- then invoke(at, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], bK)
448- else invoke(at, "putOneTkn", [0, false], bK)
437+func bM (au,bj,bJ,bN) = {
438+ let bL = [AttachedPayment(aS(bN), bJ)]
439+ if ((bj == a))
440+ then invoke(au, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], bL)
441+ else invoke(au, "putOneTkn", [0, false], bL)
449442 }
450443
451444
452-func bN (aG,bi,az,bO) = {
453- let bK = [AttachedPayment(fromBase58String(az), bO)]
454- if ((bi == a))
455- then invoke(aM(), "lockShareTokens", [aG, 0], bK)
456- else invoke(aN(addressFromStringValue(aG)), "stake", nil, bK)
445+func bO (aH,bj,aA,bP) = {
446+ let bL = [AttachedPayment(fromBase58String(aA), bP)]
447+ if ((bj == a))
448+ then invoke(aN(), "lockShareTokens", [aH, 0], bL)
449+ else invoke(aO(addressFromStringValue(aH)), "stake", nil, bL)
457450 }
458451
459452
460-func bP (aG,bi,az,bO) = {
461- let bQ = if ((bi == a))
462- then $Tuple3(aM(), "withdrawShareTokens", [aG, bO])
463- else if ((bi == b))
464- then $Tuple3(aN(Address(fromBase58String(aG))), "unstake", [az, bO])
453+func bQ (aH,bj,aA,bP) = {
454+ let bR = if ((bj == a))
455+ then $Tuple3(aN(), "withdrawShareTokens", [aH, bP])
456+ else if ((bj == b))
457+ then $Tuple3(aO(Address(fromBase58String(aH))), "unstake", [aA, bP])
465458 else throw("Wrong pool type")
466- let bR = bQ._1
467- let bS = bQ._2
468- let bT = bQ._3
469- let bU = invoke(bR, bS, bT, nil)
470- if ((bU == bU))
471- then bO
459+ let bS = bR._1
460+ let bT = bR._2
461+ let bU = bR._3
462+ let bV = invoke(bS, bT, bU, nil)
463+ if ((bV == bV))
464+ then bP
472465 else throw("Strict value is not equal to itself.")
473466 }
474467
475468
476-func bV (aG,bW,bX,aA,aB,bY,bZ) = {
477- let at = Address(fromBase58String(aG))
478- let ca = 1000000
479- let cb = getIntegerValue(at, t)
480- let cc = fraction(bY, ca, (ca - cb))
481- let cd = if ((bZ == bW))
469+func bW (aH,bX,bY,aB,aC,bZ,ca) = {
470+ let au = Address(fromBase58String(aH))
471+ let cb = 1000000
472+ let cc = getIntegerValue(au, t)
473+ let cd = fraction(bZ, cb, (cb - cc))
474+ let ce = if ((ca == bX))
482475 then {
483- let ce = fraction(cc, aB, (aA - cc))
484- $Tuple2(ce, bX)
476+ let cf = fraction(cd, aC, (aB - cd))
477+ $Tuple2(cf, bY)
485478 }
486479 else {
487- let ce = fraction(cc, aA, (aB - cc))
488- $Tuple2(ce, bW)
480+ let cf = fraction(cd, aB, (aC - cd))
481+ $Tuple2(cf, bX)
489482 }
490- let ce = cd._1
491- let cf = cd._2
492- $Tuple2(cf, ce)
483+ let cf = ce._1
484+ let cg = ce._2
485+ $Tuple2(cg, cf)
493486 }
494487
495488
496-func cg (aG,bW,bX,aA,aB,bY,bZ) = {
497- let ch = getIntegerValue(ae, "%s__protocolFee")
498- let ci = getIntegerValue(ae, "%s__poolFee")
499- let cj = toBigInt(100000000)
500- let ck = if ((bZ == bW))
489+func ch (aH,bX,bY,aB,aC,bZ,ca) = {
490+ let ci = getIntegerValue(af, "%s__protocolFee")
491+ let cj = getIntegerValue(af, "%s__poolFee")
492+ let ck = toBigInt(100000000)
493+ let cl = if ((ca == bX))
501494 then {
502- let ce = fraction(bY, aB, (aA - bY))
503- $Tuple2(ce, bX)
495+ let cf = fraction(bZ, aC, (aB - bZ))
496+ $Tuple2(cf, bY)
504497 }
505498 else {
506- let ce = fraction(bY, aA, (aB - bY))
507- $Tuple2(ce, bW)
499+ let cf = fraction(bZ, aB, (aC - bZ))
500+ $Tuple2(cf, bX)
508501 }
509- let ce = ck._1
510- let cf = ck._2
511- let cl = toInt(fraction(toBigInt(ce), cj, (cj - toBigInt((ch + ci))), CEILING))
512- $Tuple2(cf, fraction(cl, 102, 100))
502+ let cf = cl._1
503+ let cg = cl._2
504+ let cm = toInt(fraction(toBigInt(cf), ck, (ck - toBigInt((ci + cj))), CEILING))
505+ $Tuple2(cg, fraction(cm, 102, 100))
513506 }
514507
515508
516-func cm (aD,aG,bW,bX,aA,aB,bY,bZ) = if ((aD == a))
509+func cn (aE,aH,bX,bY,aB,aC,bZ,ca) = if ((aE == a))
517510 then {
518- let cn = bV(aG, bW, bX, aA, aB, bY, bZ)
519- let cf = cn._1
520- let ce = cn._2
521- invoke(addressFromStringValue(aG), "callFunction", ["exchange", [toString(bY)]], [AttachedPayment(aR(cf), ce)])
511+ let co = bW(aH, bX, bY, aB, aC, bZ, ca)
512+ let cg = co._1
513+ let cf = co._2
514+ invoke(addressFromStringValue(aH), "callFunction", ["exchange", [toString(bZ)]], [AttachedPayment(aS(cg), cf)])
522515 }
523516 else {
524- let co = cg(aG, bW, bX, aA, aB, bY, bZ)
525- let cf = co._1
526- let ce = co._2
527- invoke(ae, "swap", [bY, bZ, toString(this)], [AttachedPayment(aR(cf), ce)])
517+ let cp = ch(aH, bX, bY, aB, aC, bZ, ca)
518+ let cg = cp._1
519+ let cf = cp._2
520+ invoke(af, "swap", [bZ, ca, toString(this)], [AttachedPayment(aS(cg), cf)])
528521 }
529522
530523
531-func cp (bi,aG,bA,ax,bB,ay,aA,aB) = {
532- let at = addressFromStringValue(aG)
533- if ((bi == a))
524+func cq (bj,aH,bB,ay,bC,az,aB,aC) = {
525+ let au = addressFromStringValue(aH)
526+ if ((bj == a))
534527 then {
535- let bU = {
536- let aw = invoke(at, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(bA), toString(bB), "0"]], nil)
537- if ($isInstanceOf(aw, "List[Any]"))
538- then aw
539- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
528+ let bV = {
529+ let ax = invoke(au, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(bB), toString(bC), "0"]], nil)
530+ if ($isInstanceOf(ax, "List[Any]"))
531+ then ax
532+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
540533 }
541- if ((bU == bU))
534+ if ((bV == bV))
542535 then $Tuple2({
543- let aw = bU[0]
544- if ($isInstanceOf(aw, "Int"))
545- then aw
546- else throw(($getType(aw) + " couldn't be cast to Int"))
536+ let ax = bV[0]
537+ if ($isInstanceOf(ax, "Int"))
538+ then ax
539+ else throw(($getType(ax) + " couldn't be cast to Int"))
547540 }, {
548- let aw = bU[1]
549- if ($isInstanceOf(aw, "Int"))
550- then aw
551- else throw(($getType(aw) + " couldn't be cast to Int"))
541+ let ax = bV[1]
542+ if ($isInstanceOf(ax, "Int"))
543+ then ax
544+ else throw(($getType(ax) + " couldn't be cast to Int"))
552545 })
553546 else throw("Strict value is not equal to itself.")
554547 }
555- else if ((bi == b))
548+ else if ((bj == b))
556549 then {
557- let cq = if (if ((bA > 0))
558- then (bB > 0)
550+ let cr = if (if ((bB > 0))
551+ then (bC > 0)
559552 else false)
560553 then {
561- let cr = bz(bi, at, bA, ax, bB, ay, aA, aB)
562- let cs = cr._1
563- let ct = cr._2
564- let cu = cr._3
565- let cv = cr._4
566- let cw = cr._5
567- $Tuple3(cu, cv, cw)
554+ let cs = bA(bj, au, bB, ay, bC, az, aB, aC)
555+ let ct = cs._1
556+ let cu = cs._2
557+ let cv = cs._3
558+ let cw = cs._4
559+ let cx = cs._5
560+ $Tuple3(cv, cw, cx)
568561 }
569- else if ((bA > 0))
570- then $Tuple3(bA, ax, 0)
571- else $Tuple3(bB, ay, 0)
572- let cu = cq._1
573- let cv = cq._2
574- let cx = cq._3
575- let cy = if ((cu > 0))
562+ else if ((bB > 0))
563+ then $Tuple3(bB, ay, 0)
564+ else $Tuple3(bC, az, 0)
565+ let cv = cr._1
566+ let cw = cr._2
567+ let cy = cr._3
568+ let cz = if ((cv > 0))
576569 then {
577- let bU = {
578- let aw = invoke(at, "putOneTknREADONLY", [cv, cu], nil)
579- if ($isInstanceOf(aw, "(Int, Int, Int)"))
580- then aw
581- else throw(($getType(aw) + " couldn't be cast to (Int, Int, Int)"))
570+ let bV = {
571+ let ax = invoke(au, "putOneTknREADONLY", [cw, cv], nil)
572+ if ($isInstanceOf(ax, "(Int, Int, Int)"))
573+ then ax
574+ else throw(($getType(ax) + " couldn't be cast to (Int, Int, Int)"))
582575 }
583- if ((bU == bU))
584- then $Tuple2(bU._1, bU._3)
576+ if ((bV == bV))
577+ then $Tuple2(bV._1, bV._3)
585578 else throw("Strict value is not equal to itself.")
586579 }
587580 else $Tuple2(0, 0)
588- let cz = cy._1
589- let cA = cy._2
590- $Tuple2((cx + cz), cA)
581+ let cA = cz._1
582+ let cB = cz._2
583+ $Tuple2((cy + cA), cB)
591584 }
592585 else throw("Wrong pool type")
593586 }
594587
595588
596-func cB (bi,aG,cw,az,ax,ay,aA,aB,cC,cD) = {
597- let at = addressFromStringValue(aG)
598- let cE = if ((bi == a))
589+func cC (bj,aH,cx,aA,ay,az,aB,aC,cD,cE) = {
590+ let au = addressFromStringValue(aH)
591+ let cF = if ((bj == a))
599592 then {
600- let bU = {
601- let aw = invoke(at, "callFunction", ["withdrawREADONLY", [toString(cw), toString(aA), toString(aB)]], nil)
602- if ($isInstanceOf(aw, "List[Any]"))
603- then aw
604- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
593+ let bV = {
594+ let ax = invoke(au, "callFunction", ["withdrawREADONLY", [toString(cx), toString(aB), toString(aC)]], nil)
595+ if ($isInstanceOf(ax, "List[Any]"))
596+ then ax
597+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
605598 }
606- if ((bU == bU))
599+ if ((bV == bV))
607600 then $Tuple2({
608- let aw = bU[0]
609- if ($isInstanceOf(aw, "Int"))
610- then aw
611- else throw(($getType(aw) + " couldn't be cast to Int"))
601+ let ax = bV[0]
602+ if ($isInstanceOf(ax, "Int"))
603+ then ax
604+ else throw(($getType(ax) + " couldn't be cast to Int"))
612605 }, {
613- let aw = bU[1]
614- if ($isInstanceOf(aw, "Int"))
615- then aw
616- else throw(($getType(aw) + " couldn't be cast to Int"))
606+ let ax = bV[1]
607+ if ($isInstanceOf(ax, "Int"))
608+ then ax
609+ else throw(($getType(ax) + " couldn't be cast to Int"))
617610 })
618611 else throw("Strict value is not equal to itself.")
619612 }
620- else if ((bi == b))
613+ else if ((bj == b))
621614 then {
622- let cF = split({
623- let aw = invoke(at, "evaluateGetREADONLY", [az, cw], nil)
624- if ($isInstanceOf(aw, "String"))
625- then aw
626- else throw(($getType(aw) + " couldn't be cast to String"))
615+ let cG = split({
616+ let ax = invoke(au, "evaluateGetREADONLY", [aA, cx], nil)
617+ if ($isInstanceOf(ax, "String"))
618+ then ax
619+ else throw(($getType(ax) + " couldn't be cast to String"))
627620 }, "__")
628- if ((cF == cF))
629- then $Tuple2(parseIntValue(cF[1]), parseIntValue(cF[2]))
621+ if ((cG == cG))
622+ then $Tuple2(parseIntValue(cG[1]), parseIntValue(cG[2]))
630623 else throw("Strict value is not equal to itself.")
631624 }
632625 else throw("Wrong pool type")
633- let cG = cE._1
634- let cH = cE._2
635- if ((cC > 0))
626+ let cH = cF._1
627+ let cI = cF._2
628+ if ((cD > 0))
636629 then {
637- let cI = if (if ((cD == ax))
638- then (cC > cG)
630+ let cJ = if (if ((cE == ay))
631+ then (cD > cH)
639632 else false)
640- then (cC - cG)
641- else if (if ((cD == ay))
642- then (cC > cH)
633+ then (cD - cH)
634+ else if (if ((cE == az))
635+ then (cD > cI)
643636 else false)
644- then (cC - cH)
637+ then (cD - cI)
645638 else 0
646- let cJ = if ((cI > 0))
647- then if ((bi == a))
648- then bV(aG, ax, ay, aA, aB, cI, cD)
649- else cg(aG, ax, ay, aA, aB, cI, cD)
639+ let cK = if ((cJ > 0))
640+ then if ((bj == a))
641+ then bW(aH, ay, az, aB, aC, cJ, cE)
642+ else ch(aH, ay, az, aB, aC, cJ, cE)
650643 else $Tuple2("", 0)
651- let cf = cJ._1
652- let ce = cJ._2
653- if ((cD == ax))
654- then $Tuple2(((cG + cI) - cC), (cH - ce))
655- else $Tuple2((cG - ce), ((cH + cI) - cC))
644+ let cg = cK._1
645+ let cf = cK._2
646+ if ((cE == ay))
647+ then $Tuple2(((cH + cJ) - cD), (cI - cf))
648+ else $Tuple2((cH - cf), ((cI + cJ) - cD))
656649 }
657- else $Tuple2(cG, cH)
650+ else $Tuple2(cH, cI)
658651 }
659652
660653
661-func cK (aD,aG) = if ((aD == a))
654+func cL (aE,aH) = if ((aE == a))
662655 then {
663- let cL = an(af)
664- if ((cL == cL))
656+ let cM = ao(ag)
657+ if ((cM == cM))
665658 then {
666- let bU = invoke(aM(), "claim", [aG], nil)
667- if ((bU == bU))
659+ let bV = invoke(aN(), "claim", [aH], nil)
660+ if ((bV == bV))
668661 then {
669- let cM = an(af)
670- $Tuple2((cM - cL), af)
662+ let cN = ao(ag)
663+ $Tuple2((cN - cM), ag)
671664 }
672665 else throw("Strict value is not equal to itself.")
673666 }
674667 else throw("Strict value is not equal to itself.")
675668 }
676- else if ((aD == b))
669+ else if ((aE == b))
677670 then {
678- let cL = an(ag)
679- if ((cL == cL))
671+ let cM = ao(ah)
672+ if ((cM == cM))
680673 then {
681- let bU = invoke(aN(Address(fromBase58String(aG))), "claimWX", [aG], nil)
682- if ((bU == bU))
674+ let bV = invoke(aO(Address(fromBase58String(aH))), "claimWX", [aH], nil)
675+ if ((bV == bV))
683676 then {
684- let cM = an(ag)
685- $Tuple2((cM - cL), ag)
677+ let cN = ao(ah)
678+ $Tuple2((cN - cM), ah)
686679 }
687680 else throw("Strict value is not equal to itself.")
688681 }
691684 else throw("Wrong pool type")
692685
693686
694-func cN (bi,aG,aL,bA,ax,bB,ay,aA,aB,cO) = {
695- let cP = an(fromBase58String(cO))
696- if ((cP == cP))
687+func cO (bj,aH,aM,bB,ay,bC,az,aB,aC,cP) = {
688+ let cQ = ao(fromBase58String(cP))
689+ if ((cQ == cQ))
697690 then {
698- let at = addressFromStringValue(aG)
699- let cQ = if (if ((bA > 0))
700- then (bB > 0)
691+ let au = addressFromStringValue(aH)
692+ let cR = if (if ((bB > 0))
693+ then (bC > 0)
701694 else false)
702695 then {
703- let cR = bz(bi, at, bA, ax, bB, ay, aA, aB)
704- let cs = cR._1
705- let ct = cR._2
706- let cu = cR._3
707- let cv = cR._4
708- let bU = bJ(at, bi, cs, ax, ct, ay)
709- if ((bU == bU))
710- then $Tuple2(cu, cv)
696+ let cS = bA(bj, au, bB, ay, bC, az, aB, aC)
697+ let ct = cS._1
698+ let cu = cS._2
699+ let cv = cS._3
700+ let cw = cS._4
701+ let bV = bK(au, bj, ct, ay, cu, az)
702+ if ((bV == bV))
703+ then $Tuple2(cv, cw)
711704 else throw("Strict value is not equal to itself.")
712705 }
713- else if ((bA > 0))
714- then $Tuple2(bA, ax)
715- else if ((bB > 0))
716- then $Tuple2(bB, ay)
706+ else if ((bB > 0))
707+ then $Tuple2(bB, ay)
708+ else if ((bC > 0))
709+ then $Tuple2(bC, az)
717710 else throw("pmts must be > 0")
718- let cu = cQ._1
719- let cv = cQ._2
720- let bU = if ((cu > 0))
721- then bL(at, bi, cu, cv)
711+ let cv = cR._1
712+ let cw = cR._2
713+ let bV = if ((cv > 0))
714+ then bM(au, bj, cv, cw)
722715 else nil
723- if ((bU == bU))
716+ if ((bV == bV))
724717 then {
725- let cS = an(fromBase58String(cO))
726- let cT = (cS - cP)
727- let cU = fraction(cT, aK(aG, aL), m)
728- let cV = (cT - cU)
729- if ((0 >= cV))
718+ let cT = ao(fromBase58String(cP))
719+ let cU = (cT - cQ)
720+ let cV = fraction(cU, aL(aH, aM), m)
721+ let cW = (cU - cV)
722+ if ((0 >= cW))
730723 then throw("amount of staked sharetokens must be > 0")
731724 else {
732- let cW = bN(aG, bi, cO, cV)
733- if ((cW == cW))
734- then $Tuple2(cV, cU)
725+ let cX = bO(aH, bj, cP, cW)
726+ if ((cX == cX))
727+ then $Tuple2(cW, cV)
735728 else throw("Strict value is not equal to itself.")
736729 }
737730 }
741734 }
742735
743736
744-func cX (aG,aJ,cY,cU,cZ,az,aD,da) = {
745- let db = aF(aG)
746- let dc = aH(aG)
747- let dd = if (da)
748- then $Tuple2(getIntegerValue(this, (aG + C)), (dc + cY))
749- else $Tuple2(getIntegerValue(this, (aG + D)), dc)
750- let de = dd._1
751- let df = dd._2
752-[IntegerEntry((aG + A), (db + cY)), IntegerEntry((aG + B), df), IntegerEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + u), cY), IntegerEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + z), de), StringEntry((((aJ + "_") + toString(cZ)) + v), aG), IntegerEntry((aJ + y), cZ), ScriptTransfer(ab, cU, fromBase58String(az))]
737+func cY (aH,aK,cZ,cV,da,aA,aE,db) = {
738+ let dc = aG(aH)
739+ let dd = aI(aH)
740+ let de = if (db)
741+ then $Tuple2(getIntegerValue(this, (aH + C)), (dd + cZ))
742+ else $Tuple2(getIntegerValue(this, (aH + D)), dd)
743+ let df = de._1
744+ let dg = de._2
745+[IntegerEntry((aH + A), (dc + cZ)), IntegerEntry((aH + B), dg), IntegerEntry((((((aH + "_") + aK) + "_") + toString(da)) + u), cZ), IntegerEntry((((((aH + "_") + aK) + "_") + toString(da)) + z), df), StringEntry((((aK + "_") + toString(da)) + v), aH), IntegerEntry((aK + y), da), ScriptTransfer(ac, cV, fromBase58String(aA))]
753746 }
754747
755748
756-func dg (dh,di,dj,dk,dl,dm,dn,do,dp,dq) = {
757- let dr = an(aR(dh))
758- if ((dr == dr))
749+func dh (di,dj,dk,dl,dm,dn,do,dp,dq,dr) = {
750+ let ds = ao(aS(di))
751+ if ((ds == ds))
759752 then {
760- let bU = invoke(ac, "swap", [dk, dl, dm, dn, do, dp, dq], [AttachedPayment(dj, di)])
761- if ((bU == bU))
762- then (an(aR(dh)) - dr)
753+ let bV = invoke(ad, "swap", [dl, dm, dn, do, dp, dq, dr], [AttachedPayment(dk, dj)])
754+ if ((bV == bV))
755+ then (ao(aS(di)) - ds)
763756 else throw("Strict value is not equal to itself.")
764757 }
765758 else throw("Strict value is not equal to itself.")
766759 }
767760
768761
769-func ds (dh,di,dj,dt,du,dq) = {
770- let dr = an(aR(dh))
771- if ((dr == dr))
762+func dt (di,dj,dk,du,dv,dr) = {
763+ let ds = ao(aS(di))
764+ if ((ds == ds))
772765 then {
773- let bU = invoke(ac, "puzzleSwap", [dt, du, dq], [AttachedPayment(dj, di)])
774- if ((bU == bU))
775- then (an(aR(dh)) - dr)
766+ let bV = invoke(ad, "puzzleSwap", [du, dv, dr], [AttachedPayment(dk, dj)])
767+ if ((bV == bV))
768+ then (ao(aS(di)) - ds)
776769 else throw("Strict value is not equal to itself.")
777770 }
778771 else throw("Strict value is not equal to itself.")
779772 }
780773
781774
782-func dv (dh,di,dj,dw,dx,dy,dz,dA,dB,dq) = {
783- let dr = an(aR(dh))
784- if ((dr == dr))
775+func dw (di,dj,dk,dx,dy,dz,dA,dB,dC,dr) = {
776+ let ds = ao(aS(di))
777+ if ((ds == ds))
785778 then {
786- let bU = invoke(ac, "swopfiSwap", [dw, dx, dy, dz, dA, dB, dq], [AttachedPayment(dj, di)])
787- if ((bU == bU))
788- then (an(aR(dh)) - dr)
779+ let bV = invoke(ad, "swopfiSwap", [dx, dy, dz, dA, dB, dC, dr], [AttachedPayment(dk, dj)])
780+ if ((bV == bV))
781+ then (ao(aS(di)) - ds)
789782 else throw("Strict value is not equal to itself.")
790783 }
791784 else throw("Strict value is not equal to itself.")
792785 }
793786
794787
795-func dC (aG,bi,dD,dE) = {
796- let at = Address(fromBase58String(aG))
797- let dF = aC(at, bi)
798- let dG = dF._1
799- let dH = dF._2
800- let aA = dF._3
801- let aB = dF._4
802- let az = dF._5
803- if (if ((dD != dG))
804- then (dD != dH)
788+func dD (aH,bj,dE,dF) = {
789+ let au = Address(fromBase58String(aH))
790+ let dG = aD(au, bj)
791+ let dH = dG._1
792+ let dI = dG._2
793+ let aB = dG._3
794+ let aC = dG._4
795+ let aA = dG._5
796+ if (if ((dE != dH))
797+ then (dE != dI)
805798 else false)
806799 then throw("Wrong asset")
807800 else {
808- let dI = if ((dD == dG))
809- then $Tuple2(dE, 0)
810- else $Tuple2(0, dE)
811- let bA = dI._1
812- let bB = dI._2
813- let dJ = cN(bi, aG, i, bA, dG, bB, dH, aA, aB, az)
814- let cY = dJ._1
815- let dK = dJ._2
816- let dL = valueOrElse(getInteger(this, (aG + C)), 0)
817- let dM = valueOrElse(getInteger(this, (aG + D)), 0)
818- let dN = aF(aG)
819- let dO = aH(aG)
820- let dP = fraction(dO, j, dN)
821- let dQ = fraction(cY, dP, j)
822- let dR = (cY - dQ)
823- let dS = if ((dO > 0))
824- then (dL + fraction(dQ, k, dO))
801+ let dJ = if ((dE == dH))
802+ then $Tuple2(dF, 0)
803+ else $Tuple2(0, dF)
804+ let bB = dJ._1
805+ let bC = dJ._2
806+ let dK = cO(bj, aH, i, bB, dH, bC, dI, aB, aC, aA)
807+ let cZ = dK._1
808+ let dL = dK._2
809+ let dM = valueOrElse(getInteger(this, (aH + C)), 0)
810+ let dN = valueOrElse(getInteger(this, (aH + D)), 0)
811+ let dO = aG(aH)
812+ let dP = aI(aH)
813+ let dQ = fraction(dP, j, dO)
814+ let dR = fraction(cZ, dQ, j)
815+ let dS = (cZ - dR)
816+ let dT = if ((dP > 0))
817+ then (dM + fraction(dR, k, dP))
825818 else 0
826- let dT = if (((dN - dO) > 0))
827- then (dM + fraction(dR, k, (dN - dO)))
819+ let dU = if (((dO - dP) > 0))
820+ then (dN + fraction(dS, k, (dO - dP)))
828821 else 0
829- let dU = fraction(dQ, aK(aG, d), m)
830- let dV = fraction(dR, aK(aG, c), m)
831- let dW = bP(aG, bi, az, (dU + dV))
832- if ((dW == dW))
833- then ([IntegerEntry((aG + C), dS), IntegerEntry((aG + D), dT), IntegerEntry((aG + A), ((dN + cY) - dW)), IntegerEntry((aG + B), ((dO + dQ) - dU)), ScriptTransfer(ab, (dU + dV), fromBase58String(az))] ++ bv(dG, dH, az))
822+ let dV = fraction(dR, aL(aH, d), m)
823+ let dW = fraction(dS, aL(aH, c), m)
824+ let dX = bQ(aH, bj, aA, (dV + dW))
825+ if ((dX == dX))
826+ then ([IntegerEntry((aH + C), dT), IntegerEntry((aH + D), dU), IntegerEntry((aH + A), ((dO + cZ) - dX)), IntegerEntry((aH + B), ((dP + dR) - dV)), ScriptTransfer(ac, (dV + dW), fromBase58String(aA))] ++ bw(dH, dI, aA))
834827 else throw("Strict value is not equal to itself.")
835828 }
836829 }
837830
838831
839-func dX (aG,dY,dZ,ea) = {
840- let at = Address(fromBase58String(aG))
841- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Unknown pool")
842- let eb = aC(at, bi)
843- let bW = eb._1
844- let bX = eb._2
845- let aA = eb._3
846- let aB = eb._4
847- let az = eb._5
848- let ec = an(aR(bW))
849- if ((ec == ec))
832+func dY (aH,dZ,ea,eb) = {
833+ let au = Address(fromBase58String(aH))
834+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Unknown pool")
835+ let ec = aD(au, bj)
836+ let bX = ec._1
837+ let bY = ec._2
838+ let aB = ec._3
839+ let aC = ec._4
840+ let aA = ec._5
841+ let ed = ao(aS(bX))
842+ if ((ed == ed))
850843 then {
851- let ed = an(aR(bX))
852- if ((ed == ed))
844+ let ee = ao(aS(bY))
845+ if ((ee == ee))
853846 then {
854- let bU = if ((bi == a))
855- then invoke(at, "callFunction", ["withdraw", [toString(dY)]], nil)
847+ let bV = if ((bj == a))
848+ then invoke(au, "callFunction", ["withdraw", [toString(dZ)]], nil)
856849 else {
857- let bU = bP(aG, bi, az, dY)
858- if ((bU == bU))
859- then invoke(at, "get", nil, [AttachedPayment(aR(az), dY)])
850+ let bV = bQ(aH, bj, aA, dZ)
851+ if ((bV == bV))
852+ then invoke(au, "get", nil, [AttachedPayment(aS(aA), dZ)])
860853 else throw("Strict value is not equal to itself.")
861854 }
862- if ((bU == bU))
855+ if ((bV == bV))
863856 then {
864- let ee = an(aR(bW))
865- let ef = an(aR(bX))
866- let eg = $Tuple2((ee - ec), (ef - ed))
867- let eh = eg._1
868- let ei = eg._2
869- let ej = if ((dZ > 0))
857+ let ef = ao(aS(bX))
858+ let eg = ao(aS(bY))
859+ let eh = $Tuple2((ef - ed), (eg - ee))
860+ let ei = eh._1
861+ let ej = eh._2
862+ let ek = if ((ea > 0))
870863 then {
871- let cI = if (if ((ea == bW))
872- then (dZ > eh)
864+ let cJ = if (if ((eb == bX))
865+ then (ea > ei)
873866 else false)
874- then (dZ - eh)
875- else if (if ((ea == bX))
876- then (dZ > ei)
867+ then (ea - ei)
868+ else if (if ((eb == bY))
869+ then (ea > ej)
877870 else false)
878- then (dZ - ei)
871+ then (ea - ej)
879872 else 0
880- let ek = if ((cI > 0))
881- then cm(bi, aG, bW, bX, aA, aB, cI, ea)
873+ let el = if ((cJ > 0))
874+ then cn(bj, aH, bX, bY, aB, aC, cJ, eb)
882875 else 0
883- if ((ek == ek))
876+ if ((el == el))
884877 then {
885- let el = an(aR(bW))
886- let em = an(aR(bX))
887- if ((ea == bW))
888- then $Tuple2(((el - ec) - dZ), (em - ed))
889- else $Tuple2((el - ec), ((em - ed) - dZ))
878+ let em = ao(aS(bX))
879+ let en = ao(aS(bY))
880+ if ((eb == bX))
881+ then $Tuple2(((em - ed) - ea), (en - ee))
882+ else $Tuple2((em - ed), ((en - ee) - ea))
890883 }
891884 else throw("Strict value is not equal to itself.")
892885 }
893- else $Tuple2(eh, ei)
894- let en = ej._1
895- let eo = ej._2
896- $Tuple7(en, bW, eo, bX, ee, ef, az)
886+ else $Tuple2(ei, ej)
887+ let eo = ek._1
888+ let ep = ek._2
889+ $Tuple7(eo, bX, ep, bY, ef, eg, aA)
897890 }
898891 else throw("Strict value is not equal to itself.")
899892 }
903896 }
904897
905898
906-func ep (aJ,aG,eq,er) = {
907- let es = valueOrErrorMessage(getInteger(this, (((((aG + "_") + aJ) + "_") + eq) + u)), "Unknown position")
908- let et = getIntegerValue(this, (((((aG + "_") + aJ) + "_") + eq) + z))
909- let eu = if (er)
910- then getIntegerValue(this, (aG + C))
911- else getIntegerValue(this, (aG + D))
912- (es + fraction(es, (eu - et), k))
899+func eq (aK,aH,er,es) = {
900+ let et = valueOrErrorMessage(getInteger(this, (((((aH + "_") + aK) + "_") + er) + u)), "Unknown position")
901+ let eu = getIntegerValue(this, (((((aH + "_") + aK) + "_") + er) + z))
902+ let ev = if (es)
903+ then getIntegerValue(this, (aH + C))
904+ else getIntegerValue(this, (aH + D))
905+ (et + fraction(et, (ev - eu), k))
913906 }
914907
915908
916-func ev (aJ,aG,eq,ew) = {
917- let es = valueOrErrorMessage(getInteger(this, (((((aG + "_") + aJ) + "_") + eq) + u)), "Unknown position")
918- let cC = valueOrElse(getInteger(this, (((((aG + "_") + aJ) + "_") + eq) + w)), 0)
919- let dY = ep(aJ, aG, eq, (cC > 0))
920- let ex = aF(aG)
921- let ey = Address(fromBase58String(aJ))
922- let ea = valueOrElse(getString(this, (((((aG + "_") + aJ) + "_") + eq) + x)), "")
923- let dZ = if ((cC > 0))
909+func ew (aK,aH,er,ex) = {
910+ let et = valueOrErrorMessage(getInteger(this, (((((aH + "_") + aK) + "_") + er) + u)), "Unknown position")
911+ let cD = valueOrElse(getInteger(this, (((((aH + "_") + aK) + "_") + er) + w)), 0)
912+ let dZ = eq(aK, aH, er, (cD > 0))
913+ let ey = aG(aH)
914+ let ez = Address(fromBase58String(aK))
915+ let eb = valueOrElse(getString(this, (((((aH + "_") + aK) + "_") + er) + x)), "")
916+ let ea = if ((cD > 0))
924917 then {
925- let aw = invoke(ah(), "getAssetDebt", [false, ((aJ + "_") + eq), ea], nil)
926- if ($isInstanceOf(aw, "Int"))
927- then aw
928- else throw(($getType(aw) + " couldn't be cast to Int"))
918+ let ax = invoke(ai(), "getAssetDebt", [false, ((aK + "_") + er), eb], nil)
919+ if ($isInstanceOf(ax, "Int"))
920+ then ax
921+ else throw(($getType(ax) + " couldn't be cast to Int"))
929922 }
930923 else 0
931- let ez = dX(aG, dY, dZ, ea)
932- if ((ez == ez))
924+ let eA = dY(aH, dZ, ea, eb)
925+ if ((eA == eA))
933926 then {
934- let az = ez._7
935- let ef = ez._6
936- let ee = ez._5
937- let bX = ez._4
938- let eA = ez._3
939- let bW = ez._2
940- let eB = ez._1
941- let eC = if ((dZ > 0))
942- then invoke(ah(), "repayFor", [((aJ + "_") + eq)], [AttachedPayment(aR(ea), dZ)])
927+ let aA = eA._7
928+ let eg = eA._6
929+ let ef = eA._5
930+ let bY = eA._4
931+ let eB = eA._3
932+ let bX = eA._2
933+ let eC = eA._1
934+ let eD = if ((ea > 0))
935+ then invoke(ai(), "repayFor", [((aK + "_") + er)], [AttachedPayment(aS(eb), ea)])
943936 else 0
944- if ((eC == eC))
945- then ([DeleteEntry((((((aG + "_") + aJ) + "_") + eq) + u)), DeleteEntry((((((aG + "_") + aJ) + "_") + eq) + z)), IntegerEntry((aG + A), (ex - dY)), ScriptTransfer(ey, eB, aR(bW)), ScriptTransfer(ey, eA, aR(bX))] ++ bv(bW, bX, az))
937+ if ((eD == eD))
938+ then ([DeleteEntry((((((aH + "_") + aK) + "_") + er) + u)), DeleteEntry((((((aH + "_") + aK) + "_") + er) + z)), IntegerEntry((aH + A), (ey - dZ)), ScriptTransfer(ez, eC, aS(bX)), ScriptTransfer(ez, eB, aS(bY))] ++ bw(bX, bY, aA))
946939 else throw("Strict value is not equal to itself.")
947940 }
948941 else throw("Strict value is not equal to itself.")
949942 }
950943
951944
952-func eD (eE) = {
953- let eF = split(valueOrErrorMessage(getString(this, (eE + L)), ("No request with id " + eE)), ",")
954- let aJ = eF[0]
955- let aG = eF[1]
956- let bA = parseIntValue(eF[2])
957- let dG = eF[3]
958- let bB = parseIntValue(eF[4])
959- let dH = eF[5]
960- let aA = parseIntValue(eF[6])
961- let aB = parseIntValue(eF[7])
962- let az = eF[8]
963- let eG = eF[9]
964- let eH = parseIntValue(eF[10])
965- $Tuple11(aJ, aG, bA, dG, bB, dH, aA, aB, az, eG, eH)
945+func eE (eF) = {
946+ let eG = split(valueOrErrorMessage(getString(this, (eF + L)), ("No request with id " + eF)), ",")
947+ let aK = eG[0]
948+ let aH = eG[1]
949+ let bB = parseIntValue(eG[2])
950+ let dH = eG[3]
951+ let bC = parseIntValue(eG[4])
952+ let dI = eG[5]
953+ let aB = parseIntValue(eG[6])
954+ let aC = parseIntValue(eG[7])
955+ let aA = eG[8]
956+ let eH = eG[9]
957+ let eI = parseIntValue(eG[10])
958+ $Tuple11(aK, aH, bB, dH, bC, dI, aB, aC, aA, eH, eI)
966959 }
967960
968961
969-func eI (bA,bB,ax,ay,eJ,eK) = {
970- let bm = ( let aw = invoke(ad, "getTWAP60", [ax, false], nil)
971- if ($isInstanceOf(aw, "(Int, Int)"))
972- then aw
973- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
974- let bn = ( let aw = invoke(ad, "getTWAP60", [ay, false], nil)
975- if ($isInstanceOf(aw, "(Int, Int)"))
976- then aw
977- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
978- let eL = pow(10, 0, aS(ax), 0, 0, DOWN)
979- let eM = pow(10, 0, aS(ay), 0, 0, DOWN)
980- let eN = (fraction(bm, bA, eL) + fraction(bn, bB, eM))
981- let eO = if ((eK == ax))
982- then $Tuple2(bm, eL)
983- else $Tuple2(bn, eM)
984- let eP = eO._1
985- let eQ = eO._2
986- fraction(fraction(eN, (eJ - 100), 100), eQ, eP)
962+func eJ (bB,bC,ay,az,eK,eL) = {
963+ let bn = getIntegerValue(ae, (ay + R))
964+ let bo = getIntegerValue(ae, (az + R))
965+ let eM = pow(10, 0, aT(ay), 0, 0, DOWN)
966+ let eN = pow(10, 0, aT(az), 0, 0, DOWN)
967+ let eO = (fraction(bn, bB, eM) + fraction(bo, bC, eN))
968+ let eP = if ((eL == ay))
969+ then $Tuple2(bn, eM)
970+ else $Tuple2(bo, eN)
971+ let eQ = eP._1
972+ let eR = eP._2
973+ fraction(fraction(eO, (eK - 100), 100), eR, eQ)
987974 }
988975
989976
990-@Callable(ak)
991-func calcPriceImpactEVALONLY (aG,eJ,eK,bA,bB) = if (if ((100 > eJ))
977+@Callable(al)
978+func calcPriceImpactEVALONLY (aH,eK,eL,bB,bC) = if (if ((100 > eK))
992979 then true
993- else (eJ > 300))
980+ else (eK > 300))
994981 then throw("Leverage can't be <100 and >300")
995982 else {
996- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
997- let eR = aC(Address(fromBase58String(aG)), bi)
998- let dG = eR._1
999- let dH = eR._2
1000- let aA = eR._3
1001- let aB = eR._4
1002- let az = eR._5
1003- let cC = if ((eJ > 100))
1004- then eI(bA, bB, dG, dH, eJ, eK)
983+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
984+ let eS = aD(Address(fromBase58String(aH)), bj)
985+ let dH = eS._1
986+ let dI = eS._2
987+ let aB = eS._3
988+ let aC = eS._4
989+ let aA = eS._5
990+ let cD = if ((eK > 100))
991+ then eJ(bB, bC, dH, dI, eK, eL)
1005992 else 0
1006- let eS = if ((eK == dG))
1007- then $Tuple2((bA + cC), bB)
1008- else $Tuple2(bA, (bB + cC))
1009- let eT = eS._1
1010- let eU = eS._2
1011- let eV = cp(bi, aG, eT, dG, eU, dH, aA, aB)
1012- let cw = eV._1
1013- let cA = eV._2
1014- let eW = if ((0 > cA))
1015- then (cA * -1)
1016- else cA
1017- $Tuple2(nil, [eW])
993+ let eT = if ((eL == dH))
994+ then $Tuple2((bB + cD), bC)
995+ else $Tuple2(bB, (bC + cD))
996+ let eU = eT._1
997+ let eV = eT._2
998+ let eW = cq(bj, aH, eU, dH, eV, dI, aB, aC)
999+ let cx = eW._1
1000+ let cB = eW._2
1001+ let eX = if ((0 > cB))
1002+ then (cB * -1)
1003+ else cB
1004+ $Tuple2(nil, [eX])
10181005 }
10191006
10201007
10211008
1022-@Callable(ak)
1023-func getShareAssetPriceREADONLY (az) = {
1024- let eX = bh(az)
1025- $Tuple2(nil, eX)
1009+@Callable(al)
1010+func getShareAssetPriceREADONLY (aA) = {
1011+ let eY = bi(aA)
1012+ $Tuple2(nil, eY)
10261013 }
10271014
10281015
10291016
1030-@Callable(ak)
1031-func getUserPositionShareAmountREADONLY (aJ,cZ) = {
1032- let aG = valueOrErrorMessage(getString(this, (((aJ + "_") + cZ) + v)), "Unknown position")
1033- let cC = getIntegerValue(this, (((((aG + "_") + aJ) + "_") + cZ) + w))
1034- let dY = ep(aJ, aG, cZ, (cC > 0))
1035- $Tuple2(nil, dY)
1017+@Callable(al)
1018+func getUserPositionShareAmountREADONLY (aK,da) = {
1019+ let aH = valueOrErrorMessage(getString(this, (((aK + "_") + da) + v)), "Unknown position")
1020+ let cD = getIntegerValue(this, (((((aH + "_") + aK) + "_") + da) + w))
1021+ let dZ = eq(aK, aH, da, (cD > 0))
1022+ $Tuple2(nil, dZ)
10361023 }
10371024
10381025
10391026
1040-@Callable(ak)
1041-func getUserPositionInDollarsREADONLY (aJ,eY,cZ) = {
1042- func eZ (aY,aG) = {
1043- let fa = aY
1044- let fb = fa._1
1045- let fc = fa._2
1046- let fd = fa._3
1047- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
1048- let fe = aC(Address(fromBase58String(aG)), bi)
1049- let dG = fe._1
1050- let dH = fe._2
1051- let aA = fe._3
1052- let aB = fe._4
1053- let az = fe._5
1054- let cC = valueOrElse(getInteger(this, (((((aG + "_") + aJ) + "_") + cZ[fd]) + w)), 0)
1055- let dY = ep(aJ, aG, cZ[fd], (cC > 0))
1056- let eX = bh(az)
1057- let ff = pow(10, 0, aS(az), 0, 0, DOWN)
1058- let fg = fraction(dY, eX, ff)
1059- if ((cC == 0))
1060- then $Tuple3((fb :+ fg), (fc :+ 0), (fd + 1))
1027+@Callable(al)
1028+func getUserPositionInDollarsREADONLY (aK,eZ,da) = {
1029+ func fa (aZ,aH) = {
1030+ let fb = aZ
1031+ let fc = fb._1
1032+ let fd = fb._2
1033+ let fe = fb._3
1034+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
1035+ let ff = aD(Address(fromBase58String(aH)), bj)
1036+ let dH = ff._1
1037+ let dI = ff._2
1038+ let aB = ff._3
1039+ let aC = ff._4
1040+ let aA = ff._5
1041+ let cD = valueOrElse(getInteger(this, (((((aH + "_") + aK) + "_") + da[fe]) + w)), 0)
1042+ let dZ = eq(aK, aH, da[fe], (cD > 0))
1043+ let eY = bi(aA)
1044+ let fg = pow(10, 0, aT(aA), 0, 0, DOWN)
1045+ let fh = fraction(dZ, eY, fg)
1046+ if ((cD == 0))
1047+ then $Tuple3((fc :+ fh), (fd :+ 0), (fe + 1))
10611048 else {
1062- let ea = getStringValue(this, (((((aG + "_") + aJ) + "_") + cZ[fd]) + x))
1063- let dZ = {
1064- let aw = invoke(ah(), "getAssetDebt", [false, ((aJ + "_") + cZ[fd]), ea], nil)
1065- if ($isInstanceOf(aw, "Int"))
1066- then aw
1067- else throw(($getType(aw) + " couldn't be cast to Int"))
1049+ let eb = getStringValue(this, (((((aH + "_") + aK) + "_") + da[fe]) + x))
1050+ let ea = {
1051+ let ax = invoke(ai(), "getAssetDebt", [false, ((aK + "_") + da[fe]), eb], nil)
1052+ if ($isInstanceOf(ax, "Int"))
1053+ then ax
1054+ else throw(($getType(ax) + " couldn't be cast to Int"))
10681055 }
1069- let fh = ( let aw = invoke(ad, "getTWAP60", [ea, false], nil)
1070- if ($isInstanceOf(aw, "(Int, Int)"))
1071- then aw
1072- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._1
1073- let fi = pow(10, 0, aS(ea), 0, 0, DOWN)
1074- let fj = fraction(dZ, fh, fi)
1075- $Tuple3((fb :+ fg), (fc :+ fj), (fd + 1))
1056+ let fi = getIntegerValue(ae, (eb + R))
1057+ let fj = pow(10, 0, aT(eb), 0, 0, DOWN)
1058+ let fk = fraction(ea, fi, fj)
1059+ $Tuple3((fc :+ fh), (fd :+ fk), (fe + 1))
10761060 }
10771061 }
10781062
1079- let fk = {
1080- let ba = eY
1081- let bb = size(ba)
1082- let bc = $Tuple3(nil, nil, 0)
1083- func bd (be,bf) = if ((bf >= bb))
1084- then be
1085- else eZ(be, ba[bf])
1063+ let fl = {
1064+ let bb = eZ
1065+ let bc = size(bb)
1066+ let bd = $Tuple3(nil, nil, 0)
1067+ func be (bf,bg) = if ((bg >= bc))
1068+ then bf
1069+ else fa(bf, bb[bg])
10861070
1087- func bg (be,bf) = if ((bf >= bb))
1088- then be
1071+ func bh (bf,bg) = if ((bg >= bc))
1072+ then bf
10891073 else throw("List size exceeds 20")
10901074
1091- bg(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
1075+ bh(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(bd, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
10921076 }
1093- let fl = fk._1
1094- let dZ = fk._2
1095- $Tuple2(nil, $Tuple2(fl, dZ))
1077+ let fm = fl._1
1078+ let ea = fl._2
1079+ $Tuple2(nil, $Tuple2(fm, ea))
10961080 }
10971081
10981082
10991083
1100-@Callable(ak)
1101-func replenish (aG,eJ,eK) = if (if ((100 > eJ))
1084+@Callable(al)
1085+func replenish (aH,eK,eL) = if (if ((100 > eK))
11021086 then true
1103- else (eJ > 300))
1087+ else (eK > 300))
11041088 then throw("Leverage can't be <100 and >300")
1105- else if (if (!(getBooleanValue(this, (aG + E))))
1106- then (eJ > 100)
1089+ else if (if (!(getBooleanValue(this, (aH + E))))
1090+ then (eK > 100)
11071091 else false)
11081092 then throw("You can't borrow in this pool")
11091093 else {
1110- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
1111- let fm = aC(Address(fromBase58String(aG)), bi)
1112- let dG = fm._1
1113- let dH = fm._2
1114- let aA = fm._3
1115- let aB = fm._4
1116- let az = fm._5
1117- let fn = if ((size(ak.payments) == 2))
1118- then if ((aQ(ak.payments[0].assetId) != dG))
1094+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
1095+ let fn = aD(Address(fromBase58String(aH)), bj)
1096+ let dH = fn._1
1097+ let dI = fn._2
1098+ let aB = fn._3
1099+ let aC = fn._4
1100+ let aA = fn._5
1101+ let fo = if ((size(al.payments) == 2))
1102+ then if ((aR(al.payments[0].assetId) != dH))
11191103 then throw("Wrong payment asset A")
1120- else if ((aQ(ak.payments[1].assetId) != dH))
1104+ else if ((aR(al.payments[1].assetId) != dI))
11211105 then throw("Wrong payment asset B")
1122- else $Tuple4(ak.payments[0].amount, dG, ak.payments[1].amount, dH)
1123- else if ((size(ak.payments) == 1))
1124- then if ((aQ(ak.payments[0].assetId) == dG))
1125- then $Tuple4(ak.payments[0].amount, dG, 0, dH)
1126- else if ((aQ(ak.payments[0].assetId) == dH))
1127- then $Tuple4(0, dG, ak.payments[0].amount, dH)
1106+ else $Tuple4(al.payments[0].amount, dH, al.payments[1].amount, dI)
1107+ else if ((size(al.payments) == 1))
1108+ then if ((aR(al.payments[0].assetId) == dH))
1109+ then $Tuple4(al.payments[0].amount, dH, 0, dI)
1110+ else if ((aR(al.payments[0].assetId) == dI))
1111+ then $Tuple4(0, dH, al.payments[0].amount, dI)
11281112 else throw("Wrong payment")
11291113 else throw("One or two payments expected")
1130- let bA = fn._1
1131- let fo = fn._2
1132- let bB = fn._3
1133- let fp = fn._4
1134- let fq = aI(toString(ak.caller))
1135- if ((eJ > 100))
1114+ let bB = fo._1
1115+ let fp = fo._2
1116+ let bC = fo._3
1117+ let fq = fo._4
1118+ let fr = aJ(toString(al.caller))
1119+ if ((eK > 100))
11361120 then {
1137- let cC = eI(bA, bB, fo, fp, eJ, eK)
1138- let eF = makeString([toString(ak.caller), aG, toString(bA), fo, toString(bB), fp, toString(aA), toString(aB), az, eK, toString(cC)], ",")
1139- let fr = {
1140- let aw = invoke(this, "createNewRequest", [eF], nil)
1141- if ($isInstanceOf(aw, "Int"))
1142- then aw
1143- else throw(($getType(aw) + " couldn't be cast to Int"))
1121+ let cD = eJ(bB, bC, fp, fq, eK, eL)
1122+ let eG = makeString([toString(al.caller), aH, toString(bB), fp, toString(bC), fq, toString(aB), toString(aC), aA, eL, toString(cD)], ",")
1123+ let fs = {
1124+ let ax = invoke(this, "createNewRequest", [eG], nil)
1125+ if ($isInstanceOf(ax, "Int"))
1126+ then ax
1127+ else throw(($getType(ax) + " couldn't be cast to Int"))
11441128 }
1145- if ((fr == fr))
1129+ if ((fs == fs))
11461130 then {
1147- let fs = [((toString(ak.caller) + "_") + toString(fq)), az, eK, cC, toString(this), "replenishFromLand", toString(valueOrErrorMessage(fr, "Can't create new request"))]
1148- let bU = reentrantInvoke(ah(), "flashPosition", fs, nil)
1149- if ((bU == bU))
1131+ let ft = [((toString(al.caller) + "_") + toString(fr)), aA, eL, cD, toString(this), "replenishFromLand", toString(valueOrErrorMessage(fs, "Can't create new request"))]
1132+ let bV = reentrantInvoke(ai(), "flashPosition", ft, nil)
1133+ if ((bV == bV))
11501134 then nil
11511135 else throw("Strict value is not equal to itself.")
11521136 }
11531137 else throw("Strict value is not equal to itself.")
11541138 }
11551139 else {
1156- let ft = cN(bi, aG, h, bA, dG, bB, dH, aA, aB, az)
1157- let fu = ft._1
1158- let dW = ft._2
1159- (cX(aG, toString(ak.caller), fu, dW, fq, az, bi, false) ++ bv(dG, dH, az))
1140+ let fu = cO(bj, aH, h, bB, dH, bC, dI, aB, aC, aA)
1141+ let fv = fu._1
1142+ let dX = fu._2
1143+ (cY(aH, toString(al.caller), fv, dX, fr, aA, bj, false) ++ bw(dH, dI, aA))
11601144 }
11611145 }
11621146
11631147
11641148
1165-@Callable(ak)
1166-func withdraw (aG,eq) = ev(toString(ak.caller), aG, toString(eq), false)
1149+@Callable(al)
1150+func withdraw (aH,er) = ew(toString(al.caller), aH, toString(er), false)
11671151
11681152
11691153
1170-@Callable(ak)
1171-func createUpdateStopLoss (eq,fv,ao,fw) = {
1172- let fx = ( let aw = invoke(ad, "getTWAP60", [ao, false], nil)
1173- if ($isInstanceOf(aw, "(Int, Int)"))
1174- then aw
1175- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._1
1176- if (!(isDefined(getInteger(this, (((((fv + "_") + toString(ak.caller)) + "_") + toString(eq)) + u)))))
1154+@Callable(al)
1155+func createUpdateStopLoss (er,fw,ap,fx) = {
1156+ let fy = getIntegerValue(ae, (ap + R))
1157+ if (!(isDefined(getInteger(this, (((((fw + "_") + toString(al.caller)) + "_") + toString(er)) + u)))))
11771158 then throw("There are no user position")
1178- else if ((0 >= fw))
1159+ else if ((0 >= fx))
11791160 then throw("Price must be greater than 0")
1180- else if ((fw > fx))
1161+ else if ((fx > fy))
11811162 then throw("Price must be less than current token price")
1182- else [IntegerEntry((((((((toString(ak.caller) + "_") + toString(eq)) + "_") + fv) + "_") + ao) + R), fw)]
1163+ else [IntegerEntry((((((((toString(al.caller) + "_") + toString(er)) + "_") + fw) + "_") + ap) + S), fx)]
11831164 }
11841165
11851166
11861167
1187-@Callable(ak)
1188-func deleteStopLoss (eq,fv,ao) = if (!(isDefined(getInteger(this, (((((((toString(ak.caller) + "_") + toString(eq)) + "_") + fv) + "_") + ao) + R)))))
1168+@Callable(al)
1169+func deleteStopLoss (er,fw,ap) = if (!(isDefined(getInteger(this, (((((((toString(al.caller) + "_") + toString(er)) + "_") + fw) + "_") + ap) + S)))))
11891170 then throw("No entry")
1190- else [DeleteEntry((((((((toString(ak.caller) + "_") + toString(eq)) + "_") + fv) + "_") + ao) + R))]
1171+ else [DeleteEntry((((((((toString(al.caller) + "_") + toString(er)) + "_") + fw) + "_") + ap) + S))]
11911172
11921173
11931174
1194-@Callable(ak)
1195-func init (fy,fz,fA,ad,fB,ae,fC,fD,fE) = if (isDefined(getString(S)))
1175+@Callable(al)
1176+func init (fz,fA,fB,ae,fC,af,fD,fE,fF) = if (isDefined(getString(T)))
11961177 then throw("Already inited")
1197- else [StringEntry(S, fy), StringEntry(T, fz), StringEntry(U, fA), StringEntry(W, ad), StringEntry(X, fB), StringEntry(Y, ae), StringEntry(Z, fC), StringEntry(aa, fD), StringEntry(V, fE)]
1178+ else [StringEntry(T, fz), StringEntry(U, fA), StringEntry(V, fB), StringEntry(X, ae), StringEntry(Y, fC), StringEntry(Z, af), StringEntry(aa, fD), StringEntry(ab, fE), StringEntry(W, fF)]
11981179
11991180
12001181
1201-@Callable(ak)
1202-func createNewRequest (bT) = valueOrElse(al(ak), {
1203- let fr = (valueOrElse(getInteger(this, M), 0) + 1)
1204- $Tuple2([StringEntry((toString(fr) + L), bT), IntegerEntry(M, fr)], fr)
1182+@Callable(al)
1183+func createNewRequest (bU) = valueOrElse(am(al), {
1184+ let fs = (valueOrElse(getInteger(this, M), 0) + 1)
1185+ $Tuple2([StringEntry((toString(fs) + L), bU), IntegerEntry(M, fs)], fs)
12051186 })
12061187
12071188
12081189
1209-@Callable(ak)
1210-func replenishFromLand (eE) = valueOrElse(am(ak), {
1211- let fF = eD(eE)
1212- let aJ = fF._1
1213- let aG = fF._2
1214- let bA = fF._3
1215- let dG = fF._4
1216- let bB = fF._5
1217- let dH = fF._6
1218- let aA = fF._7
1219- let aB = fF._8
1220- let az = fF._9
1221- let eG = fF._10
1222- let eH = fF._11
1223- if ((size(ak.payments) != 1))
1190+@Callable(al)
1191+func replenishFromLand (eF) = valueOrElse(an(al), {
1192+ let fG = eE(eF)
1193+ let aK = fG._1
1194+ let aH = fG._2
1195+ let bB = fG._3
1196+ let dH = fG._4
1197+ let bC = fG._5
1198+ let dI = fG._6
1199+ let aB = fG._7
1200+ let aC = fG._8
1201+ let aA = fG._9
1202+ let eH = fG._10
1203+ let eI = fG._11
1204+ if ((size(al.payments) != 1))
12241205 then throw("Wrong payment size")
1225- else if (if ((aQ(ak.payments[0].assetId) != eG))
1206+ else if (if ((aR(al.payments[0].assetId) != eH))
12261207 then true
1227- else (ak.payments[0].amount != eH))
1208+ else (al.payments[0].amount != eI))
12281209 then throw("Wrong payment")
12291210 else {
1230- let fG = if ((dG == eG))
1231- then $Tuple2((bA + ak.payments[0].amount), bB)
1232- else $Tuple2(bA, (bB + ak.payments[0].amount))
1233- let fH = fG._1
1234- let fI = fG._2
1235- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Unknown pool")
1236- let fJ = cN(bi, aG, g, fH, dG, fI, dH, aA, aB, az)
1237- let fu = fJ._1
1238- let dW = fJ._2
1239- let cZ = aI(aJ)
1240- let fK = [IntegerEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + w), eH), StringEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + x), eG)]
1241- let fL = cX(aG, aJ, fu, dW, cZ, az, bi, true)
1242- $Tuple2((((fL ++ bv(dG, dH, az)) ++ fK) :+ DeleteEntry((eE + L))), fu)
1211+ let fH = if ((dH == eH))
1212+ then $Tuple2((bB + al.payments[0].amount), bC)
1213+ else $Tuple2(bB, (bC + al.payments[0].amount))
1214+ let fI = fH._1
1215+ let fJ = fH._2
1216+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Unknown pool")
1217+ let fK = cO(bj, aH, g, fI, dH, fJ, dI, aB, aC, aA)
1218+ let fv = fK._1
1219+ let dX = fK._2
1220+ let da = aJ(aK)
1221+ let fL = [IntegerEntry((((((aH + "_") + aK) + "_") + toString(da)) + w), eI), StringEntry((((((aH + "_") + aK) + "_") + toString(da)) + x), eH)]
1222+ let fM = cY(aH, aK, fv, dX, da, aA, bj, true)
1223+ $Tuple2((((fM ++ bw(dH, dI, aA)) ++ fL) :+ DeleteEntry((eF + L))), fv)
12431224 }
12441225 })
12451226
12461227
12471228
1248-@Callable(ak)
1249-func liquidate (aJ,eq,fM) = valueOrElse(am(ak), {
1250- let aG = valueOrErrorMessage(getString(this, (((aJ + "_") + eq) + v)), "no position")
1251- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
1252- let fN = aC(Address(fromBase58String(aG)), bi)
1253- let dG = fN._1
1254- let dH = fN._2
1255- let aA = fN._3
1256- let aB = fN._4
1257- let az = fN._5
1258- let bO = bP(aG, bi, az, fM)
1259- let cC = getIntegerValue(this, (((((aG + "_") + aJ) + "_") + eq) + w))
1260- let ea = getStringValue(this, (((((aG + "_") + aJ) + "_") + eq) + x))
1261- let dY = ep(aJ, aG, eq, (cC > 0))
1262- if ((cC == 0))
1229+@Callable(al)
1230+func liquidate (aK,er,fN) = valueOrElse(an(al), {
1231+ let aH = valueOrErrorMessage(getString(this, (((aK + "_") + er) + v)), "no position")
1232+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
1233+ let fO = aD(Address(fromBase58String(aH)), bj)
1234+ let dH = fO._1
1235+ let dI = fO._2
1236+ let aB = fO._3
1237+ let aC = fO._4
1238+ let aA = fO._5
1239+ let bP = bQ(aH, bj, aA, fN)
1240+ let cD = getIntegerValue(this, (((((aH + "_") + aK) + "_") + er) + w))
1241+ let eb = getStringValue(this, (((((aH + "_") + aK) + "_") + er) + x))
1242+ let dZ = eq(aK, aH, er, (cD > 0))
1243+ if ((cD == 0))
12631244 then throw("You can't liquidate position without borrow")
1264- else [IntegerEntry((((((aG + "_") + aJ) + "_") + eq) + z), getIntegerValue(this, (aG + C))), IntegerEntry((aG + B), (aH(aG) - fM)), IntegerEntry((aG + A), (aF(aG) - fM)), IntegerEntry((((((aG + "_") + aJ) + "_") + eq) + u), (dY - fM)), ScriptTransfer(ak.caller, bO, fromBase58String(az))]
1245+ else [IntegerEntry((((((aH + "_") + aK) + "_") + er) + z), getIntegerValue(this, (aH + C))), IntegerEntry((aH + B), (aI(aH) - fN)), IntegerEntry((aH + A), (aG(aH) - fN)), IntegerEntry((((((aH + "_") + aK) + "_") + er) + u), (dZ - fN)), ScriptTransfer(al.caller, bP, fromBase58String(aA))]
12651246 })
12661247
12671248
12681249
1269-@Callable(ak)
1270-func stopLoss (aJ,eq,aG,ao) = valueOrElse(aj(ak), {
1271- let fx = ( let aw = invoke(ad, "getTWAP60", [ao, false], nil)
1272- if ($isInstanceOf(aw, "(Int, Int)"))
1273- then aw
1274- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._1
1275- if (!(isDefined(getInteger(this, (((((((aJ + "_") + toString(eq)) + "_") + aG) + "_") + ao) + R)))))
1250+@Callable(al)
1251+func stopLoss (aK,er,aH,ap) = valueOrElse(ak(al), {
1252+ let fy = getIntegerValue(ae, (ap + R))
1253+ if (!(isDefined(getInteger(this, (((((((aK + "_") + toString(er)) + "_") + aH) + "_") + ap) + S)))))
12761254 then throw("No entry")
1277- else (ev(toString(ak.caller), aG, toString(eq), true) :+ DeleteEntry((((((((aJ + "_") + toString(eq)) + "_") + aG) + "_") + ao) + R)))
1255+ else (ew(toString(al.caller), aH, toString(er), true) :+ DeleteEntry((((((((aK + "_") + toString(er)) + "_") + aH) + "_") + ap) + S)))
12781256 })
12791257
12801258
12811259
1282-@Callable(ak)
1283-func capitalizeExKeeper (aG,aD,fO,fP,fQ,dk,dl,dm,dn,do,dp,dq) = valueOrElse(aj(ak), {
1284- let fR = if (fQ)
1285- then cK(aD, aG)
1260+@Callable(al)
1261+func capitalizeExKeeper (aH,aE,fP,fQ,fR,dl,dm,dn,do,dp,dq,dr) = valueOrElse(ak(al), {
1262+ let fS = if (fR)
1263+ then cL(aE, aH)
12861264 else {
1287- let fS = if ((aD == a))
1288- then af
1289- else ag
1290- $Tuple2(fP, fS)
1265+ let fT = if ((aE == a))
1266+ then ag
1267+ else ah
1268+ $Tuple2(fQ, fT)
12911269 }
1292- let fT = fR._1
1293- let fS = fR._2
1294- let fU = dg(fO, fP, fS, dk, dl, dm, dn, do, dp, dq)
1295- let cu = (fT - fP)
1296- let fV = if ((cu > 0))
1297- then [IntegerEntry((aG + P), (cu + valueOrElse(getInteger(this, (aG + P)), 0)))]
1270+ let fU = fS._1
1271+ let fT = fS._2
1272+ let fV = dh(fP, fQ, fT, dl, dm, dn, do, dp, dq, dr)
1273+ let cv = (fU - fQ)
1274+ let fW = if ((cv > 0))
1275+ then [IntegerEntry((aH + P), (cv + valueOrElse(getInteger(this, (aH + P)), 0)))]
12981276 else nil
1299- (dC(aG, aD, fO, fU) ++ fV)
1277+ (dD(aH, aE, fP, fV) ++ fW)
13001278 })
13011279
13021280
13031281
1304-@Callable(ak)
1305-func capitalizeExPuzzle (aG,aD,fO,fP,fQ,dt,du,dq) = valueOrElse(aj(ak), {
1306- let fW = if (fQ)
1307- then cK(aD, aG)
1282+@Callable(al)
1283+func capitalizeExPuzzle (aH,aE,fP,fQ,fR,du,dv,dr) = valueOrElse(ak(al), {
1284+ let fX = if (fR)
1285+ then cL(aE, aH)
13081286 else {
1309- let fS = if ((aD == a))
1310- then af
1311- else ag
1312- $Tuple2(fP, fS)
1287+ let fT = if ((aE == a))
1288+ then ag
1289+ else ah
1290+ $Tuple2(fQ, fT)
13131291 }
1314- let fT = fW._1
1315- let fS = fW._2
1316- let fU = ds(fO, fP, fS, dt, du, dq)
1317- let cu = (fT - fP)
1318- let fV = if ((cu > 0))
1319- then [IntegerEntry((aG + P), (cu + valueOrElse(getInteger(this, (aG + P)), 0)))]
1292+ let fU = fX._1
1293+ let fT = fX._2
1294+ let fV = dt(fP, fQ, fT, du, dv, dr)
1295+ let cv = (fU - fQ)
1296+ let fW = if ((cv > 0))
1297+ then [IntegerEntry((aH + P), (cv + valueOrElse(getInteger(this, (aH + P)), 0)))]
13201298 else nil
1321- (dC(aG, aD, fO, fU) ++ fV)
1299+ (dD(aH, aE, fP, fV) ++ fW)
13221300 })
13231301
13241302
13251303
1326-@Callable(ak)
1327-func capitalizeExSwopFi (aG,aD,fO,fP,fQ,dw,dx,dy,dz,dA,dB,dq) = valueOrElse(aj(ak), {
1328- let fX = if (fQ)
1329- then cK(aD, aG)
1304+@Callable(al)
1305+func capitalizeExSwopFi (aH,aE,fP,fQ,fR,dx,dy,dz,dA,dB,dC,dr) = valueOrElse(ak(al), {
1306+ let fY = if (fR)
1307+ then cL(aE, aH)
13301308 else {
1331- let fS = if ((aD == a))
1332- then af
1333- else ag
1334- $Tuple2(fP, fS)
1309+ let fT = if ((aE == a))
1310+ then ag
1311+ else ah
1312+ $Tuple2(fQ, fT)
13351313 }
1336- let fT = fX._1
1337- let fS = fX._2
1338- let fU = dv(fO, fP, fS, dw, dx, dy, dz, dA, dB, dq)
1339- let cu = (fT - fP)
1340- let fV = if ((cu > 0))
1341- then [IntegerEntry((aG + P), (cu + valueOrElse(getInteger(this, (aG + P)), 0)))]
1314+ let fU = fY._1
1315+ let fT = fY._2
1316+ let fV = dw(fP, fQ, fT, dx, dy, dz, dA, dB, dC, dr)
1317+ let cv = (fU - fQ)
1318+ let fW = if ((cv > 0))
1319+ then [IntegerEntry((aH + P), (cv + valueOrElse(getInteger(this, (aH + P)), 0)))]
13421320 else nil
1343- (dC(aG, aD, fO, fU) ++ fV)
1321+ (dD(aH, aE, fP, fV) ++ fW)
13441322 })
13451323
13461324
13471325
1348-@Callable(ak)
1349-func initNewPool (aD,at,fY,fZ,ga,gb,gc,gd,ge) = valueOrElse(aj(ak), if (if ((aD != a))
1350- then (aD != b)
1326+@Callable(al)
1327+func initNewPool (aE,au,fZ,ga,gb,gc,gd,ge,gf) = valueOrElse(ak(al), if (if ((aE != a))
1328+ then (aE != b)
13511329 else false)
13521330 then throw("Wrong type")
13531331 else {
1354- let gf = aC(Address(fromBase58String(at)), aD)
1355- let ax = gf._1
1356- let ay = gf._2
1357- let gg = gf._3
1358- let gh = gf._4
1359- let az = gf._5
1360-[IntegerEntry((at + F), fY), IntegerEntry((at + G), fZ), IntegerEntry((at + H), ga), IntegerEntry((at + I), gb), IntegerEntry((at + J), gc), IntegerEntry((at + K), gd), IntegerEntry((at + C), 0), IntegerEntry((at + D), 0), StringEntry((N + at), aD), StringEntry((az + O), at), BooleanEntry((at + E), ge)]
1332+ let gg = aD(Address(fromBase58String(au)), aE)
1333+ let ay = gg._1
1334+ let az = gg._2
1335+ let gh = gg._3
1336+ let gi = gg._4
1337+ let aA = gg._5
1338+[IntegerEntry((au + F), fZ), IntegerEntry((au + G), ga), IntegerEntry((au + H), gb), IntegerEntry((au + I), gc), IntegerEntry((au + J), gd), IntegerEntry((au + K), ge), IntegerEntry((au + C), 0), IntegerEntry((au + D), 0), StringEntry((N + au), aE), StringEntry((aA + O), au), BooleanEntry((au + E), gf)]
13611339 })
13621340
13631341
1364-@Verifier(gi)
1365-func gj () = sigVerify(gi.bodyBytes, gi.proofs[0], gi.senderPublicKey)
1342+@Verifier(gj)
1343+func gk () = sigVerify(gj.bodyBytes, gj.proofs[0], gj.senderPublicKey)
13661344
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "SF"
55
66 let b = "WX"
77
88 let c = "capNoLoan"
99
1010 let d = "capLoan"
1111
1212 let e = "stopLossNoLoan"
1313
1414 let f = "stopLossLoan"
1515
1616 let g = "loan"
1717
1818 let h = "noLoan"
1919
2020 let i = "noFee"
2121
2222 let j = 100000000
2323
2424 let k = 10000000000
2525
2626 let l = toBigInt(10000000000000000)
2727
2828 let m = 1000000
2929
3030 let n = "A_asset_balance"
3131
3232 let o = "B_asset_balance"
3333
3434 let p = "A_asset_id"
3535
3636 let q = "B_asset_id"
3737
3838 let r = "share_asset_id"
3939
4040 let s = "share_asset_supply"
4141
4242 let t = "commission"
4343
4444 let u = "_user_position"
4545
4646 let v = "_user_position_pool"
4747
4848 let w = "_user_position_borrow_amount"
4949
5050 let x = "_user_position_borrow_asset_id"
5151
5252 let y = "_user_position_number"
5353
5454 let z = "_user_position_interest"
5555
5656 let A = "_pool_total"
5757
5858 let B = "_pool_total_loan"
5959
6060 let C = "_pool_interest_loan"
6161
6262 let D = "_pool_interest_no_loan"
6363
6464 let E = "_pool_can_borrow"
6565
6666 let F = "_axly_fee_without_loan"
6767
6868 let G = "_axly_fee_with_loan"
6969
7070 let H = "_axly_fee_cap_with_loan"
7171
7272 let I = "_axly_fee_cap_no_loan"
7373
7474 let J = "_axly_fee_stoploss_with_loan"
7575
7676 let K = "_axly_fee_stoploss_no_loan"
7777
7878 let L = "_request_id"
7979
8080 let M = "requests_iter"
8181
8282 let N = "pool_"
8383
8484 let O = "_pool_share_id"
8585
8686 let P = "_pool_cap_change"
8787
8888 let Q = "last_price"
8989
90-let R = "_stop_loss"
90+let R = "_twap5B"
9191
92-let S = "axly_money_box"
92+let S = "_stop_loss"
9393
94-let T = "swopfi_farming_addr"
94+let T = "axly_money_box"
9595
96-let U = "lend_service_addr"
96+let U = "swopfi_farming_addr"
9797
98-let V = "admin_call_pub_key"
98+let V = "lend_service_addr"
9999
100-let W = "price_oracle"
100+let W = "admin_call_pub_key"
101101
102-let X = "exchange_contract"
102+let X = "price_oracle"
103103
104-let Y = "wx_swap_contract"
104+let Y = "exchange_contract"
105105
106-let Z = "swop_id"
106+let Z = "wx_swap_contract"
107107
108-let aa = "wx_id"
108+let aa = "swop_id"
109109
110-let ab = Address(fromBase58String(valueOrErrorMessage(getString(this, S), "No axly moneyBox address")))
110+let ab = "wx_id"
111111
112-let ac = Address(fromBase58String(valueOrErrorMessage(getString(this, X), "No exchange contract address")))
112+let ac = Address(fromBase58String(valueOrErrorMessage(getString(this, T), "No axly moneyBox address")))
113113
114-let ad = Address(fromBase58String(valueOrErrorMessage(getString(this, W), "No price oracle address")))
114+let ad = Address(fromBase58String(valueOrErrorMessage(getString(this, Y), "No exchange contract address")))
115115
116-let ae = Address(fromBase58String(valueOrErrorMessage(getString(this, Y), "No wx swap address")))
116+let ae = Address(fromBase58String(valueOrErrorMessage(getString(this, X), "No price oracle address")))
117117
118-let af = fromBase58String(valueOrErrorMessage(getString(this, Z), "No swop id"))
118+let af = Address(fromBase58String(valueOrErrorMessage(getString(this, Z), "No wx swap address")))
119119
120-let ag = fromBase58String(valueOrErrorMessage(getString(this, aa), "No wx id"))
120+let ag = fromBase58String(valueOrErrorMessage(getString(this, aa), "No swop id"))
121121
122-func ah () = Address(fromBase58String(valueOrErrorMessage(getString(this, U), "Can't get lend service addr")))
122+let ah = fromBase58String(valueOrErrorMessage(getString(this, ab), "No wx id"))
123+
124+func ai () = Address(fromBase58String(valueOrErrorMessage(getString(this, V), "Can't get lend service addr")))
123125
124126
125-func ai () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, V), "Can't get admin addr")))
127+func aj () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, W), "Can't get admin addr")))
126128
127129
128-func aj (ak) = if ((ak.caller == ai()))
130+func ak (al) = if ((al.caller == aj()))
129131 then unit
130132 else throw("Only admin can call this function")
131133
132134
133-func al (ak) = if ((ak.caller == this))
135+func am (al) = if ((al.caller == this))
134136 then unit
135137 else throw("Only contract itself can call this function")
136138
137139
138-func am (ak) = if ((ak.caller == ah()))
140+func an (al) = if ((al.caller == ai()))
139141 then unit
140142 else throw("Only land contract can call this function")
141143
142144
143-func an (ao) = {
144- let ap = ao
145- if ($isInstanceOf(ap, "ByteVector"))
145+func ao (ap) = {
146+ let aq = ap
147+ if ($isInstanceOf(aq, "ByteVector"))
146148 then {
147- let aq = ap
148- assetBalance(this, aq)
149+ let ar = aq
150+ assetBalance(this, ar)
149151 }
150- else if ($isInstanceOf(ap, "Unit"))
152+ else if ($isInstanceOf(aq, "Unit"))
151153 then {
152- let ar = ap
154+ let as = aq
153155 wavesBalance(this).available
154156 }
155157 else throw("Match error")
156158 }
157159
158160
159-func as (at) = $Tuple5(valueOrErrorMessage(getString(at, p), "Can't get pool A asset id"), valueOrErrorMessage(getString(at, q), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(at, n), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(at, o), "Can't get pool B asset balance"), valueOrErrorMessage(getString(at, r), "Can't get share asset id"))
161+func at (au) = $Tuple5(valueOrErrorMessage(getString(au, p), "Can't get pool A asset id"), valueOrErrorMessage(getString(au, q), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(au, n), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(au, o), "Can't get pool B asset balance"), valueOrErrorMessage(getString(au, r), "Can't get share asset id"))
160162
161163
162-func au (at) = {
163- let av = {
164- let aw = invoke(at, "getPoolConfigWrapperREADONLY", nil, nil)
165- if ($isInstanceOf(aw, "List[Any]"))
166- then aw
167- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
164+func av (au) = {
165+ let aw = {
166+ let ax = invoke(au, "getPoolConfigWrapperREADONLY", nil, nil)
167+ if ($isInstanceOf(ax, "List[Any]"))
168+ then ax
169+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
168170 }
169- if ((av == av))
171+ if ((aw == aw))
170172 then {
171- let ax = valueOrErrorMessage({
172- let aw = av[4]
173- if ($isInstanceOf(aw, "String"))
174- then aw
173+ let ay = valueOrErrorMessage({
174+ let ax = aw[4]
175+ if ($isInstanceOf(ax, "String"))
176+ then ax
175177 else unit
176178 }, "Can't get pool A asset id")
177- let ay = valueOrErrorMessage({
178- let aw = av[5]
179- if ($isInstanceOf(aw, "String"))
180- then aw
179+ let az = valueOrErrorMessage({
180+ let ax = aw[5]
181+ if ($isInstanceOf(ax, "String"))
182+ then ax
181183 else unit
182184 }, "Can't get pool B asset id")
183- let az = valueOrErrorMessage({
184- let aw = av[3]
185- if ($isInstanceOf(aw, "String"))
186- then aw
185+ let aA = valueOrErrorMessage({
186+ let ax = aw[3]
187+ if ($isInstanceOf(ax, "String"))
188+ then ax
187189 else unit
188190 }, "Can't get pool LP asset id")
189- let aA = {
190- let aw = invoke(at, "getAccBalanceWrapperREADONLY", [ax], nil)
191- if ($isInstanceOf(aw, "Int"))
192- then aw
193- else throw(($getType(aw) + " couldn't be cast to Int"))
191+ let aB = {
192+ let ax = invoke(au, "getAccBalanceWrapperREADONLY", [ay], nil)
193+ if ($isInstanceOf(ax, "Int"))
194+ then ax
195+ else throw(($getType(ax) + " couldn't be cast to Int"))
194196 }
195- if ((aA == aA))
197+ if ((aB == aB))
196198 then {
197- let aB = {
198- let aw = invoke(at, "getAccBalanceWrapperREADONLY", [ay], nil)
199- if ($isInstanceOf(aw, "Int"))
200- then aw
201- else throw(($getType(aw) + " couldn't be cast to Int"))
199+ let aC = {
200+ let ax = invoke(au, "getAccBalanceWrapperREADONLY", [az], nil)
201+ if ($isInstanceOf(ax, "Int"))
202+ then ax
203+ else throw(($getType(ax) + " couldn't be cast to Int"))
202204 }
203- if ((aB == aB))
204- then $Tuple5(ax, ay, aA, aB, az)
205+ if ((aC == aC))
206+ then $Tuple5(ay, az, aB, aC, aA)
205207 else throw("Strict value is not equal to itself.")
206208 }
207209 else throw("Strict value is not equal to itself.")
208210 }
209211 else throw("Strict value is not equal to itself.")
210212 }
211213
212214
213-func aC (at,aD) = if ((aD == a))
214- then as(at)
215- else if ((aD == b))
216- then au(at)
215+func aD (au,aE) = if ((aE == a))
216+ then at(au)
217+ else if ((aE == b))
218+ then av(au)
217219 else throw("Wrong pool type")
218220
219221
220-func aE (at,aD,az) = if ((aD == a))
221- then valueOrErrorMessage(getInteger(at, s), "Can't get share asset supply")
222- else if ((aD == b))
223- then valueOrErrorMessage(assetInfo(fromBase58String(az)), "Wrong ShareId").quantity
222+func aF (au,aE,aA) = if ((aE == a))
223+ then valueOrErrorMessage(getInteger(au, s), "Can't get share asset supply")
224+ else if ((aE == b))
225+ then valueOrErrorMessage(assetInfo(fromBase58String(aA)), "Wrong ShareId").quantity
224226 else throw("Wrong pool type")
225227
226228
227-func aF (aG) = valueOrElse(getInteger(this, (aG + A)), 0)
229+func aG (aH) = valueOrElse(getInteger(this, (aH + A)), 0)
228230
229231
230-func aH (aG) = valueOrElse(getInteger(this, (aG + B)), 0)
232+func aI (aH) = valueOrElse(getInteger(this, (aH + B)), 0)
231233
232234
233-func aI (aJ) = (valueOrElse(getInteger(this, (aJ + y)), 0) + 1)
235+func aJ (aK) = (valueOrElse(getInteger(this, (aK + y)), 0) + 1)
234236
235237
236-func aK (aG,aL) = if ((aL == d))
237- then getIntegerValue(this, (aG + I))
238- else if ((aL == c))
239- then getIntegerValue(this, (aG + H))
240- else if ((aL == g))
241- then getIntegerValue(this, (aG + G))
242- else if ((aL == h))
243- then getIntegerValue(this, (aG + F))
244- else if ((aL == i))
238+func aL (aH,aM) = if ((aM == d))
239+ then getIntegerValue(this, (aH + I))
240+ else if ((aM == c))
241+ then getIntegerValue(this, (aH + H))
242+ else if ((aM == g))
243+ then getIntegerValue(this, (aH + G))
244+ else if ((aM == h))
245+ then getIntegerValue(this, (aH + F))
246+ else if ((aM == i))
245247 then 0
246248 else throw("Wrong fee type")
247249
248250
249-func aM () = Address(fromBase58String(valueOrErrorMessage(getString(this, T), "Can't get swopfi farming addr")))
251+func aN () = Address(fromBase58String(valueOrErrorMessage(getString(this, U), "Can't get swopfi farming addr")))
250252
251253
252-func aN (at) = {
253- let aO = Address(fromBase58String(valueOrErrorMessage(getString(at, "%s__factoryContract"), "Can't get WX factory contract addr")))
254- let aP = split(valueOrErrorMessage(getString(aO, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
255- Address(fromBase58String(aP[1]))
254+func aO (au) = {
255+ let aP = Address(fromBase58String(valueOrErrorMessage(getString(au, "%s__factoryContract"), "Can't get WX factory contract addr")))
256+ let aQ = split(valueOrErrorMessage(getString(aP, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
257+ Address(fromBase58String(aQ[1]))
256258 }
257259
258260
259-func aQ (ao) = {
260- let ap = ao
261- if ($isInstanceOf(ap, "ByteVector"))
261+func aR (ap) = {
262+ let aq = ap
263+ if ($isInstanceOf(aq, "ByteVector"))
262264 then {
263- let aq = ap
264- toBase58String(aq)
265+ let ar = aq
266+ toBase58String(ar)
265267 }
266- else if ($isInstanceOf(ap, "Unit"))
268+ else if ($isInstanceOf(aq, "Unit"))
267269 then {
268- let ar = ap
270+ let as = aq
269271 "WAVES"
270272 }
271273 else throw("Not Asset id")
272274 }
273275
274276
275-func aR (ao) = if ((ao == "WAVES"))
277+func aS (ap) = if ((ap == "WAVES"))
276278 then unit
277- else fromBase58String(ao)
279+ else fromBase58String(ap)
278280
279281
280-func aS (ao) = if ((ao == "WAVES"))
282+func aT (ap) = if ((ap == "WAVES"))
281283 then 8
282284 else {
283- let ap = assetInfo(fromBase58String(ao))
284- if ($isInstanceOf(ap, "Asset"))
285+ let aq = assetInfo(fromBase58String(ap))
286+ if ($isInstanceOf(aq, "Asset"))
285287 then {
286- let aT = ap
287- aT.decimals
288+ let aU = aq
289+ aU.decimals
288290 }
289291 else throw("Can't find asset")
290292 }
291293
292294
293-func aU (ao) = pow(10, 0, aS(ao), 0, 0, DOWN)
295+func aV (ap) = pow(10, 0, aT(ap), 0, 0, DOWN)
294296
295297
296-func aV (aW) = {
297- func aX (aY,ao) = {
298- let aZ = ( let aw = invoke(ad, "getTWAP60", [ao, false], nil)
299- if ($isInstanceOf(aw, "(Int, Int)"))
300- then aw
301- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
302- (aY :+ aZ)
298+func aW (aX) = {
299+ func aY (aZ,ap) = {
300+ let ba = getIntegerValue(ae, (ap + R))
301+ (aZ :+ ba)
303302 }
304303
305- let ba = aW
306- let bb = size(ba)
307- let bc = nil
308- func bd (be,bf) = if ((bf >= bb))
309- then be
310- else aX(be, ba[bf])
304+ let bb = aX
305+ let bc = size(bb)
306+ let bd = nil
307+ func be (bf,bg) = if ((bg >= bc))
308+ then bf
309+ else aY(bf, bb[bg])
311310
312- func bg (be,bf) = if ((bf >= bb))
313- then be
311+ func bh (bf,bg) = if ((bg >= bc))
312+ then bf
314313 else throw("List size exceeds 50")
315314
316- bg(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
315+ bh(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(bd, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
317316 }
318317
319318
320-func bh (az) = {
321- let aG = valueOrErrorMessage(getString(this, (az + O)), "Can't find pool addr by share id")
322- let at = Address(fromBase58String(aG))
323- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
324- let bj = aC(at, bi)
325- let ax = bj._1
326- let ay = bj._2
327- let bk = bj._3
328- let bl = bj._4
329- let bm = ( let aw = invoke(ad, "getTWAP60", [ax, false], nil)
330- if ($isInstanceOf(aw, "(Int, Int)"))
331- then aw
332- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
333- let bn = ( let aw = invoke(ad, "getTWAP60", [ay, false], nil)
334- if ($isInstanceOf(aw, "(Int, Int)"))
335- then aw
336- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
337- let bo = aE(at, bi, az)
338- let bp = pow(10, 0, aS(ax), 0, 0, DOWN)
339- let bq = pow(10, 0, aS(ay), 0, 0, DOWN)
340- let br = pow(10, 0, aS(az), 0, 0, DOWN)
341- let bs = (fraction(bk, bm, bp) + fraction(bl, bn, bq))
342- fraction(bs, br, bo)
319+func bi (aA) = {
320+ let aH = valueOrErrorMessage(getString(this, (aA + O)), "Can't find pool addr by share id")
321+ let au = Address(fromBase58String(aH))
322+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
323+ let bk = aD(au, bj)
324+ let ay = bk._1
325+ let az = bk._2
326+ let bl = bk._3
327+ let bm = bk._4
328+ let bn = getIntegerValue(ae, (ay + R))
329+ let bo = getIntegerValue(ae, (az + R))
330+ let bp = aF(au, bj, aA)
331+ let bq = pow(10, 0, aT(ay), 0, 0, DOWN)
332+ let br = pow(10, 0, aT(az), 0, 0, DOWN)
333+ let bs = pow(10, 0, aT(aA), 0, 0, DOWN)
334+ let bt = (fraction(bl, bn, bq) + fraction(bm, bo, br))
335+ fraction(bt, bs, bp)
343336 }
344337
345338
346-func bt (bu) = {
347- func aX (aY,az) = (aY :+ bh(az))
339+func bu (bv) = {
340+ func aY (aZ,aA) = (aZ :+ bi(aA))
348341
349- let ba = bu
350- let bb = size(ba)
351- let bc = nil
352- func bd (be,bf) = if ((bf >= bb))
353- then be
354- else aX(be, ba[bf])
342+ let bb = bv
343+ let bc = size(bb)
344+ let bd = nil
345+ func be (bf,bg) = if ((bg >= bc))
346+ then bf
347+ else aY(bf, bb[bg])
355348
356- func bg (be,bf) = if ((bf >= bb))
357- then be
349+ func bh (bf,bg) = if ((bg >= bc))
350+ then bf
358351 else throw("List size exceeds 20")
359352
360- bg(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
353+ bh(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(bd, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
361354 }
362355
363356
364-func bv (ax,ay,az) = {
365- let bw = aV([ax, ay])
366- let bx = bh(az)
367- let by = [toString(bw[0]), toString(bw[1]), toString(bx)]
368-[StringEntry(Q, makeString(by, ","))]
357+func bw (ay,az,aA) = {
358+ let bx = aW([ay, az])
359+ let by = bi(aA)
360+ let bz = [toString(bx[0]), toString(bx[1]), toString(by)]
361+[StringEntry(Q, makeString(bz, ","))]
369362 }
370363
371364
372-func bz (bi,at,bA,ax,bB,ay,aA,aB) = if ((bi == a))
365+func bA (bj,au,bB,ay,bC,az,aB,aC) = if ((bj == a))
373366 then {
374- let bC = {
375- let aw = invoke(at, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(bA), toString(bB)]], nil)
376- if ($isInstanceOf(aw, "List[Any]"))
377- then aw
378- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
367+ let bD = {
368+ let ax = invoke(au, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(bB), toString(bC)]], nil)
369+ if ($isInstanceOf(ax, "List[Any]"))
370+ then ax
371+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
379372 }
380- if ((bC == bC))
373+ if ((bD == bD))
381374 then $Tuple5({
382- let aw = bC[3]
383- if ($isInstanceOf(aw, "Int"))
384- then aw
385- else throw(($getType(aw) + " couldn't be cast to Int"))
375+ let ax = bD[3]
376+ if ($isInstanceOf(ax, "Int"))
377+ then ax
378+ else throw(($getType(ax) + " couldn't be cast to Int"))
386379 }, {
387- let aw = bC[4]
388- if ($isInstanceOf(aw, "Int"))
389- then aw
390- else throw(($getType(aw) + " couldn't be cast to Int"))
380+ let ax = bD[4]
381+ if ($isInstanceOf(ax, "Int"))
382+ then ax
383+ else throw(($getType(ax) + " couldn't be cast to Int"))
391384 }, {
392- let aw = bC[1]
393- if ($isInstanceOf(aw, "Int"))
394- then aw
395- else throw(($getType(aw) + " couldn't be cast to Int"))
396- }, aQ(bC[2]), {
397- let aw = bC[0]
398- if ($isInstanceOf(aw, "Int"))
399- then aw
400- else throw(($getType(aw) + " couldn't be cast to Int"))
385+ let ax = bD[1]
386+ if ($isInstanceOf(ax, "Int"))
387+ then ax
388+ else throw(($getType(ax) + " couldn't be cast to Int"))
389+ }, aR(bD[2]), {
390+ let ax = bD[0]
391+ if ($isInstanceOf(ax, "Int"))
392+ then ax
393+ else throw(($getType(ax) + " couldn't be cast to Int"))
401394 })
402395 else throw("Strict value is not equal to itself.")
403396 }
404397 else {
405- let bD = $Tuple2(split({
406- let aw = invoke(at, "evaluatePutByAmountAssetREADONLY", [bA], nil)
407- if ($isInstanceOf(aw, "String"))
408- then aw
409- else throw(($getType(aw) + " couldn't be cast to String"))
398+ let bE = $Tuple2(split({
399+ let ax = invoke(au, "evaluatePutByAmountAssetREADONLY", [bB], nil)
400+ if ($isInstanceOf(ax, "String"))
401+ then ax
402+ else throw(($getType(ax) + " couldn't be cast to String"))
410403 }, "__"), split({
411- let aw = invoke(at, "evaluatePutByPriceAssetREADONLY", [bB], nil)
412- if ($isInstanceOf(aw, "String"))
413- then aw
414- else throw(($getType(aw) + " couldn't be cast to String"))
404+ let ax = invoke(au, "evaluatePutByPriceAssetREADONLY", [bC], nil)
405+ if ($isInstanceOf(ax, "String"))
406+ then ax
407+ else throw(($getType(ax) + " couldn't be cast to String"))
415408 }, "__"))
416- if ((bD == bD))
409+ if ((bE == bE))
417410 then {
418- let bE = bD._2
419- let bF = bD._1
420- let bG = parseIntValue(bF[1])
421- let bH = parseIntValue(bE[1])
422- if ((bH > bG))
411+ let bF = bE._2
412+ let bG = bE._1
413+ let bH = parseIntValue(bG[1])
414+ let bI = parseIntValue(bF[1])
415+ if ((bI > bH))
423416 then {
424- let bI = parseIntValue(bF[8])
425- $Tuple5(bA, bI, (bB - bI), ay, bH)
417+ let bJ = parseIntValue(bG[8])
418+ $Tuple5(bB, bJ, (bC - bJ), az, bI)
426419 }
427420 else {
428- let bI = parseIntValue(bF[8])
429- $Tuple5(bI, bB, (bA - bI), ax, bG)
421+ let bJ = parseIntValue(bG[8])
422+ $Tuple5(bJ, bC, (bB - bJ), ay, bH)
430423 }
431424 }
432425 else throw("Strict value is not equal to itself.")
433426 }
434427
435428
436-func bJ (at,bi,bA,ax,bB,ay) = {
437- let bK = [AttachedPayment(aR(ax), bA), AttachedPayment(aR(ay), bB)]
438- if ((bi == a))
439- then invoke(at, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bK)
440- else invoke(at, "put", [1000000, false], bK)
429+func bK (au,bj,bB,ay,bC,az) = {
430+ let bL = [AttachedPayment(aS(ay), bB), AttachedPayment(aS(az), bC)]
431+ if ((bj == a))
432+ then invoke(au, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bL)
433+ else invoke(au, "put", [1000000, false], bL)
441434 }
442435
443436
444-func bL (at,bi,bI,bM) = {
445- let bK = [AttachedPayment(aR(bM), bI)]
446- if ((bi == a))
447- then invoke(at, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], bK)
448- else invoke(at, "putOneTkn", [0, false], bK)
437+func bM (au,bj,bJ,bN) = {
438+ let bL = [AttachedPayment(aS(bN), bJ)]
439+ if ((bj == a))
440+ then invoke(au, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], bL)
441+ else invoke(au, "putOneTkn", [0, false], bL)
449442 }
450443
451444
452-func bN (aG,bi,az,bO) = {
453- let bK = [AttachedPayment(fromBase58String(az), bO)]
454- if ((bi == a))
455- then invoke(aM(), "lockShareTokens", [aG, 0], bK)
456- else invoke(aN(addressFromStringValue(aG)), "stake", nil, bK)
445+func bO (aH,bj,aA,bP) = {
446+ let bL = [AttachedPayment(fromBase58String(aA), bP)]
447+ if ((bj == a))
448+ then invoke(aN(), "lockShareTokens", [aH, 0], bL)
449+ else invoke(aO(addressFromStringValue(aH)), "stake", nil, bL)
457450 }
458451
459452
460-func bP (aG,bi,az,bO) = {
461- let bQ = if ((bi == a))
462- then $Tuple3(aM(), "withdrawShareTokens", [aG, bO])
463- else if ((bi == b))
464- then $Tuple3(aN(Address(fromBase58String(aG))), "unstake", [az, bO])
453+func bQ (aH,bj,aA,bP) = {
454+ let bR = if ((bj == a))
455+ then $Tuple3(aN(), "withdrawShareTokens", [aH, bP])
456+ else if ((bj == b))
457+ then $Tuple3(aO(Address(fromBase58String(aH))), "unstake", [aA, bP])
465458 else throw("Wrong pool type")
466- let bR = bQ._1
467- let bS = bQ._2
468- let bT = bQ._3
469- let bU = invoke(bR, bS, bT, nil)
470- if ((bU == bU))
471- then bO
459+ let bS = bR._1
460+ let bT = bR._2
461+ let bU = bR._3
462+ let bV = invoke(bS, bT, bU, nil)
463+ if ((bV == bV))
464+ then bP
472465 else throw("Strict value is not equal to itself.")
473466 }
474467
475468
476-func bV (aG,bW,bX,aA,aB,bY,bZ) = {
477- let at = Address(fromBase58String(aG))
478- let ca = 1000000
479- let cb = getIntegerValue(at, t)
480- let cc = fraction(bY, ca, (ca - cb))
481- let cd = if ((bZ == bW))
469+func bW (aH,bX,bY,aB,aC,bZ,ca) = {
470+ let au = Address(fromBase58String(aH))
471+ let cb = 1000000
472+ let cc = getIntegerValue(au, t)
473+ let cd = fraction(bZ, cb, (cb - cc))
474+ let ce = if ((ca == bX))
482475 then {
483- let ce = fraction(cc, aB, (aA - cc))
484- $Tuple2(ce, bX)
476+ let cf = fraction(cd, aC, (aB - cd))
477+ $Tuple2(cf, bY)
485478 }
486479 else {
487- let ce = fraction(cc, aA, (aB - cc))
488- $Tuple2(ce, bW)
480+ let cf = fraction(cd, aB, (aC - cd))
481+ $Tuple2(cf, bX)
489482 }
490- let ce = cd._1
491- let cf = cd._2
492- $Tuple2(cf, ce)
483+ let cf = ce._1
484+ let cg = ce._2
485+ $Tuple2(cg, cf)
493486 }
494487
495488
496-func cg (aG,bW,bX,aA,aB,bY,bZ) = {
497- let ch = getIntegerValue(ae, "%s__protocolFee")
498- let ci = getIntegerValue(ae, "%s__poolFee")
499- let cj = toBigInt(100000000)
500- let ck = if ((bZ == bW))
489+func ch (aH,bX,bY,aB,aC,bZ,ca) = {
490+ let ci = getIntegerValue(af, "%s__protocolFee")
491+ let cj = getIntegerValue(af, "%s__poolFee")
492+ let ck = toBigInt(100000000)
493+ let cl = if ((ca == bX))
501494 then {
502- let ce = fraction(bY, aB, (aA - bY))
503- $Tuple2(ce, bX)
495+ let cf = fraction(bZ, aC, (aB - bZ))
496+ $Tuple2(cf, bY)
504497 }
505498 else {
506- let ce = fraction(bY, aA, (aB - bY))
507- $Tuple2(ce, bW)
499+ let cf = fraction(bZ, aB, (aC - bZ))
500+ $Tuple2(cf, bX)
508501 }
509- let ce = ck._1
510- let cf = ck._2
511- let cl = toInt(fraction(toBigInt(ce), cj, (cj - toBigInt((ch + ci))), CEILING))
512- $Tuple2(cf, fraction(cl, 102, 100))
502+ let cf = cl._1
503+ let cg = cl._2
504+ let cm = toInt(fraction(toBigInt(cf), ck, (ck - toBigInt((ci + cj))), CEILING))
505+ $Tuple2(cg, fraction(cm, 102, 100))
513506 }
514507
515508
516-func cm (aD,aG,bW,bX,aA,aB,bY,bZ) = if ((aD == a))
509+func cn (aE,aH,bX,bY,aB,aC,bZ,ca) = if ((aE == a))
517510 then {
518- let cn = bV(aG, bW, bX, aA, aB, bY, bZ)
519- let cf = cn._1
520- let ce = cn._2
521- invoke(addressFromStringValue(aG), "callFunction", ["exchange", [toString(bY)]], [AttachedPayment(aR(cf), ce)])
511+ let co = bW(aH, bX, bY, aB, aC, bZ, ca)
512+ let cg = co._1
513+ let cf = co._2
514+ invoke(addressFromStringValue(aH), "callFunction", ["exchange", [toString(bZ)]], [AttachedPayment(aS(cg), cf)])
522515 }
523516 else {
524- let co = cg(aG, bW, bX, aA, aB, bY, bZ)
525- let cf = co._1
526- let ce = co._2
527- invoke(ae, "swap", [bY, bZ, toString(this)], [AttachedPayment(aR(cf), ce)])
517+ let cp = ch(aH, bX, bY, aB, aC, bZ, ca)
518+ let cg = cp._1
519+ let cf = cp._2
520+ invoke(af, "swap", [bZ, ca, toString(this)], [AttachedPayment(aS(cg), cf)])
528521 }
529522
530523
531-func cp (bi,aG,bA,ax,bB,ay,aA,aB) = {
532- let at = addressFromStringValue(aG)
533- if ((bi == a))
524+func cq (bj,aH,bB,ay,bC,az,aB,aC) = {
525+ let au = addressFromStringValue(aH)
526+ if ((bj == a))
534527 then {
535- let bU = {
536- let aw = invoke(at, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(bA), toString(bB), "0"]], nil)
537- if ($isInstanceOf(aw, "List[Any]"))
538- then aw
539- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
528+ let bV = {
529+ let ax = invoke(au, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(bB), toString(bC), "0"]], nil)
530+ if ($isInstanceOf(ax, "List[Any]"))
531+ then ax
532+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
540533 }
541- if ((bU == bU))
534+ if ((bV == bV))
542535 then $Tuple2({
543- let aw = bU[0]
544- if ($isInstanceOf(aw, "Int"))
545- then aw
546- else throw(($getType(aw) + " couldn't be cast to Int"))
536+ let ax = bV[0]
537+ if ($isInstanceOf(ax, "Int"))
538+ then ax
539+ else throw(($getType(ax) + " couldn't be cast to Int"))
547540 }, {
548- let aw = bU[1]
549- if ($isInstanceOf(aw, "Int"))
550- then aw
551- else throw(($getType(aw) + " couldn't be cast to Int"))
541+ let ax = bV[1]
542+ if ($isInstanceOf(ax, "Int"))
543+ then ax
544+ else throw(($getType(ax) + " couldn't be cast to Int"))
552545 })
553546 else throw("Strict value is not equal to itself.")
554547 }
555- else if ((bi == b))
548+ else if ((bj == b))
556549 then {
557- let cq = if (if ((bA > 0))
558- then (bB > 0)
550+ let cr = if (if ((bB > 0))
551+ then (bC > 0)
559552 else false)
560553 then {
561- let cr = bz(bi, at, bA, ax, bB, ay, aA, aB)
562- let cs = cr._1
563- let ct = cr._2
564- let cu = cr._3
565- let cv = cr._4
566- let cw = cr._5
567- $Tuple3(cu, cv, cw)
554+ let cs = bA(bj, au, bB, ay, bC, az, aB, aC)
555+ let ct = cs._1
556+ let cu = cs._2
557+ let cv = cs._3
558+ let cw = cs._4
559+ let cx = cs._5
560+ $Tuple3(cv, cw, cx)
568561 }
569- else if ((bA > 0))
570- then $Tuple3(bA, ax, 0)
571- else $Tuple3(bB, ay, 0)
572- let cu = cq._1
573- let cv = cq._2
574- let cx = cq._3
575- let cy = if ((cu > 0))
562+ else if ((bB > 0))
563+ then $Tuple3(bB, ay, 0)
564+ else $Tuple3(bC, az, 0)
565+ let cv = cr._1
566+ let cw = cr._2
567+ let cy = cr._3
568+ let cz = if ((cv > 0))
576569 then {
577- let bU = {
578- let aw = invoke(at, "putOneTknREADONLY", [cv, cu], nil)
579- if ($isInstanceOf(aw, "(Int, Int, Int)"))
580- then aw
581- else throw(($getType(aw) + " couldn't be cast to (Int, Int, Int)"))
570+ let bV = {
571+ let ax = invoke(au, "putOneTknREADONLY", [cw, cv], nil)
572+ if ($isInstanceOf(ax, "(Int, Int, Int)"))
573+ then ax
574+ else throw(($getType(ax) + " couldn't be cast to (Int, Int, Int)"))
582575 }
583- if ((bU == bU))
584- then $Tuple2(bU._1, bU._3)
576+ if ((bV == bV))
577+ then $Tuple2(bV._1, bV._3)
585578 else throw("Strict value is not equal to itself.")
586579 }
587580 else $Tuple2(0, 0)
588- let cz = cy._1
589- let cA = cy._2
590- $Tuple2((cx + cz), cA)
581+ let cA = cz._1
582+ let cB = cz._2
583+ $Tuple2((cy + cA), cB)
591584 }
592585 else throw("Wrong pool type")
593586 }
594587
595588
596-func cB (bi,aG,cw,az,ax,ay,aA,aB,cC,cD) = {
597- let at = addressFromStringValue(aG)
598- let cE = if ((bi == a))
589+func cC (bj,aH,cx,aA,ay,az,aB,aC,cD,cE) = {
590+ let au = addressFromStringValue(aH)
591+ let cF = if ((bj == a))
599592 then {
600- let bU = {
601- let aw = invoke(at, "callFunction", ["withdrawREADONLY", [toString(cw), toString(aA), toString(aB)]], nil)
602- if ($isInstanceOf(aw, "List[Any]"))
603- then aw
604- else throw(($getType(aw) + " couldn't be cast to List[Any]"))
593+ let bV = {
594+ let ax = invoke(au, "callFunction", ["withdrawREADONLY", [toString(cx), toString(aB), toString(aC)]], nil)
595+ if ($isInstanceOf(ax, "List[Any]"))
596+ then ax
597+ else throw(($getType(ax) + " couldn't be cast to List[Any]"))
605598 }
606- if ((bU == bU))
599+ if ((bV == bV))
607600 then $Tuple2({
608- let aw = bU[0]
609- if ($isInstanceOf(aw, "Int"))
610- then aw
611- else throw(($getType(aw) + " couldn't be cast to Int"))
601+ let ax = bV[0]
602+ if ($isInstanceOf(ax, "Int"))
603+ then ax
604+ else throw(($getType(ax) + " couldn't be cast to Int"))
612605 }, {
613- let aw = bU[1]
614- if ($isInstanceOf(aw, "Int"))
615- then aw
616- else throw(($getType(aw) + " couldn't be cast to Int"))
606+ let ax = bV[1]
607+ if ($isInstanceOf(ax, "Int"))
608+ then ax
609+ else throw(($getType(ax) + " couldn't be cast to Int"))
617610 })
618611 else throw("Strict value is not equal to itself.")
619612 }
620- else if ((bi == b))
613+ else if ((bj == b))
621614 then {
622- let cF = split({
623- let aw = invoke(at, "evaluateGetREADONLY", [az, cw], nil)
624- if ($isInstanceOf(aw, "String"))
625- then aw
626- else throw(($getType(aw) + " couldn't be cast to String"))
615+ let cG = split({
616+ let ax = invoke(au, "evaluateGetREADONLY", [aA, cx], nil)
617+ if ($isInstanceOf(ax, "String"))
618+ then ax
619+ else throw(($getType(ax) + " couldn't be cast to String"))
627620 }, "__")
628- if ((cF == cF))
629- then $Tuple2(parseIntValue(cF[1]), parseIntValue(cF[2]))
621+ if ((cG == cG))
622+ then $Tuple2(parseIntValue(cG[1]), parseIntValue(cG[2]))
630623 else throw("Strict value is not equal to itself.")
631624 }
632625 else throw("Wrong pool type")
633- let cG = cE._1
634- let cH = cE._2
635- if ((cC > 0))
626+ let cH = cF._1
627+ let cI = cF._2
628+ if ((cD > 0))
636629 then {
637- let cI = if (if ((cD == ax))
638- then (cC > cG)
630+ let cJ = if (if ((cE == ay))
631+ then (cD > cH)
639632 else false)
640- then (cC - cG)
641- else if (if ((cD == ay))
642- then (cC > cH)
633+ then (cD - cH)
634+ else if (if ((cE == az))
635+ then (cD > cI)
643636 else false)
644- then (cC - cH)
637+ then (cD - cI)
645638 else 0
646- let cJ = if ((cI > 0))
647- then if ((bi == a))
648- then bV(aG, ax, ay, aA, aB, cI, cD)
649- else cg(aG, ax, ay, aA, aB, cI, cD)
639+ let cK = if ((cJ > 0))
640+ then if ((bj == a))
641+ then bW(aH, ay, az, aB, aC, cJ, cE)
642+ else ch(aH, ay, az, aB, aC, cJ, cE)
650643 else $Tuple2("", 0)
651- let cf = cJ._1
652- let ce = cJ._2
653- if ((cD == ax))
654- then $Tuple2(((cG + cI) - cC), (cH - ce))
655- else $Tuple2((cG - ce), ((cH + cI) - cC))
644+ let cg = cK._1
645+ let cf = cK._2
646+ if ((cE == ay))
647+ then $Tuple2(((cH + cJ) - cD), (cI - cf))
648+ else $Tuple2((cH - cf), ((cI + cJ) - cD))
656649 }
657- else $Tuple2(cG, cH)
650+ else $Tuple2(cH, cI)
658651 }
659652
660653
661-func cK (aD,aG) = if ((aD == a))
654+func cL (aE,aH) = if ((aE == a))
662655 then {
663- let cL = an(af)
664- if ((cL == cL))
656+ let cM = ao(ag)
657+ if ((cM == cM))
665658 then {
666- let bU = invoke(aM(), "claim", [aG], nil)
667- if ((bU == bU))
659+ let bV = invoke(aN(), "claim", [aH], nil)
660+ if ((bV == bV))
668661 then {
669- let cM = an(af)
670- $Tuple2((cM - cL), af)
662+ let cN = ao(ag)
663+ $Tuple2((cN - cM), ag)
671664 }
672665 else throw("Strict value is not equal to itself.")
673666 }
674667 else throw("Strict value is not equal to itself.")
675668 }
676- else if ((aD == b))
669+ else if ((aE == b))
677670 then {
678- let cL = an(ag)
679- if ((cL == cL))
671+ let cM = ao(ah)
672+ if ((cM == cM))
680673 then {
681- let bU = invoke(aN(Address(fromBase58String(aG))), "claimWX", [aG], nil)
682- if ((bU == bU))
674+ let bV = invoke(aO(Address(fromBase58String(aH))), "claimWX", [aH], nil)
675+ if ((bV == bV))
683676 then {
684- let cM = an(ag)
685- $Tuple2((cM - cL), ag)
677+ let cN = ao(ah)
678+ $Tuple2((cN - cM), ah)
686679 }
687680 else throw("Strict value is not equal to itself.")
688681 }
689682 else throw("Strict value is not equal to itself.")
690683 }
691684 else throw("Wrong pool type")
692685
693686
694-func cN (bi,aG,aL,bA,ax,bB,ay,aA,aB,cO) = {
695- let cP = an(fromBase58String(cO))
696- if ((cP == cP))
687+func cO (bj,aH,aM,bB,ay,bC,az,aB,aC,cP) = {
688+ let cQ = ao(fromBase58String(cP))
689+ if ((cQ == cQ))
697690 then {
698- let at = addressFromStringValue(aG)
699- let cQ = if (if ((bA > 0))
700- then (bB > 0)
691+ let au = addressFromStringValue(aH)
692+ let cR = if (if ((bB > 0))
693+ then (bC > 0)
701694 else false)
702695 then {
703- let cR = bz(bi, at, bA, ax, bB, ay, aA, aB)
704- let cs = cR._1
705- let ct = cR._2
706- let cu = cR._3
707- let cv = cR._4
708- let bU = bJ(at, bi, cs, ax, ct, ay)
709- if ((bU == bU))
710- then $Tuple2(cu, cv)
696+ let cS = bA(bj, au, bB, ay, bC, az, aB, aC)
697+ let ct = cS._1
698+ let cu = cS._2
699+ let cv = cS._3
700+ let cw = cS._4
701+ let bV = bK(au, bj, ct, ay, cu, az)
702+ if ((bV == bV))
703+ then $Tuple2(cv, cw)
711704 else throw("Strict value is not equal to itself.")
712705 }
713- else if ((bA > 0))
714- then $Tuple2(bA, ax)
715- else if ((bB > 0))
716- then $Tuple2(bB, ay)
706+ else if ((bB > 0))
707+ then $Tuple2(bB, ay)
708+ else if ((bC > 0))
709+ then $Tuple2(bC, az)
717710 else throw("pmts must be > 0")
718- let cu = cQ._1
719- let cv = cQ._2
720- let bU = if ((cu > 0))
721- then bL(at, bi, cu, cv)
711+ let cv = cR._1
712+ let cw = cR._2
713+ let bV = if ((cv > 0))
714+ then bM(au, bj, cv, cw)
722715 else nil
723- if ((bU == bU))
716+ if ((bV == bV))
724717 then {
725- let cS = an(fromBase58String(cO))
726- let cT = (cS - cP)
727- let cU = fraction(cT, aK(aG, aL), m)
728- let cV = (cT - cU)
729- if ((0 >= cV))
718+ let cT = ao(fromBase58String(cP))
719+ let cU = (cT - cQ)
720+ let cV = fraction(cU, aL(aH, aM), m)
721+ let cW = (cU - cV)
722+ if ((0 >= cW))
730723 then throw("amount of staked sharetokens must be > 0")
731724 else {
732- let cW = bN(aG, bi, cO, cV)
733- if ((cW == cW))
734- then $Tuple2(cV, cU)
725+ let cX = bO(aH, bj, cP, cW)
726+ if ((cX == cX))
727+ then $Tuple2(cW, cV)
735728 else throw("Strict value is not equal to itself.")
736729 }
737730 }
738731 else throw("Strict value is not equal to itself.")
739732 }
740733 else throw("Strict value is not equal to itself.")
741734 }
742735
743736
744-func cX (aG,aJ,cY,cU,cZ,az,aD,da) = {
745- let db = aF(aG)
746- let dc = aH(aG)
747- let dd = if (da)
748- then $Tuple2(getIntegerValue(this, (aG + C)), (dc + cY))
749- else $Tuple2(getIntegerValue(this, (aG + D)), dc)
750- let de = dd._1
751- let df = dd._2
752-[IntegerEntry((aG + A), (db + cY)), IntegerEntry((aG + B), df), IntegerEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + u), cY), IntegerEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + z), de), StringEntry((((aJ + "_") + toString(cZ)) + v), aG), IntegerEntry((aJ + y), cZ), ScriptTransfer(ab, cU, fromBase58String(az))]
737+func cY (aH,aK,cZ,cV,da,aA,aE,db) = {
738+ let dc = aG(aH)
739+ let dd = aI(aH)
740+ let de = if (db)
741+ then $Tuple2(getIntegerValue(this, (aH + C)), (dd + cZ))
742+ else $Tuple2(getIntegerValue(this, (aH + D)), dd)
743+ let df = de._1
744+ let dg = de._2
745+[IntegerEntry((aH + A), (dc + cZ)), IntegerEntry((aH + B), dg), IntegerEntry((((((aH + "_") + aK) + "_") + toString(da)) + u), cZ), IntegerEntry((((((aH + "_") + aK) + "_") + toString(da)) + z), df), StringEntry((((aK + "_") + toString(da)) + v), aH), IntegerEntry((aK + y), da), ScriptTransfer(ac, cV, fromBase58String(aA))]
753746 }
754747
755748
756-func dg (dh,di,dj,dk,dl,dm,dn,do,dp,dq) = {
757- let dr = an(aR(dh))
758- if ((dr == dr))
749+func dh (di,dj,dk,dl,dm,dn,do,dp,dq,dr) = {
750+ let ds = ao(aS(di))
751+ if ((ds == ds))
759752 then {
760- let bU = invoke(ac, "swap", [dk, dl, dm, dn, do, dp, dq], [AttachedPayment(dj, di)])
761- if ((bU == bU))
762- then (an(aR(dh)) - dr)
753+ let bV = invoke(ad, "swap", [dl, dm, dn, do, dp, dq, dr], [AttachedPayment(dk, dj)])
754+ if ((bV == bV))
755+ then (ao(aS(di)) - ds)
763756 else throw("Strict value is not equal to itself.")
764757 }
765758 else throw("Strict value is not equal to itself.")
766759 }
767760
768761
769-func ds (dh,di,dj,dt,du,dq) = {
770- let dr = an(aR(dh))
771- if ((dr == dr))
762+func dt (di,dj,dk,du,dv,dr) = {
763+ let ds = ao(aS(di))
764+ if ((ds == ds))
772765 then {
773- let bU = invoke(ac, "puzzleSwap", [dt, du, dq], [AttachedPayment(dj, di)])
774- if ((bU == bU))
775- then (an(aR(dh)) - dr)
766+ let bV = invoke(ad, "puzzleSwap", [du, dv, dr], [AttachedPayment(dk, dj)])
767+ if ((bV == bV))
768+ then (ao(aS(di)) - ds)
776769 else throw("Strict value is not equal to itself.")
777770 }
778771 else throw("Strict value is not equal to itself.")
779772 }
780773
781774
782-func dv (dh,di,dj,dw,dx,dy,dz,dA,dB,dq) = {
783- let dr = an(aR(dh))
784- if ((dr == dr))
775+func dw (di,dj,dk,dx,dy,dz,dA,dB,dC,dr) = {
776+ let ds = ao(aS(di))
777+ if ((ds == ds))
785778 then {
786- let bU = invoke(ac, "swopfiSwap", [dw, dx, dy, dz, dA, dB, dq], [AttachedPayment(dj, di)])
787- if ((bU == bU))
788- then (an(aR(dh)) - dr)
779+ let bV = invoke(ad, "swopfiSwap", [dx, dy, dz, dA, dB, dC, dr], [AttachedPayment(dk, dj)])
780+ if ((bV == bV))
781+ then (ao(aS(di)) - ds)
789782 else throw("Strict value is not equal to itself.")
790783 }
791784 else throw("Strict value is not equal to itself.")
792785 }
793786
794787
795-func dC (aG,bi,dD,dE) = {
796- let at = Address(fromBase58String(aG))
797- let dF = aC(at, bi)
798- let dG = dF._1
799- let dH = dF._2
800- let aA = dF._3
801- let aB = dF._4
802- let az = dF._5
803- if (if ((dD != dG))
804- then (dD != dH)
788+func dD (aH,bj,dE,dF) = {
789+ let au = Address(fromBase58String(aH))
790+ let dG = aD(au, bj)
791+ let dH = dG._1
792+ let dI = dG._2
793+ let aB = dG._3
794+ let aC = dG._4
795+ let aA = dG._5
796+ if (if ((dE != dH))
797+ then (dE != dI)
805798 else false)
806799 then throw("Wrong asset")
807800 else {
808- let dI = if ((dD == dG))
809- then $Tuple2(dE, 0)
810- else $Tuple2(0, dE)
811- let bA = dI._1
812- let bB = dI._2
813- let dJ = cN(bi, aG, i, bA, dG, bB, dH, aA, aB, az)
814- let cY = dJ._1
815- let dK = dJ._2
816- let dL = valueOrElse(getInteger(this, (aG + C)), 0)
817- let dM = valueOrElse(getInteger(this, (aG + D)), 0)
818- let dN = aF(aG)
819- let dO = aH(aG)
820- let dP = fraction(dO, j, dN)
821- let dQ = fraction(cY, dP, j)
822- let dR = (cY - dQ)
823- let dS = if ((dO > 0))
824- then (dL + fraction(dQ, k, dO))
801+ let dJ = if ((dE == dH))
802+ then $Tuple2(dF, 0)
803+ else $Tuple2(0, dF)
804+ let bB = dJ._1
805+ let bC = dJ._2
806+ let dK = cO(bj, aH, i, bB, dH, bC, dI, aB, aC, aA)
807+ let cZ = dK._1
808+ let dL = dK._2
809+ let dM = valueOrElse(getInteger(this, (aH + C)), 0)
810+ let dN = valueOrElse(getInteger(this, (aH + D)), 0)
811+ let dO = aG(aH)
812+ let dP = aI(aH)
813+ let dQ = fraction(dP, j, dO)
814+ let dR = fraction(cZ, dQ, j)
815+ let dS = (cZ - dR)
816+ let dT = if ((dP > 0))
817+ then (dM + fraction(dR, k, dP))
825818 else 0
826- let dT = if (((dN - dO) > 0))
827- then (dM + fraction(dR, k, (dN - dO)))
819+ let dU = if (((dO - dP) > 0))
820+ then (dN + fraction(dS, k, (dO - dP)))
828821 else 0
829- let dU = fraction(dQ, aK(aG, d), m)
830- let dV = fraction(dR, aK(aG, c), m)
831- let dW = bP(aG, bi, az, (dU + dV))
832- if ((dW == dW))
833- then ([IntegerEntry((aG + C), dS), IntegerEntry((aG + D), dT), IntegerEntry((aG + A), ((dN + cY) - dW)), IntegerEntry((aG + B), ((dO + dQ) - dU)), ScriptTransfer(ab, (dU + dV), fromBase58String(az))] ++ bv(dG, dH, az))
822+ let dV = fraction(dR, aL(aH, d), m)
823+ let dW = fraction(dS, aL(aH, c), m)
824+ let dX = bQ(aH, bj, aA, (dV + dW))
825+ if ((dX == dX))
826+ then ([IntegerEntry((aH + C), dT), IntegerEntry((aH + D), dU), IntegerEntry((aH + A), ((dO + cZ) - dX)), IntegerEntry((aH + B), ((dP + dR) - dV)), ScriptTransfer(ac, (dV + dW), fromBase58String(aA))] ++ bw(dH, dI, aA))
834827 else throw("Strict value is not equal to itself.")
835828 }
836829 }
837830
838831
839-func dX (aG,dY,dZ,ea) = {
840- let at = Address(fromBase58String(aG))
841- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Unknown pool")
842- let eb = aC(at, bi)
843- let bW = eb._1
844- let bX = eb._2
845- let aA = eb._3
846- let aB = eb._4
847- let az = eb._5
848- let ec = an(aR(bW))
849- if ((ec == ec))
832+func dY (aH,dZ,ea,eb) = {
833+ let au = Address(fromBase58String(aH))
834+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Unknown pool")
835+ let ec = aD(au, bj)
836+ let bX = ec._1
837+ let bY = ec._2
838+ let aB = ec._3
839+ let aC = ec._4
840+ let aA = ec._5
841+ let ed = ao(aS(bX))
842+ if ((ed == ed))
850843 then {
851- let ed = an(aR(bX))
852- if ((ed == ed))
844+ let ee = ao(aS(bY))
845+ if ((ee == ee))
853846 then {
854- let bU = if ((bi == a))
855- then invoke(at, "callFunction", ["withdraw", [toString(dY)]], nil)
847+ let bV = if ((bj == a))
848+ then invoke(au, "callFunction", ["withdraw", [toString(dZ)]], nil)
856849 else {
857- let bU = bP(aG, bi, az, dY)
858- if ((bU == bU))
859- then invoke(at, "get", nil, [AttachedPayment(aR(az), dY)])
850+ let bV = bQ(aH, bj, aA, dZ)
851+ if ((bV == bV))
852+ then invoke(au, "get", nil, [AttachedPayment(aS(aA), dZ)])
860853 else throw("Strict value is not equal to itself.")
861854 }
862- if ((bU == bU))
855+ if ((bV == bV))
863856 then {
864- let ee = an(aR(bW))
865- let ef = an(aR(bX))
866- let eg = $Tuple2((ee - ec), (ef - ed))
867- let eh = eg._1
868- let ei = eg._2
869- let ej = if ((dZ > 0))
857+ let ef = ao(aS(bX))
858+ let eg = ao(aS(bY))
859+ let eh = $Tuple2((ef - ed), (eg - ee))
860+ let ei = eh._1
861+ let ej = eh._2
862+ let ek = if ((ea > 0))
870863 then {
871- let cI = if (if ((ea == bW))
872- then (dZ > eh)
864+ let cJ = if (if ((eb == bX))
865+ then (ea > ei)
873866 else false)
874- then (dZ - eh)
875- else if (if ((ea == bX))
876- then (dZ > ei)
867+ then (ea - ei)
868+ else if (if ((eb == bY))
869+ then (ea > ej)
877870 else false)
878- then (dZ - ei)
871+ then (ea - ej)
879872 else 0
880- let ek = if ((cI > 0))
881- then cm(bi, aG, bW, bX, aA, aB, cI, ea)
873+ let el = if ((cJ > 0))
874+ then cn(bj, aH, bX, bY, aB, aC, cJ, eb)
882875 else 0
883- if ((ek == ek))
876+ if ((el == el))
884877 then {
885- let el = an(aR(bW))
886- let em = an(aR(bX))
887- if ((ea == bW))
888- then $Tuple2(((el - ec) - dZ), (em - ed))
889- else $Tuple2((el - ec), ((em - ed) - dZ))
878+ let em = ao(aS(bX))
879+ let en = ao(aS(bY))
880+ if ((eb == bX))
881+ then $Tuple2(((em - ed) - ea), (en - ee))
882+ else $Tuple2((em - ed), ((en - ee) - ea))
890883 }
891884 else throw("Strict value is not equal to itself.")
892885 }
893- else $Tuple2(eh, ei)
894- let en = ej._1
895- let eo = ej._2
896- $Tuple7(en, bW, eo, bX, ee, ef, az)
886+ else $Tuple2(ei, ej)
887+ let eo = ek._1
888+ let ep = ek._2
889+ $Tuple7(eo, bX, ep, bY, ef, eg, aA)
897890 }
898891 else throw("Strict value is not equal to itself.")
899892 }
900893 else throw("Strict value is not equal to itself.")
901894 }
902895 else throw("Strict value is not equal to itself.")
903896 }
904897
905898
906-func ep (aJ,aG,eq,er) = {
907- let es = valueOrErrorMessage(getInteger(this, (((((aG + "_") + aJ) + "_") + eq) + u)), "Unknown position")
908- let et = getIntegerValue(this, (((((aG + "_") + aJ) + "_") + eq) + z))
909- let eu = if (er)
910- then getIntegerValue(this, (aG + C))
911- else getIntegerValue(this, (aG + D))
912- (es + fraction(es, (eu - et), k))
899+func eq (aK,aH,er,es) = {
900+ let et = valueOrErrorMessage(getInteger(this, (((((aH + "_") + aK) + "_") + er) + u)), "Unknown position")
901+ let eu = getIntegerValue(this, (((((aH + "_") + aK) + "_") + er) + z))
902+ let ev = if (es)
903+ then getIntegerValue(this, (aH + C))
904+ else getIntegerValue(this, (aH + D))
905+ (et + fraction(et, (ev - eu), k))
913906 }
914907
915908
916-func ev (aJ,aG,eq,ew) = {
917- let es = valueOrErrorMessage(getInteger(this, (((((aG + "_") + aJ) + "_") + eq) + u)), "Unknown position")
918- let cC = valueOrElse(getInteger(this, (((((aG + "_") + aJ) + "_") + eq) + w)), 0)
919- let dY = ep(aJ, aG, eq, (cC > 0))
920- let ex = aF(aG)
921- let ey = Address(fromBase58String(aJ))
922- let ea = valueOrElse(getString(this, (((((aG + "_") + aJ) + "_") + eq) + x)), "")
923- let dZ = if ((cC > 0))
909+func ew (aK,aH,er,ex) = {
910+ let et = valueOrErrorMessage(getInteger(this, (((((aH + "_") + aK) + "_") + er) + u)), "Unknown position")
911+ let cD = valueOrElse(getInteger(this, (((((aH + "_") + aK) + "_") + er) + w)), 0)
912+ let dZ = eq(aK, aH, er, (cD > 0))
913+ let ey = aG(aH)
914+ let ez = Address(fromBase58String(aK))
915+ let eb = valueOrElse(getString(this, (((((aH + "_") + aK) + "_") + er) + x)), "")
916+ let ea = if ((cD > 0))
924917 then {
925- let aw = invoke(ah(), "getAssetDebt", [false, ((aJ + "_") + eq), ea], nil)
926- if ($isInstanceOf(aw, "Int"))
927- then aw
928- else throw(($getType(aw) + " couldn't be cast to Int"))
918+ let ax = invoke(ai(), "getAssetDebt", [false, ((aK + "_") + er), eb], nil)
919+ if ($isInstanceOf(ax, "Int"))
920+ then ax
921+ else throw(($getType(ax) + " couldn't be cast to Int"))
929922 }
930923 else 0
931- let ez = dX(aG, dY, dZ, ea)
932- if ((ez == ez))
924+ let eA = dY(aH, dZ, ea, eb)
925+ if ((eA == eA))
933926 then {
934- let az = ez._7
935- let ef = ez._6
936- let ee = ez._5
937- let bX = ez._4
938- let eA = ez._3
939- let bW = ez._2
940- let eB = ez._1
941- let eC = if ((dZ > 0))
942- then invoke(ah(), "repayFor", [((aJ + "_") + eq)], [AttachedPayment(aR(ea), dZ)])
927+ let aA = eA._7
928+ let eg = eA._6
929+ let ef = eA._5
930+ let bY = eA._4
931+ let eB = eA._3
932+ let bX = eA._2
933+ let eC = eA._1
934+ let eD = if ((ea > 0))
935+ then invoke(ai(), "repayFor", [((aK + "_") + er)], [AttachedPayment(aS(eb), ea)])
943936 else 0
944- if ((eC == eC))
945- then ([DeleteEntry((((((aG + "_") + aJ) + "_") + eq) + u)), DeleteEntry((((((aG + "_") + aJ) + "_") + eq) + z)), IntegerEntry((aG + A), (ex - dY)), ScriptTransfer(ey, eB, aR(bW)), ScriptTransfer(ey, eA, aR(bX))] ++ bv(bW, bX, az))
937+ if ((eD == eD))
938+ then ([DeleteEntry((((((aH + "_") + aK) + "_") + er) + u)), DeleteEntry((((((aH + "_") + aK) + "_") + er) + z)), IntegerEntry((aH + A), (ey - dZ)), ScriptTransfer(ez, eC, aS(bX)), ScriptTransfer(ez, eB, aS(bY))] ++ bw(bX, bY, aA))
946939 else throw("Strict value is not equal to itself.")
947940 }
948941 else throw("Strict value is not equal to itself.")
949942 }
950943
951944
952-func eD (eE) = {
953- let eF = split(valueOrErrorMessage(getString(this, (eE + L)), ("No request with id " + eE)), ",")
954- let aJ = eF[0]
955- let aG = eF[1]
956- let bA = parseIntValue(eF[2])
957- let dG = eF[3]
958- let bB = parseIntValue(eF[4])
959- let dH = eF[5]
960- let aA = parseIntValue(eF[6])
961- let aB = parseIntValue(eF[7])
962- let az = eF[8]
963- let eG = eF[9]
964- let eH = parseIntValue(eF[10])
965- $Tuple11(aJ, aG, bA, dG, bB, dH, aA, aB, az, eG, eH)
945+func eE (eF) = {
946+ let eG = split(valueOrErrorMessage(getString(this, (eF + L)), ("No request with id " + eF)), ",")
947+ let aK = eG[0]
948+ let aH = eG[1]
949+ let bB = parseIntValue(eG[2])
950+ let dH = eG[3]
951+ let bC = parseIntValue(eG[4])
952+ let dI = eG[5]
953+ let aB = parseIntValue(eG[6])
954+ let aC = parseIntValue(eG[7])
955+ let aA = eG[8]
956+ let eH = eG[9]
957+ let eI = parseIntValue(eG[10])
958+ $Tuple11(aK, aH, bB, dH, bC, dI, aB, aC, aA, eH, eI)
966959 }
967960
968961
969-func eI (bA,bB,ax,ay,eJ,eK) = {
970- let bm = ( let aw = invoke(ad, "getTWAP60", [ax, false], nil)
971- if ($isInstanceOf(aw, "(Int, Int)"))
972- then aw
973- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
974- let bn = ( let aw = invoke(ad, "getTWAP60", [ay, false], nil)
975- if ($isInstanceOf(aw, "(Int, Int)"))
976- then aw
977- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._2
978- let eL = pow(10, 0, aS(ax), 0, 0, DOWN)
979- let eM = pow(10, 0, aS(ay), 0, 0, DOWN)
980- let eN = (fraction(bm, bA, eL) + fraction(bn, bB, eM))
981- let eO = if ((eK == ax))
982- then $Tuple2(bm, eL)
983- else $Tuple2(bn, eM)
984- let eP = eO._1
985- let eQ = eO._2
986- fraction(fraction(eN, (eJ - 100), 100), eQ, eP)
962+func eJ (bB,bC,ay,az,eK,eL) = {
963+ let bn = getIntegerValue(ae, (ay + R))
964+ let bo = getIntegerValue(ae, (az + R))
965+ let eM = pow(10, 0, aT(ay), 0, 0, DOWN)
966+ let eN = pow(10, 0, aT(az), 0, 0, DOWN)
967+ let eO = (fraction(bn, bB, eM) + fraction(bo, bC, eN))
968+ let eP = if ((eL == ay))
969+ then $Tuple2(bn, eM)
970+ else $Tuple2(bo, eN)
971+ let eQ = eP._1
972+ let eR = eP._2
973+ fraction(fraction(eO, (eK - 100), 100), eR, eQ)
987974 }
988975
989976
990-@Callable(ak)
991-func calcPriceImpactEVALONLY (aG,eJ,eK,bA,bB) = if (if ((100 > eJ))
977+@Callable(al)
978+func calcPriceImpactEVALONLY (aH,eK,eL,bB,bC) = if (if ((100 > eK))
992979 then true
993- else (eJ > 300))
980+ else (eK > 300))
994981 then throw("Leverage can't be <100 and >300")
995982 else {
996- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
997- let eR = aC(Address(fromBase58String(aG)), bi)
998- let dG = eR._1
999- let dH = eR._2
1000- let aA = eR._3
1001- let aB = eR._4
1002- let az = eR._5
1003- let cC = if ((eJ > 100))
1004- then eI(bA, bB, dG, dH, eJ, eK)
983+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
984+ let eS = aD(Address(fromBase58String(aH)), bj)
985+ let dH = eS._1
986+ let dI = eS._2
987+ let aB = eS._3
988+ let aC = eS._4
989+ let aA = eS._5
990+ let cD = if ((eK > 100))
991+ then eJ(bB, bC, dH, dI, eK, eL)
1005992 else 0
1006- let eS = if ((eK == dG))
1007- then $Tuple2((bA + cC), bB)
1008- else $Tuple2(bA, (bB + cC))
1009- let eT = eS._1
1010- let eU = eS._2
1011- let eV = cp(bi, aG, eT, dG, eU, dH, aA, aB)
1012- let cw = eV._1
1013- let cA = eV._2
1014- let eW = if ((0 > cA))
1015- then (cA * -1)
1016- else cA
1017- $Tuple2(nil, [eW])
993+ let eT = if ((eL == dH))
994+ then $Tuple2((bB + cD), bC)
995+ else $Tuple2(bB, (bC + cD))
996+ let eU = eT._1
997+ let eV = eT._2
998+ let eW = cq(bj, aH, eU, dH, eV, dI, aB, aC)
999+ let cx = eW._1
1000+ let cB = eW._2
1001+ let eX = if ((0 > cB))
1002+ then (cB * -1)
1003+ else cB
1004+ $Tuple2(nil, [eX])
10181005 }
10191006
10201007
10211008
1022-@Callable(ak)
1023-func getShareAssetPriceREADONLY (az) = {
1024- let eX = bh(az)
1025- $Tuple2(nil, eX)
1009+@Callable(al)
1010+func getShareAssetPriceREADONLY (aA) = {
1011+ let eY = bi(aA)
1012+ $Tuple2(nil, eY)
10261013 }
10271014
10281015
10291016
1030-@Callable(ak)
1031-func getUserPositionShareAmountREADONLY (aJ,cZ) = {
1032- let aG = valueOrErrorMessage(getString(this, (((aJ + "_") + cZ) + v)), "Unknown position")
1033- let cC = getIntegerValue(this, (((((aG + "_") + aJ) + "_") + cZ) + w))
1034- let dY = ep(aJ, aG, cZ, (cC > 0))
1035- $Tuple2(nil, dY)
1017+@Callable(al)
1018+func getUserPositionShareAmountREADONLY (aK,da) = {
1019+ let aH = valueOrErrorMessage(getString(this, (((aK + "_") + da) + v)), "Unknown position")
1020+ let cD = getIntegerValue(this, (((((aH + "_") + aK) + "_") + da) + w))
1021+ let dZ = eq(aK, aH, da, (cD > 0))
1022+ $Tuple2(nil, dZ)
10361023 }
10371024
10381025
10391026
1040-@Callable(ak)
1041-func getUserPositionInDollarsREADONLY (aJ,eY,cZ) = {
1042- func eZ (aY,aG) = {
1043- let fa = aY
1044- let fb = fa._1
1045- let fc = fa._2
1046- let fd = fa._3
1047- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
1048- let fe = aC(Address(fromBase58String(aG)), bi)
1049- let dG = fe._1
1050- let dH = fe._2
1051- let aA = fe._3
1052- let aB = fe._4
1053- let az = fe._5
1054- let cC = valueOrElse(getInteger(this, (((((aG + "_") + aJ) + "_") + cZ[fd]) + w)), 0)
1055- let dY = ep(aJ, aG, cZ[fd], (cC > 0))
1056- let eX = bh(az)
1057- let ff = pow(10, 0, aS(az), 0, 0, DOWN)
1058- let fg = fraction(dY, eX, ff)
1059- if ((cC == 0))
1060- then $Tuple3((fb :+ fg), (fc :+ 0), (fd + 1))
1027+@Callable(al)
1028+func getUserPositionInDollarsREADONLY (aK,eZ,da) = {
1029+ func fa (aZ,aH) = {
1030+ let fb = aZ
1031+ let fc = fb._1
1032+ let fd = fb._2
1033+ let fe = fb._3
1034+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
1035+ let ff = aD(Address(fromBase58String(aH)), bj)
1036+ let dH = ff._1
1037+ let dI = ff._2
1038+ let aB = ff._3
1039+ let aC = ff._4
1040+ let aA = ff._5
1041+ let cD = valueOrElse(getInteger(this, (((((aH + "_") + aK) + "_") + da[fe]) + w)), 0)
1042+ let dZ = eq(aK, aH, da[fe], (cD > 0))
1043+ let eY = bi(aA)
1044+ let fg = pow(10, 0, aT(aA), 0, 0, DOWN)
1045+ let fh = fraction(dZ, eY, fg)
1046+ if ((cD == 0))
1047+ then $Tuple3((fc :+ fh), (fd :+ 0), (fe + 1))
10611048 else {
1062- let ea = getStringValue(this, (((((aG + "_") + aJ) + "_") + cZ[fd]) + x))
1063- let dZ = {
1064- let aw = invoke(ah(), "getAssetDebt", [false, ((aJ + "_") + cZ[fd]), ea], nil)
1065- if ($isInstanceOf(aw, "Int"))
1066- then aw
1067- else throw(($getType(aw) + " couldn't be cast to Int"))
1049+ let eb = getStringValue(this, (((((aH + "_") + aK) + "_") + da[fe]) + x))
1050+ let ea = {
1051+ let ax = invoke(ai(), "getAssetDebt", [false, ((aK + "_") + da[fe]), eb], nil)
1052+ if ($isInstanceOf(ax, "Int"))
1053+ then ax
1054+ else throw(($getType(ax) + " couldn't be cast to Int"))
10681055 }
1069- let fh = ( let aw = invoke(ad, "getTWAP60", [ea, false], nil)
1070- if ($isInstanceOf(aw, "(Int, Int)"))
1071- then aw
1072- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._1
1073- let fi = pow(10, 0, aS(ea), 0, 0, DOWN)
1074- let fj = fraction(dZ, fh, fi)
1075- $Tuple3((fb :+ fg), (fc :+ fj), (fd + 1))
1056+ let fi = getIntegerValue(ae, (eb + R))
1057+ let fj = pow(10, 0, aT(eb), 0, 0, DOWN)
1058+ let fk = fraction(ea, fi, fj)
1059+ $Tuple3((fc :+ fh), (fd :+ fk), (fe + 1))
10761060 }
10771061 }
10781062
1079- let fk = {
1080- let ba = eY
1081- let bb = size(ba)
1082- let bc = $Tuple3(nil, nil, 0)
1083- func bd (be,bf) = if ((bf >= bb))
1084- then be
1085- else eZ(be, ba[bf])
1063+ let fl = {
1064+ let bb = eZ
1065+ let bc = size(bb)
1066+ let bd = $Tuple3(nil, nil, 0)
1067+ func be (bf,bg) = if ((bg >= bc))
1068+ then bf
1069+ else fa(bf, bb[bg])
10861070
1087- func bg (be,bf) = if ((bf >= bb))
1088- then be
1071+ func bh (bf,bg) = if ((bg >= bc))
1072+ then bf
10891073 else throw("List size exceeds 20")
10901074
1091- bg(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bd(bc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
1075+ bh(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(be(bd, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
10921076 }
1093- let fl = fk._1
1094- let dZ = fk._2
1095- $Tuple2(nil, $Tuple2(fl, dZ))
1077+ let fm = fl._1
1078+ let ea = fl._2
1079+ $Tuple2(nil, $Tuple2(fm, ea))
10961080 }
10971081
10981082
10991083
1100-@Callable(ak)
1101-func replenish (aG,eJ,eK) = if (if ((100 > eJ))
1084+@Callable(al)
1085+func replenish (aH,eK,eL) = if (if ((100 > eK))
11021086 then true
1103- else (eJ > 300))
1087+ else (eK > 300))
11041088 then throw("Leverage can't be <100 and >300")
1105- else if (if (!(getBooleanValue(this, (aG + E))))
1106- then (eJ > 100)
1089+ else if (if (!(getBooleanValue(this, (aH + E))))
1090+ then (eK > 100)
11071091 else false)
11081092 then throw("You can't borrow in this pool")
11091093 else {
1110- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
1111- let fm = aC(Address(fromBase58String(aG)), bi)
1112- let dG = fm._1
1113- let dH = fm._2
1114- let aA = fm._3
1115- let aB = fm._4
1116- let az = fm._5
1117- let fn = if ((size(ak.payments) == 2))
1118- then if ((aQ(ak.payments[0].assetId) != dG))
1094+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
1095+ let fn = aD(Address(fromBase58String(aH)), bj)
1096+ let dH = fn._1
1097+ let dI = fn._2
1098+ let aB = fn._3
1099+ let aC = fn._4
1100+ let aA = fn._5
1101+ let fo = if ((size(al.payments) == 2))
1102+ then if ((aR(al.payments[0].assetId) != dH))
11191103 then throw("Wrong payment asset A")
1120- else if ((aQ(ak.payments[1].assetId) != dH))
1104+ else if ((aR(al.payments[1].assetId) != dI))
11211105 then throw("Wrong payment asset B")
1122- else $Tuple4(ak.payments[0].amount, dG, ak.payments[1].amount, dH)
1123- else if ((size(ak.payments) == 1))
1124- then if ((aQ(ak.payments[0].assetId) == dG))
1125- then $Tuple4(ak.payments[0].amount, dG, 0, dH)
1126- else if ((aQ(ak.payments[0].assetId) == dH))
1127- then $Tuple4(0, dG, ak.payments[0].amount, dH)
1106+ else $Tuple4(al.payments[0].amount, dH, al.payments[1].amount, dI)
1107+ else if ((size(al.payments) == 1))
1108+ then if ((aR(al.payments[0].assetId) == dH))
1109+ then $Tuple4(al.payments[0].amount, dH, 0, dI)
1110+ else if ((aR(al.payments[0].assetId) == dI))
1111+ then $Tuple4(0, dH, al.payments[0].amount, dI)
11281112 else throw("Wrong payment")
11291113 else throw("One or two payments expected")
1130- let bA = fn._1
1131- let fo = fn._2
1132- let bB = fn._3
1133- let fp = fn._4
1134- let fq = aI(toString(ak.caller))
1135- if ((eJ > 100))
1114+ let bB = fo._1
1115+ let fp = fo._2
1116+ let bC = fo._3
1117+ let fq = fo._4
1118+ let fr = aJ(toString(al.caller))
1119+ if ((eK > 100))
11361120 then {
1137- let cC = eI(bA, bB, fo, fp, eJ, eK)
1138- let eF = makeString([toString(ak.caller), aG, toString(bA), fo, toString(bB), fp, toString(aA), toString(aB), az, eK, toString(cC)], ",")
1139- let fr = {
1140- let aw = invoke(this, "createNewRequest", [eF], nil)
1141- if ($isInstanceOf(aw, "Int"))
1142- then aw
1143- else throw(($getType(aw) + " couldn't be cast to Int"))
1121+ let cD = eJ(bB, bC, fp, fq, eK, eL)
1122+ let eG = makeString([toString(al.caller), aH, toString(bB), fp, toString(bC), fq, toString(aB), toString(aC), aA, eL, toString(cD)], ",")
1123+ let fs = {
1124+ let ax = invoke(this, "createNewRequest", [eG], nil)
1125+ if ($isInstanceOf(ax, "Int"))
1126+ then ax
1127+ else throw(($getType(ax) + " couldn't be cast to Int"))
11441128 }
1145- if ((fr == fr))
1129+ if ((fs == fs))
11461130 then {
1147- let fs = [((toString(ak.caller) + "_") + toString(fq)), az, eK, cC, toString(this), "replenishFromLand", toString(valueOrErrorMessage(fr, "Can't create new request"))]
1148- let bU = reentrantInvoke(ah(), "flashPosition", fs, nil)
1149- if ((bU == bU))
1131+ let ft = [((toString(al.caller) + "_") + toString(fr)), aA, eL, cD, toString(this), "replenishFromLand", toString(valueOrErrorMessage(fs, "Can't create new request"))]
1132+ let bV = reentrantInvoke(ai(), "flashPosition", ft, nil)
1133+ if ((bV == bV))
11501134 then nil
11511135 else throw("Strict value is not equal to itself.")
11521136 }
11531137 else throw("Strict value is not equal to itself.")
11541138 }
11551139 else {
1156- let ft = cN(bi, aG, h, bA, dG, bB, dH, aA, aB, az)
1157- let fu = ft._1
1158- let dW = ft._2
1159- (cX(aG, toString(ak.caller), fu, dW, fq, az, bi, false) ++ bv(dG, dH, az))
1140+ let fu = cO(bj, aH, h, bB, dH, bC, dI, aB, aC, aA)
1141+ let fv = fu._1
1142+ let dX = fu._2
1143+ (cY(aH, toString(al.caller), fv, dX, fr, aA, bj, false) ++ bw(dH, dI, aA))
11601144 }
11611145 }
11621146
11631147
11641148
1165-@Callable(ak)
1166-func withdraw (aG,eq) = ev(toString(ak.caller), aG, toString(eq), false)
1149+@Callable(al)
1150+func withdraw (aH,er) = ew(toString(al.caller), aH, toString(er), false)
11671151
11681152
11691153
1170-@Callable(ak)
1171-func createUpdateStopLoss (eq,fv,ao,fw) = {
1172- let fx = ( let aw = invoke(ad, "getTWAP60", [ao, false], nil)
1173- if ($isInstanceOf(aw, "(Int, Int)"))
1174- then aw
1175- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._1
1176- if (!(isDefined(getInteger(this, (((((fv + "_") + toString(ak.caller)) + "_") + toString(eq)) + u)))))
1154+@Callable(al)
1155+func createUpdateStopLoss (er,fw,ap,fx) = {
1156+ let fy = getIntegerValue(ae, (ap + R))
1157+ if (!(isDefined(getInteger(this, (((((fw + "_") + toString(al.caller)) + "_") + toString(er)) + u)))))
11771158 then throw("There are no user position")
1178- else if ((0 >= fw))
1159+ else if ((0 >= fx))
11791160 then throw("Price must be greater than 0")
1180- else if ((fw > fx))
1161+ else if ((fx > fy))
11811162 then throw("Price must be less than current token price")
1182- else [IntegerEntry((((((((toString(ak.caller) + "_") + toString(eq)) + "_") + fv) + "_") + ao) + R), fw)]
1163+ else [IntegerEntry((((((((toString(al.caller) + "_") + toString(er)) + "_") + fw) + "_") + ap) + S), fx)]
11831164 }
11841165
11851166
11861167
1187-@Callable(ak)
1188-func deleteStopLoss (eq,fv,ao) = if (!(isDefined(getInteger(this, (((((((toString(ak.caller) + "_") + toString(eq)) + "_") + fv) + "_") + ao) + R)))))
1168+@Callable(al)
1169+func deleteStopLoss (er,fw,ap) = if (!(isDefined(getInteger(this, (((((((toString(al.caller) + "_") + toString(er)) + "_") + fw) + "_") + ap) + S)))))
11891170 then throw("No entry")
1190- else [DeleteEntry((((((((toString(ak.caller) + "_") + toString(eq)) + "_") + fv) + "_") + ao) + R))]
1171+ else [DeleteEntry((((((((toString(al.caller) + "_") + toString(er)) + "_") + fw) + "_") + ap) + S))]
11911172
11921173
11931174
1194-@Callable(ak)
1195-func init (fy,fz,fA,ad,fB,ae,fC,fD,fE) = if (isDefined(getString(S)))
1175+@Callable(al)
1176+func init (fz,fA,fB,ae,fC,af,fD,fE,fF) = if (isDefined(getString(T)))
11961177 then throw("Already inited")
1197- else [StringEntry(S, fy), StringEntry(T, fz), StringEntry(U, fA), StringEntry(W, ad), StringEntry(X, fB), StringEntry(Y, ae), StringEntry(Z, fC), StringEntry(aa, fD), StringEntry(V, fE)]
1178+ else [StringEntry(T, fz), StringEntry(U, fA), StringEntry(V, fB), StringEntry(X, ae), StringEntry(Y, fC), StringEntry(Z, af), StringEntry(aa, fD), StringEntry(ab, fE), StringEntry(W, fF)]
11981179
11991180
12001181
1201-@Callable(ak)
1202-func createNewRequest (bT) = valueOrElse(al(ak), {
1203- let fr = (valueOrElse(getInteger(this, M), 0) + 1)
1204- $Tuple2([StringEntry((toString(fr) + L), bT), IntegerEntry(M, fr)], fr)
1182+@Callable(al)
1183+func createNewRequest (bU) = valueOrElse(am(al), {
1184+ let fs = (valueOrElse(getInteger(this, M), 0) + 1)
1185+ $Tuple2([StringEntry((toString(fs) + L), bU), IntegerEntry(M, fs)], fs)
12051186 })
12061187
12071188
12081189
1209-@Callable(ak)
1210-func replenishFromLand (eE) = valueOrElse(am(ak), {
1211- let fF = eD(eE)
1212- let aJ = fF._1
1213- let aG = fF._2
1214- let bA = fF._3
1215- let dG = fF._4
1216- let bB = fF._5
1217- let dH = fF._6
1218- let aA = fF._7
1219- let aB = fF._8
1220- let az = fF._9
1221- let eG = fF._10
1222- let eH = fF._11
1223- if ((size(ak.payments) != 1))
1190+@Callable(al)
1191+func replenishFromLand (eF) = valueOrElse(an(al), {
1192+ let fG = eE(eF)
1193+ let aK = fG._1
1194+ let aH = fG._2
1195+ let bB = fG._3
1196+ let dH = fG._4
1197+ let bC = fG._5
1198+ let dI = fG._6
1199+ let aB = fG._7
1200+ let aC = fG._8
1201+ let aA = fG._9
1202+ let eH = fG._10
1203+ let eI = fG._11
1204+ if ((size(al.payments) != 1))
12241205 then throw("Wrong payment size")
1225- else if (if ((aQ(ak.payments[0].assetId) != eG))
1206+ else if (if ((aR(al.payments[0].assetId) != eH))
12261207 then true
1227- else (ak.payments[0].amount != eH))
1208+ else (al.payments[0].amount != eI))
12281209 then throw("Wrong payment")
12291210 else {
1230- let fG = if ((dG == eG))
1231- then $Tuple2((bA + ak.payments[0].amount), bB)
1232- else $Tuple2(bA, (bB + ak.payments[0].amount))
1233- let fH = fG._1
1234- let fI = fG._2
1235- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Unknown pool")
1236- let fJ = cN(bi, aG, g, fH, dG, fI, dH, aA, aB, az)
1237- let fu = fJ._1
1238- let dW = fJ._2
1239- let cZ = aI(aJ)
1240- let fK = [IntegerEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + w), eH), StringEntry((((((aG + "_") + aJ) + "_") + toString(cZ)) + x), eG)]
1241- let fL = cX(aG, aJ, fu, dW, cZ, az, bi, true)
1242- $Tuple2((((fL ++ bv(dG, dH, az)) ++ fK) :+ DeleteEntry((eE + L))), fu)
1211+ let fH = if ((dH == eH))
1212+ then $Tuple2((bB + al.payments[0].amount), bC)
1213+ else $Tuple2(bB, (bC + al.payments[0].amount))
1214+ let fI = fH._1
1215+ let fJ = fH._2
1216+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Unknown pool")
1217+ let fK = cO(bj, aH, g, fI, dH, fJ, dI, aB, aC, aA)
1218+ let fv = fK._1
1219+ let dX = fK._2
1220+ let da = aJ(aK)
1221+ let fL = [IntegerEntry((((((aH + "_") + aK) + "_") + toString(da)) + w), eI), StringEntry((((((aH + "_") + aK) + "_") + toString(da)) + x), eH)]
1222+ let fM = cY(aH, aK, fv, dX, da, aA, bj, true)
1223+ $Tuple2((((fM ++ bw(dH, dI, aA)) ++ fL) :+ DeleteEntry((eF + L))), fv)
12431224 }
12441225 })
12451226
12461227
12471228
1248-@Callable(ak)
1249-func liquidate (aJ,eq,fM) = valueOrElse(am(ak), {
1250- let aG = valueOrErrorMessage(getString(this, (((aJ + "_") + eq) + v)), "no position")
1251- let bi = valueOrErrorMessage(getString(this, (N + aG)), "Pool is not inited")
1252- let fN = aC(Address(fromBase58String(aG)), bi)
1253- let dG = fN._1
1254- let dH = fN._2
1255- let aA = fN._3
1256- let aB = fN._4
1257- let az = fN._5
1258- let bO = bP(aG, bi, az, fM)
1259- let cC = getIntegerValue(this, (((((aG + "_") + aJ) + "_") + eq) + w))
1260- let ea = getStringValue(this, (((((aG + "_") + aJ) + "_") + eq) + x))
1261- let dY = ep(aJ, aG, eq, (cC > 0))
1262- if ((cC == 0))
1229+@Callable(al)
1230+func liquidate (aK,er,fN) = valueOrElse(an(al), {
1231+ let aH = valueOrErrorMessage(getString(this, (((aK + "_") + er) + v)), "no position")
1232+ let bj = valueOrErrorMessage(getString(this, (N + aH)), "Pool is not inited")
1233+ let fO = aD(Address(fromBase58String(aH)), bj)
1234+ let dH = fO._1
1235+ let dI = fO._2
1236+ let aB = fO._3
1237+ let aC = fO._4
1238+ let aA = fO._5
1239+ let bP = bQ(aH, bj, aA, fN)
1240+ let cD = getIntegerValue(this, (((((aH + "_") + aK) + "_") + er) + w))
1241+ let eb = getStringValue(this, (((((aH + "_") + aK) + "_") + er) + x))
1242+ let dZ = eq(aK, aH, er, (cD > 0))
1243+ if ((cD == 0))
12631244 then throw("You can't liquidate position without borrow")
1264- else [IntegerEntry((((((aG + "_") + aJ) + "_") + eq) + z), getIntegerValue(this, (aG + C))), IntegerEntry((aG + B), (aH(aG) - fM)), IntegerEntry((aG + A), (aF(aG) - fM)), IntegerEntry((((((aG + "_") + aJ) + "_") + eq) + u), (dY - fM)), ScriptTransfer(ak.caller, bO, fromBase58String(az))]
1245+ else [IntegerEntry((((((aH + "_") + aK) + "_") + er) + z), getIntegerValue(this, (aH + C))), IntegerEntry((aH + B), (aI(aH) - fN)), IntegerEntry((aH + A), (aG(aH) - fN)), IntegerEntry((((((aH + "_") + aK) + "_") + er) + u), (dZ - fN)), ScriptTransfer(al.caller, bP, fromBase58String(aA))]
12651246 })
12661247
12671248
12681249
1269-@Callable(ak)
1270-func stopLoss (aJ,eq,aG,ao) = valueOrElse(aj(ak), {
1271- let fx = ( let aw = invoke(ad, "getTWAP60", [ao, false], nil)
1272- if ($isInstanceOf(aw, "(Int, Int)"))
1273- then aw
1274- else throw(($getType(aw) + " couldn't be cast to (Int, Int)")))._1
1275- if (!(isDefined(getInteger(this, (((((((aJ + "_") + toString(eq)) + "_") + aG) + "_") + ao) + R)))))
1250+@Callable(al)
1251+func stopLoss (aK,er,aH,ap) = valueOrElse(ak(al), {
1252+ let fy = getIntegerValue(ae, (ap + R))
1253+ if (!(isDefined(getInteger(this, (((((((aK + "_") + toString(er)) + "_") + aH) + "_") + ap) + S)))))
12761254 then throw("No entry")
1277- else (ev(toString(ak.caller), aG, toString(eq), true) :+ DeleteEntry((((((((aJ + "_") + toString(eq)) + "_") + aG) + "_") + ao) + R)))
1255+ else (ew(toString(al.caller), aH, toString(er), true) :+ DeleteEntry((((((((aK + "_") + toString(er)) + "_") + aH) + "_") + ap) + S)))
12781256 })
12791257
12801258
12811259
1282-@Callable(ak)
1283-func capitalizeExKeeper (aG,aD,fO,fP,fQ,dk,dl,dm,dn,do,dp,dq) = valueOrElse(aj(ak), {
1284- let fR = if (fQ)
1285- then cK(aD, aG)
1260+@Callable(al)
1261+func capitalizeExKeeper (aH,aE,fP,fQ,fR,dl,dm,dn,do,dp,dq,dr) = valueOrElse(ak(al), {
1262+ let fS = if (fR)
1263+ then cL(aE, aH)
12861264 else {
1287- let fS = if ((aD == a))
1288- then af
1289- else ag
1290- $Tuple2(fP, fS)
1265+ let fT = if ((aE == a))
1266+ then ag
1267+ else ah
1268+ $Tuple2(fQ, fT)
12911269 }
1292- let fT = fR._1
1293- let fS = fR._2
1294- let fU = dg(fO, fP, fS, dk, dl, dm, dn, do, dp, dq)
1295- let cu = (fT - fP)
1296- let fV = if ((cu > 0))
1297- then [IntegerEntry((aG + P), (cu + valueOrElse(getInteger(this, (aG + P)), 0)))]
1270+ let fU = fS._1
1271+ let fT = fS._2
1272+ let fV = dh(fP, fQ, fT, dl, dm, dn, do, dp, dq, dr)
1273+ let cv = (fU - fQ)
1274+ let fW = if ((cv > 0))
1275+ then [IntegerEntry((aH + P), (cv + valueOrElse(getInteger(this, (aH + P)), 0)))]
12981276 else nil
1299- (dC(aG, aD, fO, fU) ++ fV)
1277+ (dD(aH, aE, fP, fV) ++ fW)
13001278 })
13011279
13021280
13031281
1304-@Callable(ak)
1305-func capitalizeExPuzzle (aG,aD,fO,fP,fQ,dt,du,dq) = valueOrElse(aj(ak), {
1306- let fW = if (fQ)
1307- then cK(aD, aG)
1282+@Callable(al)
1283+func capitalizeExPuzzle (aH,aE,fP,fQ,fR,du,dv,dr) = valueOrElse(ak(al), {
1284+ let fX = if (fR)
1285+ then cL(aE, aH)
13081286 else {
1309- let fS = if ((aD == a))
1310- then af
1311- else ag
1312- $Tuple2(fP, fS)
1287+ let fT = if ((aE == a))
1288+ then ag
1289+ else ah
1290+ $Tuple2(fQ, fT)
13131291 }
1314- let fT = fW._1
1315- let fS = fW._2
1316- let fU = ds(fO, fP, fS, dt, du, dq)
1317- let cu = (fT - fP)
1318- let fV = if ((cu > 0))
1319- then [IntegerEntry((aG + P), (cu + valueOrElse(getInteger(this, (aG + P)), 0)))]
1292+ let fU = fX._1
1293+ let fT = fX._2
1294+ let fV = dt(fP, fQ, fT, du, dv, dr)
1295+ let cv = (fU - fQ)
1296+ let fW = if ((cv > 0))
1297+ then [IntegerEntry((aH + P), (cv + valueOrElse(getInteger(this, (aH + P)), 0)))]
13201298 else nil
1321- (dC(aG, aD, fO, fU) ++ fV)
1299+ (dD(aH, aE, fP, fV) ++ fW)
13221300 })
13231301
13241302
13251303
1326-@Callable(ak)
1327-func capitalizeExSwopFi (aG,aD,fO,fP,fQ,dw,dx,dy,dz,dA,dB,dq) = valueOrElse(aj(ak), {
1328- let fX = if (fQ)
1329- then cK(aD, aG)
1304+@Callable(al)
1305+func capitalizeExSwopFi (aH,aE,fP,fQ,fR,dx,dy,dz,dA,dB,dC,dr) = valueOrElse(ak(al), {
1306+ let fY = if (fR)
1307+ then cL(aE, aH)
13301308 else {
1331- let fS = if ((aD == a))
1332- then af
1333- else ag
1334- $Tuple2(fP, fS)
1309+ let fT = if ((aE == a))
1310+ then ag
1311+ else ah
1312+ $Tuple2(fQ, fT)
13351313 }
1336- let fT = fX._1
1337- let fS = fX._2
1338- let fU = dv(fO, fP, fS, dw, dx, dy, dz, dA, dB, dq)
1339- let cu = (fT - fP)
1340- let fV = if ((cu > 0))
1341- then [IntegerEntry((aG + P), (cu + valueOrElse(getInteger(this, (aG + P)), 0)))]
1314+ let fU = fY._1
1315+ let fT = fY._2
1316+ let fV = dw(fP, fQ, fT, dx, dy, dz, dA, dB, dC, dr)
1317+ let cv = (fU - fQ)
1318+ let fW = if ((cv > 0))
1319+ then [IntegerEntry((aH + P), (cv + valueOrElse(getInteger(this, (aH + P)), 0)))]
13421320 else nil
1343- (dC(aG, aD, fO, fU) ++ fV)
1321+ (dD(aH, aE, fP, fV) ++ fW)
13441322 })
13451323
13461324
13471325
1348-@Callable(ak)
1349-func initNewPool (aD,at,fY,fZ,ga,gb,gc,gd,ge) = valueOrElse(aj(ak), if (if ((aD != a))
1350- then (aD != b)
1326+@Callable(al)
1327+func initNewPool (aE,au,fZ,ga,gb,gc,gd,ge,gf) = valueOrElse(ak(al), if (if ((aE != a))
1328+ then (aE != b)
13511329 else false)
13521330 then throw("Wrong type")
13531331 else {
1354- let gf = aC(Address(fromBase58String(at)), aD)
1355- let ax = gf._1
1356- let ay = gf._2
1357- let gg = gf._3
1358- let gh = gf._4
1359- let az = gf._5
1360-[IntegerEntry((at + F), fY), IntegerEntry((at + G), fZ), IntegerEntry((at + H), ga), IntegerEntry((at + I), gb), IntegerEntry((at + J), gc), IntegerEntry((at + K), gd), IntegerEntry((at + C), 0), IntegerEntry((at + D), 0), StringEntry((N + at), aD), StringEntry((az + O), at), BooleanEntry((at + E), ge)]
1332+ let gg = aD(Address(fromBase58String(au)), aE)
1333+ let ay = gg._1
1334+ let az = gg._2
1335+ let gh = gg._3
1336+ let gi = gg._4
1337+ let aA = gg._5
1338+[IntegerEntry((au + F), fZ), IntegerEntry((au + G), ga), IntegerEntry((au + H), gb), IntegerEntry((au + I), gc), IntegerEntry((au + J), gd), IntegerEntry((au + K), ge), IntegerEntry((au + C), 0), IntegerEntry((au + D), 0), StringEntry((N + au), aE), StringEntry((aA + O), au), BooleanEntry((au + E), gf)]
13611339 })
13621340
13631341
1364-@Verifier(gi)
1365-func gj () = sigVerify(gi.bodyBytes, gi.proofs[0], gi.senderPublicKey)
1342+@Verifier(gj)
1343+func gk () = sigVerify(gj.bodyBytes, gj.proofs[0], gj.senderPublicKey)
13661344

github/deemru/w8io/026f985 
504.98 ms