tx · 9WJktdE62BH7CJFxNKo9hJjbBoy1gUgnTTy5R5i39caW

3NADcxHXbecCheinqFbvhDjfzZhsMFZJUuH:  -0.03700000 Waves

2023.02.11 09:49 [2444617] smart account 3NADcxHXbecCheinqFbvhDjfzZhsMFZJUuH > SELF 0.00000000 Waves

{ "type": 13, "id": "9WJktdE62BH7CJFxNKo9hJjbBoy1gUgnTTy5R5i39caW", "fee": 3700000, "feeAssetId": null, "timestamp": 1676098206262, "version": 2, "chainId": 84, "sender": "3NADcxHXbecCheinqFbvhDjfzZhsMFZJUuH", "senderPublicKey": "DKfzQgvVdTqPHgGbdZptWYA8G5xVfmSMAwL3UnhwQmdy", "proofs": [ "48pQQF7YVrq9S6xBbavJwAyPtod1SBsvHH8uqp4LPssJxSpsVQZKXHcXGSQiER895ig395NJ1EvQkJcbuMVR4SGb" ], "script": "base64:BgIxCAISAwoBCBIAEgMKAQESABIAEgASAwoBARIDCgEBEgASABIDCgEIEgMKAQgSAwoBCFQADWtfdG90YWxTdXBwbHkCDWtfdG90YWxTdXBwbHkAD2tfcmV3YXJkQmFsYW5jZQIPa19yZXdhcmRCYWxhbmNlAA9rX2xvY2tlZEJhbGFuY2UCD2tfbG9ja2VkQmFsYW5jZQANa19mcmVlQmFsYW5jZQINa19mcmVlQmFsYW5jZQAGa19yYXRlAgZrX3JhdGUAEGtfbGFzdFVwZGF0ZVRpbWUCEGtfbGFzdFVwZGF0ZVRpbWUAFmtfcmV3YXJkUGVyVG9rZW5TdG9yZWQCFmtfcmV3YXJkUGVyVG9rZW5TdG9yZWQADGtfcmV3YXJkUmF0ZQIMa19yZXdhcmRSYXRlAA5rX3BlcmlvZEZpbmlzaAIOa19wZXJpb2RGaW5pc2gAFGtfdXNlclJld2FyZFBlclRva2VuAhRrX3VzZXJSZXdhcmRQZXJUb2tlbgAMa191c2VyUmV3YXJkAgxrX3VzZXJSZXdhcmQACWtfYmFsYW5jZQIJa19iYWxhbmNlAA5rX2F2ZXJhZ2VfcmF0ZQ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Zs6 Next: none Diff:
OldNewDifferences
4343
4444 let u = "k_quote_asset"
4545
46-let v = "k_admin_public_key"
46+let v = "k_admin_address"
4747
48-let w = "k_admin_address"
48+let w = "k_manager_address"
4949
50-let x = "k_manager_address"
50+let x = "k_collateral_address"
5151
52-let y = "k_collateral_address"
53-
54-func z (A,B) = ((A + "_") + B)
52+func y (z,A) = ((z + "_") + A)
5553
5654
57-func C () = valueOrErrorMessage(addressFromString(getStringValue(this, r)), "Coordinator not set")
55+func B () = valueOrErrorMessage(addressFromString(getStringValue(this, r)), "Coordinator not set")
5856
5957
60-func D (B) = valueOrElse(getBoolean(C(), z(s, B)), false)
58+func C (A) = valueOrElse(getBoolean(B(), y(s, A)), false)
6159
6260
63-func E () = fromBase58String(getStringValue(C(), v))
61+func D () = fromBase58String(getStringValue(B(), t))
6462
6563
66-func F () = fromBase58String(getStringValue(C(), t))
64+func E () = addressFromString(valueOrErrorMessage(getString(B(), v), "Admin address not set"))
6765
6866
69-func G () = addressFromString(valueOrErrorMessage(getString(C(), w), "Admin address not set"))
67+func F () = fromBase58String(getStringValue(B(), u))
7068
7169
72-func H () = fromBase58String(getStringValue(C(), u))
70+func G () = valueOrErrorMessage(addressFromString(getStringValue(B(), w)), "Manager not set")
7371
7472
75-func I () = valueOrErrorMessage(addressFromString(getStringValue(C(), x)), "Manager not set")
73+let H = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
74+
75+let I = (((7 * 60) * 60) * 24)
76+
77+let J = ""
78+
79+let K = 0
80+
81+func L (M) = (M / 100)
7682
7783
78-let J = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
79-
80-let K = (((7 * 60) * 60) * 24)
81-
82-let L = ""
83-
84-let M = 0
85-
86-func N (O) = (O / 100)
84+func N (M) = (M * 100)
8785
8886
89-func P (O) = (O * 100)
87+func O (P,Q) = fraction(P, H, Q, HALFEVEN)
9088
9189
92-func Q (R,S) = fraction(R, J, S, HALFEVEN)
90+func R (P,Q) = fraction(P, Q, H, HALFEVEN)
9391
9492
95-func T (R,S) = fraction(R, S, J, HALFEVEN)
93+func S (P) = if ((P > 0))
94+ then P
95+ else -(P)
9696
9797
98-func U (R) = if ((R > 0))
99- then R
100- else -(R)
98+func T (P,Q) = if ((P > Q))
99+ then Q
100+ else P
101101
102102
103-func V (R,S) = if ((R > S))
104- then S
105- else R
103+let U = (86400 * 1000)
104+
105+let V = O((1 * H), (4 * H))
106+
107+func W (X) = valueOrErrorMessage(getInteger(this, X), ("no value for " + X))
106108
107109
108-let W = (86400 * 1000)
109-
110-let X = Q((1 * J), (4 * J))
111-
112-func Y (Z) = valueOrErrorMessage(getInteger(this, Z), ("no value for " + Z))
110+func Y (X) = valueOrElse(getInteger(this, X), 0)
113111
114112
115-func aa (Z) = valueOrElse(getInteger(this, Z), 0)
113+func Z (X) = valueOrElse(getInteger(this, X), H)
116114
117115
118-func ab (Z) = valueOrElse(getInteger(this, Z), J)
116+func aa () = Y(a)
119117
120118
121-func ac () = aa(a)
119+func ab () = Z(e)
122120
123121
124-func ad () = ab(e)
122+func ac (ad) = Y(y(l, ad))
125123
126124
127-func ae (af) = aa(z(l, af))
125+func ae (ad) = Y(y(m, ad))
128126
129127
130-func ag (af) = aa(z(m, af))
128+func af (ad) = Y(y(n, ad))
131129
132130
133-func ah (af) = aa(z(n, af))
131+func ag (ad) = Y(y(p, ad))
134132
135133
136-func ai (af) = aa(z(p, af))
134+func ah (ad) = Y(y(o, ad))
137135
138136
139-func aj (af) = aa(z(o, af))
137+func ai () = Y(d)
140138
141139
142-func ak () = aa(d)
140+func aj () = Y(c)
143141
144142
145-func al () = aa(c)
143+func ak () = Y(g)
146144
147145
148-func am () = aa(g)
146+func al () = Y(f)
149147
150148
151-func an () = aa(f)
149+func am () = Y(h)
152150
153151
154-func ao () = aa(h)
152+func an () = Y(i)
155153
156154
157-func ap () = aa(i)
155+func ao () = Y(b)
158156
159157
160-func aq () = aa(b)
158+func ap (ad) = Y(y(k, ad))
161159
162160
163-func ar (af) = aa(z(k, af))
161+func aq (ad) = Y(y(j, ad))
164162
165163
166-func as (af) = aa(z(j, af))
164+func ar () = valueOrElse(getBoolean(this, q), false)
167165
168166
169-func at () = valueOrElse(getBoolean(this, q), false)
167+func as () = lastBlock.timestamp
170168
171169
172-func au () = lastBlock.timestamp
170+func at () = (as() / 1000)
173171
174172
175-func av () = (au() / 1000)
176-
177-
178-func aw (af) = {
179- let ax = au()
180- let ay = aj(af)
181- let az = if (((ax - ay) > W))
182- then $Tuple2(ax, ah(af))
183- else $Tuple2(ay, (ah(af) - ai(af)))
184- let aA = az._1
185- let aB = az._2
186- $Tuple2(aA, aB)
173+func au (ad) = {
174+ let av = as()
175+ let aw = ah(ad)
176+ let ax = if (((av - aw) > U))
177+ then $Tuple3(av, af(ad), 0)
178+ else $Tuple3(aw, (af(ad) - ag(ad)), ag(ad))
179+ let ay = ax._1
180+ let az = ax._2
181+ let aA = ax._3
182+ $Tuple3(ay, az, aA)
187183 }
188184
189185
190-func aC (aD) = {
191- let aE = if ((ac() > 0))
192- then Q((ak() + aD), ac())
193- else J
194- aE
186+func aB (aC) = {
187+ let aD = if ((aa() > 0))
188+ then O((ai() + aC), aa())
189+ else H
190+ aD
195191 }
196192
197193
198-func aF () = V(av(), ap())
194+func aE () = T(at(), an())
199195
200196
201-func aG (aH) = if (((ac() + aH) == 0))
202- then am()
197+func aF (aG) = if (((aa() + aG) == 0))
198+ then ak()
203199 else {
204- let aI = (aF() - an())
205- let aJ = if ((0 > aI))
200+ let aH = (aE() - al())
201+ let aI = if ((0 > aH))
206202 then 0
207- else aI
208- let aK = Q((ao() * aJ), (ac() + aH))
209- (am() + aK)
203+ else aH
204+ let aJ = O((am() * aI), (aa() + aG))
205+ (ak() + aJ)
210206 }
211207
212208
213-func aL (af,aH) = {
214- let aM = (aG(aH) - as(af))
215- (T((ae(af) + aH), aM) + ar(af))
209+func aK (ad,aG) = {
210+ let aL = (aF(aG) - aq(ad))
211+ (R((ac(ad) + aG), aL) + ap(ad))
216212 }
217213
218214
219-func aN (af,aH) = {
220- let aO = aG(aH)
221- let aP = av()
222- let aQ = if ((af != ""))
223- then $Tuple2(aL(af, aH), aO)
215+func aM (ad,aG) = {
216+ let aN = aF(aG)
217+ let aO = at()
218+ let aP = if ((ad != ""))
219+ then $Tuple2(aK(ad, aG), aN)
224220 else $Tuple2(0, 0)
225- let aR = aQ._1
226- let aS = aQ._2
227- $Tuple4(aO, aP, aR, aS)
221+ let aQ = aP._1
222+ let aR = aP._2
223+ $Tuple4(aN, aO, aQ, aR)
228224 }
229225
230226
231-func aT (aU,aV) = [IntegerEntry(z(l, aU), (ae(aU) + aV))]
227+func aS (aT,aU) = [IntegerEntry(y(l, aT), (ac(aT) + aU))]
232228
233229
234-func aW (aU,aX) = [IntegerEntry(z(n, aU), aX)]
230+func aV (aT,aW) = [IntegerEntry(y(n, aT), aW)]
235231
236232
237-func aY (aU,aX) = [IntegerEntry(z(m, aU), aX)]
233+func aX (aT,aW) = [IntegerEntry(y(m, aT), aW)]
238234
239235
240-func aZ (aV) = [IntegerEntry(d, (ak() + aV))]
241-
242-
243-func ba (aV) = {
244- let bb = al()
245- if (((bb + aV) >= 0))
246- then [IntegerEntry(c, (bb + aV))]
247- else throw(((("Vault: can not update locked balance. Balance: " + toString(bb)) + " change: ") + toString(aV)))
236+func aY (aU) = {
237+ let aZ = ai()
238+ if (((aZ + aU) >= 0))
239+ then [IntegerEntry(d, (aZ + aU))]
240+ else throw(((("Vault: can not update free balance. Balance: " + toString(aZ)) + " change: ") + toString(aU)))
248241 }
249242
250243
251-func bc (aV) = {
252- let bb = al()
253- if (((bb + aV) >= 0))
254- then [IntegerEntry(c, (bb + aV))]
255- else [IntegerEntry(c, 0)]
244+func ba (aU) = {
245+ let aZ = aj()
246+ if (((aZ + aU) >= 0))
247+ then [IntegerEntry(c, (aZ + aU))]
248+ else throw(((("Vault: can not update locked balance. Balance: " + toString(aZ)) + " change: ") + toString(aU)))
256249 }
257250
258251
259-func bd (aV) = [IntegerEntry(a, (ac() + aV))]
252+func bb (aU) = [IntegerEntry(a, (aa() + aU))]
260253
261254
262-func be (aX) = [IntegerEntry(e, aX)]
255+func bc (aW) = [IntegerEntry(e, aW)]
263256
264257
265-func bf (aU,bg,bh) = [IntegerEntry(z(o, aU), bg), IntegerEntry(z(p, aU), bh)]
258+func bd (aT,be,bf) = [IntegerEntry(y(o, aT), be), IntegerEntry(y(p, aT), bf)]
266259
267260
268-func bi (bj) = [IntegerEntry(b, (aq() + bj))]
261+func bg (bh) = [IntegerEntry(b, (ao() + bh))]
269262
270263
271-func bk (bl) = [IntegerEntry(h, bl)]
264+func bi (bj) = [IntegerEntry(h, bj)]
272265
273266
274-func bm (bn,bo) = [IntegerEntry(f, bn), IntegerEntry(i, bo)]
267+func bk (bl,bm) = [IntegerEntry(f, bl), IntegerEntry(i, bm)]
275268
276269
277-func bp (bq) = [IntegerEntry(g, bq)]
270+func bn (bo) = [IntegerEntry(g, bo)]
278271
279272
280-func br (af,bs,bt) = [IntegerEntry(z(k, af), bs), IntegerEntry(z(j, af), bt)]
273+func bp (ad,bq,br) = [IntegerEntry(y(k, ad), bq), IntegerEntry(y(j, ad), br)]
281274
282275
283-@Callable(bu)
284-func initialize (bv) = if (at())
285- then throw("Already initialized")
286- else [StringEntry(r, bv), BooleanEntry(q, true)]
276+@Callable(bs)
277+func initialize (bt) = if (if (ar())
278+ then true
279+ else (bs.caller != this))
280+ then throw("Unable to initialize")
281+ else [StringEntry(r, toString(valueOrErrorMessage(addressFromString(bt), "Invalid coordinator address"))), BooleanEntry(q, true)]
287282
288283
289284
290-@Callable(bu)
285+@Callable(bs)
291286 func stake () = {
292- let af = toString(bu.caller)
293- let O = P(bu.payments[0].amount)
294- if (if ((bu.payments[0].assetId != H()))
287+ let ad = toString(bs.caller)
288+ let M = N(bs.payments[0].amount)
289+ if (if (if ((bs.payments[0].assetId != F()))
295290 then true
296- else !(at()))
291+ else (size(bs.payments) != 1))
292+ then true
293+ else !(ar()))
297294 then throw("Invalid call to stake")
298295 else {
299- let bw = aN(af, 0)
300- let aO = bw._1
301- let aP = bw._2
302- let aR = bw._3
303- let aS = bw._4
304- let bx = ad()
305- let by = ag(af)
306- let bz = Q(O, bx)
307- let bA = Q((T(bz, bx) + T(ae(af), by)), (bz + ae(af)))
308- let bB = (bz + ae(af))
309- let bC = T(bB, X)
310- let bD = invoke(I(), "deposit", nil, [AttachedPayment(H(), N(O))])
311- if ((bD == bD))
312- then (((((((br(af, aR, aS) ++ bp(aO)) ++ bm(aP, ap())) ++ aZ(O)) ++ aT(af, bz)) ++ aY(af, bA)) ++ aW(af, bC)) ++ bd(bz))
296+ let bu = aM(ad, 0)
297+ let aN = bu._1
298+ let aO = bu._2
299+ let aQ = bu._3
300+ let aR = bu._4
301+ let bv = ab()
302+ let bw = ae(ad)
303+ let bx = O(M, bv)
304+ let by = O((R(bx, bv) + R(ac(ad), bw)), (bx + ac(ad)))
305+ let bz = (bx + ac(ad))
306+ let bA = R(bz, V)
307+ let bB = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(M))])
308+ if ((bB == bB))
309+ then (((((((bp(ad, aQ, aR) ++ bn(aN)) ++ bk(aO, an())) ++ aY(M)) ++ aS(ad, bx)) ++ aX(ad, by)) ++ aV(ad, bA)) ++ bb(bx))
313310 else throw("Strict value is not equal to itself.")
314311 }
315312 }
316313
317314
318315
319-@Callable(bu)
320-func unStake (O) = {
321- let af = toString(bu.caller)
322- let bE = P(O)
323- if (if (if ((bu.payments != nil))
316+@Callable(bs)
317+func unStake (M) = {
318+ let ad = toString(bs.caller)
319+ let bC = N(M)
320+ if (if (if ((bs.payments != nil))
324321 then true
325- else (0 >= bE))
322+ else (0 >= bC))
326323 then true
327- else !(at()))
324+ else !(ar()))
328325 then throw("Invalid call to unStake")
329326 else {
330- let bF = aN(af, 0)
331- let aO = bF._1
332- let aP = bF._2
333- let aR = bF._3
334- let aS = bF._4
335- let bG = aw(af)
336- let aA = bG._1
337- let aB = bG._2
338- let bz = Q(bE, ad())
339- if ((bz > aB))
327+ let bD = aM(ad, 0)
328+ let aN = bD._1
329+ let aO = bD._2
330+ let aQ = bD._3
331+ let aR = bD._4
332+ let bE = au(ad)
333+ let ay = bE._1
334+ let az = bE._2
335+ let aA = bE._3
336+ let bx = O(bC, ab())
337+ if ((bx > az))
340338 then throw("Invalid call to unStake: withdraw over limit")
341339 else {
342- let bH = (ai(af) + bz)
343- if ((bE > ak()))
340+ let bF = (aA + bx)
341+ if ((bC > ai()))
344342 then throw("Invalid call to unStake: balance too low")
345343 else {
346- let bI = invoke(I(), "withdraw", [toBase58String(H()), N(bE)], nil)
347- if ((bI == bI))
348- then (((((((br(af, aR, aS) ++ bp(aO)) ++ bm(aP, ap())) ++ aZ(-(bE))) ++ aT(af, -(bz))) ++ bd(-(bz))) ++ bf(af, aA, bH)) ++ [ScriptTransfer(bu.caller, N(bE), H())])
344+ let bG = invoke(G(), "withdraw", [toBase58String(F()), L(bC)], nil)
345+ if ((bG == bG))
346+ then (((((((bp(ad, aQ, aR) ++ bn(aN)) ++ bk(aO, an())) ++ aY(-(bC))) ++ aS(ad, -(bx))) ++ bb(-(bx))) ++ bd(ad, ay, bF)) ++ [ScriptTransfer(bs.caller, L(bC), F())])
349347 else throw("Strict value is not equal to itself.")
350348 }
351349 }
354352
355353
356354
357-@Callable(bu)
355+@Callable(bs)
358356 func withdrawRewards () = {
359- let af = toString(bu.caller)
360- let bJ = aN(af, 0)
361- let aO = bJ._1
362- let aP = bJ._2
363- let aR = bJ._3
364- let aS = bJ._4
365- if (if ((0 >= aR))
357+ let ad = toString(bs.caller)
358+ let bH = aM(ad, 0)
359+ let aN = bH._1
360+ let aO = bH._2
361+ let aQ = bH._3
362+ let aR = bH._4
363+ if (if ((0 >= aQ))
366364 then true
367- else !(at()))
365+ else !(ar()))
368366 then throw("No reward: Vault")
369- else ((((br(af, 0, aS) ++ bp(aO)) ++ bm(aP, ap())) ++ bi(-(aR))) ++ [ScriptTransfer(bu.caller, aR, F())])
367+ else ((((bp(ad, 0, aR) ++ bn(aN)) ++ bk(aO, an())) ++ bg(-(aQ))) ++ [ScriptTransfer(bs.caller, aQ, D())])
370368 }
371369
372370
373371
374-@Callable(bu)
372+@Callable(bs)
375373 func addFree () = {
376- let O = P(bu.payments[0].amount)
377- if (if (if ((bu.payments[0].assetId != H()))
374+ let M = N(bs.payments[0].amount)
375+ if (if (if (if ((bs.payments[0].assetId != F()))
378376 then true
379- else !(at()))
377+ else (size(bs.payments) != 1))
380378 then true
381- else !(if (D(toString(bu.caller)))
379+ else !(ar()))
380+ then true
381+ else !(if (C(toString(bs.caller)))
382382 then true
383- else (bu.caller == G())))
383+ else (bs.caller == E())))
384384 then throw("Invalid addFree params")
385385 else {
386- let aE = if ((ac() > 0))
387- then Q((ak() + O), ac())
388- else J
389- let bI = invoke(I(), "deposit", nil, [AttachedPayment(H(), N(O))])
390- if ((bI == bI))
391- then (aZ(O) ++ be(aE))
386+ let aD = aB(M)
387+ let bB = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(M))])
388+ if ((bB == bB))
389+ then (aY(M) ++ bc(aD))
392390 else throw("Strict value is not equal to itself.")
393391 }
394392 }
395393
396394
397395
398-@Callable(bu)
396+@Callable(bs)
399397 func addLocked () = {
400- let O = P(bu.payments[0].amount)
401- if (if (if ((bu.payments[0].assetId != H()))
398+ let M = N(bs.payments[0].amount)
399+ if (if (if (if ((bs.payments[0].assetId != F()))
402400 then true
403- else !(at()))
401+ else (size(bs.payments) != 1))
404402 then true
405- else !(if (D(toString(bu.caller)))
403+ else !(ar()))
404+ then true
405+ else !(if (C(toString(bs.caller)))
406406 then true
407- else (bu.caller == G())))
407+ else (bs.caller == E())))
408408 then throw("Invalid addLocked params")
409409 else {
410- let bI = invoke(I(), "deposit", nil, [AttachedPayment(H(), N(O))])
411- if ((bI == bI))
412- then ba(O)
410+ let bG = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(M))])
411+ if ((bG == bG))
412+ then ba(M)
413413 else throw("Strict value is not equal to itself.")
414414 }
415415 }
416416
417417
418418
419-@Callable(bu)
420-func exchangeFreeAndLocked (O) = if (if (!(at()))
419+@Callable(bs)
420+func exchangeFreeAndLocked (M) = if (if (!(ar()))
421421 then true
422- else !(if (D(toString(bu.caller)))
423- then true
424- else (bu.caller == G())))
422+ else !(C(toString(bs.caller))))
425423 then throw("Invalid exchangeFreeAndLocked params")
426424 else {
427- let bE = P(O)
428- let bK = -(bE)
429- let aE = aC(bK)
430- ((bc(bE) ++ aZ(bK)) ++ be(aE))
425+ let bC = N(M)
426+ let aD = aB(-(bC))
427+ ((ba(bC) ++ aY(-(bC))) ++ bc(aD))
431428 }
432429
433430
434431
435-@Callable(bu)
436-func withdrawLocked (O) = if (if (if (!(at()))
432+@Callable(bs)
433+func withdrawLocked (M) = if (if (if (!(ar()))
437434 then true
438- else (0 >= O))
435+ else (0 >= M))
439436 then true
440- else !(D(toString(bu.caller))))
437+ else !(C(toString(bs.caller))))
441438 then throw("Invalid withdrawLocked params")
442439 else {
443- let bE = P(O)
444- let bI = invoke(I(), "withdraw", [toBase58String(H()), N(bE)], nil)
445- if ((bI == bI))
446- then {
447- let bL = al()
448- let bM = if ((bE > bL))
449- then $Tuple2(bL, (bE - bL))
450- else $Tuple2(bE, 0)
451- let bN = bM._1
452- let bO = bM._2
453- (((if ((bO > 0))
454- then {
455- let aE = aC(-(bO))
456- (aZ(-(bO)) ++ be(aE))
457- }
458- else nil) ++ ba(-(bN))) ++ [ScriptTransfer(bu.caller, N(bE), H())])
459- }
440+ let bC = N(M)
441+ let bG = invoke(G(), "withdraw", [toBase58String(F()), L(bC)], nil)
442+ if ((bG == bG))
443+ then (ba(-(bC)) ++ [ScriptTransfer(bs.caller, L(bC), F())])
460444 else throw("Strict value is not equal to itself.")
461445 }
462446
463447
464448
465-@Callable(bu)
466-func addRewards () = if (if ((bu.payments[0].assetId != F()))
449+@Callable(bs)
450+func addRewards () = if (if (if ((bs.payments[0].assetId != D()))
467451 then true
468- else !(at()))
452+ else (size(bs.payments) != 1))
453+ then true
454+ else !(ar()))
469455 then throw("Invalid addRewards params")
470456 else {
471- let bs = bu.payments[0].amount
472- let aO = aN(L, M)._1
473- let bP = av()
474- let bQ = if ((bP > ap()))
475- then (bs / K)
457+ let bq = bs.payments[0].amount
458+ let aN = aM(J, K)._1
459+ let bI = at()
460+ let bJ = if ((bI > an()))
461+ then (bq / I)
476462 else {
477- let bR = (ap() - bP)
478- let bS = (ao() * bR)
479- ((bs + bS) / K)
463+ let bK = (an() - bI)
464+ let bL = (am() * bK)
465+ ((bq + bL) / I)
480466 }
481- (((bk(bQ) ++ bp(aO)) ++ bi(bs)) ++ bm(bP, (bP + K)))
467+ (((bi(bJ) ++ bn(aN)) ++ bg(bq)) ++ bk(bI, (bI + I)))
482468 }
483469
484470
485471
486-@Callable(bu)
487-func view_reward (af) = {
488- let bb = ae(af)
489- let bT = T(ag(af), bb)
490- let bU = T(ad(), bb)
491- let bV = (bU - bT)
492- throw(toString(bV))
472+@Callable(bs)
473+func ackRewards () = {
474+ let bM = invoke(G(), "claimProfit", [toBase58String(F())], nil)
475+ if ((bM == bM))
476+ then {
477+ let bN = {
478+ let bO = bM
479+ if ($isInstanceOf(bO, "Int"))
480+ then {
481+ let bP = bO
482+ N(bP)
483+ }
484+ else throw("Invalid claimProfit response")
485+ }
486+ let bQ = if ((bN > 0))
487+ then {
488+ let aD = aB(bN)
489+ let bB = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(bN))])
490+ if ((bB == bB))
491+ then (aY(bN) ++ bc(aD))
492+ else throw("Strict value is not equal to itself.")
493+ }
494+ else nil
495+ if ((bQ == bQ))
496+ then bQ
497+ else throw("Strict value is not equal to itself.")
498+ }
499+ else throw("Strict value is not equal to itself.")
493500 }
494501
495502
496503
497-@Callable(bu)
498-func view_stakingReward (af) = {
499- let aR = aN(af, 0)._3
500- throw(toString(N(aR)))
504+@Callable(bs)
505+func view_reward (ad) = {
506+ let aZ = ac(ad)
507+ let bR = R(ae(ad), aZ)
508+ let bS = R(ab(), aZ)
509+ let bT = (bS - bR)
510+ throw(toString(bT))
501511 }
502512
503513
504514
505-@Callable(bu)
506-func view_withdrawLimit (af) = {
507- let aB = aw(af)._2
508- let bW = N(T(aB, ad()))
509- throw(toString(bW))
515+@Callable(bs)
516+func view_stakingReward (ad) = {
517+ let aQ = aM(ad, 0)._3
518+ throw(toString(L(aQ)))
510519 }
511520
512521
513-@Verifier(bX)
514-func bY () = sigVerify(bX.bodyBytes, bX.proofs[0], E())
522+
523+@Callable(bs)
524+func view_withdrawLimit (ad) = {
525+ let az = au(ad)._2
526+ let bU = L(R(az, ab()))
527+ throw(toString(bU))
528+ }
529+
530+
531+@Verifier(bV)
532+func bW () = {
533+ let bX = getString(this, r)
534+ if (isDefined(bX))
535+ then {
536+ let bY = getString(addressFromStringValue(value(bX)), v)
537+ if (isDefined(bY))
538+ then valueOrElse(getBoolean(addressFromStringValue(value(bY)), ((("status_" + toString(this)) + "_") + toBase58String(bV.id))), false)
539+ else throw("unable to verify: admin not set in coordinator")
540+ }
541+ else sigVerify(bV.bodyBytes, bV.proofs[0], bV.senderPublicKey)
542+ }
515543
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "k_totalSupply"
55
66 let b = "k_rewardBalance"
77
88 let c = "k_lockedBalance"
99
1010 let d = "k_freeBalance"
1111
1212 let e = "k_rate"
1313
1414 let f = "k_lastUpdateTime"
1515
1616 let g = "k_rewardPerTokenStored"
1717
1818 let h = "k_rewardRate"
1919
2020 let i = "k_periodFinish"
2121
2222 let j = "k_userRewardPerToken"
2323
2424 let k = "k_userReward"
2525
2626 let l = "k_balance"
2727
2828 let m = "k_average_rate"
2929
3030 let n = "k_withdraw_limit"
3131
3232 let o = "k_last_withdraw_date"
3333
3434 let p = "k_withdraw_in_period"
3535
3636 let q = "k_initialized"
3737
3838 let r = "k_coordinatorAddress"
3939
4040 let s = "k_amm"
4141
4242 let t = "k_gov_asset"
4343
4444 let u = "k_quote_asset"
4545
46-let v = "k_admin_public_key"
46+let v = "k_admin_address"
4747
48-let w = "k_admin_address"
48+let w = "k_manager_address"
4949
50-let x = "k_manager_address"
50+let x = "k_collateral_address"
5151
52-let y = "k_collateral_address"
53-
54-func z (A,B) = ((A + "_") + B)
52+func y (z,A) = ((z + "_") + A)
5553
5654
57-func C () = valueOrErrorMessage(addressFromString(getStringValue(this, r)), "Coordinator not set")
55+func B () = valueOrErrorMessage(addressFromString(getStringValue(this, r)), "Coordinator not set")
5856
5957
60-func D (B) = valueOrElse(getBoolean(C(), z(s, B)), false)
58+func C (A) = valueOrElse(getBoolean(B(), y(s, A)), false)
6159
6260
63-func E () = fromBase58String(getStringValue(C(), v))
61+func D () = fromBase58String(getStringValue(B(), t))
6462
6563
66-func F () = fromBase58String(getStringValue(C(), t))
64+func E () = addressFromString(valueOrErrorMessage(getString(B(), v), "Admin address not set"))
6765
6866
69-func G () = addressFromString(valueOrErrorMessage(getString(C(), w), "Admin address not set"))
67+func F () = fromBase58String(getStringValue(B(), u))
7068
7169
72-func H () = fromBase58String(getStringValue(C(), u))
70+func G () = valueOrErrorMessage(addressFromString(getStringValue(B(), w)), "Manager not set")
7371
7472
75-func I () = valueOrErrorMessage(addressFromString(getStringValue(C(), x)), "Manager not set")
73+let H = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
74+
75+let I = (((7 * 60) * 60) * 24)
76+
77+let J = ""
78+
79+let K = 0
80+
81+func L (M) = (M / 100)
7682
7783
78-let J = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
79-
80-let K = (((7 * 60) * 60) * 24)
81-
82-let L = ""
83-
84-let M = 0
85-
86-func N (O) = (O / 100)
84+func N (M) = (M * 100)
8785
8886
89-func P (O) = (O * 100)
87+func O (P,Q) = fraction(P, H, Q, HALFEVEN)
9088
9189
92-func Q (R,S) = fraction(R, J, S, HALFEVEN)
90+func R (P,Q) = fraction(P, Q, H, HALFEVEN)
9391
9492
95-func T (R,S) = fraction(R, S, J, HALFEVEN)
93+func S (P) = if ((P > 0))
94+ then P
95+ else -(P)
9696
9797
98-func U (R) = if ((R > 0))
99- then R
100- else -(R)
98+func T (P,Q) = if ((P > Q))
99+ then Q
100+ else P
101101
102102
103-func V (R,S) = if ((R > S))
104- then S
105- else R
103+let U = (86400 * 1000)
104+
105+let V = O((1 * H), (4 * H))
106+
107+func W (X) = valueOrErrorMessage(getInteger(this, X), ("no value for " + X))
106108
107109
108-let W = (86400 * 1000)
109-
110-let X = Q((1 * J), (4 * J))
111-
112-func Y (Z) = valueOrErrorMessage(getInteger(this, Z), ("no value for " + Z))
110+func Y (X) = valueOrElse(getInteger(this, X), 0)
113111
114112
115-func aa (Z) = valueOrElse(getInteger(this, Z), 0)
113+func Z (X) = valueOrElse(getInteger(this, X), H)
116114
117115
118-func ab (Z) = valueOrElse(getInteger(this, Z), J)
116+func aa () = Y(a)
119117
120118
121-func ac () = aa(a)
119+func ab () = Z(e)
122120
123121
124-func ad () = ab(e)
122+func ac (ad) = Y(y(l, ad))
125123
126124
127-func ae (af) = aa(z(l, af))
125+func ae (ad) = Y(y(m, ad))
128126
129127
130-func ag (af) = aa(z(m, af))
128+func af (ad) = Y(y(n, ad))
131129
132130
133-func ah (af) = aa(z(n, af))
131+func ag (ad) = Y(y(p, ad))
134132
135133
136-func ai (af) = aa(z(p, af))
134+func ah (ad) = Y(y(o, ad))
137135
138136
139-func aj (af) = aa(z(o, af))
137+func ai () = Y(d)
140138
141139
142-func ak () = aa(d)
140+func aj () = Y(c)
143141
144142
145-func al () = aa(c)
143+func ak () = Y(g)
146144
147145
148-func am () = aa(g)
146+func al () = Y(f)
149147
150148
151-func an () = aa(f)
149+func am () = Y(h)
152150
153151
154-func ao () = aa(h)
152+func an () = Y(i)
155153
156154
157-func ap () = aa(i)
155+func ao () = Y(b)
158156
159157
160-func aq () = aa(b)
158+func ap (ad) = Y(y(k, ad))
161159
162160
163-func ar (af) = aa(z(k, af))
161+func aq (ad) = Y(y(j, ad))
164162
165163
166-func as (af) = aa(z(j, af))
164+func ar () = valueOrElse(getBoolean(this, q), false)
167165
168166
169-func at () = valueOrElse(getBoolean(this, q), false)
167+func as () = lastBlock.timestamp
170168
171169
172-func au () = lastBlock.timestamp
170+func at () = (as() / 1000)
173171
174172
175-func av () = (au() / 1000)
176-
177-
178-func aw (af) = {
179- let ax = au()
180- let ay = aj(af)
181- let az = if (((ax - ay) > W))
182- then $Tuple2(ax, ah(af))
183- else $Tuple2(ay, (ah(af) - ai(af)))
184- let aA = az._1
185- let aB = az._2
186- $Tuple2(aA, aB)
173+func au (ad) = {
174+ let av = as()
175+ let aw = ah(ad)
176+ let ax = if (((av - aw) > U))
177+ then $Tuple3(av, af(ad), 0)
178+ else $Tuple3(aw, (af(ad) - ag(ad)), ag(ad))
179+ let ay = ax._1
180+ let az = ax._2
181+ let aA = ax._3
182+ $Tuple3(ay, az, aA)
187183 }
188184
189185
190-func aC (aD) = {
191- let aE = if ((ac() > 0))
192- then Q((ak() + aD), ac())
193- else J
194- aE
186+func aB (aC) = {
187+ let aD = if ((aa() > 0))
188+ then O((ai() + aC), aa())
189+ else H
190+ aD
195191 }
196192
197193
198-func aF () = V(av(), ap())
194+func aE () = T(at(), an())
199195
200196
201-func aG (aH) = if (((ac() + aH) == 0))
202- then am()
197+func aF (aG) = if (((aa() + aG) == 0))
198+ then ak()
203199 else {
204- let aI = (aF() - an())
205- let aJ = if ((0 > aI))
200+ let aH = (aE() - al())
201+ let aI = if ((0 > aH))
206202 then 0
207- else aI
208- let aK = Q((ao() * aJ), (ac() + aH))
209- (am() + aK)
203+ else aH
204+ let aJ = O((am() * aI), (aa() + aG))
205+ (ak() + aJ)
210206 }
211207
212208
213-func aL (af,aH) = {
214- let aM = (aG(aH) - as(af))
215- (T((ae(af) + aH), aM) + ar(af))
209+func aK (ad,aG) = {
210+ let aL = (aF(aG) - aq(ad))
211+ (R((ac(ad) + aG), aL) + ap(ad))
216212 }
217213
218214
219-func aN (af,aH) = {
220- let aO = aG(aH)
221- let aP = av()
222- let aQ = if ((af != ""))
223- then $Tuple2(aL(af, aH), aO)
215+func aM (ad,aG) = {
216+ let aN = aF(aG)
217+ let aO = at()
218+ let aP = if ((ad != ""))
219+ then $Tuple2(aK(ad, aG), aN)
224220 else $Tuple2(0, 0)
225- let aR = aQ._1
226- let aS = aQ._2
227- $Tuple4(aO, aP, aR, aS)
221+ let aQ = aP._1
222+ let aR = aP._2
223+ $Tuple4(aN, aO, aQ, aR)
228224 }
229225
230226
231-func aT (aU,aV) = [IntegerEntry(z(l, aU), (ae(aU) + aV))]
227+func aS (aT,aU) = [IntegerEntry(y(l, aT), (ac(aT) + aU))]
232228
233229
234-func aW (aU,aX) = [IntegerEntry(z(n, aU), aX)]
230+func aV (aT,aW) = [IntegerEntry(y(n, aT), aW)]
235231
236232
237-func aY (aU,aX) = [IntegerEntry(z(m, aU), aX)]
233+func aX (aT,aW) = [IntegerEntry(y(m, aT), aW)]
238234
239235
240-func aZ (aV) = [IntegerEntry(d, (ak() + aV))]
241-
242-
243-func ba (aV) = {
244- let bb = al()
245- if (((bb + aV) >= 0))
246- then [IntegerEntry(c, (bb + aV))]
247- else throw(((("Vault: can not update locked balance. Balance: " + toString(bb)) + " change: ") + toString(aV)))
236+func aY (aU) = {
237+ let aZ = ai()
238+ if (((aZ + aU) >= 0))
239+ then [IntegerEntry(d, (aZ + aU))]
240+ else throw(((("Vault: can not update free balance. Balance: " + toString(aZ)) + " change: ") + toString(aU)))
248241 }
249242
250243
251-func bc (aV) = {
252- let bb = al()
253- if (((bb + aV) >= 0))
254- then [IntegerEntry(c, (bb + aV))]
255- else [IntegerEntry(c, 0)]
244+func ba (aU) = {
245+ let aZ = aj()
246+ if (((aZ + aU) >= 0))
247+ then [IntegerEntry(c, (aZ + aU))]
248+ else throw(((("Vault: can not update locked balance. Balance: " + toString(aZ)) + " change: ") + toString(aU)))
256249 }
257250
258251
259-func bd (aV) = [IntegerEntry(a, (ac() + aV))]
252+func bb (aU) = [IntegerEntry(a, (aa() + aU))]
260253
261254
262-func be (aX) = [IntegerEntry(e, aX)]
255+func bc (aW) = [IntegerEntry(e, aW)]
263256
264257
265-func bf (aU,bg,bh) = [IntegerEntry(z(o, aU), bg), IntegerEntry(z(p, aU), bh)]
258+func bd (aT,be,bf) = [IntegerEntry(y(o, aT), be), IntegerEntry(y(p, aT), bf)]
266259
267260
268-func bi (bj) = [IntegerEntry(b, (aq() + bj))]
261+func bg (bh) = [IntegerEntry(b, (ao() + bh))]
269262
270263
271-func bk (bl) = [IntegerEntry(h, bl)]
264+func bi (bj) = [IntegerEntry(h, bj)]
272265
273266
274-func bm (bn,bo) = [IntegerEntry(f, bn), IntegerEntry(i, bo)]
267+func bk (bl,bm) = [IntegerEntry(f, bl), IntegerEntry(i, bm)]
275268
276269
277-func bp (bq) = [IntegerEntry(g, bq)]
270+func bn (bo) = [IntegerEntry(g, bo)]
278271
279272
280-func br (af,bs,bt) = [IntegerEntry(z(k, af), bs), IntegerEntry(z(j, af), bt)]
273+func bp (ad,bq,br) = [IntegerEntry(y(k, ad), bq), IntegerEntry(y(j, ad), br)]
281274
282275
283-@Callable(bu)
284-func initialize (bv) = if (at())
285- then throw("Already initialized")
286- else [StringEntry(r, bv), BooleanEntry(q, true)]
276+@Callable(bs)
277+func initialize (bt) = if (if (ar())
278+ then true
279+ else (bs.caller != this))
280+ then throw("Unable to initialize")
281+ else [StringEntry(r, toString(valueOrErrorMessage(addressFromString(bt), "Invalid coordinator address"))), BooleanEntry(q, true)]
287282
288283
289284
290-@Callable(bu)
285+@Callable(bs)
291286 func stake () = {
292- let af = toString(bu.caller)
293- let O = P(bu.payments[0].amount)
294- if (if ((bu.payments[0].assetId != H()))
287+ let ad = toString(bs.caller)
288+ let M = N(bs.payments[0].amount)
289+ if (if (if ((bs.payments[0].assetId != F()))
295290 then true
296- else !(at()))
291+ else (size(bs.payments) != 1))
292+ then true
293+ else !(ar()))
297294 then throw("Invalid call to stake")
298295 else {
299- let bw = aN(af, 0)
300- let aO = bw._1
301- let aP = bw._2
302- let aR = bw._3
303- let aS = bw._4
304- let bx = ad()
305- let by = ag(af)
306- let bz = Q(O, bx)
307- let bA = Q((T(bz, bx) + T(ae(af), by)), (bz + ae(af)))
308- let bB = (bz + ae(af))
309- let bC = T(bB, X)
310- let bD = invoke(I(), "deposit", nil, [AttachedPayment(H(), N(O))])
311- if ((bD == bD))
312- then (((((((br(af, aR, aS) ++ bp(aO)) ++ bm(aP, ap())) ++ aZ(O)) ++ aT(af, bz)) ++ aY(af, bA)) ++ aW(af, bC)) ++ bd(bz))
296+ let bu = aM(ad, 0)
297+ let aN = bu._1
298+ let aO = bu._2
299+ let aQ = bu._3
300+ let aR = bu._4
301+ let bv = ab()
302+ let bw = ae(ad)
303+ let bx = O(M, bv)
304+ let by = O((R(bx, bv) + R(ac(ad), bw)), (bx + ac(ad)))
305+ let bz = (bx + ac(ad))
306+ let bA = R(bz, V)
307+ let bB = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(M))])
308+ if ((bB == bB))
309+ then (((((((bp(ad, aQ, aR) ++ bn(aN)) ++ bk(aO, an())) ++ aY(M)) ++ aS(ad, bx)) ++ aX(ad, by)) ++ aV(ad, bA)) ++ bb(bx))
313310 else throw("Strict value is not equal to itself.")
314311 }
315312 }
316313
317314
318315
319-@Callable(bu)
320-func unStake (O) = {
321- let af = toString(bu.caller)
322- let bE = P(O)
323- if (if (if ((bu.payments != nil))
316+@Callable(bs)
317+func unStake (M) = {
318+ let ad = toString(bs.caller)
319+ let bC = N(M)
320+ if (if (if ((bs.payments != nil))
324321 then true
325- else (0 >= bE))
322+ else (0 >= bC))
326323 then true
327- else !(at()))
324+ else !(ar()))
328325 then throw("Invalid call to unStake")
329326 else {
330- let bF = aN(af, 0)
331- let aO = bF._1
332- let aP = bF._2
333- let aR = bF._3
334- let aS = bF._4
335- let bG = aw(af)
336- let aA = bG._1
337- let aB = bG._2
338- let bz = Q(bE, ad())
339- if ((bz > aB))
327+ let bD = aM(ad, 0)
328+ let aN = bD._1
329+ let aO = bD._2
330+ let aQ = bD._3
331+ let aR = bD._4
332+ let bE = au(ad)
333+ let ay = bE._1
334+ let az = bE._2
335+ let aA = bE._3
336+ let bx = O(bC, ab())
337+ if ((bx > az))
340338 then throw("Invalid call to unStake: withdraw over limit")
341339 else {
342- let bH = (ai(af) + bz)
343- if ((bE > ak()))
340+ let bF = (aA + bx)
341+ if ((bC > ai()))
344342 then throw("Invalid call to unStake: balance too low")
345343 else {
346- let bI = invoke(I(), "withdraw", [toBase58String(H()), N(bE)], nil)
347- if ((bI == bI))
348- then (((((((br(af, aR, aS) ++ bp(aO)) ++ bm(aP, ap())) ++ aZ(-(bE))) ++ aT(af, -(bz))) ++ bd(-(bz))) ++ bf(af, aA, bH)) ++ [ScriptTransfer(bu.caller, N(bE), H())])
344+ let bG = invoke(G(), "withdraw", [toBase58String(F()), L(bC)], nil)
345+ if ((bG == bG))
346+ then (((((((bp(ad, aQ, aR) ++ bn(aN)) ++ bk(aO, an())) ++ aY(-(bC))) ++ aS(ad, -(bx))) ++ bb(-(bx))) ++ bd(ad, ay, bF)) ++ [ScriptTransfer(bs.caller, L(bC), F())])
349347 else throw("Strict value is not equal to itself.")
350348 }
351349 }
352350 }
353351 }
354352
355353
356354
357-@Callable(bu)
355+@Callable(bs)
358356 func withdrawRewards () = {
359- let af = toString(bu.caller)
360- let bJ = aN(af, 0)
361- let aO = bJ._1
362- let aP = bJ._2
363- let aR = bJ._3
364- let aS = bJ._4
365- if (if ((0 >= aR))
357+ let ad = toString(bs.caller)
358+ let bH = aM(ad, 0)
359+ let aN = bH._1
360+ let aO = bH._2
361+ let aQ = bH._3
362+ let aR = bH._4
363+ if (if ((0 >= aQ))
366364 then true
367- else !(at()))
365+ else !(ar()))
368366 then throw("No reward: Vault")
369- else ((((br(af, 0, aS) ++ bp(aO)) ++ bm(aP, ap())) ++ bi(-(aR))) ++ [ScriptTransfer(bu.caller, aR, F())])
367+ else ((((bp(ad, 0, aR) ++ bn(aN)) ++ bk(aO, an())) ++ bg(-(aQ))) ++ [ScriptTransfer(bs.caller, aQ, D())])
370368 }
371369
372370
373371
374-@Callable(bu)
372+@Callable(bs)
375373 func addFree () = {
376- let O = P(bu.payments[0].amount)
377- if (if (if ((bu.payments[0].assetId != H()))
374+ let M = N(bs.payments[0].amount)
375+ if (if (if (if ((bs.payments[0].assetId != F()))
378376 then true
379- else !(at()))
377+ else (size(bs.payments) != 1))
380378 then true
381- else !(if (D(toString(bu.caller)))
379+ else !(ar()))
380+ then true
381+ else !(if (C(toString(bs.caller)))
382382 then true
383- else (bu.caller == G())))
383+ else (bs.caller == E())))
384384 then throw("Invalid addFree params")
385385 else {
386- let aE = if ((ac() > 0))
387- then Q((ak() + O), ac())
388- else J
389- let bI = invoke(I(), "deposit", nil, [AttachedPayment(H(), N(O))])
390- if ((bI == bI))
391- then (aZ(O) ++ be(aE))
386+ let aD = aB(M)
387+ let bB = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(M))])
388+ if ((bB == bB))
389+ then (aY(M) ++ bc(aD))
392390 else throw("Strict value is not equal to itself.")
393391 }
394392 }
395393
396394
397395
398-@Callable(bu)
396+@Callable(bs)
399397 func addLocked () = {
400- let O = P(bu.payments[0].amount)
401- if (if (if ((bu.payments[0].assetId != H()))
398+ let M = N(bs.payments[0].amount)
399+ if (if (if (if ((bs.payments[0].assetId != F()))
402400 then true
403- else !(at()))
401+ else (size(bs.payments) != 1))
404402 then true
405- else !(if (D(toString(bu.caller)))
403+ else !(ar()))
404+ then true
405+ else !(if (C(toString(bs.caller)))
406406 then true
407- else (bu.caller == G())))
407+ else (bs.caller == E())))
408408 then throw("Invalid addLocked params")
409409 else {
410- let bI = invoke(I(), "deposit", nil, [AttachedPayment(H(), N(O))])
411- if ((bI == bI))
412- then ba(O)
410+ let bG = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(M))])
411+ if ((bG == bG))
412+ then ba(M)
413413 else throw("Strict value is not equal to itself.")
414414 }
415415 }
416416
417417
418418
419-@Callable(bu)
420-func exchangeFreeAndLocked (O) = if (if (!(at()))
419+@Callable(bs)
420+func exchangeFreeAndLocked (M) = if (if (!(ar()))
421421 then true
422- else !(if (D(toString(bu.caller)))
423- then true
424- else (bu.caller == G())))
422+ else !(C(toString(bs.caller))))
425423 then throw("Invalid exchangeFreeAndLocked params")
426424 else {
427- let bE = P(O)
428- let bK = -(bE)
429- let aE = aC(bK)
430- ((bc(bE) ++ aZ(bK)) ++ be(aE))
425+ let bC = N(M)
426+ let aD = aB(-(bC))
427+ ((ba(bC) ++ aY(-(bC))) ++ bc(aD))
431428 }
432429
433430
434431
435-@Callable(bu)
436-func withdrawLocked (O) = if (if (if (!(at()))
432+@Callable(bs)
433+func withdrawLocked (M) = if (if (if (!(ar()))
437434 then true
438- else (0 >= O))
435+ else (0 >= M))
439436 then true
440- else !(D(toString(bu.caller))))
437+ else !(C(toString(bs.caller))))
441438 then throw("Invalid withdrawLocked params")
442439 else {
443- let bE = P(O)
444- let bI = invoke(I(), "withdraw", [toBase58String(H()), N(bE)], nil)
445- if ((bI == bI))
446- then {
447- let bL = al()
448- let bM = if ((bE > bL))
449- then $Tuple2(bL, (bE - bL))
450- else $Tuple2(bE, 0)
451- let bN = bM._1
452- let bO = bM._2
453- (((if ((bO > 0))
454- then {
455- let aE = aC(-(bO))
456- (aZ(-(bO)) ++ be(aE))
457- }
458- else nil) ++ ba(-(bN))) ++ [ScriptTransfer(bu.caller, N(bE), H())])
459- }
440+ let bC = N(M)
441+ let bG = invoke(G(), "withdraw", [toBase58String(F()), L(bC)], nil)
442+ if ((bG == bG))
443+ then (ba(-(bC)) ++ [ScriptTransfer(bs.caller, L(bC), F())])
460444 else throw("Strict value is not equal to itself.")
461445 }
462446
463447
464448
465-@Callable(bu)
466-func addRewards () = if (if ((bu.payments[0].assetId != F()))
449+@Callable(bs)
450+func addRewards () = if (if (if ((bs.payments[0].assetId != D()))
467451 then true
468- else !(at()))
452+ else (size(bs.payments) != 1))
453+ then true
454+ else !(ar()))
469455 then throw("Invalid addRewards params")
470456 else {
471- let bs = bu.payments[0].amount
472- let aO = aN(L, M)._1
473- let bP = av()
474- let bQ = if ((bP > ap()))
475- then (bs / K)
457+ let bq = bs.payments[0].amount
458+ let aN = aM(J, K)._1
459+ let bI = at()
460+ let bJ = if ((bI > an()))
461+ then (bq / I)
476462 else {
477- let bR = (ap() - bP)
478- let bS = (ao() * bR)
479- ((bs + bS) / K)
463+ let bK = (an() - bI)
464+ let bL = (am() * bK)
465+ ((bq + bL) / I)
480466 }
481- (((bk(bQ) ++ bp(aO)) ++ bi(bs)) ++ bm(bP, (bP + K)))
467+ (((bi(bJ) ++ bn(aN)) ++ bg(bq)) ++ bk(bI, (bI + I)))
482468 }
483469
484470
485471
486-@Callable(bu)
487-func view_reward (af) = {
488- let bb = ae(af)
489- let bT = T(ag(af), bb)
490- let bU = T(ad(), bb)
491- let bV = (bU - bT)
492- throw(toString(bV))
472+@Callable(bs)
473+func ackRewards () = {
474+ let bM = invoke(G(), "claimProfit", [toBase58String(F())], nil)
475+ if ((bM == bM))
476+ then {
477+ let bN = {
478+ let bO = bM
479+ if ($isInstanceOf(bO, "Int"))
480+ then {
481+ let bP = bO
482+ N(bP)
483+ }
484+ else throw("Invalid claimProfit response")
485+ }
486+ let bQ = if ((bN > 0))
487+ then {
488+ let aD = aB(bN)
489+ let bB = invoke(G(), "deposit", nil, [AttachedPayment(F(), L(bN))])
490+ if ((bB == bB))
491+ then (aY(bN) ++ bc(aD))
492+ else throw("Strict value is not equal to itself.")
493+ }
494+ else nil
495+ if ((bQ == bQ))
496+ then bQ
497+ else throw("Strict value is not equal to itself.")
498+ }
499+ else throw("Strict value is not equal to itself.")
493500 }
494501
495502
496503
497-@Callable(bu)
498-func view_stakingReward (af) = {
499- let aR = aN(af, 0)._3
500- throw(toString(N(aR)))
504+@Callable(bs)
505+func view_reward (ad) = {
506+ let aZ = ac(ad)
507+ let bR = R(ae(ad), aZ)
508+ let bS = R(ab(), aZ)
509+ let bT = (bS - bR)
510+ throw(toString(bT))
501511 }
502512
503513
504514
505-@Callable(bu)
506-func view_withdrawLimit (af) = {
507- let aB = aw(af)._2
508- let bW = N(T(aB, ad()))
509- throw(toString(bW))
515+@Callable(bs)
516+func view_stakingReward (ad) = {
517+ let aQ = aM(ad, 0)._3
518+ throw(toString(L(aQ)))
510519 }
511520
512521
513-@Verifier(bX)
514-func bY () = sigVerify(bX.bodyBytes, bX.proofs[0], E())
522+
523+@Callable(bs)
524+func view_withdrawLimit (ad) = {
525+ let az = au(ad)._2
526+ let bU = L(R(az, ab()))
527+ throw(toString(bU))
528+ }
529+
530+
531+@Verifier(bV)
532+func bW () = {
533+ let bX = getString(this, r)
534+ if (isDefined(bX))
535+ then {
536+ let bY = getString(addressFromStringValue(value(bX)), v)
537+ if (isDefined(bY))
538+ then valueOrElse(getBoolean(addressFromStringValue(value(bY)), ((("status_" + toString(this)) + "_") + toBase58String(bV.id))), false)
539+ else throw("unable to verify: admin not set in coordinator")
540+ }
541+ else sigVerify(bV.bodyBytes, bV.proofs[0], bV.senderPublicKey)
542+ }
515543

github/deemru/w8io/169f3d6 
206.44 ms