tx · 5xWBDR3qB94w5udUo1dW6ndCg7517ifA7H3tcNKz8c8k 3N6wgiYKqC5pWTY9pvJFaDmVnrfLugeF3D3: -0.02100000 Waves 2022.10.12 12:43 [2268978] smart account 3N6wgiYKqC5pWTY9pvJFaDmVnrfLugeF3D3 > SELF 0.00000000 Waves
{ "type": 13, "id": "5xWBDR3qB94w5udUo1dW6ndCg7517ifA7H3tcNKz8c8k", "fee": 2100000, "feeAssetId": null, "timestamp": 1665567817293, "version": 2, "chainId": 84, "sender": "3N6wgiYKqC5pWTY9pvJFaDmVnrfLugeF3D3", "senderPublicKey": "ChVvYD2gDXJXpaYRt2Zy6ahrzCzHVngm9t1vyPzKXXzP", "proofs": [ "kqbmm6mu1QKGkakxohuFkmU7gkvbNwfpTuGQA9ps2wGuCNxLgwVQroQKvh2HCEDPjFpVf3CSi6KRDDQffTqQxNo" ], "script": "base64:AAIFAAAAAAAAACAIAhIAEgASBQoDCAEIEgYKBAgBCAISABIAEgUKAwgBAQAAAGsBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAAAxnZXRCb29sQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkHAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAB2FkZHJlc3MFAAAAA2tleQAAAAAAAAAAAAEAAAAYZ2V0U3RyaW5nQnlBZGRyZXN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AAgMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAQAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAgAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFVNwb25zb3JGZWVUcmFuc2FjdGlvbgQAAAAJc3BvbnNvclR4BQAAAAckbWF0Y2gwAwkBAAAAG2NoZWNrSXNWYWxpZE1pblNwb25zb3JlZEZlZQAAAAEFAAAACXNwb25zb3JUeAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAAwcJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAOc7g79", "height": 2268978, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
5 | + | ||
6 | + | ||
7 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
8 | + | ||
9 | + | ||
10 | + | func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false) | |
11 | + | ||
12 | + | ||
13 | + | func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0) | |
14 | + | ||
15 | + | ||
16 | + | func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "") | |
17 | + | ||
18 | + | ||
19 | + | func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false) | |
20 | + | ||
21 | + | ||
22 | + | let pubKeyAdminsList = ["GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy", "GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk", "CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP", "Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK"] | |
23 | + | ||
24 | + | let SEP = "__" | |
25 | + | ||
26 | + | let WAVELET = 100000000 | |
27 | + | ||
28 | + | let PAULI = 1000000 | |
29 | + | ||
30 | + | let PRICELET = 1000000 | |
31 | + | ||
32 | + | let DEFAULTSWAPFEE = 20000 | |
33 | + | ||
34 | + | let IdxNetAmount = 0 | |
35 | + | ||
36 | + | let IdxFeeAmount = 1 | |
37 | + | ||
38 | + | let IdxGrossAmount = 2 | |
39 | + | ||
40 | + | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
41 | + | ||
42 | + | let BondAssetIdKey = "bond_asset_id" | |
43 | + | ||
44 | + | let AuctionContractKey = "auction_contract" | |
45 | + | ||
46 | + | let LiquidationContractKey = "liquidation_contract" | |
47 | + | ||
48 | + | let RPDContractKey = "rpd_contract" | |
49 | + | ||
50 | + | let ContolContractKey = "control_contract" | |
51 | + | ||
52 | + | let BalanceWavesLockIntervalKey = "balance_waves_lock_interval" | |
53 | + | ||
54 | + | let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval" | |
55 | + | ||
56 | + | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
57 | + | ||
58 | + | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
59 | + | ||
60 | + | let NodeOracleProviderPubKeyKey = "node_oracle_provider" | |
61 | + | ||
62 | + | let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart" | |
63 | + | ||
64 | + | let WavesOutFeePartKey = "wavesOut_swap_feePart" | |
65 | + | ||
66 | + | let FeesManagerAddressKey = "fees_manager_address" | |
67 | + | ||
68 | + | let RsaRandPublic58Key = "rand_rsa_public" | |
69 | + | ||
70 | + | let PriceKey = "price" | |
71 | + | ||
72 | + | let PriceIndexKey = "price_index" | |
73 | + | ||
74 | + | let IsBlockedKey = "is_blocked" | |
75 | + | ||
76 | + | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
77 | + | ||
78 | + | ||
79 | + | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
80 | + | ||
81 | + | ||
82 | + | func getStakingNodeByIndex (idx) = addressFromStringValue(getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP))) | |
83 | + | ||
84 | + | ||
85 | + | func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * WAVELET)) | |
86 | + | ||
87 | + | ||
88 | + | func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner) | |
89 | + | ||
90 | + | ||
91 | + | func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP) | |
92 | + | ||
93 | + | ||
94 | + | func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP) | |
95 | + | ||
96 | + | ||
97 | + | func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount") | |
98 | + | ||
99 | + | ||
100 | + | func totalLockedKEY (swapType) = ("balance_lock_" + swapType) | |
101 | + | ||
102 | + | ||
103 | + | func totalLockedByUserKEY (swapType,owner) = makeString(["balance_lock", swapType, owner], "_") | |
104 | + | ||
105 | + | ||
106 | + | func balanceLockIntervalKEY (swapType) = (("balance_" + swapType) + "_lock_interval") | |
107 | + | ||
108 | + | ||
109 | + | func minBalanceLockIntervalKEY (swapType) = (("balance_" + swapType) + "_lock_interval_minimum") | |
110 | + | ||
111 | + | ||
112 | + | func outFeePartKEY (swapType) = (swapType + "Out_swap_feePart") | |
113 | + | ||
114 | + | ||
115 | + | func minSwapAmountREAD (swapType) = valueOrElse(getInteger(this, minSwapAmountKEY(swapType)), 0) | |
116 | + | ||
117 | + | ||
118 | + | func totalLockedREAD (swapType) = valueOrElse(getInteger(this, totalLockedKEY(swapType)), 0) | |
119 | + | ||
120 | + | ||
121 | + | func totalLockedByUserREAD (swapType,owner) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner)), 0) | |
122 | + | ||
123 | + | ||
124 | + | func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440) | |
125 | + | ||
126 | + | ||
127 | + | func minBalanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, minBalanceLockIntervalKEY(swapType)), 60) | |
128 | + | ||
129 | + | ||
130 | + | func feeManagerAddressREAD () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, FeesManagerAddressKey), (FeesManagerAddressKey + " is not specified"))), (FeesManagerAddressKey + " invalid address format")) | |
131 | + | ||
132 | + | ||
133 | + | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI) | |
134 | + | ||
135 | + | ||
136 | + | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET) | |
137 | + | ||
138 | + | ||
139 | + | func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price) | |
140 | + | ||
141 | + | ||
142 | + | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
143 | + | ||
144 | + | ||
145 | + | func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount))) | |
146 | + | ||
147 | + | ||
148 | + | func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
149 | + | ||
150 | + | ||
151 | + | 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))) | |
152 | + | ||
153 | + | ||
154 | + | let liquidationContract = getStringByKey(LiquidationContractKey) | |
155 | + | ||
156 | + | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
157 | + | ||
158 | + | let auctionContract = getStringByKey(AuctionContractKey) | |
159 | + | ||
160 | + | let rpdContract = getStringByKey(RPDContractKey) | |
161 | + | ||
162 | + | let controlContract = getStringByKey(ContolContractKey) | |
163 | + | ||
164 | + | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
165 | + | ||
166 | + | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
167 | + | ||
168 | + | let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey)) | |
169 | + | ||
170 | + | let bondAssetId = fromBase58String("6nSpVyNH7yM69eg446wrQR94ipbbcmZMU1ENPwanC97g") | |
171 | + | ||
172 | + | let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF") | |
173 | + | ||
174 | + | let rsaPub = fromBase64String(valueOrErrorMessage(getString(this, RsaRandPublic58Key), "RSA public key has not been specified")) | |
175 | + | ||
176 | + | let neutrinoContract = this | |
177 | + | ||
178 | + | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
179 | + | ||
180 | + | let neutrinoLockedBalance = totalLockedREAD("neutrino") | |
181 | + | ||
182 | + | let wavesLockedBalance = totalLockedREAD("waves") | |
183 | + | ||
184 | + | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
185 | + | ||
186 | + | let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId)) | |
187 | + | ||
188 | + | let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply) | |
189 | + | ||
190 | + | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice)) | |
191 | + | ||
192 | + | func checkIsValidMinSponsoredFee (tx) = { | |
193 | + | let MINTRANSFERFEE = 100000 | |
194 | + | let SponsoredFeeUpperBound = 1000 | |
195 | + | let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, currentPrice) | |
196 | + | let minNeutrinoFee = (realNeutrinoFee * 2) | |
197 | + | let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100) | |
198 | + | let inputFee = value(tx.minSponsoredAssetFee) | |
199 | + | if (if ((inputFee >= minNeutrinoFee)) | |
200 | + | then (maxNeutrinoFee >= inputFee) | |
201 | + | else false) | |
202 | + | then (tx.assetId == neutrinoAssetId) | |
203 | + | else false | |
204 | + | } | |
205 | + | ||
206 | + | ||
207 | + | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
208 | + | ||
209 | + | ||
210 | + | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
211 | + | ||
212 | + | ||
213 | + | let sIdxSwapType = 1 | |
214 | + | ||
215 | + | let sIdxStatus = 2 | |
216 | + | ||
217 | + | let sIdxInAmount = 3 | |
218 | + | ||
219 | + | let sIdxPrice = 4 | |
220 | + | ||
221 | + | let sIdxOutNetAmount = 5 | |
222 | + | ||
223 | + | let sIdxOutFeeAmount = 6 | |
224 | + | ||
225 | + | let sIdxStartHeight = 7 | |
226 | + | ||
227 | + | let sIdxStartTimestamp = 8 | |
228 | + | ||
229 | + | let sIdxEndHeight = 9 | |
230 | + | ||
231 | + | let sIdxEndTimestamp = 10 | |
232 | + | ||
233 | + | let sIdxSelfUnlockHeight = 11 | |
234 | + | ||
235 | + | let sIdxRandUnlockHeight = 12 | |
236 | + | ||
237 | + | let sIdxIndex = 13 | |
238 | + | ||
239 | + | let sIdxWithdrawTxId = 14 | |
240 | + | ||
241 | + | func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP) | |
242 | + | ||
243 | + | ||
244 | + | func strSwapDATA (swapType,status,inAmount,price,outNetAmount,outFeeAmount,startHeight,startTimestamp,endHeight,endTimestamp,selfUnlockHeight,randUnlockHeight,index,withdrawTxId) = makeString(["%s%s%d%d%d%d%d%d%d%d%d%d%d%s", swapType, status, inAmount, price, outNetAmount, outFeeAmount, startHeight, startTimestamp, endHeight, endTimestamp, selfUnlockHeight, randUnlockHeight, index, withdrawTxId], SEP) | |
245 | + | ||
246 | + | ||
247 | + | func pendingSwapDATA (swapType,inAssetAmount,selfUnlockHeight) = strSwapDATA(swapType, "PENDING", toString(inAssetAmount), "0", "0", "0", toString(height), toString(lastBlock.timestamp), "0", "0", toString(selfUnlockHeight), "0", "0", "NULL") | |
248 | + | ||
249 | + | ||
250 | + | func finishSwapDATA (dataArray,price,outNetAmount,outFeeAmount,randUnlockHeight,index,withdrawTxId) = 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) | |
251 | + | ||
252 | + | ||
253 | + | func swapDataFailOrREAD (userAddress,swapTxId) = { | |
254 | + | let swapKey = swapKEY(userAddress, swapTxId) | |
255 | + | split(valueOrErrorMessage(getString(this, swapKey), ("no swap data for " + swapKey)), SEP) | |
256 | + | } | |
257 | + | ||
258 | + | ||
259 | + | func applyFees (amountGross,feePart) = { | |
260 | + | let feeAmount = fraction(amountGross, feePart, PAULI) | |
261 | + | [(amountGross - feeAmount), feeAmount, amountGross] | |
262 | + | } | |
263 | + | ||
264 | + | ||
265 | + | func randUnlockHeightOrFail (txId,rsaSig,swapType,startHeight) = { | |
266 | + | let isRsaValid = rsaVerify_16Kb(SHA256, toBytes(txId), rsaSig, rsaPub) | |
267 | + | if (!(isRsaValid)) | |
268 | + | then throw("invalid RSA signature") | |
269 | + | else { | |
270 | + | let maxBalanceLockInterval = balanceLockIntervalREAD(swapType) | |
271 | + | let minBalanceLockInterval = minBalanceLockIntervalREAD(swapType) | |
272 | + | let rand = (toInt(sha256_16Kb(rsaSig)) % (maxBalanceLockInterval - minBalanceLockInterval)) | |
273 | + | let randLockInterval = (minBalanceLockInterval + (if ((0 > rand)) | |
274 | + | then -(rand) | |
275 | + | else rand)) | |
276 | + | (startHeight + randLockInterval) | |
277 | + | } | |
278 | + | } | |
279 | + | ||
280 | + | ||
281 | + | func abs (x) = if ((0 > x)) | |
282 | + | then -(x) | |
283 | + | else x | |
284 | + | ||
285 | + | ||
286 | + | func selectNode (unleaseAmount) = { | |
287 | + | let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship()) | |
288 | + | let oldLeased0 = getNumberByKey(getLeaseAmountKey(0)) | |
289 | + | let oldLeased1 = getNumberByKey(getLeaseAmountKey(1)) | |
290 | + | let newLeased0 = (amountToLease + oldLeased0) | |
291 | + | let newLeased1 = (amountToLease + oldLeased1) | |
292 | + | if (if ((newLeased0 > 0)) | |
293 | + | then true | |
294 | + | else (newLeased1 > 0)) | |
295 | + | then { | |
296 | + | let delta0 = abs((newLeased0 - oldLeased1)) | |
297 | + | let delta1 = abs((newLeased1 - oldLeased0)) | |
298 | + | if ((delta1 >= delta0)) | |
299 | + | then $Tuple2(0, newLeased0) | |
300 | + | else $Tuple2(1, newLeased1) | |
301 | + | } | |
302 | + | else $Tuple2(-1, 0) | |
303 | + | } | |
304 | + | ||
305 | + | ||
306 | + | func prepareUnleaseAndLease (unleaseAmount) = { | |
307 | + | let nodeTuple = selectNode(unleaseAmount) | |
308 | + | let nodeIndex = nodeTuple._1 | |
309 | + | let newLeaseAmount = nodeTuple._2 | |
310 | + | if ((newLeaseAmount > 0)) | |
311 | + | then { | |
312 | + | let leaseIdKey = getLeaseIdKey(nodeIndex) | |
313 | + | let oldLease = getBinary(this, leaseIdKey) | |
314 | + | let unleaseOrEmpty = if (isDefined(oldLease)) | |
315 | + | then [LeaseCancel(value(oldLease))] | |
316 | + | else nil | |
317 | + | let leaseAmountKey = getLeaseAmountKey(nodeIndex) | |
318 | + | let lease = Lease(getStakingNodeByIndex(nodeIndex), newLeaseAmount) | |
319 | + | (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, calculateLeaseId(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)]) | |
320 | + | } | |
321 | + | else nil | |
322 | + | } | |
323 | + | ||
324 | + | ||
325 | + | func commonSwap (swapType,i) = { | |
326 | + | let pmt = value(i.payments[0]) | |
327 | + | let account = toString(i.caller) | |
328 | + | let txId58 = toBase58String(i.transactionId) | |
329 | + | let minSwapAmount = minSwapAmountREAD(swapType) | |
330 | + | let totalLocked = totalLockedREAD(swapType) | |
331 | + | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
332 | + | let balanceLockMaxInterval = balanceLockIntervalREAD(swapType) | |
333 | + | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
334 | + | if ((minSwapAmount > pmt.amount)) | |
335 | + | then minSwapAmountFAIL(swapType, minSwapAmount) | |
336 | + | else if (isBlocked) | |
337 | + | then emergencyShutdownFAIL() | |
338 | + | else { | |
339 | + | let leasePart = if ((swapType == "waves")) | |
340 | + | then prepareUnleaseAndLease(0) | |
341 | + | else nil | |
342 | + | $Tuple2(([IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser + pmt.amount)), IntegerEntry(getBalanceUnlockBlockKey(account), (height + balanceLockMaxInterval)), IntegerEntry(totalLockedKEY(swapType), (totalLocked + pmt.amount)), StringEntry(swapKEY(account, txId58), pendingSwapDATA(swapType, pmt.amount, selfUnlockHeight))] ++ leasePart), unit) | |
343 | + | } | |
344 | + | } | |
345 | + | ||
346 | + | ||
347 | + | func commonWithdraw (account,index,swapTxId,rsaSigOrUnit,i) = { | |
348 | + | let userAddress = addressFromStringValue(account) | |
349 | + | let feeManagerAddress = feeManagerAddressREAD() | |
350 | + | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
351 | + | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
352 | + | let swapType = dataArray[sIdxSwapType] | |
353 | + | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
354 | + | let swapStatus = dataArray[sIdxStatus] | |
355 | + | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
356 | + | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
357 | + | let totalLocked = totalLockedREAD(swapType) | |
358 | + | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
359 | + | let unlockHeight = match rsaSigOrUnit { | |
360 | + | case rsaSig: ByteVector => | |
361 | + | randUnlockHeightOrFail(swapTxId, rsaSig, swapType, startHeight) | |
362 | + | case _: Unit => | |
363 | + | selfUnlockHeight | |
364 | + | case _ => | |
365 | + | throw("Match error") | |
366 | + | } | |
367 | + | let indexHeight = getHeightPriceByIndex(index) | |
368 | + | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
369 | + | let priceByIndex = getPriceHistory(indexHeight) | |
370 | + | let outAmountGrossTuple = if ((swapType == "waves")) | |
371 | + | then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId) | |
372 | + | else if ((swapType == "neutrino")) | |
373 | + | then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit) | |
374 | + | else throw(("Unsupported swap type " + swapType)) | |
375 | + | let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart) | |
376 | + | let outNetAmount = payoutsArray[IdxNetAmount] | |
377 | + | let outFeeAmount = payoutsArray[IdxFeeAmount] | |
378 | + | if (isBlocked) | |
379 | + | then emergencyShutdownFAIL() | |
380 | + | else if ((swapStatus != "PENDING")) | |
381 | + | then throw("swap has been already processed") | |
382 | + | else if ((unlockHeight > height)) | |
383 | + | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
384 | + | else if (if (if ((index > priceIndex)) | |
385 | + | then true | |
386 | + | else (unlockHeight > indexHeight)) | |
387 | + | then true | |
388 | + | else if ((prevIndexHeight != 0)) | |
389 | + | then (prevIndexHeight >= unlockHeight) | |
390 | + | else false) | |
391 | + | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
392 | + | else if ((0 >= payoutsArray[IdxGrossAmount])) | |
393 | + | then throw("balance equals zero") | |
394 | + | else if (if ((0 > outFeePart)) | |
395 | + | then true | |
396 | + | else (outFeePart >= PAULI)) | |
397 | + | then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart))) | |
398 | + | else { | |
399 | + | let leasePart = if (if ((swapType == "neutrino")) | |
400 | + | then (outAmountGrossTuple._1 > 0) | |
401 | + | else false) | |
402 | + | then prepareUnleaseAndLease(outAmountGrossTuple._1) | |
403 | + | else nil | |
404 | + | $Tuple2((leasePart ++ [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), ScriptTransfer(feeManagerAddress, outFeeAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, toBase58String(i.transactionId)))]), unit) | |
405 | + | } | |
406 | + | } | |
407 | + | ||
408 | + | ||
409 | + | @Callable(i) | |
410 | + | func swapWavesToNeutrino () = { | |
411 | + | let pmt = value(i.payments[0]) | |
412 | + | if (isDefined(pmt.assetId)) | |
413 | + | then throw("Only Waves token is allowed for swapping.") | |
414 | + | else commonSwap("waves", i) | |
415 | + | } | |
416 | + | ||
417 | + | ||
418 | + | ||
419 | + | @Callable(i) | |
420 | + | func swapNeutrinoToWaves () = { | |
421 | + | let pmt = value(i.payments[0]) | |
422 | + | if ((pmt.assetId != neutrinoAssetId)) | |
423 | + | then throw("Only appropriate Neutrino tokens are allowed for swapping.") | |
424 | + | else commonSwap("neutrino", i) | |
425 | + | } | |
426 | + | ||
427 | + | ||
428 | + | ||
429 | + | @Callable(i) | |
430 | + | func withdraw (account,index,swapTxId) = commonWithdraw(account, index, swapTxId, unit, i) | |
431 | + | ||
432 | + | ||
433 | + | ||
434 | + | @Callable(i) | |
435 | + | func withdrawRand (account,index,swapTxId,rsaSig) = commonWithdraw(account, index, swapTxId, rsaSig, i) | |
436 | + | ||
437 | + | ||
438 | + | ||
439 | + | @Callable(i) | |
440 | + | func transferToAuction () = { | |
441 | + | let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId)) | |
442 | + | let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId)) | |
443 | + | if (isBlocked) | |
444 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
445 | + | else if ((auctionNBAmount > (1 * PAULI))) | |
446 | + | then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)] | |
447 | + | else if ((surplusWithLiquidation >= (1 * PAULI))) | |
448 | + | then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)] | |
449 | + | else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus))) | |
450 | + | } | |
451 | + | ||
452 | + | ||
453 | + | ||
454 | + | @Callable(i) | |
455 | + | func acceptWaves () = if ((i.caller != addressFromStringValue(auctionContract))) | |
456 | + | then throw("Currently only auction contract is allowed to call") | |
457 | + | else $Tuple2(prepareUnleaseAndLease(0), "success") | |
458 | + | ||
459 | + | ||
460 | + | ||
461 | + | @Callable(i) | |
462 | + | func migrateActiveLeasings (leaseChunkTxId,chunkAmount,nodeIndex) = if ((i.callerPublicKey != nodeOracleProviderPubKey)) | |
463 | + | then throw("not authorized") | |
464 | + | else { | |
465 | + | let leaseAmountKEY = getLeaseAmountKey(nodeIndex) | |
466 | + | let amountToAdd = ((wavesBalance(neutrinoContract).available + chunkAmount) - getReservedAmountForSponsorship()) | |
467 | + | let oldLeasedAmount = getNumberByKey(leaseAmountKEY) | |
468 | + | let newLeaseAmount = (oldLeasedAmount + amountToAdd) | |
469 | + | let leaseIdKEY = getLeaseIdKey(nodeIndex) | |
470 | + | let oldLeaseId = getBinary(this, leaseIdKEY) | |
471 | + | let oldUnleaseOrEmpty = if (isDefined(oldLeaseId)) | |
472 | + | then [LeaseCancel(value(oldLeaseId))] | |
473 | + | else nil | |
474 | + | let lease = Lease(getStakingNodeByIndex(nodeIndex), newLeaseAmount) | |
475 | + | (oldUnleaseOrEmpty ++ [LeaseCancel(fromBase58String(leaseChunkTxId)), lease, BinaryEntry(leaseIdKEY, calculateLeaseId(lease)), IntegerEntry(leaseAmountKEY, newLeaseAmount)]) | |
476 | + | } | |
477 | + | ||
478 | + | ||
479 | + | @Verifier(tx) | |
480 | + | func verify () = { | |
481 | + | let id = toBase58String(tx.id) | |
482 | + | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
483 | + | then 1 | |
484 | + | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
485 | + | then 1 | |
486 | + | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
487 | + | then 1 | |
488 | + | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
489 | + | then 2 | |
490 | + | else 0)) | |
491 | + | match tx { | |
492 | + | case sponsorTx: SponsorFeeTransaction => | |
493 | + | if (checkIsValidMinSponsoredFee(sponsorTx)) | |
494 | + | then (count >= 3) | |
495 | + | else false | |
496 | + | case _ => | |
497 | + | (count >= 3) | |
498 | + | } | |
499 | + | } | |
500 | + |
github/deemru/w8io/026f985 54.08 ms ◑