tx · HKv9D6Ty4n47eNVE94NMe4NnCDJ18hrULmGgH7ZKmBQh 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW: -0.14000000 Waves 2022.06.09 10:21 [2088525] smart account 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW > SELF 0.00000000 Waves
{ "type": 13, "id": "HKv9D6Ty4n47eNVE94NMe4NnCDJ18hrULmGgH7ZKmBQh", "fee": 14000000, "feeAssetId": null, "timestamp": 1654759266800, "version": 2, "chainId": 84, "sender": "3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW", "senderPublicKey": "DfbjpZJBbZwnUKysUkxCbWTE1ZWuoUb6Y6BZdu5iAE8j", "proofs": [ "5HyuRh8Pbj1PfX58hC4VuLTfLVs8j7rCY1w2V5bjNKD4Jzyf7seMuF2LH4ZzYvSUFnStv8eqKUfArp8ZA2nn78Du", "2v6ZEgrNRAM7vX9KgNAhvNAYa5rfayrWbLcEPecr47N8oTHJGCzaKhyYHNpzRyK1VKGV3CAaBZQh4zykAPaRe99x" ], "script": "base64:AAIFAAAAAAAAEvgIAhIAEgASBAoCAQESABIECgIBARIAEgASABIFCgMEAQgSABoMCgFBEgckbWF0Y2gwGgsKAUISBnN0cmluZxoMCgFDEgdub3RoaW5nGhEKAUQSDGFkbWluUHViS2V5MRoRCgFFEgxhZG1pblB1YktleTIaEQoBRhIMYWRtaW5QdWJLZXkzGhYKAUcSEWFkbWluUHViS2V5SW52b2tlGhQKAUgSD21vbmV5Qm94QWRkcmVzcxoPCgFJEgpnb3ZBZGRyZXNzGhcKAUoSEnN0YWtpbmdVU0ROQWRkcmVzcxoJCgFLEgRVU0ROGhIKAUwSDXN0YWtpbmdBc3NldHMaCwoBTRIGYWN0aXZlGhAKAU4SC3N0ckFzc2V0SWRBGhAKAU8SC3N0ckFzc2V0SWRCGg0KAVASCGFzc2V0SWRBGg0KAVESCGFzc2V0SWRCGg8KAVISCmFzc2V0TmFtZUEaBwoBUxICaWQaCgoBVBIFd2F2Z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CQAAAAAAAAIIBQAAAAJkegAAAARkQXBwBQAAAAR0aGlzCQAAAAAAAAIIBQAAAAJkegAAAAhmdW5jdGlvbgIAAAAZdGFrZUludG9BY2NvdW50RXh0cmFGdW5kcwcEAAAAAmRIAwMDCQAB9AAAAAMIBQAAAAJkQQAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmRBAAAABnByb29mcwAAAAAAAAAAAAUAAAABRAYJAAH0AAAAAwgFAAAAAmRBAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACZEEAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAFFBgkAAfQAAAADCAUAAAACZEEAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJkQQAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAUYGCQAB9AAAAAMIBQAAAAJkQQAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmRBAAAABnByb29mcwAAAAAAAAAAAAUAAAABRwMDBQAAAAJkRwUAAAACZEgHBgUAAAACZEMFAAAAAmRD6mxZlg==", "height": 2088525, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HHTretVGkLmUGNcuYk3CNk53GFLEPycsdjonWAA4DDut Next: 7PZS4pQoYkoJJbda7TW5S7AfASibGiArTje36GH5sSHS Diff:
Old | New | Differences | |
---|---|---|---|
621 | 621 | let $t02436324479 = calcBalanceAndPmtRatio(balanceA, balanceB, minAmountToReceive, pmtAmount, pmtAssetId) | |
622 | 622 | let balanceRatio = $t02436324479._1 | |
623 | 623 | let pmtRatio = $t02436324479._2 | |
624 | - | if (( | |
624 | + | if (((exchangeRatioLimit - fraction(exchangeRatioLimitCoef, balanceRatio, scale8)) > pmtRatio)) | |
625 | 625 | then throw("Incorrect args and pmt ratio") | |
626 | 626 | else { | |
627 | 627 | let sendAssetId = if ((pmtAssetId == assetIdA)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
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 kInvariant = "invariant" | |
25 | 25 | ||
26 | 26 | let kCause = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let kUSDNAddress = "staking_usdnnsbt_address" | |
29 | 29 | ||
30 | 30 | let kEURNAddress = "staking_eurn_address" | |
31 | 31 | ||
32 | 32 | let kDiscounts = "discounts" | |
33 | 33 | ||
34 | 34 | let kDiscountValues = "discount_values" | |
35 | 35 | ||
36 | 36 | let kUserSwopInGov = "_SWOP_amount" | |
37 | 37 | ||
38 | 38 | let kAdminPubKey1 = "admin_pub_1" | |
39 | 39 | ||
40 | 40 | let kAdminPubKey2 = "admin_pub_2" | |
41 | 41 | ||
42 | 42 | let kAdminPubKey3 = "admin_pub_3" | |
43 | 43 | ||
44 | 44 | let kAdminInvokePubKey = "admin_invoke_pub" | |
45 | 45 | ||
46 | 46 | let kMoneyBoxAddress = "money_box_address" | |
47 | 47 | ||
48 | 48 | let kGovAddress = "governance_address" | |
49 | 49 | ||
50 | 50 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
51 | 51 | ||
52 | 52 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
53 | 53 | case string: String => | |
54 | 54 | fromBase58String(string) | |
55 | 55 | case nothing => | |
56 | 56 | throw((key + "is empty")) | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
61 | 61 | ||
62 | 62 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
63 | 63 | ||
64 | 64 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
65 | 65 | ||
66 | 66 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
67 | 67 | ||
68 | 68 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
69 | 69 | ||
70 | 70 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
71 | 71 | ||
72 | 72 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
73 | 73 | ||
74 | 74 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
75 | 75 | ||
76 | 76 | let stakingAssets = [toBase58String(USDN)] | |
77 | 77 | ||
78 | 78 | let active = getBooleanValue(this, kActive) | |
79 | 79 | ||
80 | 80 | let strAssetIdA = getStringValue(this, kAssetIdA) | |
81 | 81 | ||
82 | 82 | let strAssetIdB = getStringValue(this, kAssetIdB) | |
83 | 83 | ||
84 | 84 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
85 | 85 | then unit | |
86 | 86 | else fromBase58String(strAssetIdA) | |
87 | 87 | ||
88 | 88 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
89 | 89 | then unit | |
90 | 90 | else fromBase58String(strAssetIdB) | |
91 | 91 | ||
92 | 92 | let assetNameA = match assetIdA { | |
93 | 93 | case id: ByteVector => | |
94 | 94 | value(assetInfo(id)).name | |
95 | 95 | case waves: Unit => | |
96 | 96 | "WAVES" | |
97 | 97 | case _ => | |
98 | 98 | throw("Match error") | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | let assetNameB = match assetIdB { | |
102 | 102 | case id: ByteVector => | |
103 | 103 | value(assetInfo(id)).name | |
104 | 104 | case waves: Unit => | |
105 | 105 | "WAVES" | |
106 | 106 | case _ => | |
107 | 107 | throw("Match error") | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | let balanceA = getIntegerValue(this, kBalanceA) | |
111 | 111 | ||
112 | 112 | let balanceB = getIntegerValue(this, kBalanceB) | |
113 | 113 | ||
114 | 114 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
115 | 115 | ||
116 | 116 | let shareAssetSupply = getIntegerValue(this, kShareAssetSupply) | |
117 | 117 | ||
118 | 118 | let invariant = getIntegerValue(this, kInvariant) | |
119 | 119 | ||
120 | 120 | let fee = getIntegerValue(this, kFee) | |
121 | 121 | ||
122 | 122 | let feeGovernance = fraction(fee, 40, 100) | |
123 | 123 | ||
124 | 124 | let feeScale6 = 1000000 | |
125 | 125 | ||
126 | 126 | let scale3 = 1000 | |
127 | 127 | ||
128 | 128 | let scale8 = 100000000 | |
129 | 129 | ||
130 | 130 | let scale16 = 10000000000000000 | |
131 | 131 | ||
132 | 132 | let slippageScale3 = 1000 | |
133 | 133 | ||
134 | 134 | let digits8 = 8 | |
135 | 135 | ||
136 | 136 | let dAppThreshold = 125 | |
137 | 137 | ||
138 | 138 | let dAppThresholdScale2 = 1000 | |
139 | 139 | ||
140 | 140 | let exchangeRatioLimitCoef = 2500000 | |
141 | 141 | ||
142 | 142 | let exchangeRatioLimit = 93500000 | |
143 | 143 | ||
144 | 144 | let alpha = 50 | |
145 | 145 | ||
146 | 146 | let alphaDigits = 2 | |
147 | 147 | ||
148 | 148 | let beta = 4600000000000000 | |
149 | 149 | ||
150 | 150 | func accountBalance (assetId) = match assetId { | |
151 | 151 | case id: ByteVector => | |
152 | 152 | assetBalance(this, id) | |
153 | 153 | case waves: Unit => | |
154 | 154 | wavesBalance(this).available | |
155 | 155 | case _ => | |
156 | 156 | throw("Match error") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func stakedAmount (assetId) = { | |
161 | 161 | let stakedAmountCalculated = match assetId { | |
162 | 162 | case aId: ByteVector => | |
163 | 163 | if ((aId == USDN)) | |
164 | 164 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
165 | 165 | else 0 | |
166 | 166 | case _: Unit => | |
167 | 167 | 0 | |
168 | 168 | case _ => | |
169 | 169 | throw("Match error") | |
170 | 170 | } | |
171 | 171 | match stakedAmountCalculated { | |
172 | 172 | case i: Int => | |
173 | 173 | i | |
174 | 174 | case _ => | |
175 | 175 | 0 | |
176 | 176 | } | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | let stakedAmountA = stakedAmount(assetIdA) | |
181 | 181 | ||
182 | 182 | let stakedAmountB = stakedAmount(assetIdB) | |
183 | 183 | ||
184 | 184 | let availableBalanceA = (balanceA - stakedAmountA) | |
185 | 185 | ||
186 | 186 | let availableBalanceB = (balanceB - stakedAmountB) | |
187 | 187 | ||
188 | 188 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
189 | 189 | ||
190 | 190 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
191 | 191 | ||
192 | 192 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
193 | 193 | then (accountBalanceWithStakedB >= balanceB) | |
194 | 194 | else false | |
195 | 195 | ||
196 | 196 | func skewness (x,y) = ((fraction(scale16, x, y) + fraction(scale16, y, x)) / 2) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func invariantCalc (x,y) = { | |
200 | 200 | let sk = skewness(x, y) | |
201 | 201 | (fraction((x + y), scale16, pow(sk, digits8, alpha, alphaDigits, digits8, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(x), toBigInt(y), toBigInt(scale8)), 0, toBigInt(5), 1, (digits8 / 2), DOWN)), pow((sk - beta), digits8, alpha, alphaDigits, digits8, DOWN), scale8))) | |
202 | 202 | } | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func calculateSendAmount (amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount,tokenId) = { | |
206 | 206 | let worstAllowedNewInvariantRatio = (scale16 - ((scale16 * 1) / 10000000)) | |
207 | 207 | let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount) | |
208 | 208 | let x = (balanceA + tokenReceiveAmount) | |
209 | 209 | let y = (balanceB + tokenReceiveAmount) | |
210 | 210 | func getStepAmount (acc,step) = if ((acc._1 == -1)) | |
211 | 211 | then { | |
212 | 212 | let amountToSend = (amountToSendEstimated - (((step * deltaBetweenMaxAndMinSendValue) / 3) / scale3)) | |
213 | 213 | let stepInvariant = if ((tokenId == assetIdA)) | |
214 | 214 | then invariantCalc(x, (balanceB - amountToSend)) | |
215 | 215 | else invariantCalc((balanceA - amountToSend), y) | |
216 | 216 | if ((stepInvariant > invariant)) | |
217 | 217 | then $Tuple2(amountToSend, stepInvariant) | |
218 | 218 | else $Tuple2(-1, 0) | |
219 | 219 | } | |
220 | 220 | else acc | |
221 | 221 | ||
222 | 222 | let amountToSendMin = getStepAmount($Tuple2(-1, 0), 3000) | |
223 | 223 | if ((0 > amountToSendMin._1)) | |
224 | 224 | then throw("Price is worse than minReceived") | |
225 | 225 | else { | |
226 | 226 | let invEstimated = if ((tokenId == assetIdA)) | |
227 | 227 | then invariantCalc(x, (balanceB - amountToSendEstimated)) | |
228 | 228 | else if ((tokenId == assetIdB)) | |
229 | 229 | then invariantCalc((balanceA - amountToSendEstimated), y) | |
230 | 230 | else throw("Wrong asset in payment") | |
231 | 231 | if ((invariant > invEstimated)) | |
232 | 232 | then if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, invEstimated))) | |
233 | 233 | then throw("The requested price is too not profitable for user") | |
234 | 234 | else { | |
235 | 235 | let a = { | |
236 | 236 | let $l = [25, 200, 500] | |
237 | 237 | let $s = size($l) | |
238 | 238 | let $acc0 = $Tuple2(-1, 0) | |
239 | 239 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
240 | 240 | then $a | |
241 | 241 | else getStepAmount($a, $l[$i]) | |
242 | 242 | ||
243 | 243 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
244 | 244 | then $a | |
245 | 245 | else throw("List size exceeds 3") | |
246 | 246 | ||
247 | 247 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
248 | 248 | } | |
249 | 249 | if ((0 > a._1)) | |
250 | 250 | then amountToSendMin._1 | |
251 | 251 | else a._1 | |
252 | 252 | } | |
253 | 253 | else { | |
254 | 254 | let a = { | |
255 | 255 | let $l = [-500, -200, -25] | |
256 | 256 | let $s = size($l) | |
257 | 257 | let $acc0 = $Tuple2(-1, 0) | |
258 | 258 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
259 | 259 | then $a | |
260 | 260 | else getStepAmount($a, $l[$i]) | |
261 | 261 | ||
262 | 262 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
263 | 263 | then $a | |
264 | 264 | else throw("List size exceeds 3") | |
265 | 265 | ||
266 | 266 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
267 | 267 | } | |
268 | 268 | let tupleSendBetter = if ((0 > a._1)) | |
269 | 269 | then $Tuple2(amountToSendEstimated, invEstimated) | |
270 | 270 | else a | |
271 | 271 | if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, tupleSendBetter._2))) | |
272 | 272 | then throw("The requested price is too not profitable for user") | |
273 | 273 | else tupleSendBetter._1 | |
274 | 274 | } | |
275 | 275 | } | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func getAssetInfo (assetId) = match assetId { | |
280 | 280 | case id: ByteVector => | |
281 | 281 | let stringId = toBase58String(id) | |
282 | 282 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
283 | 283 | $Tuple3(stringId, info.name, info.decimals) | |
284 | 284 | case waves: Unit => | |
285 | 285 | $Tuple3("WAVES", "WAVES", 8) | |
286 | 286 | case _ => | |
287 | 287 | throw("Match error") | |
288 | 288 | } | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func throwIsActive () = throw("DApp is already active") | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | func isActive () = if (active) | |
298 | 298 | then unit | |
299 | 299 | else throw("DApp is inactive at this moment") | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
303 | 303 | then unit | |
304 | 304 | else throw("Only admin can call this function") | |
305 | 305 | ||
306 | 306 | ||
307 | 307 | func throwAssets () = throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | func throwOnePayment () = throw("One attached payment expected") | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
314 | 314 | ||
315 | 315 | ||
316 | 316 | 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)) | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
320 | 320 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
321 | 321 | else $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
325 | 325 | then { | |
326 | 326 | let $t093629428 = calcStakingFuncAndAddres(stake, assetId) | |
327 | 327 | let call = $t093629428._1 | |
328 | 328 | let stakingAddr = $t093629428._2 | |
329 | 329 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
330 | 330 | } | |
331 | 331 | else { | |
332 | 332 | let $t095149580 = calcStakingFuncAndAddres(stake, assetId) | |
333 | 333 | let call = $t095149580._1 | |
334 | 334 | let stakingAddr = $t095149580._2 | |
335 | 335 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
336 | 336 | } | |
337 | 337 | ||
338 | 338 | ||
339 | 339 | func calculateFeeDiscount (userAddr) = { | |
340 | 340 | let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0) | |
341 | 341 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
342 | 342 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
343 | 343 | if (if ((swopAmount >= parseIntValue(discountValues[0]))) | |
344 | 344 | then (parseIntValue(discountValues[1]) > swopAmount) | |
345 | 345 | else false) | |
346 | 346 | then (feeScale6 - parseIntValue(discounts[0])) | |
347 | 347 | else if (if ((swopAmount >= parseIntValue(discountValues[1]))) | |
348 | 348 | then (parseIntValue(discountValues[2]) > swopAmount) | |
349 | 349 | else false) | |
350 | 350 | then (feeScale6 - parseIntValue(discounts[1])) | |
351 | 351 | else if (if ((swopAmount >= parseIntValue(discountValues[2]))) | |
352 | 352 | then (parseIntValue(discountValues[3]) > swopAmount) | |
353 | 353 | else false) | |
354 | 354 | then (feeScale6 - parseIntValue(discounts[2])) | |
355 | 355 | else if (if ((swopAmount >= parseIntValue(discountValues[3]))) | |
356 | 356 | then (parseIntValue(discountValues[4]) > swopAmount) | |
357 | 357 | else false) | |
358 | 358 | then (feeScale6 - parseIntValue(discounts[3])) | |
359 | 359 | else if ((swopAmount >= parseIntValue(discountValues[4]))) | |
360 | 360 | then (feeScale6 - parseIntValue(discounts[4])) | |
361 | 361 | else feeScale6 | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | ||
365 | 365 | func calcBalanceAndPmtRatio (ABalance,BBalance,minAmountToReceive,pmtAmount,pmtAssetId) = if ((balanceA > balanceB)) | |
366 | 366 | then { | |
367 | 367 | let ratio = fraction(scale8, balanceA, balanceB) | |
368 | 368 | let pratio = if ((pmtAssetId == assetIdA)) | |
369 | 369 | then fraction(scale8, minAmountToReceive, pmtAmount) | |
370 | 370 | else fraction(scale8, pmtAmount, minAmountToReceive) | |
371 | 371 | $Tuple2(ratio, pratio) | |
372 | 372 | } | |
373 | 373 | else { | |
374 | 374 | let ratio = fraction(scale8, balanceB, balanceA) | |
375 | 375 | let pratio = if ((pmtAssetId == assetIdA)) | |
376 | 376 | then fraction(scale8, pmtAmount, minAmountToReceive) | |
377 | 377 | else fraction(scale8, minAmountToReceive, pmtAmount) | |
378 | 378 | $Tuple2(ratio, pratio) | |
379 | 379 | } | |
380 | 380 | ||
381 | 381 | ||
382 | 382 | @Callable(i) | |
383 | 383 | func init () = { | |
384 | 384 | let $t01149811575 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
385 | 385 | let pmtAmountA = $t01149811575._1 | |
386 | 386 | let pmtAssetIdA = $t01149811575._2 | |
387 | 387 | let $t01158011657 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
388 | 388 | let pmtAmountB = $t01158011657._1 | |
389 | 389 | let pmtAssetIdB = $t01158011657._2 | |
390 | 390 | let $t01166211739 = getAssetInfo(pmtAssetIdA) | |
391 | 391 | let pmtStrAssetIdA = $t01166211739._1 | |
392 | 392 | let pmtAssetNameA = $t01166211739._2 | |
393 | 393 | let pmtDecimalsA = $t01166211739._3 | |
394 | 394 | let $t01174411821 = getAssetInfo(pmtAssetIdB) | |
395 | 395 | let pmtStrAssetIdB = $t01174411821._1 | |
396 | 396 | let pmtAssetNameB = $t01174411821._2 | |
397 | 397 | let pmtDecimalsB = $t01174411821._3 | |
398 | 398 | if (isDefined(getBoolean(this, kActive))) | |
399 | 399 | then throwIsActive() | |
400 | 400 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
401 | 401 | then throw("Assets must be different") | |
402 | 402 | else { | |
403 | 403 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
404 | 404 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
405 | 405 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
406 | 406 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
407 | 407 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
408 | 408 | let shareIssueId = calculateAssetId(shareIssue) | |
409 | 409 | let invariantCalculated = invariantCalc(pmtAmountA, pmtAmountB) | |
410 | 410 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
411 | 411 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
412 | 412 | else 0 | |
413 | 413 | if ((stake1 == stake1)) | |
414 | 414 | then { | |
415 | 415 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
416 | 416 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
417 | 417 | else 0 | |
418 | 418 | if ((stake2 == stake2)) | |
419 | 419 | then [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
420 | 420 | else throw("Strict value is not equal to itself.") | |
421 | 421 | } | |
422 | 422 | else throw("Strict value is not equal to itself.") | |
423 | 423 | } | |
424 | 424 | } | |
425 | 425 | ||
426 | 426 | ||
427 | 427 | ||
428 | 428 | @Callable(i) | |
429 | 429 | func replenishWithTwoTokens () = valueOrElse(isActive(), { | |
430 | 430 | let pmtAssetIdA = i.payments[0].assetId | |
431 | 431 | let pmtAssetIdB = i.payments[1].assetId | |
432 | 432 | let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA) | |
433 | 433 | let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB) | |
434 | 434 | let $t01446914546 = getAssetInfo(pmtAssetIdA) | |
435 | 435 | let pmtStrAssetIdA = $t01446914546._1 | |
436 | 436 | let pmtAssetNameA = $t01446914546._2 | |
437 | 437 | let pmtDecimalsA = $t01446914546._3 | |
438 | 438 | let $t01455114668 = getAssetInfo(pmtAssetIdB) | |
439 | 439 | let pmtStrAssetIdB = $t01455114668._1 | |
440 | 440 | let pmtAssetNameB = $t01455114668._2 | |
441 | 441 | let pmtDecimalsB = $t01455114668._3 | |
442 | 442 | let $t01467315177 = if ((ratioShareTokensInB > ratioShareTokensInA)) | |
443 | 443 | then { | |
444 | 444 | let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING) | |
445 | 445 | $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA) | |
446 | 446 | } | |
447 | 447 | else { | |
448 | 448 | let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING) | |
449 | 449 | $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB) | |
450 | 450 | } | |
451 | 451 | let pmtAmountA = $t01467315177._1 | |
452 | 452 | let pmtAmountB = $t01467315177._2 | |
453 | 453 | let change = $t01467315177._3 | |
454 | 454 | let changeAssetId = $t01467315177._4 | |
455 | 455 | let shareTokenRatio = $t01467315177._5 | |
456 | 456 | let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8) | |
457 | 457 | if ((size(i.payments) != 2)) | |
458 | 458 | then throw("Two attached assets expected") | |
459 | 459 | else if (if ((pmtAssetIdA != assetIdA)) | |
460 | 460 | then true | |
461 | 461 | else (pmtAssetIdB != assetIdB)) | |
462 | 462 | then throwAssets() | |
463 | 463 | else if ((shareTokenToPayAmount == 0)) | |
464 | 464 | then throw("Too small amount to replenish") | |
465 | 465 | else if ((0 > change)) | |
466 | 466 | then throw("Change < 0") | |
467 | 467 | else if (!(hasEnoughBalance)) | |
468 | 468 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
469 | 469 | else { | |
470 | 470 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
471 | 471 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
472 | 472 | else 0 | |
473 | 473 | if ((stake1 == stake1)) | |
474 | 474 | then { | |
475 | 475 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
476 | 476 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
477 | 477 | else 0 | |
478 | 478 | if ((stake2 == stake2)) | |
479 | 479 | then [IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), IntegerEntry(kInvariant, invariantCalc((balanceA + pmtAmountA), (balanceB + pmtAmountB))), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId), ScriptTransfer(i.caller, change, changeAssetId)] | |
480 | 480 | else throw("Strict value is not equal to itself.") | |
481 | 481 | } | |
482 | 482 | else throw("Strict value is not equal to itself.") | |
483 | 483 | } | |
484 | 484 | }) | |
485 | 485 | ||
486 | 486 | ||
487 | 487 | ||
488 | 488 | @Callable(i) | |
489 | 489 | func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), { | |
490 | 490 | let $t01691016985 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
491 | 491 | let pmtAmount = $t01691016985._1 | |
492 | 492 | let pmtAssetId = $t01691016985._2 | |
493 | 493 | let $t01699017063 = getAssetInfo(pmtAssetId) | |
494 | 494 | let pmtStrAssetId = $t01699017063._1 | |
495 | 495 | let pmtAssetName = $t01699017063._2 | |
496 | 496 | let pmtDecimals = $t01699017063._3 | |
497 | 497 | let pmtMinThreshold = 5000000 | |
498 | 498 | let thresholdValueForMinTolerance = 50000000 | |
499 | 499 | let tolerance = if ((thresholdValueForMinTolerance > pmtAmount)) | |
500 | 500 | then 100000 | |
501 | 501 | else 1 | |
502 | 502 | let slippageValueMinForReplenish = (scale8 - ((scale8 * tolerance) / 10000000)) | |
503 | 503 | let slippageValueMaxForReplenish = (scale8 + ((scale8 * tolerance) / 10000000)) | |
504 | 504 | let slippageValueMinForSwap = (scale8 - ((scale8 * 1) / 10000000)) | |
505 | 505 | if ((pmtMinThreshold > pmtAmount)) | |
506 | 506 | then throw((((("Payment amount " + toString(pmtAmount)) + " does not exceed the minimum amount of ") + toString(pmtMinThreshold)) + " tokens")) | |
507 | 507 | else if ((size(i.payments) != 1)) | |
508 | 508 | then throwOnePayment() | |
509 | 509 | else if (!(hasEnoughBalance)) | |
510 | 510 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
511 | 511 | else if (if ((pmtAssetId != assetIdA)) | |
512 | 512 | then (pmtAssetId != assetIdB) | |
513 | 513 | else false) | |
514 | 514 | then throwAssets() | |
515 | 515 | else { | |
516 | 516 | let $t01804118683 = if ((pmtAssetId == assetIdA)) | |
517 | 517 | then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB) | |
518 | 518 | else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount)) | |
519 | 519 | let virtualReplenishA = $t01804118683._1 | |
520 | 520 | let virtualReplenishB = $t01804118683._2 | |
521 | 521 | let balanceAfterSwapA = $t01804118683._3 | |
522 | 522 | let balanceAfterSwapB = $t01804118683._4 | |
523 | 523 | let newBalanceA = $t01804118683._5 | |
524 | 524 | let newBalanceB = $t01804118683._6 | |
525 | 525 | let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB) | |
526 | 526 | let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB)) | |
527 | 527 | if (if ((slippageValueMinForSwap >= fraction(scale8, invariant, invariantNew))) | |
528 | 528 | then true | |
529 | 529 | else (invariant > invariantNew)) | |
530 | 530 | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
531 | 531 | else if (if ((slippageValueMinForReplenish > ratioVirtualBalanceToVirtualReplenish)) | |
532 | 532 | then true | |
533 | 533 | else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish)) | |
534 | 534 | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
535 | 535 | else { | |
536 | 536 | let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA) | |
537 | 537 | let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB) | |
538 | 538 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
539 | 539 | let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6) | |
540 | 540 | let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6) | |
541 | 541 | let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply) | |
542 | 542 | let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply) | |
543 | 543 | let $t02039420689 = if ((pmtStrAssetId == strAssetIdA)) | |
544 | 544 | then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB) | |
545 | 545 | else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA) | |
546 | 546 | let stakeAmount = $t02039420689._1 | |
547 | 547 | let unstakeAmount = $t02039420689._2 | |
548 | 548 | let unstakeAsset = $t02039420689._3 | |
549 | 549 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
550 | 550 | then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil) | |
551 | 551 | else 0 | |
552 | 552 | if ((stake1 == stake1)) | |
553 | 553 | then { | |
554 | 554 | let stake2 = if (containsElement(stakingAssets, unstakeAsset)) | |
555 | 555 | then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil) | |
556 | 556 | else 0 | |
557 | 557 | if ((stake2 == stake2)) | |
558 | 558 | then [Reissue(shareAssetId, shareTokenToPayAmountAfterFee, true), ScriptTransfer(i.caller, shareTokenToPayAmountAfterFee, shareAssetId), ScriptTransfer(moneyBoxAddress, governanceRewardTokenA, assetIdA), ScriptTransfer(moneyBoxAddress, governanceRewardTokenB, assetIdB), IntegerEntry(kBalanceA, (newBalanceA - governanceRewardTokenA)), IntegerEntry(kBalanceB, (newBalanceB - governanceRewardTokenB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmountAfterFee)), IntegerEntry(kInvariant, invariantCalc((newBalanceA - governanceRewardTokenA), (newBalanceB - governanceRewardTokenB)))] | |
559 | 559 | else throw("Strict value is not equal to itself.") | |
560 | 560 | } | |
561 | 561 | else throw("Strict value is not equal to itself.") | |
562 | 562 | } | |
563 | 563 | } | |
564 | 564 | }) | |
565 | 565 | ||
566 | 566 | ||
567 | 567 | ||
568 | 568 | @Callable(i) | |
569 | 569 | func withdraw () = valueOrElse(isActive(), { | |
570 | 570 | let $t02197622051 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
571 | 571 | let pmtAmount = $t02197622051._1 | |
572 | 572 | let pmtAssetId = $t02197622051._2 | |
573 | 573 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
574 | 574 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
575 | 575 | let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB)) | |
576 | 576 | if ((size(i.payments) != 1)) | |
577 | 577 | then throwOnePayment() | |
578 | 578 | else if ((pmtAssetId != shareAssetId)) | |
579 | 579 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
580 | 580 | else if (!(hasEnoughBalance)) | |
581 | 581 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
582 | 582 | else { | |
583 | 583 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
584 | 584 | then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
585 | 585 | else 0 | |
586 | 586 | if ((stake1 == stake1)) | |
587 | 587 | then { | |
588 | 588 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
589 | 589 | then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
590 | 590 | else 0 | |
591 | 591 | if ((stake2 == stake2)) | |
592 | 592 | then [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)] | |
593 | 593 | else throw("Strict value is not equal to itself.") | |
594 | 594 | } | |
595 | 595 | else throw("Strict value is not equal to itself.") | |
596 | 596 | } | |
597 | 597 | }) | |
598 | 598 | ||
599 | 599 | ||
600 | 600 | ||
601 | 601 | @Callable(i) | |
602 | 602 | func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), { | |
603 | 603 | let $t02360223677 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
604 | 604 | let pmtAmount = $t02360223677._1 | |
605 | 605 | let pmtAssetId = $t02360223677._2 | |
606 | 606 | if ((0 >= estimatedAmountToReceive)) | |
607 | 607 | then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive))) | |
608 | 608 | else if ((minAmountToReceive > estimatedAmountToReceive)) | |
609 | 609 | then throw("Minimal amount can't be greater than estimated.") | |
610 | 610 | else if ((size(i.payments) != 1)) | |
611 | 611 | then throwOnePayment() | |
612 | 612 | else if (!(hasEnoughBalance)) | |
613 | 613 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
614 | 614 | else if (if ((pmtAssetId != assetIdA)) | |
615 | 615 | then (pmtAssetId != assetIdB) | |
616 | 616 | else false) | |
617 | 617 | then throwAssets() | |
618 | 618 | else if ((10000000 > pmtAmount)) | |
619 | 619 | then throw("Only swap of 10.000000 or more tokens is allowed") | |
620 | 620 | else { | |
621 | 621 | let $t02436324479 = calcBalanceAndPmtRatio(balanceA, balanceB, minAmountToReceive, pmtAmount, pmtAssetId) | |
622 | 622 | let balanceRatio = $t02436324479._1 | |
623 | 623 | let pmtRatio = $t02436324479._2 | |
624 | - | if (( | |
624 | + | if (((exchangeRatioLimit - fraction(exchangeRatioLimitCoef, balanceRatio, scale8)) > pmtRatio)) | |
625 | 625 | then throw("Incorrect args and pmt ratio") | |
626 | 626 | else { | |
627 | 627 | let sendAssetId = if ((pmtAssetId == assetIdA)) | |
628 | 628 | then assetIdB | |
629 | 629 | else assetIdA | |
630 | 630 | let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId) | |
631 | 631 | let feeDiscount = calculateFeeDiscount(i.originCaller) | |
632 | 632 | let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6) | |
633 | 633 | let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6) | |
634 | 634 | let $t02523425512 = if ((pmtAssetId == assetIdA)) | |
635 | 635 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward)) | |
636 | 636 | else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount)) | |
637 | 637 | let newBalanceA = $t02523425512._1 | |
638 | 638 | let newBalanceB = $t02523425512._2 | |
639 | 639 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
640 | 640 | if (if ((dAppThresholdAmount > newBalanceA)) | |
641 | 641 | then true | |
642 | 642 | else (dAppThresholdAmount > newBalanceB)) | |
643 | 643 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
644 | 644 | else { | |
645 | 645 | let $t02583125904 = getAssetInfo(pmtAssetId) | |
646 | 646 | let pmtStrAssetId = $t02583125904._1 | |
647 | 647 | let pmtAssetName = $t02583125904._2 | |
648 | 648 | let pmtDecimals = $t02583125904._3 | |
649 | 649 | let $t02592125998 = getAssetInfo(sendAssetId) | |
650 | 650 | let sendStrAssetId = $t02592125998._1 | |
651 | 651 | let sendAssetName = $t02592125998._2 | |
652 | 652 | let sendDecimals = $t02592125998._3 | |
653 | 653 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
654 | 654 | then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil) | |
655 | 655 | else 0 | |
656 | 656 | if ((stake1 == stake1)) | |
657 | 657 | then { | |
658 | 658 | let stake2 = if (containsElement(stakingAssets, sendStrAssetId)) | |
659 | 659 | then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil) | |
660 | 660 | else 0 | |
661 | 661 | if ((stake2 == stake2)) | |
662 | 662 | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], $Tuple2(amountMinusFee, sendAssetId)) | |
663 | 663 | else throw("Strict value is not equal to itself.") | |
664 | 664 | } | |
665 | 665 | else throw("Strict value is not equal to itself.") | |
666 | 666 | } | |
667 | 667 | } | |
668 | 668 | } | |
669 | 669 | }) | |
670 | 670 | ||
671 | 671 | ||
672 | 672 | ||
673 | 673 | @Callable(i) | |
674 | 674 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
675 | 675 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
676 | 676 | else suspend("Paused by admin")) | |
677 | 677 | ||
678 | 678 | ||
679 | 679 | ||
680 | 680 | @Callable(i) | |
681 | 681 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
682 | 682 | then throwIsActive() | |
683 | 683 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
684 | 684 | ||
685 | 685 | ||
686 | 686 | ||
687 | 687 | @Callable(i) | |
688 | 688 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), { | |
689 | 689 | let amountEnrollA = (accountBalanceWithStakedA - balanceA) | |
690 | 690 | let amountEnrollB = (accountBalanceWithStakedB - balanceB) | |
691 | 691 | let invariantNew = invariantCalc((balanceA + amountEnrollA), (balanceB + amountEnrollB)) | |
692 | 692 | if ((i.caller != moneyBoxAddress)) | |
693 | 693 | then throw("Only the money box can call this function") | |
694 | 694 | else if (if ((0 > amountEnrollA)) | |
695 | 695 | then true | |
696 | 696 | else (0 > amountEnrollB)) | |
697 | 697 | then suspend("Enroll amount negative") | |
698 | 698 | else if (if ((amountEnrollA == 0)) | |
699 | 699 | then (amountEnrollB == 0) | |
700 | 700 | else false) | |
701 | 701 | then throw("No money to take") | |
702 | 702 | else { | |
703 | 703 | let stake1 = if (if (containsElement(stakingAssets, strAssetIdA)) | |
704 | 704 | then (amountEnrollA > 0) | |
705 | 705 | else false) | |
706 | 706 | then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
707 | 707 | else 0 | |
708 | 708 | if ((stake1 == stake1)) | |
709 | 709 | then { | |
710 | 710 | let stake2 = if (if (containsElement(stakingAssets, strAssetIdB)) | |
711 | 711 | then (amountEnrollB > 0) | |
712 | 712 | else false) | |
713 | 713 | then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
714 | 714 | else 0 | |
715 | 715 | if ((stake2 == stake2)) | |
716 | 716 | then [IntegerEntry(kInvariant, invariantNew), IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))] | |
717 | 717 | else throw("Strict value is not equal to itself.") | |
718 | 718 | } | |
719 | 719 | else throw("Strict value is not equal to itself.") | |
720 | 720 | } | |
721 | 721 | }) | |
722 | 722 | ||
723 | 723 | ||
724 | 724 | ||
725 | 725 | @Callable(i) | |
726 | 726 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
727 | 727 | then throw("Only contract itself can invoke this function") | |
728 | 728 | else { | |
729 | 729 | let $t02904129144 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
730 | 730 | let call = $t02904129144._1 | |
731 | 731 | let addr = $t02904129144._2 | |
732 | 732 | let params = $t02904129144._3 | |
733 | 733 | let payments = $t02904129144._4 | |
734 | 734 | let inv = invoke(addr, call, params, payments) | |
735 | 735 | if ((inv == inv)) | |
736 | 736 | then nil | |
737 | 737 | else throw("Strict value is not equal to itself.") | |
738 | 738 | } | |
739 | 739 | ||
740 | 740 | ||
741 | 741 | ||
742 | 742 | @Callable(i) | |
743 | 743 | func toBigIntInvariant () = valueOrElse(isAdminCall(i), [IntegerEntry(kInvariant, invariantCalc(balanceA, balanceB))]) | |
744 | 744 | ||
745 | 745 | ||
746 | 746 | @Verifier(tx) | |
747 | 747 | func verify () = { | |
748 | 748 | let multiSignedByAdmins = { | |
749 | 749 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
750 | 750 | then 1 | |
751 | 751 | else 0 | |
752 | 752 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
753 | 753 | then 1 | |
754 | 754 | else 0 | |
755 | 755 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
756 | 756 | then 1 | |
757 | 757 | else 0 | |
758 | 758 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
759 | 759 | } | |
760 | 760 | match tx { | |
761 | 761 | case inv: InvokeScriptTransaction => | |
762 | 762 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
763 | 763 | then (inv.function == "takeIntoAccountExtraFunds") | |
764 | 764 | else false | |
765 | 765 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
766 | 766 | then true | |
767 | 767 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
768 | 768 | then true | |
769 | 769 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
770 | 770 | then true | |
771 | 771 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
772 | 772 | if (if (callTakeIntoAccount) | |
773 | 773 | then signedByAdmin | |
774 | 774 | else false) | |
775 | 775 | then true | |
776 | 776 | else multiSignedByAdmins | |
777 | 777 | case _ => | |
778 | 778 | multiSignedByAdmins | |
779 | 779 | } | |
780 | 780 | } | |
781 | 781 |
github/deemru/w8io/026f985 104.72 ms ◑