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