tx · BXAAZ2zTLk6if5hjvoGMwRyXyVkcMi4ioKcvok957Yqy 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj: -0.04100000 Waves 2023.02.27 10:00 [2467783] smart account 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj > SELF 0.00000000 Waves
{ "type": 13, "id": "BXAAZ2zTLk6if5hjvoGMwRyXyVkcMi4ioKcvok957Yqy", "fee": 4100000, "feeAssetId": null, "timestamp": 1677481312356, "version": 2, "chainId": 84, "sender": "3N9be2mwrA52WJho6DiesZkk4351GvpnWuj", "senderPublicKey": "6mzmbCza9iqbzxMEELcEA4Xc9NeF4CYpbTtz1zMK3C7x", "proofs": [ "4YVMcswP4c9tqWs3fMMYbY6P4oTAuu7WMM3vD5rM8EkrkjqgCryg1qS5Sp7EQHk3nFmyDZjDp9QHJvmCR5AJ9Tia", "5gsP6wXfNVQZdJmUCQ6fCqAVXM7xDg6bDAMmTjL8QwyAfrJ5AjwdznxshiNdXT1XfkvAisFTWJHfiFseu2xZgHzf", "4L9zVvf5hNw72Fg1WXHnyLZCGkdSQUtBX7fNfLeZ7Eav6enpMLDfngi5zGpTjBiZGsSrYUUHyY4kiNPpCKrNE7fS" ], "script": "base64:BgJdCAISDgoMCAgICAgIAQEBAQEBEgUKAwgIARIHCgUYAQEBARIAEgASBQoDCAEIEgMKAQESBAoCAQgSABIFCgMIAQESBAoCAQESBAoCCAESBgoECAEBCBIGCgQICAEBswEBD2dldFN0cmluZ09yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuCQDMCAIFA2tleQkAzAgCAg8gaXMgbm90IGRlZmluZWQFA25pbAIAAQVsY2FsYwEBbAkAuQgBBQFsAQ5nZXROdW1iZXJCeUtleQEDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIF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YWN0aW9uBAlzcG9uc29yVHgFByRtYXRjaDADCQEbY2hlY2tJc1ZhbGlkTWluU3BvbnNvcmVkRmVlAQUJc3BvbnNvclR4CQBnAgUFY291bnQAAwcJAGcCBQVjb3VudAADsRydAw==", "height": 2467783, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 731LHi8RJPMrgiecRGEVQzBn632rg4hbYdDxxXZZzo9V Next: 8TCFfKQLAwGuzxGWqdhH7ve1vNPzHnQQARZakHCEmBAe Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func lcalc (l) = calculateLeaseId(l) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func asAnyList (v) = match v { | |
29 | 29 | case l: List[Any] => | |
30 | 30 | l | |
31 | 31 | case _ => | |
32 | 32 | throw("fail to cast into List[Any]") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func asString (v) = match v { | |
37 | 37 | case s: String => | |
38 | 38 | s | |
39 | 39 | case _ => | |
40 | 40 | throw("fail to cast into String") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func asInt (v) = match v { | |
45 | 45 | case i: Int => | |
46 | 46 | i | |
47 | 47 | case _ => | |
48 | 48 | throw("fail to cast into Int") | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func asBytes (val) = match val { | |
53 | 53 | case valByte: ByteVector => | |
54 | 54 | valByte | |
55 | 55 | case _ => | |
56 | 56 | throw("fail to cast into ByteVector") | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func asPayment (v) = match v { | |
61 | 61 | case p: AttachedPayment => | |
62 | 62 | p | |
63 | 63 | case _ => | |
64 | 64 | throw("fail to cast into AttachedPayment") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func asSwapParamsSTRUCT (v) = match v { | |
69 | 69 | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
70 | 70 | struct | |
71 | 71 | case _ => | |
72 | 72 | throw("fail to cast into Tuple5 ints") | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | let SEP = "__" | |
77 | 77 | ||
78 | 78 | let LISTSEP = ":" | |
79 | 79 | ||
80 | 80 | let MULT8 = 100000000 | |
81 | 81 | ||
82 | 82 | let MULT6 = 1000000 | |
83 | 83 | ||
84 | 84 | let DEFAULTSWAPFEE = 20000 | |
85 | 85 | ||
86 | 86 | let BRPROTECTED = 100000 | |
87 | 87 | ||
88 | 88 | let WAVESID = base58'WAVES' | |
89 | 89 | ||
90 | 90 | let nMetricIdxPrice = 0 | |
91 | 91 | ||
92 | 92 | let nMetricIdxUsdnLockedBalance = 1 | |
93 | 93 | ||
94 | 94 | let nMetricIdxWavesLockedBalance = 2 | |
95 | 95 | ||
96 | 96 | let nMetricIdxReserve = 3 | |
97 | 97 | ||
98 | 98 | let nMetricIdxReserveInUsdn = 4 | |
99 | 99 | ||
100 | 100 | let nMetricIdxUsdnSupply = 5 | |
101 | 101 | ||
102 | 102 | let nMetricIdxSurplus = 6 | |
103 | 103 | ||
104 | 104 | let nMetricIdxSurplusPercent = 7 | |
105 | 105 | ||
106 | 106 | let nMetricIdxBR = 8 | |
107 | 107 | ||
108 | 108 | let nMetricIdxNsbtSupply = 9 | |
109 | 109 | ||
110 | 110 | let nMetricIdxMaxNsbtSupply = 10 | |
111 | 111 | ||
112 | 112 | let nMetricIdxSurfSupply = 11 | |
113 | 113 | ||
114 | 114 | let nMetricUsdnUsdtPeg = 12 | |
115 | 115 | ||
116 | 116 | let nMetricCurrentPriceAdj = 13 | |
117 | 117 | ||
118 | 118 | let nMetricBasketInfo = 14 | |
119 | 119 | ||
120 | 120 | let nMetricWeightedPrice = 15 | |
121 | 121 | ||
122 | 122 | let nMetricTotalReservesUsd = 16 | |
123 | 123 | ||
124 | 124 | let IdxControlCfgNeutrinoDapp = 1 | |
125 | 125 | ||
126 | 126 | let IdxControlCfgAuctionDapp = 2 | |
127 | 127 | ||
128 | 128 | let IdxControlCfgRpdDapp = 3 | |
129 | 129 | ||
130 | 130 | let IdxControlCfgMathDapp = 4 | |
131 | 131 | ||
132 | 132 | let IdxControlCfgLiquidationDapp = 5 | |
133 | 133 | ||
134 | 134 | let IdxControlCfgRestDapp = 6 | |
135 | 135 | ||
136 | 136 | let IdxControlCfgNodeRegistryDapp = 7 | |
137 | 137 | ||
138 | 138 | let IdxControlCfgNsbtStakingDapp = 8 | |
139 | 139 | ||
140 | 140 | let IdxControlCfgMediatorDapp = 9 | |
141 | 141 | ||
142 | 142 | let IdxControlCfgSurfStakingDapp = 10 | |
143 | 143 | ||
144 | 144 | let IdxControlCfgGnsbtControllerDapp = 11 | |
145 | 145 | ||
146 | 146 | let IdxControlCfgRestV2Dapp = 12 | |
147 | 147 | ||
148 | 148 | let IdxControlCfgGovernanceDapp = 13 | |
149 | 149 | ||
150 | 150 | func keyControlAddress () = "%s%s__config__controlAddress" | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyControlCfg () = "%s__controlConfig" | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
163 | 163 | ||
164 | 164 | let controlCfg = readControlCfgOrFail(controlContract) | |
165 | 165 | ||
166 | 166 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
167 | 167 | ||
168 | 168 | let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp) | |
169 | 169 | ||
170 | 170 | let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp) | |
171 | 171 | ||
172 | 172 | let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp) | |
173 | 173 | ||
174 | 174 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
175 | 175 | ||
176 | 176 | let nodeRegistryContract = getContractAddressOrFail(controlCfg, IdxControlCfgNodeRegistryDapp) | |
177 | 177 | ||
178 | 178 | let govContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp) | |
179 | 179 | ||
180 | 180 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
181 | 181 | ||
182 | 182 | let BondAssetIdKey = "bond_asset_id" | |
183 | 183 | ||
184 | 184 | let AuctionContractKey = "auction_contract" | |
185 | 185 | ||
186 | 186 | let NsbtStakingContractKey = "nsbtStakingContract" | |
187 | 187 | ||
188 | 188 | let LiquidationContractKey = "liquidation_contract" | |
189 | 189 | ||
190 | 190 | let RPDContractKey = "rpd_contract" | |
191 | 191 | ||
192 | 192 | let ContolContractKey = "control_contract" | |
193 | 193 | ||
194 | 194 | let MathContractKey = "math_contract" | |
195 | 195 | ||
196 | 196 | let BalanceWavesLockIntervalKey = "balance_waves_lock_interval" | |
197 | 197 | ||
198 | 198 | let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval" | |
199 | 199 | ||
200 | 200 | func MinTokenSwapAmountKey (assetId) = ("min_outNeutrino_swap_amount_" + assetId) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | let MinNeutrinoSwapAmountKey = "min_outMulti_swap_amount" | |
204 | 204 | ||
205 | 205 | let LegacyMinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
206 | 206 | ||
207 | 207 | let NodeOracleProviderPubKeyKey = "node_oracle_provider" | |
208 | 208 | ||
209 | 209 | let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart" | |
210 | 210 | ||
211 | 211 | let WavesOutFeePartKey = "wavesOut_swap_feePart" | |
212 | 212 | ||
213 | 213 | func keyNodeRegistry (address) = ("%s__" + address) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | let PriceKey = "price" | |
217 | 217 | ||
218 | 218 | let PriceIndexKey = "price_index" | |
219 | 219 | ||
220 | 220 | let IsBlockedKey = "is_blocked" | |
221 | 221 | ||
222 | 222 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func getStakingNodeByIndex (idx) = getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP)) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func getStakingNodeAddressByIndex (idx) = addressFromStringValue(getStakingNodeByIndex(idx)) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * MULT8)) | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func getLeaseIdByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "id"], SEP) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func getLeaseAmountByAddressKey (nodeAddress) = makeString(["%s%s%s", "leaseByAddress", nodeAddress, "amount"], SEP) | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func getLeaseGroupNodeListKey (groupNum) = makeString(["%s%d%s", "leaseGroup", toString(groupNum), "nodeList"], SEP) | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount") | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func totalLockedKEY (swapType,assetId) = makeString(["%s%s%s", "balanceLock", swapType, assetId], SEP) | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | func totalLockedByUserKEY (swapType,owner,assetId) = makeString(["%s%s%s%s", "balanceLock", swapType, owner, assetId], "_") | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func balanceLockIntervalKEY (swapType) = if ((swapType == "outMulti")) | |
265 | 265 | then BalanceNeutrinoLockIntervalKey | |
266 | 266 | else BalanceWavesLockIntervalKey | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func nodeBalanceLockIntervalKEY () = "balance_node_lock_interval" | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func swapsTimeframeKEY () = "swaps_timeframe" | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func brProtectedKEY () = "min_BR_protection_level" | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | func basketAssetsKey () = "%s%s__common__basketAssets" | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | func basketDKey () = "%s%s__common__basketD" | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | func basketKKey () = "%s%s__common__basketK" | |
285 | 285 | ||
286 | 286 | ||
287 | 287 | func basketBKey () = "%s%s__common__basketB" | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | func basketLogbDeltaKey () = "%s%s__common__basketLogbDelta" | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | func basketWeightByAssetKey (assetId) = ("%s%s%s__common__weightByAsset__" + assetId) | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func keyPriceByAsset (assetId) = ("%s%s%s__common__priceByAsset__" + assetId) | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | func minSwapAmountREAD (swapType,assetId) = if ((swapType == "outMulti")) | |
300 | 300 | then valueOrElse(getInteger(MinNeutrinoSwapAmountKey), getNumberByKey(LegacyMinNeutrinoSwapAmountKey)) | |
301 | 301 | else getNumberByKey(MinTokenSwapAmountKey(assetId)) | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func swapsTimeframeREAD () = valueOrElse(getInteger(this, swapsTimeframeKEY()), 1440) | |
305 | 305 | ||
306 | 306 | ||
307 | 307 | func totalLockedREAD (swapType,assetId) = valueOrElse(getInteger(this, totalLockedKEY(swapType, assetId)), 0) | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | func totalLockedByUserREAD (swapType,owner,assetId) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner, assetId)), 0) | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440) | |
314 | 314 | ||
315 | 315 | ||
316 | 316 | func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1) | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP) | |
320 | 320 | ||
321 | 321 | ||
322 | 322 | func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP) | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
326 | 326 | ||
327 | 327 | ||
328 | 328 | func convertTokenToUsd (amount,price) = fraction(amount, price, MULT8) | |
329 | 329 | ||
330 | 330 | ||
331 | 331 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | func convertWavesToBond (amount,price) = convertTokenToUsd(amount, price) | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
338 | 338 | ||
339 | 339 | ||
340 | 340 | func convertBasketItemToNeutrino (inAmount,inAsset,basketInfoStr,neutrinoPrice) = { | |
341 | 341 | let basketInfo = split_4C(basketInfoStr, "_") | |
342 | 342 | func findItem (acc,item) = { | |
343 | 343 | let bItem = split(item, LISTSEP) | |
344 | 344 | if ((bItem[0] == inAsset)) | |
345 | 345 | then bItem | |
346 | 346 | else acc | |
347 | 347 | } | |
348 | 348 | ||
349 | 349 | let it = { | |
350 | 350 | let $l = basketInfo | |
351 | 351 | let $s = size($l) | |
352 | 352 | let $acc0 = nil | |
353 | 353 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
354 | 354 | then $a | |
355 | 355 | else findItem($a, $l[$i]) | |
356 | 356 | ||
357 | 357 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
358 | 358 | then $a | |
359 | 359 | else throw("List size exceeds 10") | |
360 | 360 | ||
361 | 361 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
362 | 362 | } | |
363 | 363 | let dlog6 = valueOrElse(getInteger(basketLogbDeltaKey()), -18820642) | |
364 | 364 | let d6 = valueOrElse(getInteger(basketDKey()), 50000) | |
365 | 365 | let b6 = valueOrElse(getInteger(basketBKey()), 1250000) | |
366 | 366 | let w6 = valueOrElse(getInteger(basketWeightByAssetKey(inAsset)), 166666) | |
367 | 367 | let p6 = ((dlog6 - w6) + parseIntValue(it[1])) | |
368 | 368 | let pp6 = pow(b6, 6, p6, 6, 6, HALFUP) | |
369 | 369 | let outAmountGross = fraction(inAmount, parseIntValue(it[2]), if ((neutrinoPrice == 0)) | |
370 | 370 | then MULT8 | |
371 | 371 | else (neutrinoPrice * 100)) | |
372 | 372 | let multiplier = ((MULT6 + d6) - pp6) | |
373 | 373 | let netAmount = fraction(outAmountGross, multiplier, MULT6) | |
374 | 374 | let feeAmount = if ((netAmount >= outAmountGross)) | |
375 | 375 | then 0 | |
376 | 376 | else (outAmountGross - netAmount) | |
377 | 377 | [outAmountGross, netAmount, feeAmount] | |
378 | 378 | } | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | func convertNeutrinoToBasket (amount,basketInfoStr,neutrinoSupply) = { | |
382 | 382 | let basketInfo = split_4C(basketInfoStr, "_") | |
383 | 383 | func conv (acc,item) = { | |
384 | 384 | let parts = split(item, LISTSEP) | |
385 | 385 | let assetId = parts[0] | |
386 | 386 | let share = parseIntValue(parts[1]) | |
387 | 387 | let price = parseIntValue(parts[2]) | |
388 | 388 | let reserv = parseIntValue(parts[3]) | |
389 | 389 | if ((neutrinoSupply == 0)) | |
390 | 390 | then throw("Attempt to burn neutrino at zero supply") | |
391 | 391 | else { | |
392 | 392 | let outAmount = fraction(amount, reserv, neutrinoSupply) | |
393 | 393 | let wavesTuple = if ((assetId == "WAVES")) | |
394 | 394 | then $Tuple2(outAmount, price) | |
395 | 395 | else $Tuple2(acc._2, acc._3) | |
396 | 396 | $Tuple3((acc._1 :+ $Tuple4(assetId, outAmount, price, share)), wavesTuple._1, wavesTuple._2) | |
397 | 397 | } | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | let $l = basketInfo | |
401 | 401 | let $s = size($l) | |
402 | 402 | let $acc0 = $Tuple3(nil, 0, 0) | |
403 | 403 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
404 | 404 | then $a | |
405 | 405 | else conv($a, $l[$i]) | |
406 | 406 | ||
407 | 407 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
408 | 408 | then $a | |
409 | 409 | else throw("List size exceeds 10") | |
410 | 410 | ||
411 | 411 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
412 | 412 | } | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount))) | |
416 | 416 | ||
417 | 417 | ||
418 | 418 | func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
419 | 419 | ||
420 | 420 | ||
421 | 421 | func priceIndexFAIL (index,priceIndex,indexHeight,unlockHeight,prevIndexHeight) = throw(((((((((("invalid price history index: index=" + toString(index)) + " priceIndex=") + toString(priceIndex)) + " indexHeight=") + toString(indexHeight)) + " unlockHeight=") + toString(unlockHeight)) + " prevIndexHeight=") + toString(prevIndexHeight))) | |
422 | 422 | ||
423 | 423 | ||
424 | 424 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
425 | 425 | ||
426 | 426 | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
427 | 427 | ||
428 | 428 | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
429 | 429 | ||
430 | 430 | let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey)) | |
431 | 431 | ||
432 | 432 | let bondAssetId = fromBase58String("F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z") | |
433 | 433 | ||
434 | 434 | let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF") | |
435 | 435 | ||
436 | 436 | let neutrinoContract = this | |
437 | 437 | ||
438 | 438 | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
439 | 439 | ||
440 | 440 | func checkIsValidMinSponsoredFee (tx) = { | |
441 | 441 | let MINTRANSFERFEE = 100000 | |
442 | 442 | let SponsoredFeeUpperBound = 1000 | |
443 | 443 | let realNeutrinoFee = convertTokenToUsd(MINTRANSFERFEE, currentPrice) | |
444 | 444 | let minNeutrinoFee = (realNeutrinoFee * 2) | |
445 | 445 | let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100) | |
446 | 446 | let inputFee = value(tx.minSponsoredAssetFee) | |
447 | 447 | if (if ((inputFee >= minNeutrinoFee)) | |
448 | 448 | then (maxNeutrinoFee >= inputFee) | |
449 | 449 | else false) | |
450 | 450 | then (tx.assetId == neutrinoAssetId) | |
451 | 451 | else false | |
452 | 452 | } | |
453 | 453 | ||
454 | 454 | ||
455 | 455 | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
456 | 456 | ||
457 | 457 | ||
458 | 458 | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
459 | 459 | ||
460 | 460 | ||
461 | 461 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
462 | 462 | ||
463 | 463 | ||
464 | 464 | let sIdxSwapType = 1 | |
465 | 465 | ||
466 | 466 | let sIdxStatus = 2 | |
467 | 467 | ||
468 | 468 | let sIdxInAmount = 3 | |
469 | 469 | ||
470 | 470 | let sIdxStartHeight = 7 | |
471 | 471 | ||
472 | 472 | let sIdxStartTimestamp = 8 | |
473 | 473 | ||
474 | 474 | let sIdxSelfUnlockHeight = 11 | |
475 | 475 | ||
476 | 476 | let sIdxMinRand = 15 | |
477 | 477 | ||
478 | 478 | let sIdxMaxRand = 16 | |
479 | 479 | ||
480 | 480 | let sIdxInAsset = 20 | |
481 | 481 | ||
482 | 482 | func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP) | |
483 | 483 | ||
484 | 484 | ||
485 | 485 | func strSwapDATA (swapType,status,inAmount,price,outNetAmount,outFeeAmount,startHeight,startTimestamp,endHeight,endTimestamp,selfUnlockHeight,randUnlockHeight,index,withdrawTxId,randMin,randMax,outSurfAmt,br,basketData,inAsset) = makeString_2C(["%s%s%d%d%d%d%d%d%d%d%d%d%d%s%d%d%d%d%s%s", swapType, status, inAmount, price, outNetAmount, outFeeAmount, startHeight, startTimestamp, endHeight, endTimestamp, selfUnlockHeight, randUnlockHeight, index, withdrawTxId, randMin, randMax, outSurfAmt, br, basketData, inAsset], SEP) | |
486 | 486 | ||
487 | 487 | ||
488 | 488 | func pendingSwapDATA (swapType,inAssetAmount,selfUnlockHeight,inAsset) = strSwapDATA(swapType, "PENDING", toString(inAssetAmount), "0", "0", "0", toString(height), toString(lastBlock.timestamp), "0", "0", toString(selfUnlockHeight), "0", "0", "NULL", "0", "0", "0", "0", "", inAsset) | |
489 | 489 | ||
490 | 490 | ||
491 | 491 | func finishSwapDATA (dataArray,price,outNetAmount,outFeeAmount,randUnlockHeight,index,withdrawTxId,outSurfAmt,br,basketData,inAsset) = strSwapDATA(dataArray[sIdxSwapType], "FINISHED", dataArray[sIdxInAmount], toString(price), toString(outNetAmount), toString(outFeeAmount), dataArray[sIdxStartHeight], dataArray[sIdxStartTimestamp], toString(height), toString(lastBlock.timestamp), dataArray[sIdxSelfUnlockHeight], toString(randUnlockHeight), toString(index), withdrawTxId, dataArray[sIdxMinRand], dataArray[sIdxMaxRand], toString(outSurfAmt), toString(br), basketData, inAsset) | |
492 | 492 | ||
493 | 493 | ||
494 | 494 | func swapDataFailOrREAD (userAddress,swapTxId) = { | |
495 | 495 | let swapKey = swapKEY(userAddress, swapTxId) | |
496 | 496 | split_4C(valueOrErrorMessage(getString(swapKey), ("no swap data for " + swapKey)), SEP) | |
497 | 497 | } | |
498 | 498 | ||
499 | 499 | ||
500 | 500 | func applyFees (amountOutGross,inAmtToSURF,feePart) = { | |
501 | 501 | let feeAmount = fraction(amountOutGross, feePart, MULT6) | |
502 | 502 | [(amountOutGross - feeAmount), feeAmount] | |
503 | 503 | } | |
504 | 504 | ||
505 | 505 | ||
506 | 506 | func applyFeesBasket (basketOut) = { | |
507 | 507 | let k6 = valueOrElse(getInteger(basketKKey()), MULT6) | |
508 | 508 | let d6 = valueOrElse(getInteger(basketDKey()), 50000) | |
509 | 509 | let feePart = fraction(k6, d6, MULT6) | |
510 | 510 | func feeApplier (acc,item) = { | |
511 | 511 | let feeAmount = fraction(item._2, feePart, MULT6) | |
512 | 512 | (acc :+ makeString([item._1, toString(item._3), toString((item._2 - feeAmount)), toString(feeAmount), toString(item._4)], LISTSEP)) | |
513 | 513 | } | |
514 | 514 | ||
515 | 515 | let a = { | |
516 | 516 | let $l = basketOut | |
517 | 517 | let $s = size($l) | |
518 | 518 | let $acc0 = nil | |
519 | 519 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
520 | 520 | then $a | |
521 | 521 | else feeApplier($a, $l[$i]) | |
522 | 522 | ||
523 | 523 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
524 | 524 | then $a | |
525 | 525 | else throw("List size exceeds 10") | |
526 | 526 | ||
527 | 527 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
528 | 528 | } | |
529 | 529 | makeString_2C(a, "_") | |
530 | 530 | } | |
531 | 531 | ||
532 | 532 | ||
533 | 533 | func abs (x) = if ((0 > x)) | |
534 | 534 | then -(x) | |
535 | 535 | else x | |
536 | 536 | ||
537 | 537 | ||
538 | 538 | func selectNode (unleaseAmount) = { | |
539 | 539 | let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship()) | |
540 | 540 | let oldLeased0 = getNumberByKey(getLeaseAmountKey(0)) | |
541 | 541 | let oldLeased1 = getNumberByKey(getLeaseAmountKey(1)) | |
542 | 542 | let newLeased0 = (amountToLease + oldLeased0) | |
543 | 543 | let newLeased1 = (amountToLease + oldLeased1) | |
544 | 544 | if (if ((newLeased0 > 0)) | |
545 | 545 | then true | |
546 | 546 | else (newLeased1 > 0)) | |
547 | 547 | then { | |
548 | 548 | let delta0 = abs((newLeased0 - oldLeased1)) | |
549 | 549 | let delta1 = abs((newLeased1 - oldLeased0)) | |
550 | 550 | if ((delta1 >= delta0)) | |
551 | 551 | then $Tuple2(0, newLeased0) | |
552 | 552 | else $Tuple2(1, newLeased1) | |
553 | 553 | } | |
554 | 554 | else $Tuple2(-1, 0) | |
555 | 555 | } | |
556 | 556 | ||
557 | 557 | ||
558 | 558 | func thisOnly (i) = if ((i.caller != this)) | |
559 | 559 | then throw("Permission denied: this contract only allowed") | |
560 | 560 | else true | |
561 | 561 | ||
562 | 562 | ||
563 | 563 | func prepareUnleaseAndLease (unleaseAmount) = { | |
564 | 564 | let nodeTuple = selectNode(unleaseAmount) | |
565 | 565 | let nodeIndex = nodeTuple._1 | |
566 | 566 | let newLeaseAmount = nodeTuple._2 | |
567 | 567 | if ((newLeaseAmount > 0)) | |
568 | 568 | then { | |
569 | 569 | let leaseIdKey = getLeaseIdKey(nodeIndex) | |
570 | 570 | let oldLease = getBinary(this, leaseIdKey) | |
571 | 571 | let unleaseOrEmpty = if (isDefined(oldLease)) | |
572 | 572 | then [LeaseCancel(value(oldLease))] | |
573 | 573 | else nil | |
574 | 574 | let leaseAmountKey = getLeaseAmountKey(nodeIndex) | |
575 | 575 | let lease = Lease(getStakingNodeAddressByIndex(nodeIndex), newLeaseAmount) | |
576 | 576 | (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, lcalc(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)]) | |
577 | 577 | } | |
578 | 578 | else nil | |
579 | 579 | } | |
580 | 580 | ||
581 | 581 | ||
582 | 582 | func readNodeInfo (nodeIdx) = { | |
583 | 583 | let nodeAddress = getStakingNodeAddressByIndex(nodeIdx) | |
584 | 584 | let leasedAmtKEY = getLeaseAmountKey(nodeIdx) | |
585 | 585 | let leasedAmt = getNumberByKey(leasedAmtKEY) | |
586 | 586 | let leaseIdKEY = getLeaseIdKey(nodeIdx) | |
587 | 587 | let leaseId = value(getBinary(this, leaseIdKEY)) | |
588 | 588 | $Tuple5(nodeAddress, leasedAmtKEY, leasedAmt, leaseIdKEY, leaseId) | |
589 | 589 | } | |
590 | 590 | ||
591 | 591 | ||
592 | 592 | func commonSwap (swapType,pmtAmount,inAsset,userAddressStr,txId58) = { | |
593 | 593 | let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil)) | |
594 | 594 | let tokenSwapLimitUsd = swapParamsSTRUCT._1 | |
595 | 595 | let swapLimitSpent = swapParamsSTRUCT._2 | |
596 | 596 | let blcks2LmtReset = swapParamsSTRUCT._3 | |
597 | 597 | let usdnSwapLimitMax = swapParamsSTRUCT._7 | |
598 | 598 | let minSwapAmount = minSwapAmountREAD(swapType, inAsset) | |
599 | 599 | let totalLocked = totalLockedREAD(swapType, inAsset) | |
600 | 600 | let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr, inAsset) | |
601 | 601 | let nodeAddress = getStakingNodeByIndex(0) | |
602 | 602 | let isSwapByNode = (nodeAddress == userAddressStr) | |
603 | 603 | let balanceLockMaxInterval = if (isSwapByNode) | |
604 | 604 | then nodeBalanceLockIntervalREAD() | |
605 | 605 | else balanceLockIntervalREAD(swapType) | |
606 | 606 | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
607 | 607 | let pr = valueOrElse(getInteger(controlContract, keyPriceByAsset(inAsset)), MULT6) | |
608 | 608 | let swapUsdnVolume = if ((swapType == "outNeutrino")) | |
609 | 609 | then convertTokenToUsd(pmtAmount, pr) | |
610 | 610 | else pmtAmount | |
611 | 611 | let swapLimitMax = if ((swapType == "outNeutrino")) | |
612 | 612 | then tokenSwapLimitUsd | |
613 | 613 | else usdnSwapLimitMax | |
614 | 614 | if ((minSwapAmount > pmtAmount)) | |
615 | 615 | then minSwapAmountFAIL(swapType, minSwapAmount) | |
616 | 616 | else if (if (!(isSwapByNode)) | |
617 | 617 | then (swapLimitSpent > 0) | |
618 | 618 | else false) | |
619 | 619 | then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((height + blcks2LmtReset)))) | |
620 | 620 | else if (if (!(isSwapByNode)) | |
621 | 621 | then (swapUsdnVolume > swapLimitMax) | |
622 | 622 | else false) | |
623 | 623 | then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimitMax))) | |
624 | 624 | else if (isBlocked) | |
625 | 625 | then emergencyShutdownFAIL() | |
626 | 626 | else { | |
627 | 627 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
628 | 628 | let basketInfo = asString(neutrinoMetrics[nMetricBasketInfo]) | |
629 | 629 | let weightedPrice = asInt(neutrinoMetrics[nMetricWeightedPrice]) | |
630 | 630 | let out = convertBasketItemToNeutrino(pmtAmount, inAsset, basketInfo, weightedPrice) | |
631 | 631 | if (if ((swapType == "outNeutrino")) | |
632 | 632 | then (0 >= out[1]) | |
633 | 633 | else false) | |
634 | 634 | then throw((((((("Net amount is non-positive, cannot swap. (gross, net, fee) = (" + toString(out[0])) + ", ") + toString(out[1])) + ", ") + toString(out[2])) + ")")) | |
635 | 635 | else { | |
636 | 636 | let leasePart = if (if ((swapType == "outNeutrino")) | |
637 | 637 | then (inAsset == "WAVES") | |
638 | 638 | else false) | |
639 | 639 | then prepareUnleaseAndLease(0) | |
640 | 640 | else nil | |
641 | 641 | $Tuple2(([IntegerEntry(keySwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr, inAsset), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), IntegerEntry(totalLockedKEY(swapType, inAsset), (totalLocked + pmtAmount)), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight, inAsset))] ++ leasePart), unit) | |
642 | 642 | } | |
643 | 643 | } | |
644 | 644 | } | |
645 | 645 | ||
646 | 646 | ||
647 | 647 | let bFuncIdxSurf = 0 | |
648 | 648 | ||
649 | 649 | let bFuncIdxWaves = 1 | |
650 | 650 | ||
651 | 651 | let bFuncIdxUsdn = 2 | |
652 | 652 | ||
653 | 653 | let bFuncIdxReserveStart = 3 | |
654 | 654 | ||
655 | 655 | let bFuncIdxSupplyStart = 4 | |
656 | 656 | ||
657 | 657 | let bFuncIdxBRStart = 5 | |
658 | 658 | ||
659 | 659 | let bFuncIdxReserveEnd = 6 | |
660 | 660 | ||
661 | 661 | let bFuncIdxSupplyEnd = 7 | |
662 | 662 | ||
663 | 663 | let bFuncIdxBREnd = 8 | |
664 | 664 | ||
665 | 665 | let bFuncIdxRest = 9 | |
666 | 666 | ||
667 | 667 | let bFuncIdxWavesPrice = 10 | |
668 | 668 | ||
669 | 669 | func calcWithdrawT2U (inAmount,inAsset,basketInfo,weightedPrice) = { | |
670 | 670 | let outAmt = convertBasketItemToNeutrino(inAmount, inAsset, basketInfo, weightedPrice) | |
671 | 671 | $Tuple12(outAmt[0], neutrinoAssetId, 0, inAsset, 0, weightedPrice, inAmount, 0, 0, 0, nil, [outAmt[1], outAmt[2]]) | |
672 | 672 | } | |
673 | 673 | ||
674 | 674 | ||
675 | 675 | func calcWithdrawU2Basket (usdnIn,basketInfo,neutrinoSupply) = { | |
676 | 676 | let outAmtGross = convertNeutrinoToBasket(usdnIn, basketInfo, neutrinoSupply) | |
677 | 677 | $Tuple12(outAmtGross._2, unit, 0, neutrinoAssetId, outAmtGross._2, outAmtGross._3, usdnIn, neutrinoSupply, usdnIn, 0, outAmtGross._1, nil) | |
678 | 678 | } | |
679 | 679 | ||
680 | 680 | ||
681 | 681 | func calcWithdraw (swapType,inAmount,price,neutrinoMetrics,inAsset) = { | |
682 | 682 | let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
683 | 683 | let basketInfo = asString(neutrinoMetrics[nMetricBasketInfo]) | |
684 | 684 | let weightedPrice = asInt(neutrinoMetrics[nMetricWeightedPrice]) | |
685 | 685 | let outDataTuple = if ((swapType == "outNeutrino")) | |
686 | 686 | then calcWithdrawT2U(inAmount, inAsset, basketInfo, weightedPrice) | |
687 | 687 | else if ((swapType == "outMulti")) | |
688 | 688 | then calcWithdrawU2Basket(inAmount, basketInfo, neutrinoSupply) | |
689 | 689 | else throw(("Unsupported swap type " + swapType)) | |
690 | 690 | let outAmtGross = outDataTuple._1 | |
691 | 691 | let outAssetId = outDataTuple._2 | |
692 | 692 | let inAmtToSurfPart = outDataTuple._3 | |
693 | 693 | let inAssetId = outDataTuple._4 | |
694 | 694 | let unleaseAmt = outDataTuple._5 | |
695 | 695 | let withdrawPrice = outDataTuple._6 | |
696 | 696 | let basketData = outDataTuple._11 | |
697 | 697 | let netFeeData = outDataTuple._12 | |
698 | 698 | let outNetAmt = if ((swapType == "outNeutrino")) | |
699 | 699 | then netFeeData[0] | |
700 | 700 | else 0 | |
701 | 701 | let outFeeAmt = if ((swapType == "outNeutrino")) | |
702 | 702 | then netFeeData[1] | |
703 | 703 | else 0 | |
704 | 704 | let outSurfAmt = if ((0 >= inAmtToSurfPart)) | |
705 | 705 | then 0 | |
706 | 706 | else asInt(asAnyList(invoke(mathContract, "surfFunctionREADONLY", [inAmtToSurfPart, inAssetId], nil))[bFuncIdxSurf]) | |
707 | 707 | let withdrawBasket = if ((swapType == "outMulti")) | |
708 | 708 | then applyFeesBasket(basketData) | |
709 | 709 | else "" | |
710 | 710 | $Tuple9(outNetAmt, outAssetId, outSurfAmt, inAmtToSurfPart, unleaseAmt, outFeeAmt, outAmtGross, withdrawPrice, withdrawBasket) | |
711 | 711 | } | |
712 | 712 | ||
713 | 713 | ||
714 | 714 | func keyApplyInProgress () = "%s__applyInProgress" | |
715 | 715 | ||
716 | 716 | ||
717 | 717 | func keyProposalDataById (proposalId) = ("%s%d__proposalData__" + toString(proposalId)) | |
718 | 718 | ||
719 | 719 | ||
720 | 720 | let govIdxTxIds = 9 | |
721 | 721 | ||
722 | 722 | func validateUpdate (tx) = match tx { | |
723 | 723 | case o: Order => | |
724 | 724 | throw("Orders aren't allowed") | |
725 | 725 | case t: DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|InvokeExpressionTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction => | |
726 | 726 | let txId = toBase58String(t.id) | |
727 | 727 | let proposalId = valueOrErrorMessage(getInteger(govContract, keyApplyInProgress()), "Apply is not happening") | |
728 | 728 | let txList = split(split(getStringOrFail(govContract, keyProposalDataById(proposalId)), SEP)[govIdxTxIds], LISTSEP) | |
729 | 729 | if (!(isDefined(indexOf(txList, txId)))) | |
730 | 730 | then throw(((("Unknown txId: " + txId) + " for proposalId=") + toString(proposalId))) | |
731 | 731 | else true | |
732 | 732 | case _ => | |
733 | 733 | throw("Match error") | |
734 | 734 | } | |
735 | 735 | ||
736 | 736 | ||
737 | 737 | @Callable(i) | |
738 | 738 | func constructorV1 (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = { | |
739 | 739 | let checkCaller = thisOnly(i) | |
740 | 740 | if ((checkCaller == checkCaller)) | |
741 | 741 | then if ((size(i.payments) != 0)) | |
742 | 742 | then throw("no payments allowed") | |
743 | 743 | else [StringEntry(NeutrinoAssetIdKey, neutrinoAssetIdPrm), StringEntry(BondAssetIdKey, bondAssetIdPrm), StringEntry(AuctionContractKey, auctionContractPrm), StringEntry(LiquidationContractKey, liquidationContractPrm), StringEntry(RPDContractKey, rpdContractPrm), StringEntry(NodeOracleProviderPubKeyKey, nodeOracleProviderPubKeyPrm), IntegerEntry(BalanceWavesLockIntervalKey, balanceWavesLockIntervalPrm), IntegerEntry(BalanceNeutrinoLockIntervalKey, balanceNeutrinoLockIntervalPrm), IntegerEntry(MinTokenSwapAmountKey("WAVES"), minWavesSwapAmountPrm), IntegerEntry(MinNeutrinoSwapAmountKey, minNeutrinoSwapAmountPrm), IntegerEntry(NeutrinoOutFeePartKey, neutrinoOutFeePartPrm), IntegerEntry(WavesOutFeePartKey, wavesOutFeePartPrm)] | |
744 | 744 | else throw("Strict value is not equal to itself.") | |
745 | 745 | } | |
746 | 746 | ||
747 | 747 | ||
748 | 748 | ||
749 | 749 | @Callable(i) | |
750 | 750 | func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = { | |
751 | 751 | let checkCaller = thisOnly(i) | |
752 | 752 | if ((checkCaller == checkCaller)) | |
753 | 753 | then if ((size(i.payments) != 0)) | |
754 | 754 | then throw("no payments allowed") | |
755 | 755 | else [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)] | |
756 | 756 | else throw("Strict value is not equal to itself.") | |
757 | 757 | } | |
758 | 758 | ||
759 | 759 | ||
760 | 760 | ||
761 | 761 | @Callable(i) | |
762 | 762 | func constructorV3 (assetsWeightsMins,dParam,kParam,bParam,deltaParam) = { | |
763 | 763 | let checkCaller = thisOnly(i) | |
764 | 764 | if ((checkCaller == checkCaller)) | |
765 | 765 | then if ((size(i.payments) != 0)) | |
766 | 766 | then throw("no payments allowed") | |
767 | 767 | else { | |
768 | 768 | func prepare (acc,item) = { | |
769 | 769 | let parts = split(item, "_") | |
770 | 770 | let assetId = parts[0] | |
771 | 771 | let weight = parseIntValue(parts[1]) | |
772 | 772 | let minVal = parseIntValue(parts[2]) | |
773 | 773 | $Tuple2((acc._1 :+ assetId), ((acc._2 :+ IntegerEntry(basketWeightByAssetKey(assetId), weight)) :+ IntegerEntry(MinTokenSwapAmountKey(assetId), minVal))) | |
774 | 774 | } | |
775 | 775 | ||
776 | 776 | let r = { | |
777 | 777 | let $l = assetsWeightsMins | |
778 | 778 | let $s = size($l) | |
779 | 779 | let $acc0 = $Tuple2(nil, nil) | |
780 | 780 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
781 | 781 | then $a | |
782 | 782 | else prepare($a, $l[$i]) | |
783 | 783 | ||
784 | 784 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
785 | 785 | then $a | |
786 | 786 | else throw("List size exceeds 10") | |
787 | 787 | ||
788 | 788 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
789 | 789 | } | |
790 | 790 | (((((r._2 :+ IntegerEntry(basketDKey(), dParam)) :+ IntegerEntry(basketKKey(), kParam)) :+ IntegerEntry(basketBKey(), bParam)) :+ IntegerEntry(basketLogbDeltaKey(), log(deltaParam, 6, bParam, 6, 6, HALFUP))) :+ StringEntry(basketAssetsKey(), makeString(r._1, SEP))) | |
791 | 791 | } | |
792 | 792 | else throw("Strict value is not equal to itself.") | |
793 | 793 | } | |
794 | 794 | ||
795 | 795 | ||
796 | 796 | ||
797 | 797 | @Callable(i) | |
798 | 798 | func swapTokenToNeutrino () = if ((size(i.payments) != 1)) | |
799 | 799 | then throw("swapTokenToNeutrino require only one payment") | |
800 | 800 | else { | |
801 | 801 | let pmt = value(i.payments[0]) | |
802 | 802 | let basketAssets = valueOrElse(getString(basketAssetsKey()), "WAVES") | |
803 | 803 | let pmtAssetIdStr = toBase58String(valueOrElse(pmt.assetId, WAVESID)) | |
804 | 804 | if (!(contains(basketAssets, pmtAssetIdStr))) | |
805 | 805 | then throw(((pmtAssetIdStr + " is not one of basket tokens:") + basketAssets)) | |
806 | 806 | else { | |
807 | 807 | let userAddress = toString(i.caller) | |
808 | 808 | let txId58 = toBase58String(i.transactionId) | |
809 | 809 | commonSwap("outNeutrino", pmt.amount, pmtAssetIdStr, userAddress, txId58) | |
810 | 810 | } | |
811 | 811 | } | |
812 | 812 | ||
813 | 813 | ||
814 | 814 | ||
815 | 815 | @Callable(i) | |
816 | 816 | func swapNeutrinoToBasket () = if ((size(i.payments) != 1)) | |
817 | 817 | then throw("swapNeutrinoToBasket require only one payment") | |
818 | 818 | else { | |
819 | 819 | let pmt = value(i.payments[0]) | |
820 | 820 | if ((pmt.assetId != neutrinoAssetId)) | |
821 | 821 | then throw("Only appropriate Neutrino tokens are allowed for swapping.") | |
822 | 822 | else { | |
823 | 823 | let userAddress = toString(i.caller) | |
824 | 824 | let txId58 = toBase58String(i.transactionId) | |
825 | 825 | commonSwap("outMulti", pmt.amount, toBase58String(neutrinoAssetId), userAddress, txId58) | |
826 | 826 | } | |
827 | 827 | } | |
828 | 828 | ||
829 | 829 | ||
830 | 830 | ||
831 | 831 | @Callable(i) | |
832 | 832 | func withdraw (account,index,swapTxId) = { | |
833 | 833 | let txId = toBase58String(i.transactionId) | |
834 | 834 | if ((size(i.payments) != 0)) | |
835 | 835 | then throw("no payments allowed") | |
836 | 836 | else { | |
837 | 837 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
838 | 838 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
839 | 839 | let userAddress = addressFromStringValue(account) | |
840 | 840 | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
841 | 841 | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
842 | 842 | let swapType = dataArray[sIdxSwapType] | |
843 | 843 | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
844 | 844 | let swapStatus = dataArray[sIdxStatus] | |
845 | 845 | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
846 | 846 | let inAsset = dataArray[sIdxInAsset] | |
847 | 847 | let totalLocked = totalLockedREAD(swapType, inAsset) | |
848 | 848 | let totalLockedByUser = totalLockedByUserREAD(swapType, account, inAsset) | |
849 | 849 | let unlockHeight = selfUnlockHeight | |
850 | 850 | let indexHeight = getHeightPriceByIndex(index) | |
851 | 851 | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
852 | 852 | let priceByIndex = getPriceHistory(indexHeight) | |
853 | 853 | if (isBlocked) | |
854 | 854 | then emergencyShutdownFAIL() | |
855 | 855 | else if ((swapStatus != "PENDING")) | |
856 | 856 | then throw("swap has been already processed") | |
857 | 857 | else if ((unlockHeight > height)) | |
858 | 858 | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
859 | 859 | else if (if (if ((index > priceIndex)) | |
860 | 860 | then true | |
861 | 861 | else (unlockHeight > indexHeight)) | |
862 | 862 | then true | |
863 | 863 | else if ((prevIndexHeight != 0)) | |
864 | 864 | then (prevIndexHeight >= unlockHeight) | |
865 | 865 | else false) | |
866 | 866 | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
867 | 867 | else { | |
868 | 868 | let withdrawTuple = calcWithdraw(swapType, inAmount, priceByIndex, neutrinoMetrics, inAsset) | |
869 | 869 | let outNetAmount = withdrawTuple._1 | |
870 | 870 | let outAssetId = withdrawTuple._2 | |
871 | 871 | let outSurfAmt = withdrawTuple._3 | |
872 | 872 | let unleaseAmt = withdrawTuple._5 | |
873 | 873 | let outFeeAmount = withdrawTuple._6 | |
874 | 874 | let outAmtGross = withdrawTuple._7 | |
875 | 875 | let withdrawPrice = withdrawTuple._8 | |
876 | 876 | let withdrawBasket = withdrawTuple._9 | |
877 | 877 | if (if ((swapType == "outNeutrino")) | |
878 | 878 | then (0 >= outAmtGross) | |
879 | 879 | else false) | |
880 | 880 | then throw("balance equals zero") | |
881 | 881 | else { | |
882 | 882 | let surfCondition = if ((outSurfAmt > 0)) | |
883 | 883 | then { | |
884 | 884 | let issueResult = invoke(auctionContract, "issueSurf", [outSurfAmt, account], nil) | |
885 | 885 | if ((issueResult == issueResult)) | |
886 | 886 | then 0 | |
887 | 887 | else throw("Strict value is not equal to itself.") | |
888 | 888 | } | |
889 | 889 | else 0 | |
890 | 890 | if ((surfCondition == surfCondition)) | |
891 | 891 | then { | |
892 | 892 | let unleaseInvOrEmpty = invoke(this, "internalUnleaseAndLease", [unleaseAmt], nil) | |
893 | 893 | if ((unleaseInvOrEmpty == unleaseInvOrEmpty)) | |
894 | 894 | then { | |
895 | 895 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", ["", 0, 0], nil)) | |
896 | 896 | let gnsbtAmtTotal = asInt(gnsbtData[1]) | |
897 | 897 | let gnsbtAmtFromSurfTotal = asInt(asAnyList(gnsbtData[3])[3]) | |
898 | 898 | let commonActions = [IntegerEntry(totalLockedByUserKEY(swapType, account, inAsset), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType, inAsset), (totalLocked - inAmount)), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, withdrawPrice, outNetAmount, outFeeAmount, unlockHeight, index, txId, outSurfAmt, BR, withdrawBasket, inAsset))] | |
899 | 899 | func deposits (surfFees,nsbtFees,surfPayments,nsbtPayments) = { | |
900 | 900 | let surfDeposit = if ((surfFees > 0)) | |
901 | 901 | then asInt(invoke(surfStakingContract, "deposit", nil, surfPayments)) | |
902 | 902 | else 0 | |
903 | 903 | let nsbtDeposit = if ((nsbtFees > 0)) | |
904 | 904 | then asInt(invoke(nsbtStakingContract, "deposit", nil, nsbtPayments)) | |
905 | 905 | else 0 | |
906 | 906 | (surfDeposit + nsbtDeposit) | |
907 | 907 | } | |
908 | 908 | ||
909 | 909 | func divideFees (feeAmount) = { | |
910 | 910 | let surfAmt1 = if ((gnsbtAmtTotal != 0)) | |
911 | 911 | then fraction(feeAmount, gnsbtAmtFromSurfTotal, gnsbtAmtTotal) | |
912 | 912 | else 0 | |
913 | 913 | let surfAmt2 = if ((gnsbtAmtTotal != 0)) | |
914 | 914 | then fraction(feeAmount, (MULT6 - BR), MULT6) | |
915 | 915 | else 0 | |
916 | 916 | let surfAmt = max([surfAmt1, surfAmt2]) | |
917 | 917 | let nsbtAmt = (feeAmount - surfAmt) | |
918 | 918 | [surfAmt, nsbtAmt] | |
919 | 919 | } | |
920 | 920 | ||
921 | 921 | let transfers = if ((swapType == "outMulti")) | |
922 | 922 | then { | |
923 | 923 | let basket = split_4C(withdrawBasket, "_") | |
924 | 924 | func looper (acc,item) = { | |
925 | 925 | let it = split(item, LISTSEP) | |
926 | 926 | let tempAssetId = fromBase58String(it[0]) | |
927 | 927 | let assetId = if ((tempAssetId == WAVESID)) | |
928 | 928 | then unit | |
929 | 929 | else tempAssetId | |
930 | 930 | let netAmount = parseIntValue(it[2]) | |
931 | 931 | let feeAmount = parseIntValue(it[3]) | |
932 | 932 | let fees = divideFees(feeAmount) | |
933 | 933 | $Tuple5((acc._1 :+ ScriptTransfer(userAddress, netAmount, assetId)), (acc._2 :+ AttachedPayment(assetId, fees[0])), (acc._3 :+ AttachedPayment(assetId, fees[1])), (acc._4 + fees[0]), (acc._5 + fees[1])) | |
934 | 934 | } | |
935 | 935 | ||
936 | 936 | let r = { | |
937 | 937 | let $l = basket | |
938 | 938 | let $s = size($l) | |
939 | 939 | let $acc0 = $Tuple5(nil, nil, nil, 0, 0) | |
940 | 940 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
941 | 941 | then $a | |
942 | 942 | else looper($a, $l[$i]) | |
943 | 943 | ||
944 | 944 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
945 | 945 | then $a | |
946 | 946 | else throw("List size exceeds 10") | |
947 | 947 | ||
948 | 948 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
949 | 949 | } | |
950 | 950 | let depoResult = deposits(r._4, r._5, r._2, r._3) | |
951 | 951 | $Tuple2(r._1, depoResult) | |
952 | 952 | } | |
953 | 953 | else { | |
954 | 954 | let fees = divideFees(outFeeAmount) | |
955 | 955 | let depoResult = deposits(fees[0], fees[1], [AttachedPayment(outAssetId, fees[0])], [AttachedPayment(outAssetId, fees[1])]) | |
956 | 956 | $Tuple2([ScriptTransfer(userAddress, outNetAmount, outAssetId)], depoResult) | |
957 | 957 | } | |
958 | 958 | $Tuple2((commonActions ++ transfers._1), transfers._2) | |
959 | 959 | } | |
960 | 960 | else throw("Strict value is not equal to itself.") | |
961 | 961 | } | |
962 | 962 | else throw("Strict value is not equal to itself.") | |
963 | 963 | } | |
964 | 964 | } | |
965 | 965 | } | |
966 | 966 | } | |
967 | 967 | ||
968 | 968 | ||
969 | 969 | ||
970 | 970 | @Callable(i) | |
971 | 971 | func internalUnleaseAndLease (unleaseAmount) = if ((i.caller != this)) | |
972 | 972 | then throw("internalUnleaseAndLease is not public method") | |
973 | 973 | else prepareUnleaseAndLease(unleaseAmount) | |
974 | 974 | ||
975 | 975 | ||
976 | 976 | ||
977 | 977 | @Callable(i) | |
978 | 978 | func transferUsdnToUser (amount,addr) = if ((i.caller != auctionContract)) | |
979 | 979 | then throw("Only auction contract is authorized") | |
980 | 980 | else [ScriptTransfer(addressFromStringValue(addr), amount, neutrinoAssetId)] | |
981 | 981 | ||
982 | 982 | ||
983 | 983 | ||
984 | 984 | @Callable(i) | |
985 | 985 | func acceptWaves () = if (if ((i.caller != auctionContract)) | |
986 | 986 | then (i.caller != govContract) | |
987 | 987 | else false) | |
988 | 988 | then throw("Currently only auction and governance contracts are allowed to call") | |
989 | 989 | else $Tuple2(prepareUnleaseAndLease(0), "success") | |
990 | 990 | ||
991 | 991 | ||
992 | 992 | ||
993 | 993 | @Callable(i) | |
994 | 994 | func approveLeasings (nListS,groupNum,lAmt) = { | |
995 | 995 | let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7] | |
996 | 996 | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
997 | 997 | let mngPub = fromBase58String(mngPubS) | |
998 | 998 | let nodeRegAddrStr = valueOrElse(getString("%s%s__cfg__nodesRegistryAddress"), "3P9vKqQKjUdmpXAfiWau8krREYAY1Xr69pE") | |
999 | 999 | let nodeRegAddr = addressFromStringValue(nodeRegAddrStr) | |
1000 | 1000 | let lGroupNodeListKEY = getLeaseGroupNodeListKey(groupNum) | |
1001 | 1001 | let lGrNodeOpt = getString(this, lGroupNodeListKEY) | |
1002 | 1002 | if (isDefined(lGrNodeOpt)) | |
1003 | 1003 | then throw((("group " + toString(groupNum)) + " already initialized")) | |
1004 | 1004 | else { | |
1005 | 1005 | let nList = split(nListS, SEP) | |
1006 | 1006 | let expCount = size(nIdxs) | |
1007 | 1007 | if ((i.callerPublicKey != mngPub)) | |
1008 | 1008 | then throw("approveLeasings not authorized") | |
1009 | 1009 | else { | |
1010 | 1010 | let $t04371943781 = readNodeInfo(0) | |
1011 | 1011 | let nAddr0 = $t04371943781._1 | |
1012 | 1012 | let lAmtKEY0 = $t04371943781._2 | |
1013 | 1013 | let lAmt0 = $t04371943781._3 | |
1014 | 1014 | let lIdKEY0 = $t04371943781._4 | |
1015 | 1015 | let lId0 = $t04371943781._5 | |
1016 | 1016 | let newL0 = Lease(nAddr0, (lAmt0 - (lAmt * expCount))) | |
1017 | 1017 | let validation = invoke(nodeRegAddr, "validateAndApproveLeasings", [nListS], nil) | |
1018 | 1018 | if ((validation == validation)) | |
1019 | 1019 | then { | |
1020 | 1020 | func forEachNodeValidateAndGenerateLease (a,i) = { | |
1021 | 1021 | let node = nList[i] | |
1022 | 1022 | let la = Lease(addressFromStringValue(node), lAmt) | |
1023 | 1023 | (a ++ [la, BinaryEntry(getLeaseIdByAddressKey(node), lcalc(la)), IntegerEntry(getLeaseAmountByAddressKey(node), lAmt)]) | |
1024 | 1024 | } | |
1025 | 1025 | ||
1026 | 1026 | ([StringEntry(lGroupNodeListKEY, nListS), BinaryEntry(lIdKEY0, lcalc(newL0)), IntegerEntry(lAmtKEY0, newL0.amount), LeaseCancel(lId0), newL0] ++ { | |
1027 | 1027 | let $l = nIdxs | |
1028 | 1028 | let $s = size($l) | |
1029 | 1029 | let $acc0 = nil | |
1030 | 1030 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1031 | 1031 | then $a | |
1032 | 1032 | else forEachNodeValidateAndGenerateLease($a, $l[$i]) | |
1033 | 1033 | ||
1034 | 1034 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1035 | 1035 | then $a | |
1036 | 1036 | else throw("List size exceeds 8") | |
1037 | 1037 | ||
1038 | 1038 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
1039 | 1039 | }) | |
1040 | 1040 | } | |
1041 | 1041 | else throw("Strict value is not equal to itself.") | |
1042 | 1042 | } | |
1043 | 1043 | } | |
1044 | 1044 | } | |
1045 | 1045 | ||
1046 | 1046 | ||
1047 | 1047 | ||
1048 | 1048 | @Callable(i) | |
1049 | 1049 | func rebalanceLeasings (amount,groupNum) = { | |
1050 | 1050 | let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7] | |
1051 | 1051 | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
1052 | 1052 | let mngPub = fromBase58String(mngPubS) | |
1053 | 1053 | let lGroupNodeListKEY = getLeaseGroupNodeListKey(groupNum) | |
1054 | 1054 | let nListS = getStringOrFail(this, lGroupNodeListKEY) | |
1055 | 1055 | let nList = split(nListS, SEP) | |
1056 | 1056 | if ((i.callerPublicKey != mngPub)) | |
1057 | 1057 | then throw("rebalanceLeasings not authorized") | |
1058 | 1058 | else { | |
1059 | 1059 | let unleaseAmt = ((amount / size(nList)) + 1) | |
1060 | 1060 | let $t04502145083 = readNodeInfo(0) | |
1061 | 1061 | let nAddr0 = $t04502145083._1 | |
1062 | 1062 | let lAmtKEY0 = $t04502145083._2 | |
1063 | 1063 | let lAmt0 = $t04502145083._3 | |
1064 | 1064 | let lIdKEY0 = $t04502145083._4 | |
1065 | 1065 | let lId0 = $t04502145083._5 | |
1066 | 1066 | let newL0 = Lease(nAddr0, (lAmt0 + (unleaseAmt * size(nList)))) | |
1067 | 1067 | func forEachNodeDoUnlease (a,i) = { | |
1068 | 1068 | let node = nList[i] | |
1069 | 1069 | let lIdKEY = getLeaseIdByAddressKey(node) | |
1070 | 1070 | let lId = getBinaryValue(this, lIdKEY) | |
1071 | 1071 | let lAmtKEY = getLeaseAmountByAddressKey(node) | |
1072 | 1072 | let lAmt = getIntegerValue(this, lAmtKEY) | |
1073 | 1073 | let ula = LeaseCancel(value(lId)) | |
1074 | 1074 | let la = Lease(addressFromStringValue(node), (lAmt - unleaseAmt)) | |
1075 | 1075 | (a ++ [LeaseCancel(value(lId)), la, BinaryEntry(lIdKEY, lcalc(la)), IntegerEntry(lAmtKEY, la.amount)]) | |
1076 | 1076 | } | |
1077 | 1077 | ||
1078 | 1078 | ({ | |
1079 | 1079 | let $l = nIdxs | |
1080 | 1080 | let $s = size($l) | |
1081 | 1081 | let $acc0 = nil | |
1082 | 1082 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1083 | 1083 | then $a | |
1084 | 1084 | else forEachNodeDoUnlease($a, $l[$i]) | |
1085 | 1085 | ||
1086 | 1086 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1087 | 1087 | then $a | |
1088 | 1088 | else throw("List size exceeds 8") | |
1089 | 1089 | ||
1090 | 1090 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8) | |
1091 | 1091 | } ++ [BinaryEntry(lIdKEY0, lcalc(newL0)), IntegerEntry(lAmtKEY0, newL0.amount), LeaseCancel(lId0), newL0]) | |
1092 | 1092 | } | |
1093 | 1093 | } | |
1094 | 1094 | ||
1095 | 1095 | ||
1096 | 1096 | ||
1097 | 1097 | @Callable(i) | |
1098 | 1098 | func swapParamsByUserSYSREADONLY (userAddressStr,gnsbtDiff) = { | |
1099 | 1099 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStr, 0, 0], nil)) | |
1100 | 1100 | let gnsbtAmt = (asInt(gnsbtData[0]) + gnsbtDiff) | |
1101 | 1101 | let gnsbtAmtTotal = (asInt(gnsbtData[1]) + gnsbtDiff) | |
1102 | 1102 | let swapLimitData = asAnyList(invoke(mathContract, "calcSwapLimitREADONLY", [gnsbtAmt], nil)) | |
1103 | 1103 | let tokenSwapLimitInUsdMax = asInt(swapLimitData[0]) | |
1104 | 1104 | let usdnSwapLimitMax = asInt(swapLimitData[2]) | |
1105 | 1105 | let lastSwapHeight = valueOrElse(getInteger(this, keyUserLastSwapHeight(userAddressStr)), 0) | |
1106 | 1106 | let swapLimitTimelifeBlocks = swapsTimeframeREAD() | |
1107 | 1107 | let passedBlocksAfterLastSwap = (height - lastSwapHeight) | |
1108 | 1108 | let isSwapTimelifeNew = (passedBlocksAfterLastSwap >= swapLimitTimelifeBlocks) | |
1109 | 1109 | let swapLimitSpentInUsdn = if (isSwapTimelifeNew) | |
1110 | 1110 | then 0 | |
1111 | 1111 | else valueOrElse(getInteger(this, keySwapUserSpentInPeriod(userAddressStr)), 0) | |
1112 | 1112 | let blcks2LmtReset = if (isSwapTimelifeNew) | |
1113 | 1113 | then 0 | |
1114 | 1114 | else (swapLimitTimelifeBlocks - passedBlocksAfterLastSwap) | |
1115 | 1115 | $Tuple2(nil, $Tuple7(tokenSwapLimitInUsdMax, swapLimitSpentInUsdn, blcks2LmtReset, gnsbtAmt, gnsbtAmtTotal, 0, usdnSwapLimitMax)) | |
1116 | 1116 | } | |
1117 | 1117 | ||
1118 | 1118 | ||
1119 | 1119 | ||
1120 | 1120 | @Callable(i) | |
1121 | 1121 | func calcWithdrawResultSYSREADONLY (swapType,inAmount,price,inAsset) = { | |
1122 | 1122 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
1123 | 1123 | $Tuple2(nil, calcWithdraw(swapType, inAmount, price, neutrinoMetrics, inAsset)) | |
1124 | 1124 | } | |
1125 | 1125 | ||
1126 | 1126 | ||
1127 | 1127 | ||
1128 | 1128 | @Callable(i) | |
1129 | 1129 | func replaceCommunityNode (oldAddrStr,newAddrStr,groupNum,penaltyAmount) = { | |
1130 | 1130 | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
1131 | 1131 | let mngPub = fromBase58String(mngPubS) | |
1132 | 1132 | if ((i.callerPublicKey != mngPub)) | |
1133 | 1133 | then throw("replaceCommunityNode not authorized") | |
1134 | 1134 | else { | |
1135 | 1135 | let groupKey = getLeaseGroupNodeListKey(groupNum) | |
1136 | 1136 | let groupNodeListS = getStringOrFail(this, groupKey) | |
1137 | 1137 | if (!(contains(groupNodeListS, oldAddrStr))) | |
1138 | 1138 | then throw(((("Group " + toString(groupNum)) + " does not contain address ") + oldAddrStr)) | |
1139 | 1139 | else { | |
1140 | 1140 | let doReplace = invoke(nodeRegistryContract, "replaceApprovedNode", [oldAddrStr, newAddrStr, groupNum, penaltyAmount], nil) | |
1141 | 1141 | if ((doReplace == doReplace)) | |
1142 | 1142 | then { | |
1143 | 1143 | let oldLeaseIdKey = getLeaseIdByAddressKey(oldAddrStr) | |
1144 | 1144 | let oldLeaseAmtKey = getLeaseAmountByAddressKey(oldAddrStr) | |
1145 | 1145 | let leaseAmt = getIntegerValue(oldLeaseAmtKey) | |
1146 | 1146 | let newLeaseIdKey = getLeaseIdByAddressKey(newAddrStr) | |
1147 | 1147 | let newLeaseAmtKey = getLeaseAmountByAddressKey(newAddrStr) | |
1148 | 1148 | let newLease = Lease(addressFromStringValue(newAddrStr), leaseAmt) | |
1149 | 1149 | let updatedGroupNodeListS = makeString(split(groupNodeListS, oldAddrStr), newAddrStr) | |
1150 | 1150 | $Tuple2([LeaseCancel(getBinaryValue(oldLeaseIdKey)), DeleteEntry(oldLeaseIdKey), DeleteEntry(oldLeaseAmtKey), StringEntry(groupKey, updatedGroupNodeListS), newLease, BinaryEntry(newLeaseIdKey, lcalc(newLease)), IntegerEntry(newLeaseAmtKey, leaseAmt)], unit) | |
1151 | 1151 | } | |
1152 | 1152 | else throw("Strict value is not equal to itself.") | |
1153 | 1153 | } | |
1154 | 1154 | } | |
1155 | 1155 | } | |
1156 | 1156 | ||
1157 | 1157 | ||
1158 | 1158 | @Verifier(tx) | |
1159 | 1159 | func verify () = { | |
1160 | 1160 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
1161 | 1161 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
1162 | 1162 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
1163 | 1163 | then 1 | |
1164 | 1164 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
1165 | 1165 | then 1 | |
1166 | 1166 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
1167 | 1167 | then 1 | |
1168 | 1168 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
1169 | 1169 | then 2 | |
1170 | 1170 | else 0)) | |
1171 | 1171 | if (if (isBlocked) | |
1172 | 1172 | then (getStringValue(controlContract, "is_blocked_caller") == toString(govContract)) | |
1173 | 1173 | else false) | |
1174 | 1174 | then validateUpdate(tx) | |
1175 | 1175 | else match tx { | |
1176 | 1176 | case sponsorTx: SponsorFeeTransaction => | |
1177 | 1177 | if (checkIsValidMinSponsoredFee(sponsorTx)) | |
1178 | 1178 | then (count >= 3) | |
1179 | 1179 | else false | |
1180 | 1180 | case _ => | |
1181 | 1181 | (count >= 3) | |
1182 | 1182 | } | |
1183 | 1183 | } | |
1184 | 1184 |
github/deemru/w8io/026f985 90.36 ms ◑