tx · DLjrR2vLeenXbj8E4QgH17CRKUmoXPhgb72462z7ya4a

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.03600000 Waves

2023.05.04 12:36 [2562839] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "DLjrR2vLeenXbj8E4QgH17CRKUmoXPhgb72462z7ya4a", "fee": 3600000, "feeAssetId": null, "timestamp": 1683192976834, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "atf6Qzz5iFUKVAwBbTh6iBfcq5TeY3wtD4EgYVcMVm7UpdvtjPJuQsUsiXU1oEzsU2m6NmUXs8zaQtMeTqZQLD6" ], "script": "base64:BgJbCAISBQoDCAEIEgMKAQgSBQoDCAEIEgMKAQgSBAoCCAESAwoBCBIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEggKBggIAQEBAVAAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAPQ0FQX0ZFRV9OT19MT0FOAgljYXBOb0xvYW4ADENBUF9GRUVfTE9BTgIHY2FwTG9hbgAHQ0FQX0ZFRQIDY2FwAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0ZQb29sQkFzc2V0QmFsYW5jZQIPQl9hc3NldF9iYWxhbmNlAA9rU0ZQb29sQUFzc2V0SWQCCkFfYXNzZXRfaWQAD2tTRlBvb2xCQXNzZXRJZAIKQl9hc3NldF9pZAAOa1NGUG9vbFNoYXJlSWQCDnNoYXJlX2Fzc2V0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0MgJfMwQEYkJhbAgFDSR0MDM0NjQ4MzQ3NDICXzQEB3NoYXJlSWQIBQ0kdDAzNDY0ODM0NzQyAl81CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRVrQXhseUluRmVlV2l0aG91dExvYW4FC2luRmVlTm9Mb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRJrQXhseUluRmVlV2l0aExvYW4FCWluRmVlTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgURa0F4bHlOb0xvYW5DYXBGZWUFDGNhcEZlZU5vTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgUTa0F4bHlXaXRoTG9hbkNhcEZlZQUOY2FwRmVlV2l0aExvYW4JAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUIcG9vbEFkZHIFDWtQb29sSW50ZXJlc3QAAAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBWtQb29sBQhwb29sQWRkcgUEdHlwZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB3NoYXJlSWQFCmtTaGFyZVBvb2wFCHBvb2xBZGRyBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5Be0ilg==", "height": 2562839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5fR9GKAFo54kJi9S7gKH27SmohD7tgNEpmujjBqCHFk Next: 5NjufpnggLyQB99Abxsr37ytDCCWaVprj3WXLYnDbhWg Diff:
OldNewDifferences
99
1010 let d = "capLoan"
1111
12-let e = "loan"
12+let e = "cap"
1313
14-let f = "noLoan"
14+let f = "loan"
1515
16-let g = 100000000
16+let g = "noLoan"
1717
18-let h = 10000000000
18+let h = 100000000
1919
20-let i = 1000000
20+let i = 10000000000
2121
22-let j = "A_asset_balance"
22+let j = 1000000
2323
24-let k = "B_asset_balance"
24+let k = "A_asset_balance"
2525
26-let l = "A_asset_id"
26+let l = "B_asset_balance"
2727
28-let m = "B_asset_id"
28+let m = "A_asset_id"
2929
30-let n = "share_asset_id"
30+let n = "B_asset_id"
3131
32-let o = "commission"
32+let o = "share_asset_id"
3333
34-let p = "_user_position"
34+let p = "share_asset_supply"
3535
36-let q = "_user_position_borrow_amount"
36+let q = "commission"
3737
38-let r = "_user_position_borrow_asset_id"
38+let r = "_user_position"
3939
40-let s = "_user_position_number"
40+let s = "_user_position_borrow_amount"
4141
42-let t = "_user_position_interest"
42+let t = "_user_position_borrow_asset_id"
4343
44-let u = "_pool_total"
44+let u = "_user_position_number"
4545
46-let v = "_pool_total_loan"
46+let v = "_user_position_interest"
4747
48-let w = "_pool_interest"
48+let w = "_pool_total"
4949
50-let x = "_axly_fee_without_loan"
50+let x = "_pool_total_loan"
5151
52-let y = "_axly_fee_with_loan"
52+let y = "_pool_interest"
5353
54-let z = "_axly_fee_cap_with_loan"
54+let z = "_axly_fee_without_loan"
5555
56-let A = "_axly_fee_cap_no_loan"
56+let A = "_axly_fee_with_loan"
5757
58-let B = "_request_id"
58+let B = "_axly_fee_cap_with_loan"
5959
60-let C = "requests_iter"
60+let C = "_axly_fee_cap_no_loan"
6161
62-let D = "pool_"
62+let D = "_request_id"
6363
64-let E = "_pool_share_id"
64+let E = "requests_iter"
6565
66-let F = "_pool_cap_change"
66+let F = "pool_"
6767
68-let G = "axly_money_box"
68+let G = "_pool_share_id"
6969
70-let H = "swopfi_farming_addr"
70+let H = "_pool_cap_change"
7171
72-let I = "lend_service_addr"
72+let I = "_last_price"
7373
74-let J = "price_oracle"
74+let J = "axly_money_box"
7575
76-let K = "exchange_contract"
76+let K = "swopfi_farming_addr"
7777
78-let L = "wx_swap_contract"
78+let L = "lend_service_addr"
7979
80-let M = Address(fromBase58String(valueOrErrorMessage(getString(this, G), "No axly moneyBox address")))
80+let M = "price_oracle"
8181
82-let N = Address(fromBase58String(valueOrErrorMessage(getString(this, K), "No exchange contract address")))
82+let N = "exchange_contract"
8383
84-let O = Address(fromBase58String(valueOrErrorMessage(getString(this, J), "No price oracle address")))
84+let O = "wx_swap_contract"
8585
86-let P = Address(fromBase58String(valueOrErrorMessage(getString(this, L), "No wx swap address")))
86+let P = Address(fromBase58String(valueOrErrorMessage(getString(this, J), "No axly moneyBox address")))
8787
88-let Q = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
88+let Q = Address(fromBase58String(valueOrErrorMessage(getString(this, N), "No exchange contract address")))
8989
90-let R = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
90+let R = Address(fromBase58String(valueOrErrorMessage(getString(this, M), "No price oracle address")))
9191
92-func S (T) = if ((T.caller == this))
92+let S = Address(fromBase58String(valueOrErrorMessage(getString(this, O), "No wx swap address")))
93+
94+let T = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
95+
96+let U = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
97+
98+func V (W) = if ((W.caller == this))
9399 then unit
94100 else throw("Only contract itself can call this function")
95101
96102
97-func U (V) = {
98- let W = V
99- if ($isInstanceOf(W, "ByteVector"))
103+func X (Y) = {
104+ let Z = Y
105+ if ($isInstanceOf(Z, "ByteVector"))
100106 then {
101- let X = W
102- assetBalance(this, X)
107+ let aa = Z
108+ assetBalance(this, aa)
103109 }
104- else if ($isInstanceOf(W, "Unit"))
110+ else if ($isInstanceOf(Z, "Unit"))
105111 then {
106- let Y = W
112+ let ab = Z
107113 wavesBalance(this).available
108114 }
109115 else throw("Match error")
110116 }
111117
112118
113-func Z (aa) = $Tuple5(valueOrErrorMessage(getString(aa, l), "Can't get pool A asset id"), valueOrErrorMessage(getString(aa, m), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(aa, j), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(aa, k), "Can't get pool B asset balance"), valueOrErrorMessage(getString(aa, n), "Can't get share asset id"))
119+func ac (ad) = $Tuple5(valueOrErrorMessage(getString(ad, m), "Can't get pool A asset id"), valueOrErrorMessage(getString(ad, n), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(ad, k), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(ad, l), "Can't get pool B asset balance"), valueOrErrorMessage(getString(ad, o), "Can't get share asset id"))
114120
115121
116-func ab (aa) = {
117- let ac = {
118- let ad = invoke(aa, "getPoolConfigWrapperREADONLY", nil, nil)
119- if ($isInstanceOf(ad, "List[Any]"))
120- then ad
121- else throw(($getType(ad) + " couldn't be cast to List[Any]"))
122+func ae (ad) = {
123+ let af = {
124+ let ag = invoke(ad, "getPoolConfigWrapperREADONLY", nil, nil)
125+ if ($isInstanceOf(ag, "List[Any]"))
126+ then ag
127+ else throw(($getType(ag) + " couldn't be cast to List[Any]"))
122128 }
123- if ((ac == ac))
129+ if ((af == af))
124130 then {
125- let ae = valueOrErrorMessage({
126- let ad = ac[4]
127- if ($isInstanceOf(ad, "String"))
128- then ad
131+ let ah = valueOrErrorMessage({
132+ let ag = af[4]
133+ if ($isInstanceOf(ag, "String"))
134+ then ag
129135 else unit
130136 }, "Can't get pool A asset id")
131- let af = valueOrErrorMessage({
132- let ad = ac[5]
133- if ($isInstanceOf(ad, "String"))
134- then ad
137+ let ai = valueOrErrorMessage({
138+ let ag = af[5]
139+ if ($isInstanceOf(ag, "String"))
140+ then ag
135141 else unit
136142 }, "Can't get pool B asset id")
137- let ag = valueOrErrorMessage({
138- let ad = ac[3]
139- if ($isInstanceOf(ad, "String"))
140- then ad
143+ let aj = valueOrErrorMessage({
144+ let ag = af[3]
145+ if ($isInstanceOf(ag, "String"))
146+ then ag
141147 else unit
142148 }, "Can't get pool LP asset id")
143- let ah = {
144- let ad = invoke(aa, "getAccBalanceWrapperREADONLY", [ae], nil)
145- if ($isInstanceOf(ad, "Int"))
146- then ad
147- else throw(($getType(ad) + " couldn't be cast to Int"))
149+ let ak = {
150+ let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ah], nil)
151+ if ($isInstanceOf(ag, "Int"))
152+ then ag
153+ else throw(($getType(ag) + " couldn't be cast to Int"))
148154 }
149- if ((ah == ah))
155+ if ((ak == ak))
150156 then {
151- let ai = {
152- let ad = invoke(aa, "getAccBalanceWrapperREADONLY", [af], nil)
153- if ($isInstanceOf(ad, "Int"))
154- then ad
155- else throw(($getType(ad) + " couldn't be cast to Int"))
157+ let al = {
158+ let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ai], nil)
159+ if ($isInstanceOf(ag, "Int"))
160+ then ag
161+ else throw(($getType(ag) + " couldn't be cast to Int"))
156162 }
157- if ((ai == ai))
158- then $Tuple5(ae, af, ah, ai, ag)
163+ if ((al == al))
164+ then $Tuple5(ah, ai, ak, al, aj)
159165 else throw("Strict value is not equal to itself.")
160166 }
161167 else throw("Strict value is not equal to itself.")
164170 }
165171
166172
167-func aj (aa,ak) = if ((ak == a))
168- then Z(aa)
169- else if ((ak == b))
170- then ab(aa)
173+func am (ad,an) = if ((an == a))
174+ then ac(ad)
175+ else if ((an == b))
176+ then ae(ad)
171177 else throw("Wrong pool type")
172178
173179
174-func al (am) = valueOrElse(getInteger(this, (am + u)), 0)
180+func ao (ad,an,aj) = if ((an == a))
181+ then valueOrErrorMessage(getInteger(ad, p), "Can't get share asset supply")
182+ else if ((an == b))
183+ then valueOrErrorMessage(assetInfo(fromBase58String(aj)), "Wrong ShareId").quantity
184+ else throw("Wrong pool type")
175185
176186
177-func an (am) = valueOrElse(getInteger(this, (am + v)), 0)
187+func ap (aq) = valueOrElse(getInteger(this, (aq + w)), 0)
178188
179189
180-func ao (am,ap) = (valueOrElse(getInteger(this, (((am + "_") + ap) + s)), 0) + 1)
190+func ar (aq) = valueOrElse(getInteger(this, (aq + x)), 0)
181191
182192
183-func aq (am,ar) = if ((ar == d))
184- then getIntegerValue(this, (am + A))
185- else if ((ar == c))
186- then getIntegerValue(this, (am + z))
187- else if ((ar == e))
188- then getIntegerValue(this, (am + y))
189- else if ((ar == f))
190- then getIntegerValue(this, (am + x))
193+func as (aq,at) = (valueOrElse(getInteger(this, (((aq + "_") + at) + u)), 0) + 1)
194+
195+
196+func au (aq,av) = if ((av == d))
197+ then getIntegerValue(this, (aq + C))
198+ else if ((av == c))
199+ then getIntegerValue(this, (aq + B))
200+ else if ((av == f))
201+ then getIntegerValue(this, (aq + A))
202+ else if ((av == g))
203+ then getIntegerValue(this, (aq + z))
191204 else throw("Wrong fee type")
192205
193206
194-func as () = Address(fromBase58String(valueOrErrorMessage(getString(this, H), "Can't get swopfi farming addr")))
207+func aw () = Address(fromBase58String(valueOrErrorMessage(getString(this, K), "Can't get swopfi farming addr")))
195208
196209
197-func at (aa) = {
198- let au = Address(fromBase58String(valueOrErrorMessage(getString(aa, "%s__factoryContract"), "Can't get WX factory contract addr")))
199- let av = split(valueOrErrorMessage(getString(au, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
200- Address(fromBase58String(av[1]))
210+func ax (ad) = {
211+ let ay = Address(fromBase58String(valueOrErrorMessage(getString(ad, "%s__factoryContract"), "Can't get WX factory contract addr")))
212+ let az = split(valueOrErrorMessage(getString(ay, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
213+ Address(fromBase58String(az[1]))
201214 }
202215
203216
204-func aw () = Address(fromBase58String(valueOrErrorMessage(getString(this, I), "Can't get lend service addr")))
217+func aA () = Address(fromBase58String(valueOrErrorMessage(getString(this, L), "Can't get lend service addr")))
205218
206219
207-func ax (V) = {
208- let W = V
209- if ($isInstanceOf(W, "ByteVector"))
220+func aB (Y) = {
221+ let Z = Y
222+ if ($isInstanceOf(Z, "ByteVector"))
210223 then {
211- let X = W
212- toBase58String(X)
224+ let aa = Z
225+ toBase58String(aa)
213226 }
214- else if ($isInstanceOf(W, "Unit"))
227+ else if ($isInstanceOf(Z, "Unit"))
215228 then {
216- let Y = W
229+ let ab = Z
217230 "WAVES"
218231 }
219232 else throw("Match error")
220233 }
221234
222235
223-func ay (V) = if ((V == "WAVES"))
236+func aC (Y) = if ((Y == "WAVES"))
224237 then unit
225- else fromBase58String(V)
238+ else fromBase58String(Y)
226239
227240
228-func az (V) = if ((V == "WAVES"))
241+func aD (Y) = if ((Y == "WAVES"))
229242 then 8
230243 else {
231- let W = assetInfo(fromBase58String(V))
232- if ($isInstanceOf(W, "Asset"))
244+ let Z = assetInfo(fromBase58String(Y))
245+ if ($isInstanceOf(Z, "Asset"))
233246 then {
234- let aA = W
235- aA.decimals
247+ let aE = Z
248+ aE.decimals
236249 }
237250 else throw("Can't find asset")
238251 }
239252
240253
241-func aB (am,ar,aC,aD,aE,aF,ah,ai,ag) = {
242- let aG = U(fromBase58String(ag))
243- if ((aG == aG))
254+func aF (aG) = {
255+ func aH (aI,Y) = {
256+ let aJ = ( let ag = invoke(R, "getTWAP60", [Y, false], nil)
257+ if ($isInstanceOf(ag, "(Int, Int)"))
258+ then ag
259+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
260+ (aI :+ aJ)
261+ }
262+
263+ let aK = aG
264+ let aL = size(aK)
265+ let aM = nil
266+ func aN (aO,aP) = if ((aP >= aL))
267+ then aO
268+ else aH(aO, aK[aP])
269+
270+ func aQ (aO,aP) = if ((aP >= aL))
271+ then aO
272+ else throw("List size exceeds 100")
273+
274+ aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
275+ }
276+
277+
278+func aR (aS) = {
279+ func aH (aI,aj) = {
280+ let aq = valueOrErrorMessage(getString(this, (aj + G)), "Can't find pool addr by share id")
281+ let ad = Address(fromBase58String(aq))
282+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited")
283+ let aU = am(ad, aT)
284+ let ah = aU._1
285+ let ai = aU._2
286+ let aV = aU._3
287+ let aW = aU._4
288+ let aX = ( let ag = invoke(R, "getTWAP60", [ah, false], nil)
289+ if ($isInstanceOf(ag, "(Int, Int)"))
290+ then ag
291+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
292+ let aY = ( let ag = invoke(R, "getTWAP60", [ai, false], nil)
293+ if ($isInstanceOf(ag, "(Int, Int)"))
294+ then ag
295+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
296+ let aZ = ao(ad, aT, aj)
297+ let ba = pow(10, 0, aD(ah), 0, 0, DOWN)
298+ let bb = pow(10, 0, aD(ai), 0, 0, DOWN)
299+ let bc = pow(10, 0, aD(aj), 0, 0, DOWN)
300+ let bd = (fraction(aV, aX, ba) + fraction(aW, aY, bb))
301+ let be = fraction(bd, bc, aZ)
302+ (aI :+ be)
303+ }
304+
305+ let aK = aS
306+ let aL = size(aK)
307+ let aM = nil
308+ func aN (aO,aP) = if ((aP >= aL))
309+ then aO
310+ else aH(aO, aK[aP])
311+
312+ func aQ (aO,aP) = if ((aP >= aL))
313+ then aO
314+ else throw("List size exceeds 50")
315+
316+ aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 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)
317+ }
318+
319+
320+func bf (ah,ai,aj) = {
321+ let bg = aF([ah, ai])
322+ let be = aR([aj])
323+[IntegerEntry((ah + I), bg[0]), IntegerEntry((ai + I), bg[1]), IntegerEntry((aj + I), be[0])]
324+ }
325+
326+
327+func bh (aq,av,bi,bj,bk,bl,ak,al,aj) = {
328+ let bm = X(fromBase58String(aj))
329+ if ((bm == bm))
244330 then {
245- let aa = Address(fromBase58String(am))
246- let aH = fraction(g, aC, ah)
247- let aI = fraction(g, aE, ai)
248- let aJ = if ((aI > aH))
331+ let ad = Address(fromBase58String(aq))
332+ let bn = fraction(h, bi, ak)
333+ let bo = fraction(h, bk, al)
334+ let bp = if ((bo > bn))
249335 then {
250- let aK = fraction(ai, aH, g, CEILING)
251- $Tuple4(aC, aK, (aE - aK), aF)
336+ let bq = fraction(al, bn, h, CEILING)
337+ $Tuple4(bi, bq, (bk - bq), bl)
252338 }
253339 else {
254- let aK = fraction(ah, aI, g, CEILING)
255- $Tuple4(aK, aE, (aC - aK), aD)
340+ let bq = fraction(ak, bo, h, CEILING)
341+ $Tuple4(bq, bk, (bi - bq), bj)
256342 }
257- let aL = aJ._1
258- let aM = aJ._2
259- let aN = aJ._3
260- let aO = aJ._4
261- let aP = if (if ((aL > 0))
262- then (aM > 0)
343+ let br = bp._1
344+ let bs = bp._2
345+ let bt = bp._3
346+ let bu = bp._4
347+ let bv = if (if ((br > 0))
348+ then (bs > 0)
263349 else false)
264350 then {
265- let aQ = [AttachedPayment(ay(aD), aL), AttachedPayment(ay(aF), aM)]
266- invoke(aa, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], aQ)
351+ let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)]
352+ invoke(ad, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bw)
267353 }
268354 else 0
269- if ((aP == aP))
355+ if ((bv == bv))
270356 then {
271- let aR = if ((aN > 0))
357+ let bx = if ((bt > 0))
272358 then {
273- let aQ = [AttachedPayment(ay(aO), aN)]
274- let aS = ["0", "false", "0"]
275- invoke(aa, "callFunction", ["replenishWithOneToken", aS], aQ)
359+ let bw = [AttachedPayment(aC(bu), bt)]
360+ let by = ["0", "false", "0"]
361+ invoke(ad, "callFunction", ["replenishWithOneToken", by], bw)
276362 }
277363 else 0
278- if ((aR == aR))
364+ if ((bx == bx))
279365 then {
280- let aT = U(fromBase58String(ag))
281- let aU = (aT - aG)
282- let aV = fraction(aU, aq(am, ar), i)
283- let aW = (aU - aV)
284- if ((0 >= aW))
366+ let bz = X(fromBase58String(aj))
367+ let bA = (bz - bm)
368+ let bB = if ((av == e))
369+ then fraction(bA, au(aq, av), j)
370+ else fraction(bA, au(aq, av), j)
371+ let bC = (bA - bB)
372+ if ((0 >= bC))
285373 then throw("amount of staked sharetokens must be > 0")
286374 else {
287- let aX = invoke(as(), "lockShareTokens", [am, 0], [AttachedPayment(fromBase58String(ag), aW)])
288- if ((aX == aX))
289- then $Tuple2(aW, aV)
375+ let bD = invoke(aw(), "lockShareTokens", [aq, 0], [AttachedPayment(fromBase58String(aj), bC)])
376+ if ((bD == bD))
377+ then $Tuple2(bC, bB)
290378 else throw("Strict value is not equal to itself.")
291379 }
292380 }
298386 }
299387
300388
301-func aY (am,ar,aC,aD,aE,aF,ag) = {
302- let aa = Address(fromBase58String(am))
303- let aZ = if (if ((aC > 0))
304- then (aE > 0)
389+func bE (aq,av,bi,bj,bk,bl,aj) = {
390+ let ad = Address(fromBase58String(aq))
391+ let bF = if (if ((bi > 0))
392+ then (bk > 0)
305393 else false)
306394 then {
307- let ba = split({
308- let ad = invoke(aa, "evaluatePutByAmountAssetREADONLY", [aC], nil)
309- if ($isInstanceOf(ad, "String"))
310- then ad
311- else throw(($getType(ad) + " couldn't be cast to String"))
395+ let bG = split({
396+ let ag = invoke(ad, "evaluatePutByAmountAssetREADONLY", [bi], nil)
397+ if ($isInstanceOf(ag, "String"))
398+ then ag
399+ else throw(($getType(ag) + " couldn't be cast to String"))
312400 }, "__")
313- if ((ba == ba))
401+ if ((bG == bG))
314402 then {
315- let bb = split({
316- let ad = invoke(aa, "evaluatePutByPriceAssetREADONLY", [aE], nil)
317- if ($isInstanceOf(ad, "String"))
318- then ad
319- else throw(($getType(ad) + " couldn't be cast to String"))
403+ let bH = split({
404+ let ag = invoke(ad, "evaluatePutByPriceAssetREADONLY", [bk], nil)
405+ if ($isInstanceOf(ag, "String"))
406+ then ag
407+ else throw(($getType(ag) + " couldn't be cast to String"))
320408 }, "__")
321- if ((bb == bb))
409+ if ((bH == bH))
322410 then {
323- let bc = parseIntValue(ba[1])
324- let bd = parseIntValue(bb[1])
325- if ((bd > bc))
411+ let bI = parseIntValue(bG[1])
412+ let bJ = parseIntValue(bH[1])
413+ if ((bJ > bI))
326414 then {
327- let be = parseIntValue(ba[8])
328- $Tuple4(aC, be, (aE - be), aF)
415+ let bK = parseIntValue(bG[8])
416+ $Tuple4(bi, bK, (bk - bK), bl)
329417 }
330418 else {
331- let bf = parseIntValue(bb[7])
332- $Tuple4(bf, aE, (aC - bf), aD)
419+ let bL = parseIntValue(bH[7])
420+ $Tuple4(bL, bk, (bi - bL), bj)
333421 }
334422 }
335423 else throw("Strict value is not equal to itself.")
336424 }
337425 else throw("Strict value is not equal to itself.")
338426 }
339- else if ((aC > 0))
340- then $Tuple4(aC, aE, aC, aD)
341- else if ((aE > 0))
342- then $Tuple4(aC, aE, aE, aF)
427+ else if ((bi > 0))
428+ then $Tuple4(bi, bk, bi, bj)
429+ else if ((bk > 0))
430+ then $Tuple4(bi, bk, bk, bl)
343431 else throw("pmts must be > 0")
344- let aL = aZ._1
345- let aM = aZ._2
346- let aN = aZ._3
347- let aO = aZ._4
348- let aG = U(fromBase58String(ag))
349- if ((aG == aG))
432+ let br = bF._1
433+ let bs = bF._2
434+ let bt = bF._3
435+ let bu = bF._4
436+ let bm = X(fromBase58String(aj))
437+ if ((bm == bm))
350438 then {
351- let aP = if (if ((aL > 0))
352- then (aM > 0)
439+ let bv = if (if ((br > 0))
440+ then (bs > 0)
353441 else false)
354442 then {
355- let aQ = [AttachedPayment(ay(aD), aL), AttachedPayment(ay(aF), aM)]
356- invoke(aa, "put", [1000000, false], aQ)
443+ let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)]
444+ invoke(ad, "put", [1000000, false], bw)
357445 }
358446 else 0
359- if ((aP == aP))
447+ if ((bv == bv))
360448 then {
361- let aR = if ((aN > 0))
449+ let bx = if ((bt > 0))
362450 then {
363- let aQ = [AttachedPayment(ay(aO), aN)]
364- invoke(aa, "putOneTkn", [0, false], aQ)
451+ let bw = [AttachedPayment(aC(bu), bt)]
452+ invoke(ad, "putOneTkn", [0, false], bw)
365453 }
366454 else 0
367- if ((aR == aR))
455+ if ((bx == bx))
368456 then {
369- let aT = U(fromBase58String(ag))
370- let aU = (aT - aG)
371- let aV = fraction(aU, aq(am, ar), i)
372- let aW = (aU - aV)
373- if ((0 >= aW))
457+ let bz = X(fromBase58String(aj))
458+ let bA = (bz - bm)
459+ let bB = fraction(bA, au(aq, av), j)
460+ let bC = (bA - bB)
461+ if ((0 >= bC))
374462 then throw("amount of staked sharetokens must be > 0")
375463 else {
376- let aX = invoke(at(aa), "stake", nil, [AttachedPayment(fromBase58String(ag), aW)])
377- if ((aX == aX))
378- then $Tuple2(aW, aV)
464+ let bD = invoke(ax(ad), "stake", nil, [AttachedPayment(fromBase58String(aj), bC)])
465+ if ((bD == bD))
466+ then $Tuple2(bC, bB)
379467 else throw("Strict value is not equal to itself.")
380468 }
381469 }
387475 }
388476
389477
390-func bg (ak,am,ar,aC,bh,aE,bi,ah,ai,ag) = if ((ak == a))
391- then aB(am, e, aC, bh, aE, bi, ah, ai, ag)
392- else if ((ak == b))
393- then aY(am, e, aC, bh, aE, bi, ag)
478+func bM (an,aq,av,bi,bN,bk,bO,ak,al,aj) = if ((an == a))
479+ then bh(aq, av, bi, bN, bk, bO, ak, al, aj)
480+ else if ((an == b))
481+ then bE(aq, av, bi, bN, bk, bO, aj)
394482 else throw("Wrong pool type")
395483
396484
397-func bj (am,ap,bk,aV,bl,ag,ak) = {
398- let bm = al(am)
399- let bn = an(am)
400- let bo = getIntegerValue(this, (am + w))
401-[IntegerEntry((am + u), (bm + bk)), IntegerEntry((am + v), (bn + bk)), IntegerEntry((((((am + "_") + ap) + "_") + toString(bl)) + p), bk), IntegerEntry((((((am + "_") + ap) + "_") + toString(bl)) + t), bo), IntegerEntry((((am + "_") + ap) + s), bl), ScriptTransfer(M, aV, fromBase58String(ag))]
485+func bP (aq,at,bQ,bB,bR,aj,an) = {
486+ let bS = ap(aq)
487+ let bT = ar(aq)
488+ let bU = getIntegerValue(this, (aq + y))
489+[IntegerEntry((aq + w), (bS + bQ)), IntegerEntry((aq + x), (bT + bQ)), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + r), bQ), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + v), bU), IntegerEntry((((aq + "_") + at) + u), bR), ScriptTransfer(P, bB, fromBase58String(aj))]
402490 }
403491
404492
405-func bp (ak,am) = if ((ak == a))
493+func bV (an,aq) = if ((an == a))
406494 then {
407- let bq = U(Q)
408- if ((bq == bq))
495+ let bW = X(T)
496+ if ((bW == bW))
409497 then {
410- let br = invoke(as(), "claim", [am], nil)
411- if ((br == br))
498+ let bX = invoke(aw(), "claim", [aq], nil)
499+ if ((bX == bX))
412500 then {
413- let bs = U(Q)
414- $Tuple2((bs - bq), Q)
501+ let bY = X(T)
502+ $Tuple2((bY - bW), T)
415503 }
416504 else throw("Strict value is not equal to itself.")
417505 }
418506 else throw("Strict value is not equal to itself.")
419507 }
420- else if ((ak == b))
508+ else if ((an == b))
421509 then {
422- let bq = U(R)
423- if ((bq == bq))
510+ let bW = X(U)
511+ if ((bW == bW))
424512 then {
425- let br = invoke(at(Address(fromBase58String(am))), "claimWX", [am], nil)
426- if ((br == br))
513+ let bX = invoke(ax(Address(fromBase58String(aq))), "claimWX", [aq], nil)
514+ if ((bX == bX))
427515 then {
428- let bs = U(R)
429- $Tuple2((bs - bq), R)
516+ let bY = X(U)
517+ $Tuple2((bY - bW), U)
430518 }
431519 else throw("Strict value is not equal to itself.")
432520 }
435523 else throw("Wrong pool type")
436524
437525
438-func bt (bu,bv,bw,bx,by,bz,bA,bB,bC,bD) = {
439- let bE = U(ay(bu))
440- if ((bE == bE))
526+func bZ (ca,cb,cc,cd,ce,cf,cg,ch,ci,cj) = {
527+ let ck = X(aC(ca))
528+ if ((ck == ck))
441529 then {
442- let br = invoke(N, "swap", [bx, by, bz, bA, bB, bC, bD], [AttachedPayment(bw, bv)])
443- if ((br == br))
444- then (U(ay(bu)) - bE)
530+ let bX = invoke(Q, "swap", [cd, ce, cf, cg, ch, ci, cj], [AttachedPayment(cc, cb)])
531+ if ((bX == bX))
532+ then (X(aC(ca)) - ck)
445533 else throw("Strict value is not equal to itself.")
446534 }
447535 else throw("Strict value is not equal to itself.")
448536 }
449537
450538
451-func bF (bu,bv,bw,bG,bH,bD) = {
452- let bE = U(ay(bu))
453- if ((bE == bE))
539+func cl (ca,cb,cc,cm,cn,cj) = {
540+ let ck = X(aC(ca))
541+ if ((ck == ck))
454542 then {
455- let br = invoke(N, "puzzleSwap", [bG, bH, bD], [AttachedPayment(bw, bv)])
456- if ((br == br))
457- then (U(ay(bu)) - bE)
543+ let bX = invoke(Q, "puzzleSwap", [cm, cn, cj], [AttachedPayment(cc, cb)])
544+ if ((bX == bX))
545+ then (X(aC(ca)) - ck)
458546 else throw("Strict value is not equal to itself.")
459547 }
460548 else throw("Strict value is not equal to itself.")
461549 }
462550
463551
464-func bI (bu,bv,bw,bJ,bK,bL,bM,bN,bO,bD) = {
465- let bE = U(ay(bu))
466- if ((bE == bE))
552+func co (ca,cb,cc,cp,cq,cr,cs,ct,cu,cj) = {
553+ let ck = X(aC(ca))
554+ if ((ck == ck))
467555 then {
468- let br = invoke(N, "swopfiSwap", [bJ, bK, bL, bM, bN, bO, bD], [AttachedPayment(bw, bv)])
469- if ((br == br))
470- then (U(ay(bu)) - bE)
556+ let bX = invoke(Q, "swopfiSwap", [cp, cq, cr, cs, ct, cu, cj], [AttachedPayment(cc, cb)])
557+ if ((bX == bX))
558+ then (X(aC(ca)) - ck)
471559 else throw("Strict value is not equal to itself.")
472560 }
473561 else throw("Strict value is not equal to itself.")
474562 }
475563
476564
477-func bP (am,bQ,bR,bS) = {
478- let aa = Address(fromBase58String(am))
479- let bT = aj(aa, bQ)
480- let bh = bT._1
481- let bi = bT._2
482- let ah = bT._3
483- let ai = bT._4
484- let ag = bT._5
485- let bU = if ((bR == bh))
486- then $Tuple2(bS, 0)
487- else $Tuple2(0, bS)
488- let aC = bU._1
489- let aE = bU._2
490- let bV = bg(bQ, am, d, aC, bh, aE, bi, ah, ai, ag)
491- let bk = bV._1
492- let bW = bV._2
493- let bo = valueOrElse(getInteger(this, (am + w)), 0)
494- let bX = al(am)
495- let bY = (bo + fraction(bk, h, bX))
496-[IntegerEntry((am + w), bY), ScriptTransfer(M, bW, fromBase58String(ag))]
565+func cv (aq,aT,cw,cx) = {
566+ let ad = Address(fromBase58String(aq))
567+ let cy = am(ad, aT)
568+ let bN = cy._1
569+ let bO = cy._2
570+ let ak = cy._3
571+ let al = cy._4
572+ let aj = cy._5
573+ let cz = if ((cw == bN))
574+ then $Tuple2(cx, 0)
575+ else $Tuple2(0, cx)
576+ let bi = cz._1
577+ let bk = cz._2
578+ let cA = bM(aT, aq, e, bi, bN, bk, bO, ak, al, aj)
579+ let bQ = cA._1
580+ let cB = cA._2
581+ let bU = valueOrElse(getInteger(this, (aq + y)), 0)
582+ let cC = ap(aq)
583+ let cD = (bU + fraction(bQ, i, cC))
584+ ([IntegerEntry((aq + y), cD), ScriptTransfer(P, cB, fromBase58String(aj))] ++ bf(bN, bO, aj))
497585 }
498586
499587
500-func bZ (am,ca,cb,ah,ai,cc,cd) = {
501- let aa = Address(fromBase58String(am))
502- let ce = 1000000
503- let cf = getIntegerValue(aa, o)
504- let cg = fraction(cc, ce, (ce - cf))
505- let ch = if ((cd == ca))
588+func cE (aq,cF,cG,ak,al,cH,cI) = {
589+ let ad = Address(fromBase58String(aq))
590+ let cJ = 1000000
591+ let cK = getIntegerValue(ad, q)
592+ let cL = fraction(cH, cJ, (cJ - cK))
593+ let cM = if ((cI == cF))
506594 then {
507- let ci = fraction(ah, cg, (ai - cg))
508- $Tuple2(ci, cb)
595+ let cN = fraction(ak, cL, (al - cL))
596+ $Tuple2(cN, cG)
509597 }
510598 else {
511- let ci = fraction(ai, cg, (ah - cg))
512- $Tuple2(ci, ca)
599+ let cN = fraction(al, cL, (ak - cL))
600+ $Tuple2(cN, cF)
513601 }
514- let ci = ch._1
515- let cj = ch._2
516- invoke(aa, "callFunction", ["exchange", ["1"]], [AttachedPayment(ay(cj), ci)])
602+ let cN = cM._1
603+ let cO = cM._2
604+ invoke(ad, "callFunction", ["exchange", ["1"]], [AttachedPayment(aC(cO), cN)])
517605 }
518606
519607
520-func ck (am,ca,cb,ah,ai,cc,cd) = {
521- let aa = Address(fromBase58String(am))
522- let cl = getIntegerValue(P, "%s__protocolFee")
523- let cm = getIntegerValue(P, "%s__poolFee")
524- let cn = toBigInt(100000000)
525- let co = if ((cd == ca))
608+func cP (aq,cF,cG,ak,al,cH,cI) = {
609+ let ad = Address(fromBase58String(aq))
610+ let cQ = getIntegerValue(S, "%s__protocolFee")
611+ let cR = getIntegerValue(S, "%s__poolFee")
612+ let cS = toBigInt(100000000)
613+ let cT = if ((cI == cF))
526614 then {
527- let ci = fraction(ah, cc, (ai - cc))
528- $Tuple2(ci, cb)
615+ let cN = fraction(ak, cH, (al - cH))
616+ $Tuple2(cN, cG)
529617 }
530618 else {
531- let ci = fraction(ai, cc, (ah - cc))
532- $Tuple2(ci, ca)
619+ let cN = fraction(al, cH, (ak - cH))
620+ $Tuple2(cN, cF)
533621 }
534- let ci = co._1
535- let cj = co._2
536- let cp = toInt(fraction(toBigInt(ci), cn, (cn - toBigInt((cl + cm)))))
537- invoke(P, "swap", [1, cd, toString(this)], [AttachedPayment(ay(cj), cp)])
622+ let cN = cT._1
623+ let cO = cT._2
624+ let cU = toInt(fraction(toBigInt(cN), cS, (cS - toBigInt((cQ + cR)))))
625+ invoke(S, "swap", [1, cI, toString(this)], [AttachedPayment(aC(cO), cU)])
538626 }
539627
540628
541-func cq (ak,am,ca,cb,ah,ai,cc,cd) = if ((ak == a))
542- then bZ(am, ca, cb, ah, ai, cc, cd)
543- else ck(am, ca, cb, ah, ai, cc, cd)
629+func cV (an,aq,cF,cG,ak,al,cH,cI) = if ((an == a))
630+ then cE(aq, cF, cG, ak, al, cH, cI)
631+ else cP(aq, cF, cG, ak, al, cH, cI)
544632
545633
546-func cr (am,cs,ct,cu) = {
547- let aa = Address(fromBase58String(am))
548- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool")
549- let cv = aj(aa, bQ)
550- let ca = cv._1
551- let cb = cv._2
552- let ah = cv._3
553- let ai = cv._4
554- let cw = U(ay(ca))
555- if ((cw == cw))
634+func cW (aq,cX,cY,cZ) = {
635+ let ad = Address(fromBase58String(aq))
636+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool")
637+ let da = am(ad, aT)
638+ let cF = da._1
639+ let cG = da._2
640+ let ak = da._3
641+ let al = da._4
642+ let aj = da._5
643+ let db = X(aC(cF))
644+ if ((db == db))
556645 then {
557- let cx = U(ay(cb))
558- if ((cx == cx))
646+ let dc = X(aC(cG))
647+ if ((dc == dc))
559648 then {
560- let br = if ((bQ == a))
561- then invoke(aa, "callFunction", ["withdraw", [toString(cs)]], nil)
562- else if ((bQ == b))
563- then invoke(aa, "unstakeAndGet", [cs], nil)
649+ let bX = if ((aT == a))
650+ then invoke(ad, "callFunction", ["withdraw", [toString(cX)]], nil)
651+ else if ((aT == b))
652+ then invoke(ad, "unstakeAndGet", [cX], nil)
564653 else throw("Wrong position type")
565- if ((br == br))
654+ if ((bX == bX))
566655 then {
567- let cy = U(ay(ca))
568- let cz = U(ay(cb))
569- let cA = $Tuple2((cy - cw), (cz - cx))
570- let cB = cA._1
571- let cC = cA._2
572- let cD = if ((ct > 0))
656+ let dd = X(aC(cF))
657+ let de = X(aC(cG))
658+ let df = $Tuple2((dd - db), (de - dc))
659+ let dg = df._1
660+ let dh = df._2
661+ let di = if ((cY > 0))
573662 then {
574- let cE = if (if ((cu == ca))
575- then (ct > cB)
663+ let dj = if (if ((cZ == cF))
664+ then (cY > dg)
576665 else false)
577- then (ct - cB)
578- else if (if ((cu == cb))
579- then (ct > cC)
666+ then (cY - dg)
667+ else if (if ((cZ == cG))
668+ then (cY > dh)
580669 else false)
581- then (ct - cC)
670+ then (cY - dh)
582671 else 0
583- let cF = if ((cE > 0))
584- then cq(bQ, am, ca, cb, ah, ai, cE, cu)
672+ let dk = if ((dj > 0))
673+ then cV(aT, aq, cF, cG, ak, al, dj, cZ)
585674 else 0
586- if ((cF == cF))
675+ if ((dk == dk))
587676 then {
588- let cG = U(ay(ca))
589- let cH = U(ay(cb))
590- $Tuple2((cG - cw), (cH - cx))
677+ let dl = X(aC(cF))
678+ let dm = X(aC(cG))
679+ $Tuple2((dl - db), (dm - dc))
591680 }
592681 else throw("Strict value is not equal to itself.")
593682 }
594- else $Tuple2(cB, cC)
595- let cI = cD._1
596- let cJ = cD._2
597- $Tuple6(cI, ca, cJ, cb, cy, cz)
683+ else $Tuple2(dg, dh)
684+ let dn = di._1
685+ let do = di._2
686+ $Tuple7(dn, cF, do, cG, dd, de, aj)
598687 }
599688 else throw("Strict value is not equal to itself.")
600689 }
604693 }
605694
606695
607-func cK (cL) = {
608- let cM = split(valueOrErrorMessage(getString(this, (cL + B)), ("No request with id " + cL)), ",")
609- let ap = cM[0]
610- let am = cM[1]
611- let aC = parseIntValue(cM[2])
612- let bh = cM[3]
613- let aE = parseIntValue(cM[4])
614- let bi = cM[5]
615- let ah = parseIntValue(cM[6])
616- let ai = parseIntValue(cM[7])
617- let ag = cM[8]
618- let cN = cM[9]
619- let cO = parseIntValue(cM[10])
620- $Tuple11(ap, am, aC, bh, aE, bi, ah, ai, ag, cN, cO)
696+func dp (dq) = {
697+ let dr = split(valueOrErrorMessage(getString(this, (dq + D)), ("No request with id " + dq)), ",")
698+ let at = dr[0]
699+ let aq = dr[1]
700+ let bi = parseIntValue(dr[2])
701+ let bN = dr[3]
702+ let bk = parseIntValue(dr[4])
703+ let bO = dr[5]
704+ let ak = parseIntValue(dr[6])
705+ let al = parseIntValue(dr[7])
706+ let aj = dr[8]
707+ let ds = dr[9]
708+ let dt = parseIntValue(dr[10])
709+ $Tuple11(at, aq, bi, bN, bk, bO, ak, al, aj, ds, dt)
621710 }
622711
623712
624-@Callable(T)
625-func getAssetPrice (V) = $Tuple2(nil, (let ad = invoke(O, "getTWAP60", [V, false], nil)
626-if ($isInstanceOf(ad, "(Int, Int)"))
627- then ad
628- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2)
629-
630-
631-
632-@Callable(T)
633-func getSharePrice (ag) = {
634- let am = valueOrErrorMessage(getString(this, (ag + E)), "Can't find pool addr by share id")
635- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited")
636- let cP = aj(Address(fromBase58String(am)), bQ)
637- let ae = cP._1
638- let af = cP._2
639- let cQ = ( let ad = invoke(O, "getTWAP60", [ae, false], nil)
640- if ($isInstanceOf(ad, "(Int, Int)"))
641- then ad
642- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
643- let cR = ( let ad = invoke(O, "getTWAP60", [af, false], nil)
644- if ($isInstanceOf(ad, "(Int, Int)"))
645- then ad
646- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
647- $Tuple2(nil, (cQ + cR))
648- }
649-
650-
651-
652-@Callable(T)
653-func replenishEVALONLY (am,cS,cT) = if (if ((100 > cS))
713+@Callable(W)
714+func replenishEVALONLY (aq,du,dv) = if (if ((100 > du))
654715 then true
655- else (cS > 300))
716+ else (du > 300))
656717 then throw("Leverage can't be <100 and >300")
657718 else {
658- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited")
659- let cU = aj(Address(fromBase58String(am)), bQ)
660- let bh = cU._1
661- let bi = cU._2
662- let ah = cU._3
663- let ai = cU._4
664- let ag = cU._5
665- let cV = if ((size(T.payments) == 2))
666- then if ((ax(T.payments[0].assetId) != bh))
719+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited")
720+ let dw = am(Address(fromBase58String(aq)), aT)
721+ let bN = dw._1
722+ let bO = dw._2
723+ let ak = dw._3
724+ let al = dw._4
725+ let aj = dw._5
726+ let dx = if ((size(W.payments) == 2))
727+ then if ((aB(W.payments[0].assetId) != bN))
667728 then throw("Wrong payment asset A")
668- else if ((ax(T.payments[1].assetId) != bi))
729+ else if ((aB(W.payments[1].assetId) != bO))
669730 then throw("Wrong payment asset B")
670- else $Tuple4(T.payments[0].amount, bh, T.payments[1].amount, bi)
671- else if ((size(T.payments) == 1))
672- then if ((ax(T.payments[0].assetId) == bh))
673- then $Tuple4(T.payments[0].amount, bh, 0, bi)
674- else if ((ax(T.payments[0].assetId) == bi))
675- then $Tuple4(0, bh, T.payments[0].amount, bi)
731+ else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO)
732+ else if ((size(W.payments) == 1))
733+ then if ((aB(W.payments[0].assetId) == bN))
734+ then $Tuple4(W.payments[0].amount, bN, 0, bO)
735+ else if ((aB(W.payments[0].assetId) == bO))
736+ then $Tuple4(0, bN, W.payments[0].amount, bO)
676737 else throw("Wrong payment")
677738 else throw("One or two payments expected")
678- let aC = cV._1
679- let aD = cV._2
680- let aE = cV._3
681- let aF = cV._4
682- let cW = if ((cS > 100))
739+ let bi = dx._1
740+ let bj = dx._2
741+ let bk = dx._3
742+ let bl = dx._4
743+ let dy = if ((du > 100))
683744 then {
684- let cQ = ( let ad = invoke(O, "getTWAP60", [aD, false], nil)
685- if ($isInstanceOf(ad, "(Int, Int)"))
686- then ad
687- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
688- let cR = ( let ad = invoke(O, "getTWAP60", [aF, false], nil)
689- if ($isInstanceOf(ad, "(Int, Int)"))
690- then ad
691- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
692- let cX = (fraction(cQ, aC, pow(10, 0, az(aD), 0, 0, DOWN)) + fraction(cR, aE, pow(10, 0, az(aF), 0, 0, DOWN)))
693- let cY = fraction(cX, (cS - 100), 100)
694- let cM = makeString([toString(T.caller), am, toString(aC), aD, toString(aE), aF, toString(ah), toString(ai), ag, cT, toString(cY), toString(1)], ",")
695- let cZ = {
696- let ad = invoke(this, "createNewRequest", [cM], nil)
697- if ($isInstanceOf(ad, "Int"))
698- then ad
699- else throw(($getType(ad) + " couldn't be cast to Int"))
745+ let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil)
746+ if ($isInstanceOf(ag, "(Int, Int)"))
747+ then ag
748+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
749+ let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil)
750+ if ($isInstanceOf(ag, "(Int, Int)"))
751+ then ag
752+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
753+ let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN)))
754+ let dA = fraction(dz, (du - 100), 100)
755+ let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA), toString(1)], ",")
756+ let dB = {
757+ let ag = invoke(this, "createNewRequest", [dr], nil)
758+ if ($isInstanceOf(ag, "Int"))
759+ then ag
760+ else throw(($getType(ag) + " couldn't be cast to Int"))
700761 }
701- if ((cZ == cZ))
762+ if ((dB == dB))
702763 then {
703- let da = [((toString(T.caller) + "_") + toString(1)), ag, cT, cY, toString(this), "replenishFromLandEVALONLY", toString(valueOrErrorMessage(cZ, "Can't create new request"))]
704- let br = reentrantInvoke(aw(), "flashPosition", da, nil)
705- if ((br == br))
706- then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), cY)
764+ let dC = [((toString(W.caller) + "_") + toString(1)), aj, dv, dA, toString(this), "replenishFromLandEVALONLY", toString(valueOrErrorMessage(dB, "Can't create new request"))]
765+ let bX = reentrantInvoke(aA(), "flashPosition", dC, nil)
766+ if ((bX == bX))
767+ then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), dA)
707768 else throw("Strict value is not equal to itself.")
708769 }
709770 else throw("Strict value is not equal to itself.")
710771 }
711- else $Tuple2(bg(bQ, am, f, aC, bh, aE, bi, ah, ai, ag)._1, 0)
712- let db = cW._1
713- let cY = cW._2
714- let dc = cr(am, db, cY, cT)
715- if ((dc == dc))
772+ else $Tuple2(bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj)._1, 0)
773+ let dD = dy._1
774+ let dA = dy._2
775+ let dE = cW(aq, dD, dA, dv)
776+ if ((dE == dE))
716777 then {
717- let dd = dc._6
718- let de = dc._5
719- let cb = dc._4
720- let cJ = dc._3
721- let ca = dc._2
722- let cI = dc._1
723- let df = aj(Address(fromBase58String(am)), bQ)
724- let dg = df._1
725- let dh = df._2
726- let di = df._3
727- let dj = df._4
728- let dk = df._5
729- let dl = fraction(ai, g, ah)
730- let dm = fraction(dj, g, di)
731- let dn = (g - fraction(dl, g, dm))
732- let do = if ((0 > dn))
733- then (dn * -1)
734- else dn
735- $Tuple2(nil, [de, dd, do])
778+ let dF = dE._6
779+ let dG = dE._5
780+ let cG = dE._4
781+ let do = dE._3
782+ let cF = dE._2
783+ let dn = dE._1
784+ let dH = am(Address(fromBase58String(aq)), aT)
785+ let dI = dH._1
786+ let dJ = dH._2
787+ let dK = dH._3
788+ let dL = dH._4
789+ let dM = dH._5
790+ let dN = fraction(al, h, ak)
791+ let dO = fraction(dL, h, dK)
792+ let dP = (h - fraction(dN, h, dO))
793+ let dQ = if ((0 > dP))
794+ then (dP * -1)
795+ else dP
796+ $Tuple2(nil, [dG, dF, dQ])
736797 }
737798 else throw("Strict value is not equal to itself.")
738799 }
739800
740801
741802
742-@Callable(T)
743-func replenishFromLandEVALONLY (cL) = {
744- let dp = cK(cL)
745- let ap = dp._1
746- let am = dp._2
747- let aC = dp._3
748- let bh = dp._4
749- let aE = dp._5
750- let bi = dp._6
751- let ah = dp._7
752- let ai = dp._8
753- let ag = dp._9
754- let cN = dp._10
755- let cO = dp._11
756- if ((size(T.payments) != 1))
803+@Callable(W)
804+func replenishFromLandEVALONLY (dq) = {
805+ let dR = dp(dq)
806+ let at = dR._1
807+ let aq = dR._2
808+ let bi = dR._3
809+ let bN = dR._4
810+ let bk = dR._5
811+ let bO = dR._6
812+ let ak = dR._7
813+ let al = dR._8
814+ let aj = dR._9
815+ let ds = dR._10
816+ let dt = dR._11
817+ if ((size(W.payments) != 1))
757818 then throw("Wrong payment size")
758- else if (if ((ax(T.payments[0].assetId) != cN))
819+ else if (if ((aB(W.payments[0].assetId) != ds))
759820 then true
760- else (T.payments[0].amount != cO))
821+ else (W.payments[0].amount != dt))
761822 then throw("Wrong payment")
762823 else {
763- let dq = if ((bh == cN))
764- then $Tuple2((aC + T.payments[0].amount), aE)
765- else $Tuple2(aC, (aE + T.payments[0].amount))
766- let dr = dq._1
767- let ds = dq._2
768- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool")
769- let dt = bg(bQ, am, e, aC, bh, aE, bi, ah, ai, ag)
770- let db = dt._1
771- let bW = dt._2
772- $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", db)], db)
824+ let dS = if ((bN == ds))
825+ then $Tuple2((bi + W.payments[0].amount), bk)
826+ else $Tuple2(bi, (bk + W.payments[0].amount))
827+ let dT = dS._1
828+ let dU = dS._2
829+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool")
830+ let dV = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj)
831+ let dD = dV._1
832+ let cB = dV._2
833+ $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", dD)], dD)
773834 }
774835 }
775836
776837
777838
778-@Callable(T)
779-func replenish (am,cS,cT) = if (if ((100 > cS))
839+@Callable(W)
840+func replenish (aq,du,dv) = if (if ((100 > du))
780841 then true
781- else (cS > 300))
842+ else (du > 300))
782843 then throw("Leverage can't be <100 and >300")
783844 else {
784- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited")
785- let du = aj(Address(fromBase58String(am)), bQ)
786- let bh = du._1
787- let bi = du._2
788- let ah = du._3
789- let ai = du._4
790- let ag = du._5
791- let dv = if ((size(T.payments) == 2))
792- then if ((ax(T.payments[0].assetId) != bh))
845+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited")
846+ let dW = am(Address(fromBase58String(aq)), aT)
847+ let bN = dW._1
848+ let bO = dW._2
849+ let ak = dW._3
850+ let al = dW._4
851+ let aj = dW._5
852+ let dX = if ((size(W.payments) == 2))
853+ then if ((aB(W.payments[0].assetId) != bN))
793854 then throw("Wrong payment asset A")
794- else if ((ax(T.payments[1].assetId) != bi))
855+ else if ((aB(W.payments[1].assetId) != bO))
795856 then throw("Wrong payment asset B")
796- else $Tuple4(T.payments[0].amount, bh, T.payments[1].amount, bi)
797- else if ((size(T.payments) == 1))
798- then if ((ax(T.payments[0].assetId) == bh))
799- then $Tuple4(T.payments[0].amount, bh, 0, bi)
800- else if ((ax(T.payments[0].assetId) == bi))
801- then $Tuple4(0, bh, T.payments[0].amount, bi)
857+ else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO)
858+ else if ((size(W.payments) == 1))
859+ then if ((aB(W.payments[0].assetId) == bN))
860+ then $Tuple4(W.payments[0].amount, bN, 0, bO)
861+ else if ((aB(W.payments[0].assetId) == bO))
862+ then $Tuple4(0, bN, W.payments[0].amount, bO)
802863 else throw("Wrong payment")
803864 else throw("One or two payments expected")
804- let aC = dv._1
805- let aD = dv._2
806- let aE = dv._3
807- let aF = dv._4
808- let dw = ao(am, toString(T.caller))
809- if ((cS > 100))
865+ let bi = dX._1
866+ let bj = dX._2
867+ let bk = dX._3
868+ let bl = dX._4
869+ let dY = as(aq, toString(W.caller))
870+ if ((du > 100))
810871 then {
811- let cQ = ( let ad = invoke(O, "getTWAP60", [aD, false], nil)
812- if ($isInstanceOf(ad, "(Int, Int)"))
813- then ad
814- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
815- let cR = ( let ad = invoke(O, "getTWAP60", [aF, false], nil)
816- if ($isInstanceOf(ad, "(Int, Int)"))
817- then ad
818- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
819- let cX = (fraction(cQ, aC, pow(10, 0, az(aD), 0, 0, DOWN)) + fraction(cR, aE, pow(10, 0, az(aF), 0, 0, DOWN)))
820- let cY = fraction(cX, (cS - 100), 100)
821- let cM = makeString([toString(T.caller), am, toString(aC), aD, toString(aE), aF, toString(ah), toString(ai), ag, cT, toString(cY)], ",")
822- let cZ = {
823- let ad = invoke(this, "createNewRequest", [cM], nil)
824- if ($isInstanceOf(ad, "Int"))
825- then ad
826- else throw(($getType(ad) + " couldn't be cast to Int"))
872+ let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil)
873+ if ($isInstanceOf(ag, "(Int, Int)"))
874+ then ag
875+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
876+ let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil)
877+ if ($isInstanceOf(ag, "(Int, Int)"))
878+ then ag
879+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
880+ let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN)))
881+ let dA = fraction(dz, (du - 100), 100)
882+ let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA)], ",")
883+ let dB = {
884+ let ag = invoke(this, "createNewRequest", [dr], nil)
885+ if ($isInstanceOf(ag, "Int"))
886+ then ag
887+ else throw(($getType(ag) + " couldn't be cast to Int"))
827888 }
828- if ((cZ == cZ))
889+ if ((dB == dB))
829890 then {
830- let da = [((toString(T.caller) + "_") + toString(dw)), ag, cT, cY, toString(this), "replenishFromLand", toString(valueOrErrorMessage(cZ, "Can't create new request"))]
831- let br = reentrantInvoke(aw(), "flashPosition", da, nil)
832- if ((br == br))
891+ let dC = [((toString(W.caller) + "_") + toString(dY)), aj, dv, dA, toString(this), "replenishFromLand", toString(valueOrErrorMessage(dB, "Can't create new request"))]
892+ let bX = reentrantInvoke(aA(), "flashPosition", dC, nil)
893+ if ((bX == bX))
833894 then nil
834895 else throw("Strict value is not equal to itself.")
835896 }
836897 else throw("Strict value is not equal to itself.")
837898 }
838899 else {
839- let dx = bg(bQ, am, f, aC, bh, aE, bi, ah, ai, ag)
840- let db = dx._1
841- let bW = dx._2
842- bj(am, toString(T.caller), db, bW, dw, ag, bQ)
900+ let dZ = bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj)
901+ let dD = dZ._1
902+ let cB = dZ._2
903+ (bP(aq, toString(W.caller), dD, cB, dY, aj, aT) ++ bf(bN, bO, aj))
843904 }
844905 }
845906
846907
847908
848-@Callable(T)
849-func replenishFromLand (cL) = {
850- let dy = cK(cL)
851- let ap = dy._1
852- let am = dy._2
853- let aC = dy._3
854- let bh = dy._4
855- let aE = dy._5
856- let bi = dy._6
857- let ah = dy._7
858- let ai = dy._8
859- let ag = dy._9
860- let cN = dy._10
861- let cO = dy._11
862- if ((size(T.payments) != 1))
909+@Callable(W)
910+func replenishFromLand (dq) = {
911+ let ea = dp(dq)
912+ let at = ea._1
913+ let aq = ea._2
914+ let bi = ea._3
915+ let bN = ea._4
916+ let bk = ea._5
917+ let bO = ea._6
918+ let ak = ea._7
919+ let al = ea._8
920+ let aj = ea._9
921+ let ds = ea._10
922+ let dt = ea._11
923+ if ((size(W.payments) != 1))
863924 then throw("Wrong payment size")
864- else if (if ((ax(T.payments[0].assetId) != cN))
925+ else if (if ((aB(W.payments[0].assetId) != ds))
865926 then true
866- else (T.payments[0].amount != cO))
927+ else (W.payments[0].amount != dt))
867928 then throw("Wrong payment")
868929 else {
869- let dz = if ((bh == cN))
870- then $Tuple2((aC + T.payments[0].amount), aE)
871- else $Tuple2(aC, (aE + T.payments[0].amount))
872- let dr = dz._1
873- let ds = dz._2
874- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool")
875- let dA = bg(bQ, am, e, aC, bh, aE, bi, ah, ai, ag)
876- let db = dA._1
877- let bW = dA._2
878- let bl = ao(am, toString(T.caller))
879- let dB = [IntegerEntry((((((am + "_") + ap) + "_") + toString(bl)) + q), cO), StringEntry((((((am + "_") + ap) + "_") + toString(bl)) + r), cN)]
880- let dC = bj(am, ap, db, bW, bl, ag, bQ)
881- $Tuple2(((dC ++ dB) :+ DeleteEntry((cL + B))), db)
930+ let eb = if ((bN == ds))
931+ then $Tuple2((bi + W.payments[0].amount), bk)
932+ else $Tuple2(bi, (bk + W.payments[0].amount))
933+ let dT = eb._1
934+ let dU = eb._2
935+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool")
936+ let ec = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj)
937+ let dD = ec._1
938+ let cB = ec._2
939+ let bR = as(aq, toString(W.caller))
940+ let ed = [IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + s), dt), StringEntry((((((aq + "_") + at) + "_") + toString(bR)) + t), ds)]
941+ let ee = bP(aq, at, dD, cB, bR, aj, aT)
942+ $Tuple2((((ee ++ bf(bN, bO, aj)) ++ ed) :+ DeleteEntry((dq + D))), dD)
882943 }
883944 }
884945
885946
886947
887-@Callable(T)
888-func withdraw (am,dD) = {
889- let ap = toString(T.caller)
890- let dE = valueOrErrorMessage(getInteger(this, (((((am + "_") + ap) + "_") + toString(dD)) + p)), "Unknown position")
891- let dF = getIntegerValue(this, (((((am + "_") + ap) + "_") + toString(dD)) + t))
892- let dG = getIntegerValue(this, (am + w))
893- let dH = al(am)
894- let cs = (dE + fraction(dE, (dG - dF), h))
895- let dI = Address(fromBase58String(ap))
896- let cY = getIntegerValue(this, (((((am + "_") + ap) + "_") + toString(dD)) + q))
897- let cu = getStringValue(this, (((((am + "_") + ap) + "_") + toString(dD)) + r))
898- let ct = if ((cY > 0))
948+@Callable(W)
949+func withdraw (aq,ef) = {
950+ let at = toString(W.caller)
951+ let eg = valueOrErrorMessage(getInteger(this, (((((aq + "_") + at) + "_") + toString(ef)) + r)), "Unknown position")
952+ let eh = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + v))
953+ let ei = getIntegerValue(this, (aq + y))
954+ let ej = ap(aq)
955+ let cX = (eg + fraction(eg, (ei - eh), i))
956+ let ek = Address(fromBase58String(at))
957+ let dA = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + s))
958+ let cZ = getStringValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + t))
959+ let cY = if ((dA > 0))
899960 then {
900- let ad = invoke(aw(), "getAssetDebt", [false, ((((am + "_") + ap) + "_") + toString(dD)), cu], nil)
901- if ($isInstanceOf(ad, "Int"))
902- then ad
903- else throw(($getType(ad) + " couldn't be cast to Int"))
961+ let ag = invoke(aA(), "getAssetDebt", [false, ((((aq + "_") + at) + "_") + toString(ef)), cZ], nil)
962+ if ($isInstanceOf(ag, "Int"))
963+ then ag
964+ else throw(($getType(ag) + " couldn't be cast to Int"))
904965 }
905966 else 0
906- let dJ = cr(am, cs, ct, cu)
907- if ((dJ == dJ))
967+ let el = cW(aq, cX, cY, cZ)
968+ if ((el == el))
908969 then {
909- let cb = dJ._4
910- let cJ = dJ._3
911- let ca = dJ._2
912- let cI = dJ._1
913- let dK = if ((ct > 0))
914- then invoke(aw(), "repayFor", [((ap + "_") + toString(dD))], [AttachedPayment(ay(cu), ct)])
970+ let aj = el._7
971+ let de = el._6
972+ let dd = el._5
973+ let cG = el._4
974+ let do = el._3
975+ let cF = el._2
976+ let dn = el._1
977+ let em = if ((cY > 0))
978+ then invoke(aA(), "repayFor", [((at + "_") + toString(ef))], [AttachedPayment(aC(cZ), cY)])
915979 else 0
916- if ((dK == dK))
917- then [DeleteEntry((((((am + "_") + ap) + "_") + toString(dD)) + p)), DeleteEntry((((((am + "_") + ap) + "_") + toString(dD)) + t)), IntegerEntry((am + u), (dH - cs)), ScriptTransfer(dI, cI, ay(ca)), ScriptTransfer(dI, cJ, ay(cb))]
980+ if ((em == em))
981+ then ([DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + r)), DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + v)), IntegerEntry((aq + w), (ej - cX)), ScriptTransfer(ek, dn, aC(cF)), ScriptTransfer(ek, do, aC(cG))] ++ bf(cF, cG, aj))
918982 else throw("Strict value is not equal to itself.")
919983 }
920984 else throw("Strict value is not equal to itself.")
922986
923987
924988
925-@Callable(T)
926-func createNewRequest (dL) = valueOrElse(S(T), {
927- let cZ = (valueOrElse(getInteger(this, C), 0) + 1)
928- $Tuple2([StringEntry((toString(cZ) + B), dL), IntegerEntry(C, cZ)], cZ)
989+@Callable(W)
990+func createNewRequest (en) = valueOrElse(V(W), {
991+ let dB = (valueOrElse(getInteger(this, E), 0) + 1)
992+ $Tuple2([StringEntry((toString(dB) + D), en), IntegerEntry(E, dB)], dB)
929993 })
930994
931995
932996
933-@Callable(T)
934-func capitalizeExKeeper (am,ak,dM,dN,dO,bx,by,bz,bA,bB,bC,bD) = {
935- let dP = if (dO)
936- then bp(ak, am)
997+@Callable(W)
998+func capitalizeExKeeper (aq,an,eo,ep,eq,cd,ce,cf,cg,ch,ci,cj) = {
999+ let er = if (eq)
1000+ then bV(an, aq)
9371001 else {
938- let dQ = if ((ak == a))
939- then Q
940- else R
941- $Tuple2(dN, dQ)
1002+ let es = if ((an == a))
1003+ then T
1004+ else U
1005+ $Tuple2(ep, es)
9421006 }
943- let dR = dP._1
944- let dQ = dP._2
945- let dS = bt(dM, dN, dQ, bx, by, bz, bA, bB, bC, bD)
946- let aN = (dR - dN)
947- let dT = if ((aN > 0))
948- then [IntegerEntry((am + F), (aN + valueOrElse(getInteger(this, (am + F)), 0)))]
1007+ let et = er._1
1008+ let es = er._2
1009+ let eu = bZ(eo, ep, es, cd, ce, cf, cg, ch, ci, cj)
1010+ let bt = (et - ep)
1011+ let ev = if ((bt > 0))
1012+ then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))]
9491013 else nil
950- (bP(am, ak, dM, dS) ++ dT)
1014+ (cv(aq, an, eo, eu) ++ ev)
9511015 }
9521016
9531017
9541018
955-@Callable(T)
956-func capitalizeExPazzle (am,ak,dM,dN,dO,bG,bH,bD) = {
957- let dU = if (dO)
958- then bp(ak, am)
1019+@Callable(W)
1020+func capitalizeExPazzle (aq,an,eo,ep,eq,cm,cn,cj) = {
1021+ let ew = if (eq)
1022+ then bV(an, aq)
9591023 else {
960- let dQ = if ((ak == a))
961- then Q
962- else R
963- $Tuple2(dN, dQ)
1024+ let es = if ((an == a))
1025+ then T
1026+ else U
1027+ $Tuple2(ep, es)
9641028 }
965- let dR = dU._1
966- let dQ = dU._2
967- let dS = bF(dM, dN, dQ, bG, bH, bD)
968- let aN = (dR - dN)
969- let dT = if ((aN > 0))
970- then [IntegerEntry((am + F), (aN + valueOrElse(getInteger(this, (am + F)), 0)))]
1029+ let et = ew._1
1030+ let es = ew._2
1031+ let eu = cl(eo, ep, es, cm, cn, cj)
1032+ let bt = (et - ep)
1033+ let ev = if ((bt > 0))
1034+ then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))]
9711035 else nil
972- (bP(am, ak, dM, dS) ++ dT)
1036+ (cv(aq, an, eo, eu) ++ ev)
9731037 }
9741038
9751039
9761040
977-@Callable(T)
978-func capitalizeExSwopFi (am,ak,dM,dN,dO,bJ,bK,bL,bM,bN,bO,bD) = {
979- let dV = if (dO)
980- then bp(ak, am)
1041+@Callable(W)
1042+func capitalizeExSwopFi (aq,an,eo,ep,eq,cp,cq,cr,cs,ct,cu,cj) = {
1043+ let ex = if (eq)
1044+ then bV(an, aq)
9811045 else {
982- let dQ = if ((ak == a))
983- then Q
984- else R
985- $Tuple2(dN, dQ)
1046+ let es = if ((an == a))
1047+ then T
1048+ else U
1049+ $Tuple2(ep, es)
9861050 }
987- let dR = dV._1
988- let dQ = dV._2
989- let dS = bI(dM, dN, dQ, bJ, bK, bL, bM, bN, bO, bD)
990- let aN = (dR - dN)
991- let dT = if ((aN > 0))
992- then [IntegerEntry((am + F), (aN + valueOrElse(getInteger(this, (am + F)), 0)))]
1051+ let et = ex._1
1052+ let es = ex._2
1053+ let eu = co(eo, ep, es, cp, cq, cr, cs, ct, cu, cj)
1054+ let bt = (et - ep)
1055+ let ev = if ((bt > 0))
1056+ then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))]
9931057 else nil
994- (bP(am, ak, dM, dS) ++ dT)
1058+ (cv(aq, an, eo, eu) ++ ev)
9951059 }
9961060
9971061
9981062
999-@Callable(T)
1000-func initNewPool (ak,aa,dW,dX,dY,dZ) = if (if ((ak != a))
1001- then (ak != b)
1063+@Callable(W)
1064+func initNewPool (an,ad,ey,ez,eA,eB) = if (if ((an != a))
1065+ then (an != b)
10021066 else false)
10031067 then throw("Wrong type")
10041068 else {
1005- let ea = aj(Address(fromBase58String(aa)), ak)
1006- let ae = ea._1
1007- let af = ea._2
1008- let eb = ea._3
1009- let ec = ea._4
1010- let ag = ea._5
1011-[IntegerEntry((aa + x), dW), IntegerEntry((aa + y), dX), IntegerEntry((aa + z), dY), IntegerEntry((aa + A), dZ), IntegerEntry((aa + w), 0), StringEntry((D + aa), ak), StringEntry((ag + E), aa)]
1069+ let eC = am(Address(fromBase58String(ad)), an)
1070+ let ah = eC._1
1071+ let ai = eC._2
1072+ let eD = eC._3
1073+ let eE = eC._4
1074+ let aj = eC._5
1075+[IntegerEntry((ad + z), ey), IntegerEntry((ad + A), ez), IntegerEntry((ad + B), eA), IntegerEntry((ad + C), eB), IntegerEntry((ad + y), 0), StringEntry((F + ad), an), StringEntry((aj + G), ad)]
10121076 }
10131077
10141078
1015-@Verifier(ed)
1016-func ee () = sigVerify(ed.bodyBytes, ed.proofs[0], ed.senderPublicKey)
1079+@Verifier(eF)
1080+func eG () = sigVerify(eF.bodyBytes, eF.proofs[0], eF.senderPublicKey)
10171081
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
12-let e = "loan"
12+let e = "cap"
1313
14-let f = "noLoan"
14+let f = "loan"
1515
16-let g = 100000000
16+let g = "noLoan"
1717
18-let h = 10000000000
18+let h = 100000000
1919
20-let i = 1000000
20+let i = 10000000000
2121
22-let j = "A_asset_balance"
22+let j = 1000000
2323
24-let k = "B_asset_balance"
24+let k = "A_asset_balance"
2525
26-let l = "A_asset_id"
26+let l = "B_asset_balance"
2727
28-let m = "B_asset_id"
28+let m = "A_asset_id"
2929
30-let n = "share_asset_id"
30+let n = "B_asset_id"
3131
32-let o = "commission"
32+let o = "share_asset_id"
3333
34-let p = "_user_position"
34+let p = "share_asset_supply"
3535
36-let q = "_user_position_borrow_amount"
36+let q = "commission"
3737
38-let r = "_user_position_borrow_asset_id"
38+let r = "_user_position"
3939
40-let s = "_user_position_number"
40+let s = "_user_position_borrow_amount"
4141
42-let t = "_user_position_interest"
42+let t = "_user_position_borrow_asset_id"
4343
44-let u = "_pool_total"
44+let u = "_user_position_number"
4545
46-let v = "_pool_total_loan"
46+let v = "_user_position_interest"
4747
48-let w = "_pool_interest"
48+let w = "_pool_total"
4949
50-let x = "_axly_fee_without_loan"
50+let x = "_pool_total_loan"
5151
52-let y = "_axly_fee_with_loan"
52+let y = "_pool_interest"
5353
54-let z = "_axly_fee_cap_with_loan"
54+let z = "_axly_fee_without_loan"
5555
56-let A = "_axly_fee_cap_no_loan"
56+let A = "_axly_fee_with_loan"
5757
58-let B = "_request_id"
58+let B = "_axly_fee_cap_with_loan"
5959
60-let C = "requests_iter"
60+let C = "_axly_fee_cap_no_loan"
6161
62-let D = "pool_"
62+let D = "_request_id"
6363
64-let E = "_pool_share_id"
64+let E = "requests_iter"
6565
66-let F = "_pool_cap_change"
66+let F = "pool_"
6767
68-let G = "axly_money_box"
68+let G = "_pool_share_id"
6969
70-let H = "swopfi_farming_addr"
70+let H = "_pool_cap_change"
7171
72-let I = "lend_service_addr"
72+let I = "_last_price"
7373
74-let J = "price_oracle"
74+let J = "axly_money_box"
7575
76-let K = "exchange_contract"
76+let K = "swopfi_farming_addr"
7777
78-let L = "wx_swap_contract"
78+let L = "lend_service_addr"
7979
80-let M = Address(fromBase58String(valueOrErrorMessage(getString(this, G), "No axly moneyBox address")))
80+let M = "price_oracle"
8181
82-let N = Address(fromBase58String(valueOrErrorMessage(getString(this, K), "No exchange contract address")))
82+let N = "exchange_contract"
8383
84-let O = Address(fromBase58String(valueOrErrorMessage(getString(this, J), "No price oracle address")))
84+let O = "wx_swap_contract"
8585
86-let P = Address(fromBase58String(valueOrErrorMessage(getString(this, L), "No wx swap address")))
86+let P = Address(fromBase58String(valueOrErrorMessage(getString(this, J), "No axly moneyBox address")))
8787
88-let Q = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
88+let Q = Address(fromBase58String(valueOrErrorMessage(getString(this, N), "No exchange contract address")))
8989
90-let R = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
90+let R = Address(fromBase58String(valueOrErrorMessage(getString(this, M), "No price oracle address")))
9191
92-func S (T) = if ((T.caller == this))
92+let S = Address(fromBase58String(valueOrErrorMessage(getString(this, O), "No wx swap address")))
93+
94+let T = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
95+
96+let U = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
97+
98+func V (W) = if ((W.caller == this))
9399 then unit
94100 else throw("Only contract itself can call this function")
95101
96102
97-func U (V) = {
98- let W = V
99- if ($isInstanceOf(W, "ByteVector"))
103+func X (Y) = {
104+ let Z = Y
105+ if ($isInstanceOf(Z, "ByteVector"))
100106 then {
101- let X = W
102- assetBalance(this, X)
107+ let aa = Z
108+ assetBalance(this, aa)
103109 }
104- else if ($isInstanceOf(W, "Unit"))
110+ else if ($isInstanceOf(Z, "Unit"))
105111 then {
106- let Y = W
112+ let ab = Z
107113 wavesBalance(this).available
108114 }
109115 else throw("Match error")
110116 }
111117
112118
113-func Z (aa) = $Tuple5(valueOrErrorMessage(getString(aa, l), "Can't get pool A asset id"), valueOrErrorMessage(getString(aa, m), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(aa, j), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(aa, k), "Can't get pool B asset balance"), valueOrErrorMessage(getString(aa, n), "Can't get share asset id"))
119+func ac (ad) = $Tuple5(valueOrErrorMessage(getString(ad, m), "Can't get pool A asset id"), valueOrErrorMessage(getString(ad, n), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(ad, k), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(ad, l), "Can't get pool B asset balance"), valueOrErrorMessage(getString(ad, o), "Can't get share asset id"))
114120
115121
116-func ab (aa) = {
117- let ac = {
118- let ad = invoke(aa, "getPoolConfigWrapperREADONLY", nil, nil)
119- if ($isInstanceOf(ad, "List[Any]"))
120- then ad
121- else throw(($getType(ad) + " couldn't be cast to List[Any]"))
122+func ae (ad) = {
123+ let af = {
124+ let ag = invoke(ad, "getPoolConfigWrapperREADONLY", nil, nil)
125+ if ($isInstanceOf(ag, "List[Any]"))
126+ then ag
127+ else throw(($getType(ag) + " couldn't be cast to List[Any]"))
122128 }
123- if ((ac == ac))
129+ if ((af == af))
124130 then {
125- let ae = valueOrErrorMessage({
126- let ad = ac[4]
127- if ($isInstanceOf(ad, "String"))
128- then ad
131+ let ah = valueOrErrorMessage({
132+ let ag = af[4]
133+ if ($isInstanceOf(ag, "String"))
134+ then ag
129135 else unit
130136 }, "Can't get pool A asset id")
131- let af = valueOrErrorMessage({
132- let ad = ac[5]
133- if ($isInstanceOf(ad, "String"))
134- then ad
137+ let ai = valueOrErrorMessage({
138+ let ag = af[5]
139+ if ($isInstanceOf(ag, "String"))
140+ then ag
135141 else unit
136142 }, "Can't get pool B asset id")
137- let ag = valueOrErrorMessage({
138- let ad = ac[3]
139- if ($isInstanceOf(ad, "String"))
140- then ad
143+ let aj = valueOrErrorMessage({
144+ let ag = af[3]
145+ if ($isInstanceOf(ag, "String"))
146+ then ag
141147 else unit
142148 }, "Can't get pool LP asset id")
143- let ah = {
144- let ad = invoke(aa, "getAccBalanceWrapperREADONLY", [ae], nil)
145- if ($isInstanceOf(ad, "Int"))
146- then ad
147- else throw(($getType(ad) + " couldn't be cast to Int"))
149+ let ak = {
150+ let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ah], nil)
151+ if ($isInstanceOf(ag, "Int"))
152+ then ag
153+ else throw(($getType(ag) + " couldn't be cast to Int"))
148154 }
149- if ((ah == ah))
155+ if ((ak == ak))
150156 then {
151- let ai = {
152- let ad = invoke(aa, "getAccBalanceWrapperREADONLY", [af], nil)
153- if ($isInstanceOf(ad, "Int"))
154- then ad
155- else throw(($getType(ad) + " couldn't be cast to Int"))
157+ let al = {
158+ let ag = invoke(ad, "getAccBalanceWrapperREADONLY", [ai], nil)
159+ if ($isInstanceOf(ag, "Int"))
160+ then ag
161+ else throw(($getType(ag) + " couldn't be cast to Int"))
156162 }
157- if ((ai == ai))
158- then $Tuple5(ae, af, ah, ai, ag)
163+ if ((al == al))
164+ then $Tuple5(ah, ai, ak, al, aj)
159165 else throw("Strict value is not equal to itself.")
160166 }
161167 else throw("Strict value is not equal to itself.")
162168 }
163169 else throw("Strict value is not equal to itself.")
164170 }
165171
166172
167-func aj (aa,ak) = if ((ak == a))
168- then Z(aa)
169- else if ((ak == b))
170- then ab(aa)
173+func am (ad,an) = if ((an == a))
174+ then ac(ad)
175+ else if ((an == b))
176+ then ae(ad)
171177 else throw("Wrong pool type")
172178
173179
174-func al (am) = valueOrElse(getInteger(this, (am + u)), 0)
180+func ao (ad,an,aj) = if ((an == a))
181+ then valueOrErrorMessage(getInteger(ad, p), "Can't get share asset supply")
182+ else if ((an == b))
183+ then valueOrErrorMessage(assetInfo(fromBase58String(aj)), "Wrong ShareId").quantity
184+ else throw("Wrong pool type")
175185
176186
177-func an (am) = valueOrElse(getInteger(this, (am + v)), 0)
187+func ap (aq) = valueOrElse(getInteger(this, (aq + w)), 0)
178188
179189
180-func ao (am,ap) = (valueOrElse(getInteger(this, (((am + "_") + ap) + s)), 0) + 1)
190+func ar (aq) = valueOrElse(getInteger(this, (aq + x)), 0)
181191
182192
183-func aq (am,ar) = if ((ar == d))
184- then getIntegerValue(this, (am + A))
185- else if ((ar == c))
186- then getIntegerValue(this, (am + z))
187- else if ((ar == e))
188- then getIntegerValue(this, (am + y))
189- else if ((ar == f))
190- then getIntegerValue(this, (am + x))
193+func as (aq,at) = (valueOrElse(getInteger(this, (((aq + "_") + at) + u)), 0) + 1)
194+
195+
196+func au (aq,av) = if ((av == d))
197+ then getIntegerValue(this, (aq + C))
198+ else if ((av == c))
199+ then getIntegerValue(this, (aq + B))
200+ else if ((av == f))
201+ then getIntegerValue(this, (aq + A))
202+ else if ((av == g))
203+ then getIntegerValue(this, (aq + z))
191204 else throw("Wrong fee type")
192205
193206
194-func as () = Address(fromBase58String(valueOrErrorMessage(getString(this, H), "Can't get swopfi farming addr")))
207+func aw () = Address(fromBase58String(valueOrErrorMessage(getString(this, K), "Can't get swopfi farming addr")))
195208
196209
197-func at (aa) = {
198- let au = Address(fromBase58String(valueOrErrorMessage(getString(aa, "%s__factoryContract"), "Can't get WX factory contract addr")))
199- let av = split(valueOrErrorMessage(getString(au, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
200- Address(fromBase58String(av[1]))
210+func ax (ad) = {
211+ let ay = Address(fromBase58String(valueOrErrorMessage(getString(ad, "%s__factoryContract"), "Can't get WX factory contract addr")))
212+ let az = split(valueOrErrorMessage(getString(ay, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
213+ Address(fromBase58String(az[1]))
201214 }
202215
203216
204-func aw () = Address(fromBase58String(valueOrErrorMessage(getString(this, I), "Can't get lend service addr")))
217+func aA () = Address(fromBase58String(valueOrErrorMessage(getString(this, L), "Can't get lend service addr")))
205218
206219
207-func ax (V) = {
208- let W = V
209- if ($isInstanceOf(W, "ByteVector"))
220+func aB (Y) = {
221+ let Z = Y
222+ if ($isInstanceOf(Z, "ByteVector"))
210223 then {
211- let X = W
212- toBase58String(X)
224+ let aa = Z
225+ toBase58String(aa)
213226 }
214- else if ($isInstanceOf(W, "Unit"))
227+ else if ($isInstanceOf(Z, "Unit"))
215228 then {
216- let Y = W
229+ let ab = Z
217230 "WAVES"
218231 }
219232 else throw("Match error")
220233 }
221234
222235
223-func ay (V) = if ((V == "WAVES"))
236+func aC (Y) = if ((Y == "WAVES"))
224237 then unit
225- else fromBase58String(V)
238+ else fromBase58String(Y)
226239
227240
228-func az (V) = if ((V == "WAVES"))
241+func aD (Y) = if ((Y == "WAVES"))
229242 then 8
230243 else {
231- let W = assetInfo(fromBase58String(V))
232- if ($isInstanceOf(W, "Asset"))
244+ let Z = assetInfo(fromBase58String(Y))
245+ if ($isInstanceOf(Z, "Asset"))
233246 then {
234- let aA = W
235- aA.decimals
247+ let aE = Z
248+ aE.decimals
236249 }
237250 else throw("Can't find asset")
238251 }
239252
240253
241-func aB (am,ar,aC,aD,aE,aF,ah,ai,ag) = {
242- let aG = U(fromBase58String(ag))
243- if ((aG == aG))
254+func aF (aG) = {
255+ func aH (aI,Y) = {
256+ let aJ = ( let ag = invoke(R, "getTWAP60", [Y, false], nil)
257+ if ($isInstanceOf(ag, "(Int, Int)"))
258+ then ag
259+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
260+ (aI :+ aJ)
261+ }
262+
263+ let aK = aG
264+ let aL = size(aK)
265+ let aM = nil
266+ func aN (aO,aP) = if ((aP >= aL))
267+ then aO
268+ else aH(aO, aK[aP])
269+
270+ func aQ (aO,aP) = if ((aP >= aL))
271+ then aO
272+ else throw("List size exceeds 100")
273+
274+ aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 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), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
275+ }
276+
277+
278+func aR (aS) = {
279+ func aH (aI,aj) = {
280+ let aq = valueOrErrorMessage(getString(this, (aj + G)), "Can't find pool addr by share id")
281+ let ad = Address(fromBase58String(aq))
282+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited")
283+ let aU = am(ad, aT)
284+ let ah = aU._1
285+ let ai = aU._2
286+ let aV = aU._3
287+ let aW = aU._4
288+ let aX = ( let ag = invoke(R, "getTWAP60", [ah, false], nil)
289+ if ($isInstanceOf(ag, "(Int, Int)"))
290+ then ag
291+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
292+ let aY = ( let ag = invoke(R, "getTWAP60", [ai, false], nil)
293+ if ($isInstanceOf(ag, "(Int, Int)"))
294+ then ag
295+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
296+ let aZ = ao(ad, aT, aj)
297+ let ba = pow(10, 0, aD(ah), 0, 0, DOWN)
298+ let bb = pow(10, 0, aD(ai), 0, 0, DOWN)
299+ let bc = pow(10, 0, aD(aj), 0, 0, DOWN)
300+ let bd = (fraction(aV, aX, ba) + fraction(aW, aY, bb))
301+ let be = fraction(bd, bc, aZ)
302+ (aI :+ be)
303+ }
304+
305+ let aK = aS
306+ let aL = size(aK)
307+ let aM = nil
308+ func aN (aO,aP) = if ((aP >= aL))
309+ then aO
310+ else aH(aO, aK[aP])
311+
312+ func aQ (aO,aP) = if ((aP >= aL))
313+ then aO
314+ else throw("List size exceeds 50")
315+
316+ aQ(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aN(aM, 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)
317+ }
318+
319+
320+func bf (ah,ai,aj) = {
321+ let bg = aF([ah, ai])
322+ let be = aR([aj])
323+[IntegerEntry((ah + I), bg[0]), IntegerEntry((ai + I), bg[1]), IntegerEntry((aj + I), be[0])]
324+ }
325+
326+
327+func bh (aq,av,bi,bj,bk,bl,ak,al,aj) = {
328+ let bm = X(fromBase58String(aj))
329+ if ((bm == bm))
244330 then {
245- let aa = Address(fromBase58String(am))
246- let aH = fraction(g, aC, ah)
247- let aI = fraction(g, aE, ai)
248- let aJ = if ((aI > aH))
331+ let ad = Address(fromBase58String(aq))
332+ let bn = fraction(h, bi, ak)
333+ let bo = fraction(h, bk, al)
334+ let bp = if ((bo > bn))
249335 then {
250- let aK = fraction(ai, aH, g, CEILING)
251- $Tuple4(aC, aK, (aE - aK), aF)
336+ let bq = fraction(al, bn, h, CEILING)
337+ $Tuple4(bi, bq, (bk - bq), bl)
252338 }
253339 else {
254- let aK = fraction(ah, aI, g, CEILING)
255- $Tuple4(aK, aE, (aC - aK), aD)
340+ let bq = fraction(ak, bo, h, CEILING)
341+ $Tuple4(bq, bk, (bi - bq), bj)
256342 }
257- let aL = aJ._1
258- let aM = aJ._2
259- let aN = aJ._3
260- let aO = aJ._4
261- let aP = if (if ((aL > 0))
262- then (aM > 0)
343+ let br = bp._1
344+ let bs = bp._2
345+ let bt = bp._3
346+ let bu = bp._4
347+ let bv = if (if ((br > 0))
348+ then (bs > 0)
263349 else false)
264350 then {
265- let aQ = [AttachedPayment(ay(aD), aL), AttachedPayment(ay(aF), aM)]
266- invoke(aa, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], aQ)
351+ let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)]
352+ invoke(ad, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], bw)
267353 }
268354 else 0
269- if ((aP == aP))
355+ if ((bv == bv))
270356 then {
271- let aR = if ((aN > 0))
357+ let bx = if ((bt > 0))
272358 then {
273- let aQ = [AttachedPayment(ay(aO), aN)]
274- let aS = ["0", "false", "0"]
275- invoke(aa, "callFunction", ["replenishWithOneToken", aS], aQ)
359+ let bw = [AttachedPayment(aC(bu), bt)]
360+ let by = ["0", "false", "0"]
361+ invoke(ad, "callFunction", ["replenishWithOneToken", by], bw)
276362 }
277363 else 0
278- if ((aR == aR))
364+ if ((bx == bx))
279365 then {
280- let aT = U(fromBase58String(ag))
281- let aU = (aT - aG)
282- let aV = fraction(aU, aq(am, ar), i)
283- let aW = (aU - aV)
284- if ((0 >= aW))
366+ let bz = X(fromBase58String(aj))
367+ let bA = (bz - bm)
368+ let bB = if ((av == e))
369+ then fraction(bA, au(aq, av), j)
370+ else fraction(bA, au(aq, av), j)
371+ let bC = (bA - bB)
372+ if ((0 >= bC))
285373 then throw("amount of staked sharetokens must be > 0")
286374 else {
287- let aX = invoke(as(), "lockShareTokens", [am, 0], [AttachedPayment(fromBase58String(ag), aW)])
288- if ((aX == aX))
289- then $Tuple2(aW, aV)
375+ let bD = invoke(aw(), "lockShareTokens", [aq, 0], [AttachedPayment(fromBase58String(aj), bC)])
376+ if ((bD == bD))
377+ then $Tuple2(bC, bB)
290378 else throw("Strict value is not equal to itself.")
291379 }
292380 }
293381 else throw("Strict value is not equal to itself.")
294382 }
295383 else throw("Strict value is not equal to itself.")
296384 }
297385 else throw("Strict value is not equal to itself.")
298386 }
299387
300388
301-func aY (am,ar,aC,aD,aE,aF,ag) = {
302- let aa = Address(fromBase58String(am))
303- let aZ = if (if ((aC > 0))
304- then (aE > 0)
389+func bE (aq,av,bi,bj,bk,bl,aj) = {
390+ let ad = Address(fromBase58String(aq))
391+ let bF = if (if ((bi > 0))
392+ then (bk > 0)
305393 else false)
306394 then {
307- let ba = split({
308- let ad = invoke(aa, "evaluatePutByAmountAssetREADONLY", [aC], nil)
309- if ($isInstanceOf(ad, "String"))
310- then ad
311- else throw(($getType(ad) + " couldn't be cast to String"))
395+ let bG = split({
396+ let ag = invoke(ad, "evaluatePutByAmountAssetREADONLY", [bi], nil)
397+ if ($isInstanceOf(ag, "String"))
398+ then ag
399+ else throw(($getType(ag) + " couldn't be cast to String"))
312400 }, "__")
313- if ((ba == ba))
401+ if ((bG == bG))
314402 then {
315- let bb = split({
316- let ad = invoke(aa, "evaluatePutByPriceAssetREADONLY", [aE], nil)
317- if ($isInstanceOf(ad, "String"))
318- then ad
319- else throw(($getType(ad) + " couldn't be cast to String"))
403+ let bH = split({
404+ let ag = invoke(ad, "evaluatePutByPriceAssetREADONLY", [bk], nil)
405+ if ($isInstanceOf(ag, "String"))
406+ then ag
407+ else throw(($getType(ag) + " couldn't be cast to String"))
320408 }, "__")
321- if ((bb == bb))
409+ if ((bH == bH))
322410 then {
323- let bc = parseIntValue(ba[1])
324- let bd = parseIntValue(bb[1])
325- if ((bd > bc))
411+ let bI = parseIntValue(bG[1])
412+ let bJ = parseIntValue(bH[1])
413+ if ((bJ > bI))
326414 then {
327- let be = parseIntValue(ba[8])
328- $Tuple4(aC, be, (aE - be), aF)
415+ let bK = parseIntValue(bG[8])
416+ $Tuple4(bi, bK, (bk - bK), bl)
329417 }
330418 else {
331- let bf = parseIntValue(bb[7])
332- $Tuple4(bf, aE, (aC - bf), aD)
419+ let bL = parseIntValue(bH[7])
420+ $Tuple4(bL, bk, (bi - bL), bj)
333421 }
334422 }
335423 else throw("Strict value is not equal to itself.")
336424 }
337425 else throw("Strict value is not equal to itself.")
338426 }
339- else if ((aC > 0))
340- then $Tuple4(aC, aE, aC, aD)
341- else if ((aE > 0))
342- then $Tuple4(aC, aE, aE, aF)
427+ else if ((bi > 0))
428+ then $Tuple4(bi, bk, bi, bj)
429+ else if ((bk > 0))
430+ then $Tuple4(bi, bk, bk, bl)
343431 else throw("pmts must be > 0")
344- let aL = aZ._1
345- let aM = aZ._2
346- let aN = aZ._3
347- let aO = aZ._4
348- let aG = U(fromBase58String(ag))
349- if ((aG == aG))
432+ let br = bF._1
433+ let bs = bF._2
434+ let bt = bF._3
435+ let bu = bF._4
436+ let bm = X(fromBase58String(aj))
437+ if ((bm == bm))
350438 then {
351- let aP = if (if ((aL > 0))
352- then (aM > 0)
439+ let bv = if (if ((br > 0))
440+ then (bs > 0)
353441 else false)
354442 then {
355- let aQ = [AttachedPayment(ay(aD), aL), AttachedPayment(ay(aF), aM)]
356- invoke(aa, "put", [1000000, false], aQ)
443+ let bw = [AttachedPayment(aC(bj), br), AttachedPayment(aC(bl), bs)]
444+ invoke(ad, "put", [1000000, false], bw)
357445 }
358446 else 0
359- if ((aP == aP))
447+ if ((bv == bv))
360448 then {
361- let aR = if ((aN > 0))
449+ let bx = if ((bt > 0))
362450 then {
363- let aQ = [AttachedPayment(ay(aO), aN)]
364- invoke(aa, "putOneTkn", [0, false], aQ)
451+ let bw = [AttachedPayment(aC(bu), bt)]
452+ invoke(ad, "putOneTkn", [0, false], bw)
365453 }
366454 else 0
367- if ((aR == aR))
455+ if ((bx == bx))
368456 then {
369- let aT = U(fromBase58String(ag))
370- let aU = (aT - aG)
371- let aV = fraction(aU, aq(am, ar), i)
372- let aW = (aU - aV)
373- if ((0 >= aW))
457+ let bz = X(fromBase58String(aj))
458+ let bA = (bz - bm)
459+ let bB = fraction(bA, au(aq, av), j)
460+ let bC = (bA - bB)
461+ if ((0 >= bC))
374462 then throw("amount of staked sharetokens must be > 0")
375463 else {
376- let aX = invoke(at(aa), "stake", nil, [AttachedPayment(fromBase58String(ag), aW)])
377- if ((aX == aX))
378- then $Tuple2(aW, aV)
464+ let bD = invoke(ax(ad), "stake", nil, [AttachedPayment(fromBase58String(aj), bC)])
465+ if ((bD == bD))
466+ then $Tuple2(bC, bB)
379467 else throw("Strict value is not equal to itself.")
380468 }
381469 }
382470 else throw("Strict value is not equal to itself.")
383471 }
384472 else throw("Strict value is not equal to itself.")
385473 }
386474 else throw("Strict value is not equal to itself.")
387475 }
388476
389477
390-func bg (ak,am,ar,aC,bh,aE,bi,ah,ai,ag) = if ((ak == a))
391- then aB(am, e, aC, bh, aE, bi, ah, ai, ag)
392- else if ((ak == b))
393- then aY(am, e, aC, bh, aE, bi, ag)
478+func bM (an,aq,av,bi,bN,bk,bO,ak,al,aj) = if ((an == a))
479+ then bh(aq, av, bi, bN, bk, bO, ak, al, aj)
480+ else if ((an == b))
481+ then bE(aq, av, bi, bN, bk, bO, aj)
394482 else throw("Wrong pool type")
395483
396484
397-func bj (am,ap,bk,aV,bl,ag,ak) = {
398- let bm = al(am)
399- let bn = an(am)
400- let bo = getIntegerValue(this, (am + w))
401-[IntegerEntry((am + u), (bm + bk)), IntegerEntry((am + v), (bn + bk)), IntegerEntry((((((am + "_") + ap) + "_") + toString(bl)) + p), bk), IntegerEntry((((((am + "_") + ap) + "_") + toString(bl)) + t), bo), IntegerEntry((((am + "_") + ap) + s), bl), ScriptTransfer(M, aV, fromBase58String(ag))]
485+func bP (aq,at,bQ,bB,bR,aj,an) = {
486+ let bS = ap(aq)
487+ let bT = ar(aq)
488+ let bU = getIntegerValue(this, (aq + y))
489+[IntegerEntry((aq + w), (bS + bQ)), IntegerEntry((aq + x), (bT + bQ)), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + r), bQ), IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + v), bU), IntegerEntry((((aq + "_") + at) + u), bR), ScriptTransfer(P, bB, fromBase58String(aj))]
402490 }
403491
404492
405-func bp (ak,am) = if ((ak == a))
493+func bV (an,aq) = if ((an == a))
406494 then {
407- let bq = U(Q)
408- if ((bq == bq))
495+ let bW = X(T)
496+ if ((bW == bW))
409497 then {
410- let br = invoke(as(), "claim", [am], nil)
411- if ((br == br))
498+ let bX = invoke(aw(), "claim", [aq], nil)
499+ if ((bX == bX))
412500 then {
413- let bs = U(Q)
414- $Tuple2((bs - bq), Q)
501+ let bY = X(T)
502+ $Tuple2((bY - bW), T)
415503 }
416504 else throw("Strict value is not equal to itself.")
417505 }
418506 else throw("Strict value is not equal to itself.")
419507 }
420- else if ((ak == b))
508+ else if ((an == b))
421509 then {
422- let bq = U(R)
423- if ((bq == bq))
510+ let bW = X(U)
511+ if ((bW == bW))
424512 then {
425- let br = invoke(at(Address(fromBase58String(am))), "claimWX", [am], nil)
426- if ((br == br))
513+ let bX = invoke(ax(Address(fromBase58String(aq))), "claimWX", [aq], nil)
514+ if ((bX == bX))
427515 then {
428- let bs = U(R)
429- $Tuple2((bs - bq), R)
516+ let bY = X(U)
517+ $Tuple2((bY - bW), U)
430518 }
431519 else throw("Strict value is not equal to itself.")
432520 }
433521 else throw("Strict value is not equal to itself.")
434522 }
435523 else throw("Wrong pool type")
436524
437525
438-func bt (bu,bv,bw,bx,by,bz,bA,bB,bC,bD) = {
439- let bE = U(ay(bu))
440- if ((bE == bE))
526+func bZ (ca,cb,cc,cd,ce,cf,cg,ch,ci,cj) = {
527+ let ck = X(aC(ca))
528+ if ((ck == ck))
441529 then {
442- let br = invoke(N, "swap", [bx, by, bz, bA, bB, bC, bD], [AttachedPayment(bw, bv)])
443- if ((br == br))
444- then (U(ay(bu)) - bE)
530+ let bX = invoke(Q, "swap", [cd, ce, cf, cg, ch, ci, cj], [AttachedPayment(cc, cb)])
531+ if ((bX == bX))
532+ then (X(aC(ca)) - ck)
445533 else throw("Strict value is not equal to itself.")
446534 }
447535 else throw("Strict value is not equal to itself.")
448536 }
449537
450538
451-func bF (bu,bv,bw,bG,bH,bD) = {
452- let bE = U(ay(bu))
453- if ((bE == bE))
539+func cl (ca,cb,cc,cm,cn,cj) = {
540+ let ck = X(aC(ca))
541+ if ((ck == ck))
454542 then {
455- let br = invoke(N, "puzzleSwap", [bG, bH, bD], [AttachedPayment(bw, bv)])
456- if ((br == br))
457- then (U(ay(bu)) - bE)
543+ let bX = invoke(Q, "puzzleSwap", [cm, cn, cj], [AttachedPayment(cc, cb)])
544+ if ((bX == bX))
545+ then (X(aC(ca)) - ck)
458546 else throw("Strict value is not equal to itself.")
459547 }
460548 else throw("Strict value is not equal to itself.")
461549 }
462550
463551
464-func bI (bu,bv,bw,bJ,bK,bL,bM,bN,bO,bD) = {
465- let bE = U(ay(bu))
466- if ((bE == bE))
552+func co (ca,cb,cc,cp,cq,cr,cs,ct,cu,cj) = {
553+ let ck = X(aC(ca))
554+ if ((ck == ck))
467555 then {
468- let br = invoke(N, "swopfiSwap", [bJ, bK, bL, bM, bN, bO, bD], [AttachedPayment(bw, bv)])
469- if ((br == br))
470- then (U(ay(bu)) - bE)
556+ let bX = invoke(Q, "swopfiSwap", [cp, cq, cr, cs, ct, cu, cj], [AttachedPayment(cc, cb)])
557+ if ((bX == bX))
558+ then (X(aC(ca)) - ck)
471559 else throw("Strict value is not equal to itself.")
472560 }
473561 else throw("Strict value is not equal to itself.")
474562 }
475563
476564
477-func bP (am,bQ,bR,bS) = {
478- let aa = Address(fromBase58String(am))
479- let bT = aj(aa, bQ)
480- let bh = bT._1
481- let bi = bT._2
482- let ah = bT._3
483- let ai = bT._4
484- let ag = bT._5
485- let bU = if ((bR == bh))
486- then $Tuple2(bS, 0)
487- else $Tuple2(0, bS)
488- let aC = bU._1
489- let aE = bU._2
490- let bV = bg(bQ, am, d, aC, bh, aE, bi, ah, ai, ag)
491- let bk = bV._1
492- let bW = bV._2
493- let bo = valueOrElse(getInteger(this, (am + w)), 0)
494- let bX = al(am)
495- let bY = (bo + fraction(bk, h, bX))
496-[IntegerEntry((am + w), bY), ScriptTransfer(M, bW, fromBase58String(ag))]
565+func cv (aq,aT,cw,cx) = {
566+ let ad = Address(fromBase58String(aq))
567+ let cy = am(ad, aT)
568+ let bN = cy._1
569+ let bO = cy._2
570+ let ak = cy._3
571+ let al = cy._4
572+ let aj = cy._5
573+ let cz = if ((cw == bN))
574+ then $Tuple2(cx, 0)
575+ else $Tuple2(0, cx)
576+ let bi = cz._1
577+ let bk = cz._2
578+ let cA = bM(aT, aq, e, bi, bN, bk, bO, ak, al, aj)
579+ let bQ = cA._1
580+ let cB = cA._2
581+ let bU = valueOrElse(getInteger(this, (aq + y)), 0)
582+ let cC = ap(aq)
583+ let cD = (bU + fraction(bQ, i, cC))
584+ ([IntegerEntry((aq + y), cD), ScriptTransfer(P, cB, fromBase58String(aj))] ++ bf(bN, bO, aj))
497585 }
498586
499587
500-func bZ (am,ca,cb,ah,ai,cc,cd) = {
501- let aa = Address(fromBase58String(am))
502- let ce = 1000000
503- let cf = getIntegerValue(aa, o)
504- let cg = fraction(cc, ce, (ce - cf))
505- let ch = if ((cd == ca))
588+func cE (aq,cF,cG,ak,al,cH,cI) = {
589+ let ad = Address(fromBase58String(aq))
590+ let cJ = 1000000
591+ let cK = getIntegerValue(ad, q)
592+ let cL = fraction(cH, cJ, (cJ - cK))
593+ let cM = if ((cI == cF))
506594 then {
507- let ci = fraction(ah, cg, (ai - cg))
508- $Tuple2(ci, cb)
595+ let cN = fraction(ak, cL, (al - cL))
596+ $Tuple2(cN, cG)
509597 }
510598 else {
511- let ci = fraction(ai, cg, (ah - cg))
512- $Tuple2(ci, ca)
599+ let cN = fraction(al, cL, (ak - cL))
600+ $Tuple2(cN, cF)
513601 }
514- let ci = ch._1
515- let cj = ch._2
516- invoke(aa, "callFunction", ["exchange", ["1"]], [AttachedPayment(ay(cj), ci)])
602+ let cN = cM._1
603+ let cO = cM._2
604+ invoke(ad, "callFunction", ["exchange", ["1"]], [AttachedPayment(aC(cO), cN)])
517605 }
518606
519607
520-func ck (am,ca,cb,ah,ai,cc,cd) = {
521- let aa = Address(fromBase58String(am))
522- let cl = getIntegerValue(P, "%s__protocolFee")
523- let cm = getIntegerValue(P, "%s__poolFee")
524- let cn = toBigInt(100000000)
525- let co = if ((cd == ca))
608+func cP (aq,cF,cG,ak,al,cH,cI) = {
609+ let ad = Address(fromBase58String(aq))
610+ let cQ = getIntegerValue(S, "%s__protocolFee")
611+ let cR = getIntegerValue(S, "%s__poolFee")
612+ let cS = toBigInt(100000000)
613+ let cT = if ((cI == cF))
526614 then {
527- let ci = fraction(ah, cc, (ai - cc))
528- $Tuple2(ci, cb)
615+ let cN = fraction(ak, cH, (al - cH))
616+ $Tuple2(cN, cG)
529617 }
530618 else {
531- let ci = fraction(ai, cc, (ah - cc))
532- $Tuple2(ci, ca)
619+ let cN = fraction(al, cH, (ak - cH))
620+ $Tuple2(cN, cF)
533621 }
534- let ci = co._1
535- let cj = co._2
536- let cp = toInt(fraction(toBigInt(ci), cn, (cn - toBigInt((cl + cm)))))
537- invoke(P, "swap", [1, cd, toString(this)], [AttachedPayment(ay(cj), cp)])
622+ let cN = cT._1
623+ let cO = cT._2
624+ let cU = toInt(fraction(toBigInt(cN), cS, (cS - toBigInt((cQ + cR)))))
625+ invoke(S, "swap", [1, cI, toString(this)], [AttachedPayment(aC(cO), cU)])
538626 }
539627
540628
541-func cq (ak,am,ca,cb,ah,ai,cc,cd) = if ((ak == a))
542- then bZ(am, ca, cb, ah, ai, cc, cd)
543- else ck(am, ca, cb, ah, ai, cc, cd)
629+func cV (an,aq,cF,cG,ak,al,cH,cI) = if ((an == a))
630+ then cE(aq, cF, cG, ak, al, cH, cI)
631+ else cP(aq, cF, cG, ak, al, cH, cI)
544632
545633
546-func cr (am,cs,ct,cu) = {
547- let aa = Address(fromBase58String(am))
548- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool")
549- let cv = aj(aa, bQ)
550- let ca = cv._1
551- let cb = cv._2
552- let ah = cv._3
553- let ai = cv._4
554- let cw = U(ay(ca))
555- if ((cw == cw))
634+func cW (aq,cX,cY,cZ) = {
635+ let ad = Address(fromBase58String(aq))
636+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool")
637+ let da = am(ad, aT)
638+ let cF = da._1
639+ let cG = da._2
640+ let ak = da._3
641+ let al = da._4
642+ let aj = da._5
643+ let db = X(aC(cF))
644+ if ((db == db))
556645 then {
557- let cx = U(ay(cb))
558- if ((cx == cx))
646+ let dc = X(aC(cG))
647+ if ((dc == dc))
559648 then {
560- let br = if ((bQ == a))
561- then invoke(aa, "callFunction", ["withdraw", [toString(cs)]], nil)
562- else if ((bQ == b))
563- then invoke(aa, "unstakeAndGet", [cs], nil)
649+ let bX = if ((aT == a))
650+ then invoke(ad, "callFunction", ["withdraw", [toString(cX)]], nil)
651+ else if ((aT == b))
652+ then invoke(ad, "unstakeAndGet", [cX], nil)
564653 else throw("Wrong position type")
565- if ((br == br))
654+ if ((bX == bX))
566655 then {
567- let cy = U(ay(ca))
568- let cz = U(ay(cb))
569- let cA = $Tuple2((cy - cw), (cz - cx))
570- let cB = cA._1
571- let cC = cA._2
572- let cD = if ((ct > 0))
656+ let dd = X(aC(cF))
657+ let de = X(aC(cG))
658+ let df = $Tuple2((dd - db), (de - dc))
659+ let dg = df._1
660+ let dh = df._2
661+ let di = if ((cY > 0))
573662 then {
574- let cE = if (if ((cu == ca))
575- then (ct > cB)
663+ let dj = if (if ((cZ == cF))
664+ then (cY > dg)
576665 else false)
577- then (ct - cB)
578- else if (if ((cu == cb))
579- then (ct > cC)
666+ then (cY - dg)
667+ else if (if ((cZ == cG))
668+ then (cY > dh)
580669 else false)
581- then (ct - cC)
670+ then (cY - dh)
582671 else 0
583- let cF = if ((cE > 0))
584- then cq(bQ, am, ca, cb, ah, ai, cE, cu)
672+ let dk = if ((dj > 0))
673+ then cV(aT, aq, cF, cG, ak, al, dj, cZ)
585674 else 0
586- if ((cF == cF))
675+ if ((dk == dk))
587676 then {
588- let cG = U(ay(ca))
589- let cH = U(ay(cb))
590- $Tuple2((cG - cw), (cH - cx))
677+ let dl = X(aC(cF))
678+ let dm = X(aC(cG))
679+ $Tuple2((dl - db), (dm - dc))
591680 }
592681 else throw("Strict value is not equal to itself.")
593682 }
594- else $Tuple2(cB, cC)
595- let cI = cD._1
596- let cJ = cD._2
597- $Tuple6(cI, ca, cJ, cb, cy, cz)
683+ else $Tuple2(dg, dh)
684+ let dn = di._1
685+ let do = di._2
686+ $Tuple7(dn, cF, do, cG, dd, de, aj)
598687 }
599688 else throw("Strict value is not equal to itself.")
600689 }
601690 else throw("Strict value is not equal to itself.")
602691 }
603692 else throw("Strict value is not equal to itself.")
604693 }
605694
606695
607-func cK (cL) = {
608- let cM = split(valueOrErrorMessage(getString(this, (cL + B)), ("No request with id " + cL)), ",")
609- let ap = cM[0]
610- let am = cM[1]
611- let aC = parseIntValue(cM[2])
612- let bh = cM[3]
613- let aE = parseIntValue(cM[4])
614- let bi = cM[5]
615- let ah = parseIntValue(cM[6])
616- let ai = parseIntValue(cM[7])
617- let ag = cM[8]
618- let cN = cM[9]
619- let cO = parseIntValue(cM[10])
620- $Tuple11(ap, am, aC, bh, aE, bi, ah, ai, ag, cN, cO)
696+func dp (dq) = {
697+ let dr = split(valueOrErrorMessage(getString(this, (dq + D)), ("No request with id " + dq)), ",")
698+ let at = dr[0]
699+ let aq = dr[1]
700+ let bi = parseIntValue(dr[2])
701+ let bN = dr[3]
702+ let bk = parseIntValue(dr[4])
703+ let bO = dr[5]
704+ let ak = parseIntValue(dr[6])
705+ let al = parseIntValue(dr[7])
706+ let aj = dr[8]
707+ let ds = dr[9]
708+ let dt = parseIntValue(dr[10])
709+ $Tuple11(at, aq, bi, bN, bk, bO, ak, al, aj, ds, dt)
621710 }
622711
623712
624-@Callable(T)
625-func getAssetPrice (V) = $Tuple2(nil, (let ad = invoke(O, "getTWAP60", [V, false], nil)
626-if ($isInstanceOf(ad, "(Int, Int)"))
627- then ad
628- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2)
629-
630-
631-
632-@Callable(T)
633-func getSharePrice (ag) = {
634- let am = valueOrErrorMessage(getString(this, (ag + E)), "Can't find pool addr by share id")
635- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited")
636- let cP = aj(Address(fromBase58String(am)), bQ)
637- let ae = cP._1
638- let af = cP._2
639- let cQ = ( let ad = invoke(O, "getTWAP60", [ae, false], nil)
640- if ($isInstanceOf(ad, "(Int, Int)"))
641- then ad
642- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
643- let cR = ( let ad = invoke(O, "getTWAP60", [af, false], nil)
644- if ($isInstanceOf(ad, "(Int, Int)"))
645- then ad
646- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
647- $Tuple2(nil, (cQ + cR))
648- }
649-
650-
651-
652-@Callable(T)
653-func replenishEVALONLY (am,cS,cT) = if (if ((100 > cS))
713+@Callable(W)
714+func replenishEVALONLY (aq,du,dv) = if (if ((100 > du))
654715 then true
655- else (cS > 300))
716+ else (du > 300))
656717 then throw("Leverage can't be <100 and >300")
657718 else {
658- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited")
659- let cU = aj(Address(fromBase58String(am)), bQ)
660- let bh = cU._1
661- let bi = cU._2
662- let ah = cU._3
663- let ai = cU._4
664- let ag = cU._5
665- let cV = if ((size(T.payments) == 2))
666- then if ((ax(T.payments[0].assetId) != bh))
719+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited")
720+ let dw = am(Address(fromBase58String(aq)), aT)
721+ let bN = dw._1
722+ let bO = dw._2
723+ let ak = dw._3
724+ let al = dw._4
725+ let aj = dw._5
726+ let dx = if ((size(W.payments) == 2))
727+ then if ((aB(W.payments[0].assetId) != bN))
667728 then throw("Wrong payment asset A")
668- else if ((ax(T.payments[1].assetId) != bi))
729+ else if ((aB(W.payments[1].assetId) != bO))
669730 then throw("Wrong payment asset B")
670- else $Tuple4(T.payments[0].amount, bh, T.payments[1].amount, bi)
671- else if ((size(T.payments) == 1))
672- then if ((ax(T.payments[0].assetId) == bh))
673- then $Tuple4(T.payments[0].amount, bh, 0, bi)
674- else if ((ax(T.payments[0].assetId) == bi))
675- then $Tuple4(0, bh, T.payments[0].amount, bi)
731+ else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO)
732+ else if ((size(W.payments) == 1))
733+ then if ((aB(W.payments[0].assetId) == bN))
734+ then $Tuple4(W.payments[0].amount, bN, 0, bO)
735+ else if ((aB(W.payments[0].assetId) == bO))
736+ then $Tuple4(0, bN, W.payments[0].amount, bO)
676737 else throw("Wrong payment")
677738 else throw("One or two payments expected")
678- let aC = cV._1
679- let aD = cV._2
680- let aE = cV._3
681- let aF = cV._4
682- let cW = if ((cS > 100))
739+ let bi = dx._1
740+ let bj = dx._2
741+ let bk = dx._3
742+ let bl = dx._4
743+ let dy = if ((du > 100))
683744 then {
684- let cQ = ( let ad = invoke(O, "getTWAP60", [aD, false], nil)
685- if ($isInstanceOf(ad, "(Int, Int)"))
686- then ad
687- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
688- let cR = ( let ad = invoke(O, "getTWAP60", [aF, false], nil)
689- if ($isInstanceOf(ad, "(Int, Int)"))
690- then ad
691- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
692- let cX = (fraction(cQ, aC, pow(10, 0, az(aD), 0, 0, DOWN)) + fraction(cR, aE, pow(10, 0, az(aF), 0, 0, DOWN)))
693- let cY = fraction(cX, (cS - 100), 100)
694- let cM = makeString([toString(T.caller), am, toString(aC), aD, toString(aE), aF, toString(ah), toString(ai), ag, cT, toString(cY), toString(1)], ",")
695- let cZ = {
696- let ad = invoke(this, "createNewRequest", [cM], nil)
697- if ($isInstanceOf(ad, "Int"))
698- then ad
699- else throw(($getType(ad) + " couldn't be cast to Int"))
745+ let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil)
746+ if ($isInstanceOf(ag, "(Int, Int)"))
747+ then ag
748+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
749+ let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil)
750+ if ($isInstanceOf(ag, "(Int, Int)"))
751+ then ag
752+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
753+ let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN)))
754+ let dA = fraction(dz, (du - 100), 100)
755+ let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA), toString(1)], ",")
756+ let dB = {
757+ let ag = invoke(this, "createNewRequest", [dr], nil)
758+ if ($isInstanceOf(ag, "Int"))
759+ then ag
760+ else throw(($getType(ag) + " couldn't be cast to Int"))
700761 }
701- if ((cZ == cZ))
762+ if ((dB == dB))
702763 then {
703- let da = [((toString(T.caller) + "_") + toString(1)), ag, cT, cY, toString(this), "replenishFromLandEVALONLY", toString(valueOrErrorMessage(cZ, "Can't create new request"))]
704- let br = reentrantInvoke(aw(), "flashPosition", da, nil)
705- if ((br == br))
706- then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), cY)
764+ let dC = [((toString(W.caller) + "_") + toString(1)), aj, dv, dA, toString(this), "replenishFromLandEVALONLY", toString(valueOrErrorMessage(dB, "Can't create new request"))]
765+ let bX = reentrantInvoke(aA(), "flashPosition", dC, nil)
766+ if ((bX == bX))
767+ then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), dA)
707768 else throw("Strict value is not equal to itself.")
708769 }
709770 else throw("Strict value is not equal to itself.")
710771 }
711- else $Tuple2(bg(bQ, am, f, aC, bh, aE, bi, ah, ai, ag)._1, 0)
712- let db = cW._1
713- let cY = cW._2
714- let dc = cr(am, db, cY, cT)
715- if ((dc == dc))
772+ else $Tuple2(bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj)._1, 0)
773+ let dD = dy._1
774+ let dA = dy._2
775+ let dE = cW(aq, dD, dA, dv)
776+ if ((dE == dE))
716777 then {
717- let dd = dc._6
718- let de = dc._5
719- let cb = dc._4
720- let cJ = dc._3
721- let ca = dc._2
722- let cI = dc._1
723- let df = aj(Address(fromBase58String(am)), bQ)
724- let dg = df._1
725- let dh = df._2
726- let di = df._3
727- let dj = df._4
728- let dk = df._5
729- let dl = fraction(ai, g, ah)
730- let dm = fraction(dj, g, di)
731- let dn = (g - fraction(dl, g, dm))
732- let do = if ((0 > dn))
733- then (dn * -1)
734- else dn
735- $Tuple2(nil, [de, dd, do])
778+ let dF = dE._6
779+ let dG = dE._5
780+ let cG = dE._4
781+ let do = dE._3
782+ let cF = dE._2
783+ let dn = dE._1
784+ let dH = am(Address(fromBase58String(aq)), aT)
785+ let dI = dH._1
786+ let dJ = dH._2
787+ let dK = dH._3
788+ let dL = dH._4
789+ let dM = dH._5
790+ let dN = fraction(al, h, ak)
791+ let dO = fraction(dL, h, dK)
792+ let dP = (h - fraction(dN, h, dO))
793+ let dQ = if ((0 > dP))
794+ then (dP * -1)
795+ else dP
796+ $Tuple2(nil, [dG, dF, dQ])
736797 }
737798 else throw("Strict value is not equal to itself.")
738799 }
739800
740801
741802
742-@Callable(T)
743-func replenishFromLandEVALONLY (cL) = {
744- let dp = cK(cL)
745- let ap = dp._1
746- let am = dp._2
747- let aC = dp._3
748- let bh = dp._4
749- let aE = dp._5
750- let bi = dp._6
751- let ah = dp._7
752- let ai = dp._8
753- let ag = dp._9
754- let cN = dp._10
755- let cO = dp._11
756- if ((size(T.payments) != 1))
803+@Callable(W)
804+func replenishFromLandEVALONLY (dq) = {
805+ let dR = dp(dq)
806+ let at = dR._1
807+ let aq = dR._2
808+ let bi = dR._3
809+ let bN = dR._4
810+ let bk = dR._5
811+ let bO = dR._6
812+ let ak = dR._7
813+ let al = dR._8
814+ let aj = dR._9
815+ let ds = dR._10
816+ let dt = dR._11
817+ if ((size(W.payments) != 1))
757818 then throw("Wrong payment size")
758- else if (if ((ax(T.payments[0].assetId) != cN))
819+ else if (if ((aB(W.payments[0].assetId) != ds))
759820 then true
760- else (T.payments[0].amount != cO))
821+ else (W.payments[0].amount != dt))
761822 then throw("Wrong payment")
762823 else {
763- let dq = if ((bh == cN))
764- then $Tuple2((aC + T.payments[0].amount), aE)
765- else $Tuple2(aC, (aE + T.payments[0].amount))
766- let dr = dq._1
767- let ds = dq._2
768- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool")
769- let dt = bg(bQ, am, e, aC, bh, aE, bi, ah, ai, ag)
770- let db = dt._1
771- let bW = dt._2
772- $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", db)], db)
824+ let dS = if ((bN == ds))
825+ then $Tuple2((bi + W.payments[0].amount), bk)
826+ else $Tuple2(bi, (bk + W.payments[0].amount))
827+ let dT = dS._1
828+ let dU = dS._2
829+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool")
830+ let dV = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj)
831+ let dD = dV._1
832+ let cB = dV._2
833+ $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", dD)], dD)
773834 }
774835 }
775836
776837
777838
778-@Callable(T)
779-func replenish (am,cS,cT) = if (if ((100 > cS))
839+@Callable(W)
840+func replenish (aq,du,dv) = if (if ((100 > du))
780841 then true
781- else (cS > 300))
842+ else (du > 300))
782843 then throw("Leverage can't be <100 and >300")
783844 else {
784- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Pool is not inited")
785- let du = aj(Address(fromBase58String(am)), bQ)
786- let bh = du._1
787- let bi = du._2
788- let ah = du._3
789- let ai = du._4
790- let ag = du._5
791- let dv = if ((size(T.payments) == 2))
792- then if ((ax(T.payments[0].assetId) != bh))
845+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Pool is not inited")
846+ let dW = am(Address(fromBase58String(aq)), aT)
847+ let bN = dW._1
848+ let bO = dW._2
849+ let ak = dW._3
850+ let al = dW._4
851+ let aj = dW._5
852+ let dX = if ((size(W.payments) == 2))
853+ then if ((aB(W.payments[0].assetId) != bN))
793854 then throw("Wrong payment asset A")
794- else if ((ax(T.payments[1].assetId) != bi))
855+ else if ((aB(W.payments[1].assetId) != bO))
795856 then throw("Wrong payment asset B")
796- else $Tuple4(T.payments[0].amount, bh, T.payments[1].amount, bi)
797- else if ((size(T.payments) == 1))
798- then if ((ax(T.payments[0].assetId) == bh))
799- then $Tuple4(T.payments[0].amount, bh, 0, bi)
800- else if ((ax(T.payments[0].assetId) == bi))
801- then $Tuple4(0, bh, T.payments[0].amount, bi)
857+ else $Tuple4(W.payments[0].amount, bN, W.payments[1].amount, bO)
858+ else if ((size(W.payments) == 1))
859+ then if ((aB(W.payments[0].assetId) == bN))
860+ then $Tuple4(W.payments[0].amount, bN, 0, bO)
861+ else if ((aB(W.payments[0].assetId) == bO))
862+ then $Tuple4(0, bN, W.payments[0].amount, bO)
802863 else throw("Wrong payment")
803864 else throw("One or two payments expected")
804- let aC = dv._1
805- let aD = dv._2
806- let aE = dv._3
807- let aF = dv._4
808- let dw = ao(am, toString(T.caller))
809- if ((cS > 100))
865+ let bi = dX._1
866+ let bj = dX._2
867+ let bk = dX._3
868+ let bl = dX._4
869+ let dY = as(aq, toString(W.caller))
870+ if ((du > 100))
810871 then {
811- let cQ = ( let ad = invoke(O, "getTWAP60", [aD, false], nil)
812- if ($isInstanceOf(ad, "(Int, Int)"))
813- then ad
814- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
815- let cR = ( let ad = invoke(O, "getTWAP60", [aF, false], nil)
816- if ($isInstanceOf(ad, "(Int, Int)"))
817- then ad
818- else throw(($getType(ad) + " couldn't be cast to (Int, Int)")))._2
819- let cX = (fraction(cQ, aC, pow(10, 0, az(aD), 0, 0, DOWN)) + fraction(cR, aE, pow(10, 0, az(aF), 0, 0, DOWN)))
820- let cY = fraction(cX, (cS - 100), 100)
821- let cM = makeString([toString(T.caller), am, toString(aC), aD, toString(aE), aF, toString(ah), toString(ai), ag, cT, toString(cY)], ",")
822- let cZ = {
823- let ad = invoke(this, "createNewRequest", [cM], nil)
824- if ($isInstanceOf(ad, "Int"))
825- then ad
826- else throw(($getType(ad) + " couldn't be cast to Int"))
872+ let aX = ( let ag = invoke(R, "getTWAP60", [bj, false], nil)
873+ if ($isInstanceOf(ag, "(Int, Int)"))
874+ then ag
875+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
876+ let aY = ( let ag = invoke(R, "getTWAP60", [bl, false], nil)
877+ if ($isInstanceOf(ag, "(Int, Int)"))
878+ then ag
879+ else throw(($getType(ag) + " couldn't be cast to (Int, Int)")))._2
880+ let dz = (fraction(aX, bi, pow(10, 0, aD(bj), 0, 0, DOWN)) + fraction(aY, bk, pow(10, 0, aD(bl), 0, 0, DOWN)))
881+ let dA = fraction(dz, (du - 100), 100)
882+ let dr = makeString([toString(W.caller), aq, toString(bi), bj, toString(bk), bl, toString(ak), toString(al), aj, dv, toString(dA)], ",")
883+ let dB = {
884+ let ag = invoke(this, "createNewRequest", [dr], nil)
885+ if ($isInstanceOf(ag, "Int"))
886+ then ag
887+ else throw(($getType(ag) + " couldn't be cast to Int"))
827888 }
828- if ((cZ == cZ))
889+ if ((dB == dB))
829890 then {
830- let da = [((toString(T.caller) + "_") + toString(dw)), ag, cT, cY, toString(this), "replenishFromLand", toString(valueOrErrorMessage(cZ, "Can't create new request"))]
831- let br = reentrantInvoke(aw(), "flashPosition", da, nil)
832- if ((br == br))
891+ let dC = [((toString(W.caller) + "_") + toString(dY)), aj, dv, dA, toString(this), "replenishFromLand", toString(valueOrErrorMessage(dB, "Can't create new request"))]
892+ let bX = reentrantInvoke(aA(), "flashPosition", dC, nil)
893+ if ((bX == bX))
833894 then nil
834895 else throw("Strict value is not equal to itself.")
835896 }
836897 else throw("Strict value is not equal to itself.")
837898 }
838899 else {
839- let dx = bg(bQ, am, f, aC, bh, aE, bi, ah, ai, ag)
840- let db = dx._1
841- let bW = dx._2
842- bj(am, toString(T.caller), db, bW, dw, ag, bQ)
900+ let dZ = bM(aT, aq, g, bi, bN, bk, bO, ak, al, aj)
901+ let dD = dZ._1
902+ let cB = dZ._2
903+ (bP(aq, toString(W.caller), dD, cB, dY, aj, aT) ++ bf(bN, bO, aj))
843904 }
844905 }
845906
846907
847908
848-@Callable(T)
849-func replenishFromLand (cL) = {
850- let dy = cK(cL)
851- let ap = dy._1
852- let am = dy._2
853- let aC = dy._3
854- let bh = dy._4
855- let aE = dy._5
856- let bi = dy._6
857- let ah = dy._7
858- let ai = dy._8
859- let ag = dy._9
860- let cN = dy._10
861- let cO = dy._11
862- if ((size(T.payments) != 1))
909+@Callable(W)
910+func replenishFromLand (dq) = {
911+ let ea = dp(dq)
912+ let at = ea._1
913+ let aq = ea._2
914+ let bi = ea._3
915+ let bN = ea._4
916+ let bk = ea._5
917+ let bO = ea._6
918+ let ak = ea._7
919+ let al = ea._8
920+ let aj = ea._9
921+ let ds = ea._10
922+ let dt = ea._11
923+ if ((size(W.payments) != 1))
863924 then throw("Wrong payment size")
864- else if (if ((ax(T.payments[0].assetId) != cN))
925+ else if (if ((aB(W.payments[0].assetId) != ds))
865926 then true
866- else (T.payments[0].amount != cO))
927+ else (W.payments[0].amount != dt))
867928 then throw("Wrong payment")
868929 else {
869- let dz = if ((bh == cN))
870- then $Tuple2((aC + T.payments[0].amount), aE)
871- else $Tuple2(aC, (aE + T.payments[0].amount))
872- let dr = dz._1
873- let ds = dz._2
874- let bQ = valueOrErrorMessage(getString(this, (D + am)), "Unknown pool")
875- let dA = bg(bQ, am, e, aC, bh, aE, bi, ah, ai, ag)
876- let db = dA._1
877- let bW = dA._2
878- let bl = ao(am, toString(T.caller))
879- let dB = [IntegerEntry((((((am + "_") + ap) + "_") + toString(bl)) + q), cO), StringEntry((((((am + "_") + ap) + "_") + toString(bl)) + r), cN)]
880- let dC = bj(am, ap, db, bW, bl, ag, bQ)
881- $Tuple2(((dC ++ dB) :+ DeleteEntry((cL + B))), db)
930+ let eb = if ((bN == ds))
931+ then $Tuple2((bi + W.payments[0].amount), bk)
932+ else $Tuple2(bi, (bk + W.payments[0].amount))
933+ let dT = eb._1
934+ let dU = eb._2
935+ let aT = valueOrErrorMessage(getString(this, (F + aq)), "Unknown pool")
936+ let ec = bM(aT, aq, f, bi, bN, bk, bO, ak, al, aj)
937+ let dD = ec._1
938+ let cB = ec._2
939+ let bR = as(aq, toString(W.caller))
940+ let ed = [IntegerEntry((((((aq + "_") + at) + "_") + toString(bR)) + s), dt), StringEntry((((((aq + "_") + at) + "_") + toString(bR)) + t), ds)]
941+ let ee = bP(aq, at, dD, cB, bR, aj, aT)
942+ $Tuple2((((ee ++ bf(bN, bO, aj)) ++ ed) :+ DeleteEntry((dq + D))), dD)
882943 }
883944 }
884945
885946
886947
887-@Callable(T)
888-func withdraw (am,dD) = {
889- let ap = toString(T.caller)
890- let dE = valueOrErrorMessage(getInteger(this, (((((am + "_") + ap) + "_") + toString(dD)) + p)), "Unknown position")
891- let dF = getIntegerValue(this, (((((am + "_") + ap) + "_") + toString(dD)) + t))
892- let dG = getIntegerValue(this, (am + w))
893- let dH = al(am)
894- let cs = (dE + fraction(dE, (dG - dF), h))
895- let dI = Address(fromBase58String(ap))
896- let cY = getIntegerValue(this, (((((am + "_") + ap) + "_") + toString(dD)) + q))
897- let cu = getStringValue(this, (((((am + "_") + ap) + "_") + toString(dD)) + r))
898- let ct = if ((cY > 0))
948+@Callable(W)
949+func withdraw (aq,ef) = {
950+ let at = toString(W.caller)
951+ let eg = valueOrErrorMessage(getInteger(this, (((((aq + "_") + at) + "_") + toString(ef)) + r)), "Unknown position")
952+ let eh = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + v))
953+ let ei = getIntegerValue(this, (aq + y))
954+ let ej = ap(aq)
955+ let cX = (eg + fraction(eg, (ei - eh), i))
956+ let ek = Address(fromBase58String(at))
957+ let dA = getIntegerValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + s))
958+ let cZ = getStringValue(this, (((((aq + "_") + at) + "_") + toString(ef)) + t))
959+ let cY = if ((dA > 0))
899960 then {
900- let ad = invoke(aw(), "getAssetDebt", [false, ((((am + "_") + ap) + "_") + toString(dD)), cu], nil)
901- if ($isInstanceOf(ad, "Int"))
902- then ad
903- else throw(($getType(ad) + " couldn't be cast to Int"))
961+ let ag = invoke(aA(), "getAssetDebt", [false, ((((aq + "_") + at) + "_") + toString(ef)), cZ], nil)
962+ if ($isInstanceOf(ag, "Int"))
963+ then ag
964+ else throw(($getType(ag) + " couldn't be cast to Int"))
904965 }
905966 else 0
906- let dJ = cr(am, cs, ct, cu)
907- if ((dJ == dJ))
967+ let el = cW(aq, cX, cY, cZ)
968+ if ((el == el))
908969 then {
909- let cb = dJ._4
910- let cJ = dJ._3
911- let ca = dJ._2
912- let cI = dJ._1
913- let dK = if ((ct > 0))
914- then invoke(aw(), "repayFor", [((ap + "_") + toString(dD))], [AttachedPayment(ay(cu), ct)])
970+ let aj = el._7
971+ let de = el._6
972+ let dd = el._5
973+ let cG = el._4
974+ let do = el._3
975+ let cF = el._2
976+ let dn = el._1
977+ let em = if ((cY > 0))
978+ then invoke(aA(), "repayFor", [((at + "_") + toString(ef))], [AttachedPayment(aC(cZ), cY)])
915979 else 0
916- if ((dK == dK))
917- then [DeleteEntry((((((am + "_") + ap) + "_") + toString(dD)) + p)), DeleteEntry((((((am + "_") + ap) + "_") + toString(dD)) + t)), IntegerEntry((am + u), (dH - cs)), ScriptTransfer(dI, cI, ay(ca)), ScriptTransfer(dI, cJ, ay(cb))]
980+ if ((em == em))
981+ then ([DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + r)), DeleteEntry((((((aq + "_") + at) + "_") + toString(ef)) + v)), IntegerEntry((aq + w), (ej - cX)), ScriptTransfer(ek, dn, aC(cF)), ScriptTransfer(ek, do, aC(cG))] ++ bf(cF, cG, aj))
918982 else throw("Strict value is not equal to itself.")
919983 }
920984 else throw("Strict value is not equal to itself.")
921985 }
922986
923987
924988
925-@Callable(T)
926-func createNewRequest (dL) = valueOrElse(S(T), {
927- let cZ = (valueOrElse(getInteger(this, C), 0) + 1)
928- $Tuple2([StringEntry((toString(cZ) + B), dL), IntegerEntry(C, cZ)], cZ)
989+@Callable(W)
990+func createNewRequest (en) = valueOrElse(V(W), {
991+ let dB = (valueOrElse(getInteger(this, E), 0) + 1)
992+ $Tuple2([StringEntry((toString(dB) + D), en), IntegerEntry(E, dB)], dB)
929993 })
930994
931995
932996
933-@Callable(T)
934-func capitalizeExKeeper (am,ak,dM,dN,dO,bx,by,bz,bA,bB,bC,bD) = {
935- let dP = if (dO)
936- then bp(ak, am)
997+@Callable(W)
998+func capitalizeExKeeper (aq,an,eo,ep,eq,cd,ce,cf,cg,ch,ci,cj) = {
999+ let er = if (eq)
1000+ then bV(an, aq)
9371001 else {
938- let dQ = if ((ak == a))
939- then Q
940- else R
941- $Tuple2(dN, dQ)
1002+ let es = if ((an == a))
1003+ then T
1004+ else U
1005+ $Tuple2(ep, es)
9421006 }
943- let dR = dP._1
944- let dQ = dP._2
945- let dS = bt(dM, dN, dQ, bx, by, bz, bA, bB, bC, bD)
946- let aN = (dR - dN)
947- let dT = if ((aN > 0))
948- then [IntegerEntry((am + F), (aN + valueOrElse(getInteger(this, (am + F)), 0)))]
1007+ let et = er._1
1008+ let es = er._2
1009+ let eu = bZ(eo, ep, es, cd, ce, cf, cg, ch, ci, cj)
1010+ let bt = (et - ep)
1011+ let ev = if ((bt > 0))
1012+ then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))]
9491013 else nil
950- (bP(am, ak, dM, dS) ++ dT)
1014+ (cv(aq, an, eo, eu) ++ ev)
9511015 }
9521016
9531017
9541018
955-@Callable(T)
956-func capitalizeExPazzle (am,ak,dM,dN,dO,bG,bH,bD) = {
957- let dU = if (dO)
958- then bp(ak, am)
1019+@Callable(W)
1020+func capitalizeExPazzle (aq,an,eo,ep,eq,cm,cn,cj) = {
1021+ let ew = if (eq)
1022+ then bV(an, aq)
9591023 else {
960- let dQ = if ((ak == a))
961- then Q
962- else R
963- $Tuple2(dN, dQ)
1024+ let es = if ((an == a))
1025+ then T
1026+ else U
1027+ $Tuple2(ep, es)
9641028 }
965- let dR = dU._1
966- let dQ = dU._2
967- let dS = bF(dM, dN, dQ, bG, bH, bD)
968- let aN = (dR - dN)
969- let dT = if ((aN > 0))
970- then [IntegerEntry((am + F), (aN + valueOrElse(getInteger(this, (am + F)), 0)))]
1029+ let et = ew._1
1030+ let es = ew._2
1031+ let eu = cl(eo, ep, es, cm, cn, cj)
1032+ let bt = (et - ep)
1033+ let ev = if ((bt > 0))
1034+ then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))]
9711035 else nil
972- (bP(am, ak, dM, dS) ++ dT)
1036+ (cv(aq, an, eo, eu) ++ ev)
9731037 }
9741038
9751039
9761040
977-@Callable(T)
978-func capitalizeExSwopFi (am,ak,dM,dN,dO,bJ,bK,bL,bM,bN,bO,bD) = {
979- let dV = if (dO)
980- then bp(ak, am)
1041+@Callable(W)
1042+func capitalizeExSwopFi (aq,an,eo,ep,eq,cp,cq,cr,cs,ct,cu,cj) = {
1043+ let ex = if (eq)
1044+ then bV(an, aq)
9811045 else {
982- let dQ = if ((ak == a))
983- then Q
984- else R
985- $Tuple2(dN, dQ)
1046+ let es = if ((an == a))
1047+ then T
1048+ else U
1049+ $Tuple2(ep, es)
9861050 }
987- let dR = dV._1
988- let dQ = dV._2
989- let dS = bI(dM, dN, dQ, bJ, bK, bL, bM, bN, bO, bD)
990- let aN = (dR - dN)
991- let dT = if ((aN > 0))
992- then [IntegerEntry((am + F), (aN + valueOrElse(getInteger(this, (am + F)), 0)))]
1051+ let et = ex._1
1052+ let es = ex._2
1053+ let eu = co(eo, ep, es, cp, cq, cr, cs, ct, cu, cj)
1054+ let bt = (et - ep)
1055+ let ev = if ((bt > 0))
1056+ then [IntegerEntry((aq + H), (bt + valueOrElse(getInteger(this, (aq + H)), 0)))]
9931057 else nil
994- (bP(am, ak, dM, dS) ++ dT)
1058+ (cv(aq, an, eo, eu) ++ ev)
9951059 }
9961060
9971061
9981062
999-@Callable(T)
1000-func initNewPool (ak,aa,dW,dX,dY,dZ) = if (if ((ak != a))
1001- then (ak != b)
1063+@Callable(W)
1064+func initNewPool (an,ad,ey,ez,eA,eB) = if (if ((an != a))
1065+ then (an != b)
10021066 else false)
10031067 then throw("Wrong type")
10041068 else {
1005- let ea = aj(Address(fromBase58String(aa)), ak)
1006- let ae = ea._1
1007- let af = ea._2
1008- let eb = ea._3
1009- let ec = ea._4
1010- let ag = ea._5
1011-[IntegerEntry((aa + x), dW), IntegerEntry((aa + y), dX), IntegerEntry((aa + z), dY), IntegerEntry((aa + A), dZ), IntegerEntry((aa + w), 0), StringEntry((D + aa), ak), StringEntry((ag + E), aa)]
1069+ let eC = am(Address(fromBase58String(ad)), an)
1070+ let ah = eC._1
1071+ let ai = eC._2
1072+ let eD = eC._3
1073+ let eE = eC._4
1074+ let aj = eC._5
1075+[IntegerEntry((ad + z), ey), IntegerEntry((ad + A), ez), IntegerEntry((ad + B), eA), IntegerEntry((ad + C), eB), IntegerEntry((ad + y), 0), StringEntry((F + ad), an), StringEntry((aj + G), ad)]
10121076 }
10131077
10141078
1015-@Verifier(ed)
1016-func ee () = sigVerify(ed.bodyBytes, ed.proofs[0], ed.senderPublicKey)
1079+@Verifier(eF)
1080+func eG () = sigVerify(eF.bodyBytes, eF.proofs[0], eF.senderPublicKey)
10171081

github/deemru/w8io/026f985 
382.19 ms