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