tx · 8pnLxhjMcNf41H6eTvyPad8DXmWSeiZQ74YU9T8BfN4 3N18bq33YEjzWkoTDhZvc7zd7eRAyv6x4aZ: -0.01400000 Waves 2021.03.07 17:15 [1427376] smart account 3N18bq33YEjzWkoTDhZvc7zd7eRAyv6x4aZ > SELF 0.00000000 Waves
{ "type": 13, "id": "8pnLxhjMcNf41H6eTvyPad8DXmWSeiZQ74YU9T8BfN4", "fee": 1400000, "feeAssetId": null, "timestamp": 1615126560720, "version": 1, "sender": "3N18bq33YEjzWkoTDhZvc7zd7eRAyv6x4aZ", "senderPublicKey": "71DfVUys2KXcuEivd6kRxABvVQKB5k5c48qobMB1DzKN", "proofs": [ "5ngcghcKdur275Z471iGx3DnLEfuRZE7D64Df4SfvTpAESpyYdq4QwEdJ1qQZM6TZsBifAwFVFpgWofHrXD8hyeN" ], "script": "base64:AAIEAAAAAAAAACAIAhIAEgMKAQESBAoCAQESABIECgIBARIAEgASAwoBAQAAAEYAAAAAB3ZlcnNpb24CAAAABTIuMC4wAAAAAAhrVmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAHa0FjdGl2ZQIAAAAGYWN0aXZlAAAAAAlrQXNzZXRJZEECAAAACkFfYXNzZXRfaWQAAAAACWtBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAAJa0JhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAACWtCYWxhbmNlQgIAAAAPQl9hc3NldF9iYWxhbmNlAAAAAA1rU2hhcmVBc3NldElkAgAAAA5zaGFyZV9hc3NldF9pZAAAAAARa1NoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAAEa0ZlZQIAAAAKY29tbWlzc2lvbgAAAAASa0ZlZVNjYWxlRGVsaW1pdGVyAgAAABpjb21taXNzaW9uX3NjYWxlX2RlbGltaXRlcgAAAAAKa0ludmFyaWFudAIAAAAJaW52YXJpYW50AAAAAAZrQ2F1c2UCAAAADnNodXRkb3duX2Nh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AAtzdHJBc3NldElkQQUAAAANYW1vdW50RW5yb2xsQQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAxsYXN0X2luY29tZV8FAAAAC3N0ckFzc2V0SWRCBQAAAA1hbW91bnRFbnJvbGxCBQAAAANuaWwAAAAAI5hSJA==", "chainId": 84, "height": 1427376, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EHuWJhNJqywfdmurbn6Amd65UE9ersDFBkJ2RjFRtKYe Next: 8ExFUYuQSXRfBcAZEn3dNrzLN9KPEhf57Ye7pXiKgwtc Diff:
Old | New | Differences | |
---|---|---|---|
285 | 285 | ||
286 | 286 | @Callable(i) | |
287 | 287 | func init () = { | |
288 | - | let $ | |
289 | - | let pmtAmountA = $ | |
290 | - | let pmtAssetIdA = $ | |
291 | - | let $ | |
292 | - | let pmtAmountB = $ | |
293 | - | let pmtAssetIdB = $ | |
294 | - | let $ | |
295 | - | let pmtStrAssetIdA = $ | |
296 | - | let pmtAssetNameA = $ | |
297 | - | let pmtDecimalsA = $ | |
298 | - | let $ | |
299 | - | let pmtStrAssetIdB = $ | |
300 | - | let pmtAssetNameB = $ | |
301 | - | let pmtDecimalsB = $ | |
288 | + | let $t084188495 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
289 | + | let pmtAmountA = $t084188495._1 | |
290 | + | let pmtAssetIdA = $t084188495._2 | |
291 | + | let $t085008577 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
292 | + | let pmtAmountB = $t085008577._1 | |
293 | + | let pmtAssetIdB = $t085008577._2 | |
294 | + | let $t085828659 = getAssetInfo(pmtAssetIdA) | |
295 | + | let pmtStrAssetIdA = $t085828659._1 | |
296 | + | let pmtAssetNameA = $t085828659._2 | |
297 | + | let pmtDecimalsA = $t085828659._3 | |
298 | + | let $t086648741 = getAssetInfo(pmtAssetIdB) | |
299 | + | let pmtStrAssetIdB = $t086648741._1 | |
300 | + | let pmtAssetNameB = $t086648741._2 | |
301 | + | let pmtDecimalsB = $t086648741._3 | |
302 | 302 | if (isDefined(getBoolean(this, kActive))) | |
303 | 303 | then throwIsActive() | |
304 | 304 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
355 | 355 | ||
356 | 356 | @Callable(i) | |
357 | 357 | func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = { | |
358 | - | let $ | |
359 | - | let pmtAmount = $ | |
360 | - | let pmtAssetId = $ | |
358 | + | let $t01295613031 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
359 | + | let pmtAmount = $t01295613031._1 | |
360 | + | let pmtAssetId = $t01295613031._2 | |
361 | 361 | let pmtMinThreshold = 5000000 | |
362 | 362 | let thresholdValueForMinTolerance = 50000000 | |
363 | 363 | let tolerance = if ((thresholdValueForMinTolerance > pmtAmount)) | |
380 | 380 | else false) | |
381 | 381 | then throwAssets() | |
382 | 382 | else { | |
383 | - | let $ | |
383 | + | let $t01403314798 = if ((pmtAssetId == assetIdA)) | |
384 | 384 | then $Tuple7((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), invariantCalc((balanceA + pmtAmount), balanceB), (balanceA + pmtAmount), balanceB) | |
385 | 385 | else $Tuple7(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), invariantCalc(balanceA, (balanceB + pmtAmount)), balanceA, (balanceB + pmtAmount)) | |
386 | - | let virtualReplenishA = $ | |
387 | - | let virtualReplenishB = $ | |
388 | - | let balanceAfterSwapA = $ | |
389 | - | let balanceAfterSwapB = $ | |
390 | - | let invariantCalculated = $ | |
391 | - | let newBalanceA = $ | |
392 | - | let newBalanceB = $ | |
386 | + | let virtualReplenishA = $t01403314798._1 | |
387 | + | let virtualReplenishB = $t01403314798._2 | |
388 | + | let balanceAfterSwapA = $t01403314798._3 | |
389 | + | let balanceAfterSwapB = $t01403314798._4 | |
390 | + | let invariantCalculated = $t01403314798._5 | |
391 | + | let newBalanceA = $t01403314798._6 | |
392 | + | let newBalanceB = $t01403314798._7 | |
393 | 393 | let newBalanceEntry = if ((pmtAssetId == assetIdA)) | |
394 | 394 | then IntegerEntry(kBalanceA, newBalanceA) | |
395 | 395 | else IntegerEntry(kBalanceB, newBalanceB) | |
413 | 413 | let ratioShareTokensInA = fraction(deductStakingFee(virtualReplenishA, assetIdA), scale8, balanceAfterSwapA) | |
414 | 414 | let ratioShareTokensInB = fraction(deductStakingFee(virtualReplenishB, assetIdB), scale8, balanceAfterSwapB) | |
415 | 415 | if (true) | |
416 | - | then throw( | |
416 | + | then throw(toString(stakingFeeInUSDN)) | |
417 | 417 | else { | |
418 | 418 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
419 | 419 | if (true) | |
428 | 428 | ||
429 | 429 | @Callable(i) | |
430 | 430 | func withdraw () = { | |
431 | - | let $ | |
432 | - | let pmtAmount = $ | |
433 | - | let pmtAssetId = $ | |
431 | + | let $t01747517618 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
432 | + | let pmtAmount = $t01747517618._1 | |
433 | + | let pmtAssetId = $t01747517618._2 | |
434 | 434 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
435 | 435 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
436 | 436 | let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB)) | |
453 | 453 | ||
454 | 454 | @Callable(i) | |
455 | 455 | func exchange (estimatedAmountToReceive,minAmountToReceive) = { | |
456 | - | let $ | |
457 | - | let pmtAmount = $ | |
458 | - | let pmtAssetId = $ | |
456 | + | let $t01890118976 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
457 | + | let pmtAmount = $t01890118976._1 | |
458 | + | let pmtAssetId = $t01890118976._2 | |
459 | 459 | if (!(isActive)) | |
460 | 460 | then throwIsInactive() | |
461 | 461 | else if ((0 >= estimatedAmountToReceive)) | |
483 | 483 | let amountWithoutFee = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId) | |
484 | 484 | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fee), feeScale6) | |
485 | 485 | let governanceReward = fraction(amountWithoutFee, feeGovernance, feeScale6) | |
486 | - | let $ | |
486 | + | let $t02035620617 = if ((pmtAssetId == assetIdA)) | |
487 | 487 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountWithFee) - governanceReward)) | |
488 | 488 | else $Tuple2(((balanceA - amountWithFee) - governanceReward), (balanceB + pmtAmount)) | |
489 | - | let newBalanceA = $ | |
490 | - | let newBalanceB = $ | |
489 | + | let newBalanceA = $t02035620617._1 | |
490 | + | let newBalanceB = $t02035620617._2 | |
491 | 491 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
492 | 492 | if (if ((dAppThresholdAmount > newBalanceA)) | |
493 | 493 | then true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "2.0.0" | |
5 | 5 | ||
6 | 6 | let kVersion = "version" | |
7 | 7 | ||
8 | 8 | let kActive = "active" | |
9 | 9 | ||
10 | 10 | let kAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let kAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let kBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let kBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let kShareAssetId = "share_asset_id" | |
19 | 19 | ||
20 | 20 | let kShareAssetSupply = "share_asset_supply" | |
21 | 21 | ||
22 | 22 | let kFee = "commission" | |
23 | 23 | ||
24 | 24 | let kFeeScaleDelimiter = "commission_scale_delimiter" | |
25 | 25 | ||
26 | 26 | let kInvariant = "invariant" | |
27 | 27 | ||
28 | 28 | let kCause = "shutdown_cause" | |
29 | 29 | ||
30 | 30 | let adm1 = base58'7FhFLst7Htn4uYxGH7xYMTAmbydLVoiZef3eFghi7CG4' | |
31 | 31 | ||
32 | 32 | let adm2 = base58'7FhFLst7Htn4uYxGH7xYMTAmbydLVoiZef3eFghi7CG4' | |
33 | 33 | ||
34 | 34 | let adm3 = base58'7FhFLst7Htn4uYxGH7xYMTAmbydLVoiZef3eFghi7CG4' | |
35 | 35 | ||
36 | 36 | let admStartStop = base58'7FhFLst7Htn4uYxGH7xYMTAmbydLVoiZef3eFghi7CG4' | |
37 | 37 | ||
38 | 38 | let admStaking = base58'7FhFLst7Htn4uYxGH7xYMTAmbydLVoiZef3eFghi7CG4' | |
39 | 39 | ||
40 | 40 | let govAddr = Address(base58'3MqhxbxHEMtp2Rwy1gUb6cPSJHQepdap1Yp') | |
41 | 41 | ||
42 | 42 | let stakingAddress = Address(base58'3MqhxbxHEMtp2Rwy1gUb6cPSJHQepdap1Yp') | |
43 | 43 | ||
44 | 44 | let USDN = base58'3FUNGbzfNsQ1AZfvumCUqARXvpjjLQrvCzorYuDryQAq' | |
45 | 45 | ||
46 | 46 | let stakingFeeInUSDN = (9 * value(value(assetInfo(USDN)).minSponsoredFee)) | |
47 | 47 | ||
48 | 48 | let isActive = getBooleanValue(this, kActive) | |
49 | 49 | ||
50 | 50 | let strAssetIdA = getStringValue(this, kAssetIdA) | |
51 | 51 | ||
52 | 52 | let strAssetIdB = getStringValue(this, kAssetIdB) | |
53 | 53 | ||
54 | 54 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
55 | 55 | then unit | |
56 | 56 | else fromBase58String(strAssetIdA) | |
57 | 57 | ||
58 | 58 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
59 | 59 | then unit | |
60 | 60 | else fromBase58String(strAssetIdB) | |
61 | 61 | ||
62 | 62 | let assetNameA = match assetIdA { | |
63 | 63 | case id: ByteVector => | |
64 | 64 | value(assetInfo(id)).name | |
65 | 65 | case waves: Unit => | |
66 | 66 | "WAVES" | |
67 | 67 | case _ => | |
68 | 68 | throw("Match error") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | let assetNameB = match assetIdB { | |
72 | 72 | case id: ByteVector => | |
73 | 73 | value(assetInfo(id)).name | |
74 | 74 | case waves: Unit => | |
75 | 75 | "WAVES" | |
76 | 76 | case _ => | |
77 | 77 | throw("Match error") | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | let balanceA = getIntegerValue(this, kBalanceA) | |
81 | 81 | ||
82 | 82 | let balanceB = getIntegerValue(this, kBalanceB) | |
83 | 83 | ||
84 | 84 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
85 | 85 | ||
86 | 86 | let shareAssetSupply = getIntegerValue(this, kShareAssetSupply) | |
87 | 87 | ||
88 | 88 | let invariant = getIntegerValue(this, kInvariant) | |
89 | 89 | ||
90 | 90 | let fee = 500 | |
91 | 91 | ||
92 | 92 | let feeGovernance = 200 | |
93 | 93 | ||
94 | 94 | let feeScale6 = 1000000 | |
95 | 95 | ||
96 | 96 | let scale3 = 1000 | |
97 | 97 | ||
98 | 98 | let scale8 = 100000000 | |
99 | 99 | ||
100 | 100 | let scale12 = 1000000000000 | |
101 | 101 | ||
102 | 102 | let slippageScale3 = 1000 | |
103 | 103 | ||
104 | 104 | let digits8 = 8 | |
105 | 105 | ||
106 | 106 | let dAppThreshold = 50 | |
107 | 107 | ||
108 | 108 | let dAppThresholdScale2 = 100 | |
109 | 109 | ||
110 | 110 | let exchangeRatioLimitMin = 90000000 | |
111 | 111 | ||
112 | 112 | let exchangeRatioLimitMax = 110000000 | |
113 | 113 | ||
114 | 114 | let alpha = 50 | |
115 | 115 | ||
116 | 116 | let alphaDigits = 2 | |
117 | 117 | ||
118 | 118 | let beta = 46000000 | |
119 | 119 | ||
120 | 120 | func accountBalance (assetId) = match assetId { | |
121 | 121 | case id: ByteVector => | |
122 | 122 | assetBalance(this, id) | |
123 | 123 | case waves: Unit => | |
124 | 124 | wavesBalance(this).available | |
125 | 125 | case _ => | |
126 | 126 | throw("Match error") | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | let stakedAmountUSDN = match getInteger(stakingAddress, ((("rpd_balance_" + toBase58String(USDN)) + "_") + toString(this))) { | |
131 | 131 | case staked: Int => | |
132 | 132 | staked | |
133 | 133 | case nothing: Unit => | |
134 | 134 | 0 | |
135 | 135 | case _ => | |
136 | 136 | throw("Match error") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | let availableBalanceA = (balanceA - (if ((assetIdA == USDN)) | |
140 | 140 | then stakedAmountUSDN | |
141 | 141 | else 0)) | |
142 | 142 | ||
143 | 143 | let availableBalanceB = (balanceB - (if ((assetIdB == USDN)) | |
144 | 144 | then stakedAmountUSDN | |
145 | 145 | else 0)) | |
146 | 146 | ||
147 | 147 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + (if ((assetIdA == USDN)) | |
148 | 148 | then stakedAmountUSDN | |
149 | 149 | else 0)) | |
150 | 150 | ||
151 | 151 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + (if ((assetIdB == USDN)) | |
152 | 152 | then stakedAmountUSDN | |
153 | 153 | else 0)) | |
154 | 154 | ||
155 | 155 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
156 | 156 | then (accountBalanceWithStakedB >= balanceB) | |
157 | 157 | else false | |
158 | 158 | ||
159 | 159 | func skewness (x,y) = (((fraction(scale12, x, y) + fraction(scale12, y, x)) / 2) / 10000) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func invariantCalc (x,y) = { | |
163 | 163 | let sk = skewness(x, y) | |
164 | 164 | (fraction((x + y), scale8, pow(sk, digits8, alpha, alphaDigits, digits8, UP)) + (2 * fraction(pow(fraction(x, y, scale8), 0, 5, 1, (digits8 / 2), DOWN), pow((sk - beta), digits8, alpha, alphaDigits, digits8, DOWN), scale8))) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func calculateSendAmount (amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount,tokenId) = { | |
169 | 169 | let slippageValue = (scale8 - ((scale8 * 1) / 10000000)) | |
170 | 170 | let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount) | |
171 | 171 | let x = (balanceA + tokenReceiveAmount) | |
172 | 172 | let y = (balanceB + tokenReceiveAmount) | |
173 | 173 | let invariantNew = if ((tokenId == assetIdA)) | |
174 | 174 | then invariantCalc(x, (balanceB - amountToSendEstimated)) | |
175 | 175 | else if ((tokenId == assetIdB)) | |
176 | 176 | then invariantCalc((balanceA - amountToSendEstimated), y) | |
177 | 177 | else throw("Wrong asset in payment") | |
178 | 178 | let invariantEstimatedRatio = fraction(scale8, invariant, invariantNew) | |
179 | 179 | func getStepAmount (acc,step) = if (true) | |
180 | 180 | then throw(((toString(acc) + " ") + toString(step))) | |
181 | 181 | else { | |
182 | 182 | let amountToSend = (amountToSendEstimated - ((step * deltaBetweenMaxAndMinSendValue) / 5)) | |
183 | 183 | let stepInvariant = if ((tokenId == assetIdA)) | |
184 | 184 | then invariantCalc(x, (balanceB - amountToSend)) | |
185 | 185 | else invariantCalc((balanceA - amountToSend), y) | |
186 | 186 | if (true) | |
187 | 187 | then amountToSend | |
188 | 188 | else acc | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | let stepAmount = { | |
192 | 192 | let $list56645707 = [1, 2, 3, 4, 5] | |
193 | 193 | let $size56645707 = size($list56645707) | |
194 | 194 | let $acc056645707 = -1 | |
195 | 195 | if (($size56645707 == 0)) | |
196 | 196 | then $acc056645707 | |
197 | 197 | else { | |
198 | 198 | let $acc156645707 = getStepAmount($acc056645707, $list56645707[0]) | |
199 | 199 | if (($size56645707 == 1)) | |
200 | 200 | then $acc156645707 | |
201 | 201 | else { | |
202 | 202 | let $acc256645707 = getStepAmount($acc156645707, $list56645707[1]) | |
203 | 203 | if (($size56645707 == 2)) | |
204 | 204 | then $acc256645707 | |
205 | 205 | else { | |
206 | 206 | let $acc356645707 = getStepAmount($acc256645707, $list56645707[2]) | |
207 | 207 | if (($size56645707 == 3)) | |
208 | 208 | then $acc356645707 | |
209 | 209 | else { | |
210 | 210 | let $acc456645707 = getStepAmount($acc356645707, $list56645707[3]) | |
211 | 211 | if (($size56645707 == 4)) | |
212 | 212 | then $acc456645707 | |
213 | 213 | else { | |
214 | 214 | let $acc556645707 = getStepAmount($acc456645707, $list56645707[4]) | |
215 | 215 | if (($size56645707 == 5)) | |
216 | 216 | then $acc556645707 | |
217 | 217 | else { | |
218 | 218 | let $acc656645707 = getStepAmount($acc556645707, $list56645707[5]) | |
219 | 219 | throw("List size exceed 5") | |
220 | 220 | } | |
221 | 221 | } | |
222 | 222 | } | |
223 | 223 | } | |
224 | 224 | } | |
225 | 225 | } | |
226 | 226 | } | |
227 | 227 | if ((0 > stepAmount)) | |
228 | 228 | then throw("something went wrong while working with amountToSend") | |
229 | 229 | else if (if ((invariantEstimatedRatio > slippageValue)) | |
230 | 230 | then (invariantNew > invariant) | |
231 | 231 | else false) | |
232 | 232 | then amountToSendEstimated | |
233 | 233 | else ((stepAmount * (feeScale6 - fee)) / feeScale6) | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func getAssetInfo (assetId) = match assetId { | |
238 | 238 | case id: ByteVector => | |
239 | 239 | let stringId = toBase58String(id) | |
240 | 240 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
241 | 241 | $Tuple3(stringId, info.name, info.decimals) | |
242 | 242 | case waves: Unit => | |
243 | 243 | $Tuple3("WAVES", "WAVES", 8) | |
244 | 244 | case _ => | |
245 | 245 | throw("Match error") | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func deductStakingFee (amount,assetId) = if ((assetId == USDN)) | |
253 | 253 | then { | |
254 | 254 | let result = (amount - stakingFeeInUSDN) | |
255 | 255 | if ((0 >= result)) | |
256 | 256 | then throw((((("Insufficient amount " + toString(amount)) + " to deduct staking fee ") + toString(stakingFeeInUSDN)) + " USD-N")) | |
257 | 257 | else result | |
258 | 258 | } | |
259 | 259 | else amount | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func throwIsActive () = throw("DApp is already active") | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func throwIsInactive () = throw("DApp is inactive at this moment") | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func throwOnlyAdmin () = throw("Only admin can call this function") | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func throwAssets () = throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | func throwThreshold (threshold,amountA,amountB) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(threshold)) + ": ") + toString(amountA)) + " ") + assetNameA) + ", ") + toString(amountB)) + " ") + assetNameB)) | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | func throwInsufficientAvailableBalance (amount,available,assetName) = throw((((((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking. Available: ") + toString(available)) + " ") + assetName) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func throwInsufficientAvailableBalances (amountA,amountB) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(amountA)) + " ") + assetNameA) + " and ") + toString(amountB)) + " ") + assetNameB) + " due to staking. Available: ") + toString(availableBalanceA)) + " ") + assetNameA) + " and ") + toString(availableBalanceB)) + " ") + assetNameB) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Callable(i) | |
287 | 287 | func init () = { | |
288 | - | let $ | |
289 | - | let pmtAmountA = $ | |
290 | - | let pmtAssetIdA = $ | |
291 | - | let $ | |
292 | - | let pmtAmountB = $ | |
293 | - | let pmtAssetIdB = $ | |
294 | - | let $ | |
295 | - | let pmtStrAssetIdA = $ | |
296 | - | let pmtAssetNameA = $ | |
297 | - | let pmtDecimalsA = $ | |
298 | - | let $ | |
299 | - | let pmtStrAssetIdB = $ | |
300 | - | let pmtAssetNameB = $ | |
301 | - | let pmtDecimalsB = $ | |
288 | + | let $t084188495 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
289 | + | let pmtAmountA = $t084188495._1 | |
290 | + | let pmtAssetIdA = $t084188495._2 | |
291 | + | let $t085008577 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
292 | + | let pmtAmountB = $t085008577._1 | |
293 | + | let pmtAssetIdB = $t085008577._2 | |
294 | + | let $t085828659 = getAssetInfo(pmtAssetIdA) | |
295 | + | let pmtStrAssetIdA = $t085828659._1 | |
296 | + | let pmtAssetNameA = $t085828659._2 | |
297 | + | let pmtDecimalsA = $t085828659._3 | |
298 | + | let $t086648741 = getAssetInfo(pmtAssetIdB) | |
299 | + | let pmtStrAssetIdB = $t086648741._1 | |
300 | + | let pmtAssetNameB = $t086648741._2 | |
301 | + | let pmtDecimalsB = $t086648741._3 | |
302 | 302 | if (isDefined(getBoolean(this, kActive))) | |
303 | 303 | then throwIsActive() | |
304 | 304 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
305 | 305 | then throw("Assets must be different") | |
306 | 306 | else { | |
307 | 307 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
308 | 308 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
309 | 309 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
310 | 310 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
311 | 311 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
312 | 312 | let shareIssueId = calculateAssetId(shareIssue) | |
313 | 313 | let invariantCalculated = invariantCalc(pmtAmountA, pmtAmountB) | |
314 | 314 | [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, fee), IntegerEntry(kFeeScaleDelimiter, feeScale6), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
315 | 315 | } | |
316 | 316 | } | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | ||
320 | 320 | @Callable(i) | |
321 | 321 | func replenishWithTwoTokens (slippageTolerance) = { | |
322 | 322 | let pmtAssetIdA = i.payments[0].assetId | |
323 | 323 | let pmtAssetIdB = i.payments[1].assetId | |
324 | 324 | let pmtAmountA = deductStakingFee(i.payments[0].amount, pmtAssetIdA) | |
325 | 325 | let pmtAmountB = deductStakingFee(i.payments[1].amount, pmtAssetIdB) | |
326 | 326 | let tokenRatio = fraction(fraction(scale8, balanceA, pmtAmountA), scale3, fraction(scale8, balanceB, pmtAmountB)) | |
327 | 327 | let ratioShareTokensInA = fraction(scale8, pmtAmountA, balanceA) | |
328 | 328 | let ratioShareTokensInB = fraction(scale8, pmtAmountB, balanceB) | |
329 | 329 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
330 | 330 | let invariantCalculated = invariantCalc((balanceA + pmtAmountA), (balanceB + pmtAmountB)) | |
331 | 331 | if (!(isActive)) | |
332 | 332 | then throwIsInactive() | |
333 | 333 | else if (if ((0 > slippageTolerance)) | |
334 | 334 | then true | |
335 | 335 | else (slippageTolerance > 10)) | |
336 | 336 | then throw("Slippage tolerance must be <= 1%") | |
337 | 337 | else if ((size(i.payments) != 2)) | |
338 | 338 | then throw("Two attached assets expected") | |
339 | 339 | else if (if ((pmtAssetIdA != assetIdA)) | |
340 | 340 | then true | |
341 | 341 | else (pmtAssetIdB != assetIdB)) | |
342 | 342 | then throwAssets() | |
343 | 343 | else if (if ((((scale3 * (slippageScale3 - slippageTolerance)) / slippageScale3) > tokenRatio)) | |
344 | 344 | then true | |
345 | 345 | else (tokenRatio > ((scale3 * (slippageScale3 + slippageTolerance)) / slippageScale3))) | |
346 | 346 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
347 | 347 | else if ((shareTokenToPayAmount == 0)) | |
348 | 348 | then throw("Too small amount to replenish") | |
349 | 349 | else if (!(hasEnoughBalance)) | |
350 | 350 | then suspendSuspicious() | |
351 | 351 | else [IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), IntegerEntry(kInvariant, invariantCalculated), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
352 | 352 | } | |
353 | 353 | ||
354 | 354 | ||
355 | 355 | ||
356 | 356 | @Callable(i) | |
357 | 357 | func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = { | |
358 | - | let $ | |
359 | - | let pmtAmount = $ | |
360 | - | let pmtAssetId = $ | |
358 | + | let $t01295613031 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
359 | + | let pmtAmount = $t01295613031._1 | |
360 | + | let pmtAssetId = $t01295613031._2 | |
361 | 361 | let pmtMinThreshold = 5000000 | |
362 | 362 | let thresholdValueForMinTolerance = 50000000 | |
363 | 363 | let tolerance = if ((thresholdValueForMinTolerance > pmtAmount)) | |
364 | 364 | then 100000 | |
365 | 365 | else 1 | |
366 | 366 | let slippageValueMinForReplenish = (scale8 - ((scale8 * tolerance) / 10000000)) | |
367 | 367 | let slippageValueMaxForReplenish = (scale8 + ((scale8 * tolerance) / 10000000)) | |
368 | 368 | let slippageValueMinForSwap = (scale8 - ((scale8 * 1) / 10000000)) | |
369 | 369 | let slippageValueMaxForSwap = (scale8 + ((scale8 * 1) / 10000000)) | |
370 | 370 | if (!(isActive)) | |
371 | 371 | then throwIsInactive() | |
372 | 372 | else if ((pmtMinThreshold > pmtAmount)) | |
373 | 373 | then throw((((("Payment amount " + toString(pmtAmount)) + " does not exceed the minimum amount of ") + toString(pmtMinThreshold)) + " tokens")) | |
374 | 374 | else if ((size(i.payments) != 1)) | |
375 | 375 | then throw("One attached payment expected") | |
376 | 376 | else if (!(hasEnoughBalance)) | |
377 | 377 | then suspendSuspicious() | |
378 | 378 | else if (if ((pmtAssetId != assetIdA)) | |
379 | 379 | then (pmtAssetId != assetIdB) | |
380 | 380 | else false) | |
381 | 381 | then throwAssets() | |
382 | 382 | else { | |
383 | - | let $ | |
383 | + | let $t01403314798 = if ((pmtAssetId == assetIdA)) | |
384 | 384 | then $Tuple7((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), invariantCalc((balanceA + pmtAmount), balanceB), (balanceA + pmtAmount), balanceB) | |
385 | 385 | else $Tuple7(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), invariantCalc(balanceA, (balanceB + pmtAmount)), balanceA, (balanceB + pmtAmount)) | |
386 | - | let virtualReplenishA = $ | |
387 | - | let virtualReplenishB = $ | |
388 | - | let balanceAfterSwapA = $ | |
389 | - | let balanceAfterSwapB = $ | |
390 | - | let invariantCalculated = $ | |
391 | - | let newBalanceA = $ | |
392 | - | let newBalanceB = $ | |
386 | + | let virtualReplenishA = $t01403314798._1 | |
387 | + | let virtualReplenishB = $t01403314798._2 | |
388 | + | let balanceAfterSwapA = $t01403314798._3 | |
389 | + | let balanceAfterSwapB = $t01403314798._4 | |
390 | + | let invariantCalculated = $t01403314798._5 | |
391 | + | let newBalanceA = $t01403314798._6 | |
392 | + | let newBalanceB = $t01403314798._7 | |
393 | 393 | let newBalanceEntry = if ((pmtAssetId == assetIdA)) | |
394 | 394 | then IntegerEntry(kBalanceA, newBalanceA) | |
395 | 395 | else IntegerEntry(kBalanceB, newBalanceB) | |
396 | 396 | let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB) | |
397 | 397 | let invariantEstimatedRatio = fraction(scale8, invariant, invariantNew) | |
398 | 398 | let ratioVirtualBalanceToVirtualReplenish = (fraction((scale8 * scale8), balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB)) | |
399 | 399 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
400 | 400 | if (if ((slippageValueMinForSwap >= invariantEstimatedRatio)) | |
401 | 401 | then true | |
402 | 402 | else (invariant > invariantNew)) | |
403 | 403 | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
404 | 404 | else if (if ((slippageValueMinForReplenish > ratioVirtualBalanceToVirtualReplenish)) | |
405 | 405 | then true | |
406 | 406 | else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish)) | |
407 | 407 | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
408 | 408 | else if (if ((dAppThresholdAmount > newBalanceA)) | |
409 | 409 | then true | |
410 | 410 | else (dAppThresholdAmount > newBalanceB)) | |
411 | 411 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
412 | 412 | else { | |
413 | 413 | let ratioShareTokensInA = fraction(deductStakingFee(virtualReplenishA, assetIdA), scale8, balanceAfterSwapA) | |
414 | 414 | let ratioShareTokensInB = fraction(deductStakingFee(virtualReplenishB, assetIdB), scale8, balanceAfterSwapB) | |
415 | 415 | if (true) | |
416 | - | then throw( | |
416 | + | then throw(toString(stakingFeeInUSDN)) | |
417 | 417 | else { | |
418 | 418 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
419 | 419 | if (true) | |
420 | 420 | then throw(toString(shareTokenToPayAmount)) | |
421 | 421 | else [Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), newBalanceEntry, IntegerEntry(kInvariant, invariantCalculated)] | |
422 | 422 | } | |
423 | 423 | } | |
424 | 424 | } | |
425 | 425 | } | |
426 | 426 | ||
427 | 427 | ||
428 | 428 | ||
429 | 429 | @Callable(i) | |
430 | 430 | func withdraw () = { | |
431 | - | let $ | |
432 | - | let pmtAmount = $ | |
433 | - | let pmtAssetId = $ | |
431 | + | let $t01747517618 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
432 | + | let pmtAmount = $t01747517618._1 | |
433 | + | let pmtAssetId = $t01747517618._2 | |
434 | 434 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
435 | 435 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
436 | 436 | let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB)) | |
437 | 437 | if (!(isActive)) | |
438 | 438 | then throwIsInactive() | |
439 | 439 | else if ((size(i.payments) != 1)) | |
440 | 440 | then throw("One attached payment expected") | |
441 | 441 | else if ((pmtAssetId != shareAssetId)) | |
442 | 442 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
443 | 443 | else if (!(hasEnoughBalance)) | |
444 | 444 | then suspendSuspicious() | |
445 | 445 | else if (if ((amountToPayA > availableBalanceA)) | |
446 | 446 | then true | |
447 | 447 | else (amountToPayB > availableBalanceB)) | |
448 | 448 | then throwInsufficientAvailableBalances(amountToPayA, amountToPayB) | |
449 | 449 | else [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - pmtAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
450 | 450 | } | |
451 | 451 | ||
452 | 452 | ||
453 | 453 | ||
454 | 454 | @Callable(i) | |
455 | 455 | func exchange (estimatedAmountToReceive,minAmountToReceive) = { | |
456 | - | let $ | |
457 | - | let pmtAmount = $ | |
458 | - | let pmtAssetId = $ | |
456 | + | let $t01890118976 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
457 | + | let pmtAmount = $t01890118976._1 | |
458 | + | let pmtAssetId = $t01890118976._2 | |
459 | 459 | if (!(isActive)) | |
460 | 460 | then throwIsInactive() | |
461 | 461 | else if ((0 >= estimatedAmountToReceive)) | |
462 | 462 | then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive))) | |
463 | 463 | else if ((minAmountToReceive > estimatedAmountToReceive)) | |
464 | 464 | then throw(((("Minimal amount can't be greater than estimated. Estimated: " + toString(estimatedAmountToReceive)) + ". Minimal: ") + toString(minAmountToReceive))) | |
465 | 465 | else if ((size(i.payments) != 1)) | |
466 | 466 | then throw("One attached payment expected") | |
467 | 467 | else if (!(hasEnoughBalance)) | |
468 | 468 | then suspendSuspicious() | |
469 | 469 | else if (if ((pmtAssetId != assetIdA)) | |
470 | 470 | then (pmtAssetId != assetIdB) | |
471 | 471 | else false) | |
472 | 472 | then throwAssets() | |
473 | 473 | else if ((10000000 > pmtAmount)) | |
474 | 474 | then throw("Only swap of 10.000000 or more tokens is allowed") | |
475 | 475 | else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount))) | |
476 | 476 | then true | |
477 | 477 | else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax)) | |
478 | 478 | then throw("Incorrect args and pmt ratio") | |
479 | 479 | else { | |
480 | 480 | let sendAssetId = if ((pmtAssetId == assetIdA)) | |
481 | 481 | then assetIdB | |
482 | 482 | else assetIdA | |
483 | 483 | let amountWithoutFee = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId) | |
484 | 484 | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fee), feeScale6) | |
485 | 485 | let governanceReward = fraction(amountWithoutFee, feeGovernance, feeScale6) | |
486 | - | let $ | |
486 | + | let $t02035620617 = if ((pmtAssetId == assetIdA)) | |
487 | 487 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountWithFee) - governanceReward)) | |
488 | 488 | else $Tuple2(((balanceA - amountWithFee) - governanceReward), (balanceB + pmtAmount)) | |
489 | - | let newBalanceA = $ | |
490 | - | let newBalanceB = $ | |
489 | + | let newBalanceA = $t02035620617._1 | |
490 | + | let newBalanceB = $t02035620617._2 | |
491 | 491 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
492 | 492 | if (if ((dAppThresholdAmount > newBalanceA)) | |
493 | 493 | then true | |
494 | 494 | else (dAppThresholdAmount > newBalanceB)) | |
495 | 495 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
496 | 496 | else if (if (if ((assetIdA == USDN)) | |
497 | 497 | then (sendAssetId == assetIdA) | |
498 | 498 | else false) | |
499 | 499 | then (stakedAmountUSDN >= newBalanceA) | |
500 | 500 | else false) | |
501 | 501 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA) | |
502 | 502 | else if (if (if ((assetIdB == USDN)) | |
503 | 503 | then (sendAssetId == assetIdB) | |
504 | 504 | else false) | |
505 | 505 | then (stakedAmountUSDN >= newBalanceB) | |
506 | 506 | else false) | |
507 | 507 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB) | |
508 | 508 | else [IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountWithFee, sendAssetId), ScriptTransfer(govAddr, governanceReward, sendAssetId)] | |
509 | 509 | } | |
510 | 510 | } | |
511 | 511 | ||
512 | 512 | ||
513 | 513 | ||
514 | 514 | @Callable(i) | |
515 | 515 | func shutdown () = if (!(isActive)) | |
516 | 516 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
517 | 517 | else if (!(containsElement([adm1, adm2, adm3, admStartStop], i.callerPublicKey))) | |
518 | 518 | then throwOnlyAdmin() | |
519 | 519 | else suspend("Paused by admin") | |
520 | 520 | ||
521 | 521 | ||
522 | 522 | ||
523 | 523 | @Callable(i) | |
524 | 524 | func activate () = if (isActive) | |
525 | 525 | then throwIsActive() | |
526 | 526 | else if (!(containsElement([adm1, adm2, adm3, admStartStop], i.callerPublicKey))) | |
527 | 527 | then throwOnlyAdmin() | |
528 | 528 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)] | |
529 | 529 | ||
530 | 530 | ||
531 | 531 | ||
532 | 532 | @Callable(i) | |
533 | 533 | func takeIntoAccountExtraFunds (amountLeave) = { | |
534 | 534 | let uncountableA = (accountBalanceWithStakedA - balanceA) | |
535 | 535 | let uncountableB = (accountBalanceWithStakedB - balanceB) | |
536 | 536 | let amountEnrollA = (uncountableA - (if ((assetIdA == USDN)) | |
537 | 537 | then amountLeave | |
538 | 538 | else 0)) | |
539 | 539 | let amountEnrollB = (uncountableB - (if ((assetIdB == USDN)) | |
540 | 540 | then amountLeave | |
541 | 541 | else 0)) | |
542 | 542 | if (!(isActive)) | |
543 | 543 | then throwIsInactive() | |
544 | 544 | else if ((i.caller != this)) | |
545 | 545 | then throwOnlyAdmin() | |
546 | 546 | else if ((0 > amountLeave)) | |
547 | 547 | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
548 | 548 | else if (if ((0 > uncountableA)) | |
549 | 549 | then true | |
550 | 550 | else (0 > uncountableB)) | |
551 | 551 | then suspend("Enroll amount negative") | |
552 | 552 | else if (if ((0 > amountEnrollA)) | |
553 | 553 | then true | |
554 | 554 | else (0 > amountEnrollB)) | |
555 | 555 | then throw("Too large amountLeave") | |
556 | 556 | else [IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
557 | 557 | } | |
558 | 558 | ||
559 | 559 |
github/deemru/w8io/026f985 69.15 ms ◑