tx · MvqrafPwemyS2mZG4Y4v8ByfvujrT3FYw4CmwAB6tRG 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj: -0.01400000 Waves 2022.03.16 11:20 [1966278] smart account 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj > SELF 0.00000000 Waves
{ "type": 13, "id": "MvqrafPwemyS2mZG4Y4v8ByfvujrT3FYw4CmwAB6tRG", "fee": 1400000, "feeAssetId": null, "timestamp": 1647418828181, "version": 1, "sender": "3N9be2mwrA52WJho6DiesZkk4351GvpnWuj", "senderPublicKey": "6mzmbCza9iqbzxMEELcEA4Xc9NeF4CYpbTtz1zMK3C7x", "proofs": [ "2kAda2gxzxKYbh8vdgPMvM5ouxhZP9SFzBLXBBXPeVSEi1vAvRskJse1i8wurCLczfmiKGnAMRgswCep5PT1Goit", "5iQbJZSXWUiv1sNXjfoGoWudyNggvJUMRbTnYMLVhgQNZnx2gnJH1zERyj7Nqh7HaSnbZqibCVkRfpkhZPbcyjLU", "2udhH5jGXeZZ3A8akWo1y1g2TLYEcTQJa75WwSwNFXPNh5iAaAzCCU728YtfbzpA35Kr6LAijXDioCaSphBUMTZB" ], "script": "base64:AAIFAAAAAAAAADYIAhIGCgQIAQgIEg4KDAgICAgICAEBAQEBARIFCgMICAESABIAEgUKAwgBCBIAEgQKAgEIEgAAAABzAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAEAAAAMZ2V0Qm9vbEJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5BwEAAAAYZ2V0TnVtYmVyQnlBZGRyZ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AAAAAAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAVU3BvbnNvckZlZVRyYW5zYWN0aW9uBAAAAAlzcG9uc29yVHgFAAAAByRtYXRjaDADCQEAAAAbY2hlY2tJc1ZhbGlkTWluU3BvbnNvcmVkRmVlAAAAAQUAAAAJc3BvbnNvclR4CQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADBwkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAAxrJMsI=", "chainId": 84, "height": 1966278, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FCtNwUX7qPaJ17n29RghudgJwKS9sU8Gb4pgUvZw1mvB Next: G49CKWHdPTtjx4uyWRbooY3bihbp6cBjUkQBenFzeY4j Diff:
Old | New | Differences | |
---|---|---|---|
93 | 93 | ||
94 | 94 | let FeesManagerAddressKey = "fees_manager_address" | |
95 | 95 | ||
96 | - | func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration" | |
97 | - | ||
98 | - | ||
99 | 96 | let PriceKey = "price" | |
100 | 97 | ||
101 | 98 | let PriceIndexKey = "price_index" | |
165 | 162 | func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1) | |
166 | 163 | ||
167 | 164 | ||
168 | - | func | |
165 | + | func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP) | |
169 | 166 | ||
170 | 167 | ||
171 | - | func | |
168 | + | func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP) | |
172 | 169 | ||
173 | 170 | ||
174 | 171 | func feeManagerAddressREAD () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, FeesManagerAddressKey), (FeesManagerAddressKey + " is not specified"))), (FeesManagerAddressKey + " invalid address format")) | |
356 | 353 | } | |
357 | 354 | ||
358 | 355 | ||
359 | - | func commonWithdraw (account,index,swapTxId,i) = { | |
360 | - | let userAddress = addressFromStringValue(account) | |
361 | - | let feeManagerAddress = feeManagerAddressREAD() | |
362 | - | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
363 | - | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
364 | - | let swapType = dataArray[sIdxSwapType] | |
365 | - | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
366 | - | let swapStatus = dataArray[sIdxStatus] | |
367 | - | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
368 | - | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
356 | + | func commonSwap (swapType,pmtAmount,userAddressStr,txId58,swapLimit) = { | |
357 | + | let minSwapAmount = minSwapAmountREAD(swapType) | |
369 | 358 | let totalLocked = totalLockedREAD(swapType) | |
370 | - | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
371 | - | let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType))) | |
372 | - | let indexHeight = getHeightPriceByIndex(index) | |
373 | - | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
374 | - | let priceByIndex = getPriceHistory(indexHeight) | |
375 | - | let outAmountGrossTuple = if ((swapType == "waves")) | |
376 | - | then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId) | |
377 | - | else if ((swapType == "neutrino")) | |
378 | - | then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit) | |
379 | - | else throw(("Unsupported swap type " + swapType)) | |
380 | - | let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart) | |
381 | - | let outNetAmount = payoutsArray[IdxNetAmount] | |
382 | - | let outFeeAmount = payoutsArray[IdxFeeAmount] | |
383 | - | if (isBlocked) | |
384 | - | then emergencyShutdownFAIL() | |
385 | - | else if ((swapStatus != "PENDING")) | |
386 | - | then throw("swap has been already processed") | |
387 | - | else if ((unlockHeight > height)) | |
388 | - | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
389 | - | else if (if (if ((index > priceIndex)) | |
390 | - | then true | |
391 | - | else (unlockHeight > indexHeight)) | |
392 | - | then true | |
393 | - | else if ((prevIndexHeight != 0)) | |
394 | - | then (prevIndexHeight >= unlockHeight) | |
395 | - | else false) | |
396 | - | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
397 | - | else if ((0 >= payoutsArray[IdxGrossAmount])) | |
398 | - | then throw("balance equals zero") | |
399 | - | else if (if ((0 > outFeePart)) | |
359 | + | let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr) | |
360 | + | let nodeAddress = getStakingNodeByIndex(0) | |
361 | + | let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex)) | |
362 | + | let isSwapByNode = (nodeAddress == userAddressStr) | |
363 | + | let minBlocksBetweenSwaps = swapsTimeframeREAD() | |
364 | + | let amountCheck = if ((minSwapAmount > pmtAmount)) | |
365 | + | then minSwapAmountFAIL(swapType, minSwapAmount) | |
366 | + | else true | |
367 | + | if ((amountCheck == amountCheck)) | |
368 | + | then { | |
369 | + | let balanceLockMaxInterval = if (isSwapByNode) | |
370 | + | then nodeBalanceLockIntervalREAD() | |
371 | + | else balanceLockIntervalREAD(swapType) | |
372 | + | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
373 | + | let swapUsdnVolume = if ((swapType == "neutrino")) | |
374 | + | then pmtAmount | |
375 | + | else convertWavesToNeutrino(pmtAmount, priceByIndex) | |
376 | + | let validateNodeIsCaller = if (isSwapByNode) | |
377 | + | then true | |
378 | + | else { | |
379 | + | let lastSwapHeight = getNumberByKey(keyUserLastSwapHeight(userAddressStr)) | |
380 | + | if ((minBlocksBetweenSwaps > (height - lastSwapHeight))) | |
381 | + | then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((lastSwapHeight + minBlocksBetweenSwaps)))) | |
382 | + | else if ((swapUsdnVolume > swapLimit)) | |
383 | + | then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimit))) | |
384 | + | else true | |
385 | + | } | |
386 | + | if ((validateNodeIsCaller == validateNodeIsCaller)) | |
387 | + | then if (isBlocked) | |
388 | + | then emergencyShutdownFAIL() | |
389 | + | else { | |
390 | + | let leasePart = if ((swapType == "waves")) | |
391 | + | then prepareUnleaseAndLease(0) | |
392 | + | else nil | |
393 | + | $Tuple2(([IntegerEntry(keySwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), IntegerEntry(totalLockedKEY(swapType), (totalLocked + pmtAmount)), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight))] ++ leasePart), unit) | |
394 | + | } | |
395 | + | else throw("Strict value is not equal to itself.") | |
396 | + | } | |
397 | + | else throw("Strict value is not equal to itself.") | |
398 | + | } | |
399 | + | ||
400 | + | ||
401 | + | @Callable(i) | |
402 | + | func commonWithdraw (account,index,swapTxId,withdrawTxId) = { | |
403 | + | let checkCaller = thisOnly(i) | |
404 | + | if ((checkCaller == checkCaller)) | |
405 | + | then { | |
406 | + | let userAddress = addressFromStringValue(account) | |
407 | + | let feeManagerAddress = feeManagerAddressREAD() | |
408 | + | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
409 | + | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
410 | + | let swapType = dataArray[sIdxSwapType] | |
411 | + | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
412 | + | let swapStatus = dataArray[sIdxStatus] | |
413 | + | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
414 | + | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
415 | + | let totalLocked = totalLockedREAD(swapType) | |
416 | + | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
417 | + | let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType))) | |
418 | + | let indexHeight = getHeightPriceByIndex(index) | |
419 | + | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
420 | + | let priceByIndex = getPriceHistory(indexHeight) | |
421 | + | let outAmountGrossTuple = if ((swapType == "waves")) | |
422 | + | then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId) | |
423 | + | else if ((swapType == "neutrino")) | |
424 | + | then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit) | |
425 | + | else throw(("Unsupported swap type " + swapType)) | |
426 | + | let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart) | |
427 | + | let outNetAmount = payoutsArray[IdxNetAmount] | |
428 | + | let outFeeAmount = payoutsArray[IdxFeeAmount] | |
429 | + | if (isBlocked) | |
430 | + | then emergencyShutdownFAIL() | |
431 | + | else if ((swapStatus != "PENDING")) | |
432 | + | then throw("swap has been already processed") | |
433 | + | else if ((unlockHeight > height)) | |
434 | + | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
435 | + | else if (if (if ((index > priceIndex)) | |
400 | 436 | then true | |
401 | - | else (outFeePart >= PAULI)) | |
402 | - | then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart))) | |
403 | - | else { | |
404 | - | let leasePart = if (if ((swapType == "neutrino")) | |
405 | - | then (outAmountGrossTuple._1 > 0) | |
406 | - | else false) | |
407 | - | then prepareUnleaseAndLease(outAmountGrossTuple._1) | |
408 | - | else nil | |
409 | - | $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) | |
410 | - | } | |
437 | + | else (unlockHeight > indexHeight)) | |
438 | + | then true | |
439 | + | else if ((prevIndexHeight != 0)) | |
440 | + | then (prevIndexHeight >= unlockHeight) | |
441 | + | else false) | |
442 | + | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
443 | + | else if ((0 >= payoutsArray[IdxGrossAmount])) | |
444 | + | then throw("balance equals zero") | |
445 | + | else if (if ((0 > outFeePart)) | |
446 | + | then true | |
447 | + | else (outFeePart >= PAULI)) | |
448 | + | then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart))) | |
449 | + | else { | |
450 | + | let leasePart = if (if ((swapType == "neutrino")) | |
451 | + | then (outAmountGrossTuple._1 > 0) | |
452 | + | else false) | |
453 | + | then prepareUnleaseAndLease(outAmountGrossTuple._1) | |
454 | + | else nil | |
455 | + | let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)]) | |
456 | + | if ((nsbtStakingDeposit == nsbtStakingDeposit)) | |
457 | + | then $Tuple2((leasePart ++ [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, toBase58String(i.transactionId)))]), unit) | |
458 | + | else throw("Strict value is not equal to itself.") | |
459 | + | } | |
460 | + | } | |
461 | + | else throw("Strict value is not equal to itself.") | |
411 | 462 | } | |
463 | + | ||
412 | 464 | ||
413 | 465 | ||
414 | 466 | @Callable(i) | |
432 | 484 | ||
433 | 485 | ||
434 | 486 | @Callable(i) | |
435 | - | func commonSwap (swapType,pmtAmount,userAddressStr,txId58) = { | |
436 | - | let checkThisOriginCaller = if ((i.caller != this)) | |
437 | - | then throw("Permission denied. Wrong caller.") | |
438 | - | else true | |
439 | - | if ((checkThisOriginCaller == checkThisOriginCaller)) | |
440 | - | then { | |
441 | - | let checkCaller = if ((i.originCaller != addressFromStringValue(userAddressStr))) | |
442 | - | then throw("Permission denied. Wrong origin caller.") | |
443 | - | else true | |
444 | - | if ((checkCaller == checkCaller)) | |
445 | - | then { | |
446 | - | let minSwapAmount = minSwapAmountREAD(swapType) | |
447 | - | let totalLocked = totalLockedREAD(swapType) | |
448 | - | let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr) | |
449 | - | let nodeAddress = getStakingNodeByIndex(0) | |
450 | - | let balanceLockMaxInterval = if ((nodeAddress == userAddressStr)) | |
451 | - | then nodeBalanceLockIntervalREAD() | |
452 | - | else balanceLockIntervalREAD(swapType) | |
453 | - | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
454 | - | let amountCheck = if ((minSwapAmount > pmtAmount)) | |
455 | - | then minSwapAmountFAIL(swapType, minSwapAmount) | |
456 | - | else true | |
457 | - | if ((amountCheck == amountCheck)) | |
458 | - | then { | |
459 | - | let lastSwapHeight = getNumberByKey(keyUserLastQuickSwapHeight(userAddressStr)) | |
460 | - | let swapsTimeframeBlocks = swapsTimeframeREAD() | |
461 | - | if ((swapsTimeframeBlocks > (height - lastSwapHeight))) | |
462 | - | then throw(("You have exceeded swap limit for 24h! Next allowed swap height is " + toString((lastSwapHeight + swapsTimeframeBlocks)))) | |
463 | - | else { | |
464 | - | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
465 | - | let quickSwapLimitTotal = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil)) | |
466 | - | if ((quickSwapLimitTotal == quickSwapLimitTotal)) | |
467 | - | then { | |
468 | - | let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex)) | |
469 | - | let swapUsdnVolume = if ((swapType == "neutrino")) | |
470 | - | then pmtAmount | |
471 | - | else convertWavesToNeutrino(pmtAmount, priceByIndex) | |
472 | - | if ((swapUsdnVolume > quickSwapLimitTotal)) | |
473 | - | then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(quickSwapLimitTotal))) | |
474 | - | else if (isBlocked) | |
475 | - | then emergencyShutdownFAIL() | |
476 | - | else { | |
477 | - | let leasePart = if ((swapType == "waves")) | |
478 | - | then prepareUnleaseAndLease(0) | |
479 | - | else nil | |
480 | - | $Tuple2(([IntegerEntry(keyQuickSwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastQuickSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), IntegerEntry(totalLockedKEY(swapType), (totalLocked + pmtAmount)), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight))] ++ leasePart), unit) | |
481 | - | } | |
482 | - | } | |
483 | - | else throw("Strict value is not equal to itself.") | |
484 | - | } | |
485 | - | } | |
486 | - | else throw("Strict value is not equal to itself.") | |
487 | - | } | |
488 | - | else throw("Strict value is not equal to itself.") | |
489 | - | } | |
490 | - | else throw("Strict value is not equal to itself.") | |
491 | - | } | |
492 | - | ||
493 | - | ||
494 | - | ||
495 | - | @Callable(i) | |
496 | 487 | func swapWavesToNeutrino () = { | |
497 | 488 | let pmt = value(i.payments[0]) | |
498 | 489 | if (isDefined(pmt.assetId)) | |
500 | 491 | else { | |
501 | 492 | let userAddress = toString(i.caller) | |
502 | 493 | let txId58 = toBase58String(i.transactionId) | |
503 | - | let | |
504 | - | | |
505 | - | | |
506 | - | | |
494 | + | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddress)), 0) | |
495 | + | let swapLimit = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil)) | |
496 | + | let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapLimit) | |
497 | + | commonSwapResult | |
507 | 498 | } | |
508 | 499 | } | |
509 | 500 | ||
517 | 508 | else { | |
518 | 509 | let userAddress = toString(i.caller) | |
519 | 510 | let txId58 = toBase58String(i.transactionId) | |
520 | - | let | |
521 | - | | |
522 | - | | |
523 | - | | |
511 | + | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddress)), 0) | |
512 | + | let swapLimitTotal = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil)) | |
513 | + | let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapLimitTotal) | |
514 | + | commonSwapResult | |
524 | 515 | } | |
525 | 516 | } | |
526 | 517 | ||
527 | 518 | ||
528 | 519 | ||
529 | 520 | @Callable(i) | |
530 | - | func withdraw (account,index,swapTxId) = commonWithdraw(account, index, swapTxId, i) | |
521 | + | func withdraw (account,index,swapTxId) = { | |
522 | + | let commonWithdrawInv = invoke(this, "commonWithdraw", [account, index, swapTxId, toBase58String(i.transactionId)], nil) | |
523 | + | if ((commonWithdrawInv == commonWithdrawInv)) | |
524 | + | then nil | |
525 | + | else throw("Strict value is not equal to itself.") | |
526 | + | } | |
531 | 527 | ||
532 | 528 | ||
533 | 529 | ||
534 | 530 | @Callable(i) | |
535 | 531 | func transferToAuction () = { | |
536 | - | let neutrinoMetrics = asAnyList(invoke(mathContract, " | |
532 | + | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
537 | 533 | let reserve = asInt(neutrinoMetrics[3]) | |
538 | 534 | let neutrinoSupply = asInt(neutrinoMetrics[5]) | |
539 | 535 | let surplus = asInt(neutrinoMetrics[6]) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "") | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func asAnyList (val) = match val { | |
23 | 23 | case valAnyLyst: List[Any] => | |
24 | 24 | valAnyLyst | |
25 | 25 | case _ => | |
26 | 26 | throw("fail to cast into List[Any]") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func asString (val) = match val { | |
31 | 31 | case valStr: String => | |
32 | 32 | valStr | |
33 | 33 | case _ => | |
34 | 34 | throw("fail to cast into String") | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func asInt (val) = match val { | |
39 | 39 | case valInt: Int => | |
40 | 40 | valInt | |
41 | 41 | case _ => | |
42 | 42 | throw("fail to cast into Int") | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | let pubKeyAdminsList = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"] | |
47 | 47 | ||
48 | 48 | let SEP = "__" | |
49 | 49 | ||
50 | 50 | let WAVELET = 100000000 | |
51 | 51 | ||
52 | 52 | let PAULI = 1000000 | |
53 | 53 | ||
54 | 54 | let PRICELET = 1000000 | |
55 | 55 | ||
56 | 56 | let DEFAULTSWAPFEE = 20000 | |
57 | 57 | ||
58 | 58 | let IdxNetAmount = 0 | |
59 | 59 | ||
60 | 60 | let IdxFeeAmount = 1 | |
61 | 61 | ||
62 | 62 | let IdxGrossAmount = 2 | |
63 | 63 | ||
64 | 64 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
65 | 65 | ||
66 | 66 | let BondAssetIdKey = "bond_asset_id" | |
67 | 67 | ||
68 | 68 | let AuctionContractKey = "auction_contract" | |
69 | 69 | ||
70 | 70 | let NsbtStakingContractKey = "nsbtStakingContract" | |
71 | 71 | ||
72 | 72 | let LiquidationContractKey = "liquidation_contract" | |
73 | 73 | ||
74 | 74 | let RPDContractKey = "rpd_contract" | |
75 | 75 | ||
76 | 76 | let ContolContractKey = "control_contract" | |
77 | 77 | ||
78 | 78 | let MathContractKey = "math_contract" | |
79 | 79 | ||
80 | 80 | let BalanceWavesLockIntervalKey = "balance_waves_lock_interval" | |
81 | 81 | ||
82 | 82 | let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval" | |
83 | 83 | ||
84 | 84 | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
85 | 85 | ||
86 | 86 | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
87 | 87 | ||
88 | 88 | let NodeOracleProviderPubKeyKey = "node_oracle_provider" | |
89 | 89 | ||
90 | 90 | let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart" | |
91 | 91 | ||
92 | 92 | let WavesOutFeePartKey = "wavesOut_swap_feePart" | |
93 | 93 | ||
94 | 94 | let FeesManagerAddressKey = "fees_manager_address" | |
95 | 95 | ||
96 | - | func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration" | |
97 | - | ||
98 | - | ||
99 | 96 | let PriceKey = "price" | |
100 | 97 | ||
101 | 98 | let PriceIndexKey = "price_index" | |
102 | 99 | ||
103 | 100 | let IsBlockedKey = "is_blocked" | |
104 | 101 | ||
105 | 102 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
106 | 103 | ||
107 | 104 | ||
108 | 105 | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
109 | 106 | ||
110 | 107 | ||
111 | 108 | func getStakingNodeByIndex (idx) = getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP)) | |
112 | 109 | ||
113 | 110 | ||
114 | 111 | func getStakingNodeAddressByIndex (idx) = addressFromStringValue(getStakingNodeByIndex(idx)) | |
115 | 112 | ||
116 | 113 | ||
117 | 114 | func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * WAVELET)) | |
118 | 115 | ||
119 | 116 | ||
120 | 117 | func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner) | |
121 | 118 | ||
122 | 119 | ||
123 | 120 | func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP) | |
124 | 121 | ||
125 | 122 | ||
126 | 123 | func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP) | |
127 | 124 | ||
128 | 125 | ||
129 | 126 | func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount") | |
130 | 127 | ||
131 | 128 | ||
132 | 129 | func totalLockedKEY (swapType) = ("balance_lock_" + swapType) | |
133 | 130 | ||
134 | 131 | ||
135 | 132 | func totalLockedByUserKEY (swapType,owner) = makeString(["balance_lock", swapType, owner], "_") | |
136 | 133 | ||
137 | 134 | ||
138 | 135 | func balanceLockIntervalKEY (swapType) = (("balance_" + swapType) + "_lock_interval") | |
139 | 136 | ||
140 | 137 | ||
141 | 138 | func nodeBalanceLockIntervalKEY () = "balance_node_lock_interval" | |
142 | 139 | ||
143 | 140 | ||
144 | 141 | func outFeePartKEY (swapType) = (swapType + "Out_swap_feePart") | |
145 | 142 | ||
146 | 143 | ||
147 | 144 | func swapsTimeframeKEY () = "swaps_timeframe" | |
148 | 145 | ||
149 | 146 | ||
150 | 147 | func minSwapAmountREAD (swapType) = valueOrElse(getInteger(this, minSwapAmountKEY(swapType)), 0) | |
151 | 148 | ||
152 | 149 | ||
153 | 150 | func swapsTimeframeREAD () = valueOrElse(getInteger(this, swapsTimeframeKEY()), 1440) | |
154 | 151 | ||
155 | 152 | ||
156 | 153 | func totalLockedREAD (swapType) = valueOrElse(getInteger(this, totalLockedKEY(swapType)), 0) | |
157 | 154 | ||
158 | 155 | ||
159 | 156 | func totalLockedByUserREAD (swapType,owner) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner)), 0) | |
160 | 157 | ||
161 | 158 | ||
162 | 159 | func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440) | |
163 | 160 | ||
164 | 161 | ||
165 | 162 | func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1) | |
166 | 163 | ||
167 | 164 | ||
168 | - | func | |
165 | + | func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP) | |
169 | 166 | ||
170 | 167 | ||
171 | - | func | |
168 | + | func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP) | |
172 | 169 | ||
173 | 170 | ||
174 | 171 | func feeManagerAddressREAD () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, FeesManagerAddressKey), (FeesManagerAddressKey + " is not specified"))), (FeesManagerAddressKey + " invalid address format")) | |
175 | 172 | ||
176 | 173 | ||
177 | 174 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI) | |
178 | 175 | ||
179 | 176 | ||
180 | 177 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET) | |
181 | 178 | ||
182 | 179 | ||
183 | 180 | func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price) | |
184 | 181 | ||
185 | 182 | ||
186 | 183 | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
187 | 184 | ||
188 | 185 | ||
189 | 186 | func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount))) | |
190 | 187 | ||
191 | 188 | ||
192 | 189 | func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
193 | 190 | ||
194 | 191 | ||
195 | 192 | 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))) | |
196 | 193 | ||
197 | 194 | ||
198 | 195 | let liquidationContract = getStringByKey(LiquidationContractKey) | |
199 | 196 | ||
200 | 197 | let nsbtStakingContractStr = getStringByKey(NsbtStakingContractKey) | |
201 | 198 | ||
202 | 199 | let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey)) | |
203 | 200 | ||
204 | 201 | let auctionContract = getStringByKey(AuctionContractKey) | |
205 | 202 | ||
206 | 203 | let rpdContract = getStringByKey(RPDContractKey) | |
207 | 204 | ||
208 | 205 | let controlContract = getStringByKey(ContolContractKey) | |
209 | 206 | ||
210 | 207 | let mathContractAddress = getStringByKey(MathContractKey) | |
211 | 208 | ||
212 | 209 | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
213 | 210 | ||
214 | 211 | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
215 | 212 | ||
216 | 213 | let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey)) | |
217 | 214 | ||
218 | 215 | let bondAssetId = fromBase58String("F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z") | |
219 | 216 | ||
220 | 217 | let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF") | |
221 | 218 | ||
222 | 219 | let neutrinoContract = this | |
223 | 220 | ||
224 | 221 | let mathContract = addressFromStringValue(mathContractAddress) | |
225 | 222 | ||
226 | 223 | let nsbtStakingContract = addressFromStringValue(nsbtStakingContractStr) | |
227 | 224 | ||
228 | 225 | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
229 | 226 | ||
230 | 227 | func checkIsValidMinSponsoredFee (tx) = { | |
231 | 228 | let MINTRANSFERFEE = 100000 | |
232 | 229 | let SponsoredFeeUpperBound = 1000 | |
233 | 230 | let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, currentPrice) | |
234 | 231 | let minNeutrinoFee = (realNeutrinoFee * 2) | |
235 | 232 | let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100) | |
236 | 233 | let inputFee = value(tx.minSponsoredAssetFee) | |
237 | 234 | if (if ((inputFee >= minNeutrinoFee)) | |
238 | 235 | then (maxNeutrinoFee >= inputFee) | |
239 | 236 | else false) | |
240 | 237 | then (tx.assetId == neutrinoAssetId) | |
241 | 238 | else false | |
242 | 239 | } | |
243 | 240 | ||
244 | 241 | ||
245 | 242 | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
246 | 243 | ||
247 | 244 | ||
248 | 245 | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
249 | 246 | ||
250 | 247 | ||
251 | 248 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
252 | 249 | ||
253 | 250 | ||
254 | 251 | let sIdxSwapType = 1 | |
255 | 252 | ||
256 | 253 | let sIdxStatus = 2 | |
257 | 254 | ||
258 | 255 | let sIdxInAmount = 3 | |
259 | 256 | ||
260 | 257 | let sIdxPrice = 4 | |
261 | 258 | ||
262 | 259 | let sIdxOutNetAmount = 5 | |
263 | 260 | ||
264 | 261 | let sIdxOutFeeAmount = 6 | |
265 | 262 | ||
266 | 263 | let sIdxStartHeight = 7 | |
267 | 264 | ||
268 | 265 | let sIdxStartTimestamp = 8 | |
269 | 266 | ||
270 | 267 | let sIdxEndHeight = 9 | |
271 | 268 | ||
272 | 269 | let sIdxEndTimestamp = 10 | |
273 | 270 | ||
274 | 271 | let sIdxSelfUnlockHeight = 11 | |
275 | 272 | ||
276 | 273 | let sIdxRandUnlockHeight = 12 | |
277 | 274 | ||
278 | 275 | let sIdxIndex = 13 | |
279 | 276 | ||
280 | 277 | let sIdxWithdrawTxId = 14 | |
281 | 278 | ||
282 | 279 | let sIdxMinRand = 15 | |
283 | 280 | ||
284 | 281 | let sIdxMaxRand = 16 | |
285 | 282 | ||
286 | 283 | func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP) | |
287 | 284 | ||
288 | 285 | ||
289 | 286 | func strSwapDATA (swapType,status,inAmount,price,outNetAmount,outFeeAmount,startHeight,startTimestamp,endHeight,endTimestamp,selfUnlockHeight,randUnlockHeight,index,withdrawTxId,randMin,randMax) = 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, randMin, randMax], SEP) | |
290 | 287 | ||
291 | 288 | ||
292 | 289 | 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", "0", "0") | |
293 | 290 | ||
294 | 291 | ||
295 | 292 | 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, dataArray[sIdxMinRand], dataArray[sIdxMaxRand]) | |
296 | 293 | ||
297 | 294 | ||
298 | 295 | func swapDataFailOrREAD (userAddress,swapTxId) = { | |
299 | 296 | let swapKey = swapKEY(userAddress, swapTxId) | |
300 | 297 | split(valueOrErrorMessage(getString(this, swapKey), ("no swap data for " + swapKey)), SEP) | |
301 | 298 | } | |
302 | 299 | ||
303 | 300 | ||
304 | 301 | func applyFees (amountGross,feePart) = { | |
305 | 302 | let feeAmount = fraction(amountGross, feePart, PAULI) | |
306 | 303 | [(amountGross - feeAmount), feeAmount, amountGross] | |
307 | 304 | } | |
308 | 305 | ||
309 | 306 | ||
310 | 307 | func abs (x) = if ((0 > x)) | |
311 | 308 | then -(x) | |
312 | 309 | else x | |
313 | 310 | ||
314 | 311 | ||
315 | 312 | func selectNode (unleaseAmount) = { | |
316 | 313 | let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship()) | |
317 | 314 | let oldLeased0 = getNumberByKey(getLeaseAmountKey(0)) | |
318 | 315 | let oldLeased1 = getNumberByKey(getLeaseAmountKey(1)) | |
319 | 316 | let newLeased0 = (amountToLease + oldLeased0) | |
320 | 317 | let newLeased1 = (amountToLease + oldLeased1) | |
321 | 318 | if (if ((newLeased0 > 0)) | |
322 | 319 | then true | |
323 | 320 | else (newLeased1 > 0)) | |
324 | 321 | then { | |
325 | 322 | let delta0 = abs((newLeased0 - oldLeased1)) | |
326 | 323 | let delta1 = abs((newLeased1 - oldLeased0)) | |
327 | 324 | if ((delta1 >= delta0)) | |
328 | 325 | then $Tuple2(0, newLeased0) | |
329 | 326 | else $Tuple2(1, newLeased1) | |
330 | 327 | } | |
331 | 328 | else $Tuple2(-1, 0) | |
332 | 329 | } | |
333 | 330 | ||
334 | 331 | ||
335 | 332 | func thisOnly (i) = if ((i.caller != this)) | |
336 | 333 | then throw("Permission denied: this contract only allowed") | |
337 | 334 | else true | |
338 | 335 | ||
339 | 336 | ||
340 | 337 | func prepareUnleaseAndLease (unleaseAmount) = { | |
341 | 338 | let nodeTuple = selectNode(unleaseAmount) | |
342 | 339 | let nodeIndex = nodeTuple._1 | |
343 | 340 | let newLeaseAmount = nodeTuple._2 | |
344 | 341 | if ((newLeaseAmount > 0)) | |
345 | 342 | then { | |
346 | 343 | let leaseIdKey = getLeaseIdKey(nodeIndex) | |
347 | 344 | let oldLease = getBinary(this, leaseIdKey) | |
348 | 345 | let unleaseOrEmpty = if (isDefined(oldLease)) | |
349 | 346 | then [LeaseCancel(value(oldLease))] | |
350 | 347 | else nil | |
351 | 348 | let leaseAmountKey = getLeaseAmountKey(nodeIndex) | |
352 | 349 | let lease = Lease(getStakingNodeAddressByIndex(nodeIndex), newLeaseAmount) | |
353 | 350 | (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, calculateLeaseId(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)]) | |
354 | 351 | } | |
355 | 352 | else nil | |
356 | 353 | } | |
357 | 354 | ||
358 | 355 | ||
359 | - | func commonWithdraw (account,index,swapTxId,i) = { | |
360 | - | let userAddress = addressFromStringValue(account) | |
361 | - | let feeManagerAddress = feeManagerAddressREAD() | |
362 | - | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
363 | - | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
364 | - | let swapType = dataArray[sIdxSwapType] | |
365 | - | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
366 | - | let swapStatus = dataArray[sIdxStatus] | |
367 | - | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
368 | - | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
356 | + | func commonSwap (swapType,pmtAmount,userAddressStr,txId58,swapLimit) = { | |
357 | + | let minSwapAmount = minSwapAmountREAD(swapType) | |
369 | 358 | let totalLocked = totalLockedREAD(swapType) | |
370 | - | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
371 | - | let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType))) | |
372 | - | let indexHeight = getHeightPriceByIndex(index) | |
373 | - | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
374 | - | let priceByIndex = getPriceHistory(indexHeight) | |
375 | - | let outAmountGrossTuple = if ((swapType == "waves")) | |
376 | - | then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId) | |
377 | - | else if ((swapType == "neutrino")) | |
378 | - | then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit) | |
379 | - | else throw(("Unsupported swap type " + swapType)) | |
380 | - | let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart) | |
381 | - | let outNetAmount = payoutsArray[IdxNetAmount] | |
382 | - | let outFeeAmount = payoutsArray[IdxFeeAmount] | |
383 | - | if (isBlocked) | |
384 | - | then emergencyShutdownFAIL() | |
385 | - | else if ((swapStatus != "PENDING")) | |
386 | - | then throw("swap has been already processed") | |
387 | - | else if ((unlockHeight > height)) | |
388 | - | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
389 | - | else if (if (if ((index > priceIndex)) | |
390 | - | then true | |
391 | - | else (unlockHeight > indexHeight)) | |
392 | - | then true | |
393 | - | else if ((prevIndexHeight != 0)) | |
394 | - | then (prevIndexHeight >= unlockHeight) | |
395 | - | else false) | |
396 | - | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
397 | - | else if ((0 >= payoutsArray[IdxGrossAmount])) | |
398 | - | then throw("balance equals zero") | |
399 | - | else if (if ((0 > outFeePart)) | |
359 | + | let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr) | |
360 | + | let nodeAddress = getStakingNodeByIndex(0) | |
361 | + | let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex)) | |
362 | + | let isSwapByNode = (nodeAddress == userAddressStr) | |
363 | + | let minBlocksBetweenSwaps = swapsTimeframeREAD() | |
364 | + | let amountCheck = if ((minSwapAmount > pmtAmount)) | |
365 | + | then minSwapAmountFAIL(swapType, minSwapAmount) | |
366 | + | else true | |
367 | + | if ((amountCheck == amountCheck)) | |
368 | + | then { | |
369 | + | let balanceLockMaxInterval = if (isSwapByNode) | |
370 | + | then nodeBalanceLockIntervalREAD() | |
371 | + | else balanceLockIntervalREAD(swapType) | |
372 | + | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
373 | + | let swapUsdnVolume = if ((swapType == "neutrino")) | |
374 | + | then pmtAmount | |
375 | + | else convertWavesToNeutrino(pmtAmount, priceByIndex) | |
376 | + | let validateNodeIsCaller = if (isSwapByNode) | |
377 | + | then true | |
378 | + | else { | |
379 | + | let lastSwapHeight = getNumberByKey(keyUserLastSwapHeight(userAddressStr)) | |
380 | + | if ((minBlocksBetweenSwaps > (height - lastSwapHeight))) | |
381 | + | then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((lastSwapHeight + minBlocksBetweenSwaps)))) | |
382 | + | else if ((swapUsdnVolume > swapLimit)) | |
383 | + | then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimit))) | |
384 | + | else true | |
385 | + | } | |
386 | + | if ((validateNodeIsCaller == validateNodeIsCaller)) | |
387 | + | then if (isBlocked) | |
388 | + | then emergencyShutdownFAIL() | |
389 | + | else { | |
390 | + | let leasePart = if ((swapType == "waves")) | |
391 | + | then prepareUnleaseAndLease(0) | |
392 | + | else nil | |
393 | + | $Tuple2(([IntegerEntry(keySwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), IntegerEntry(totalLockedKEY(swapType), (totalLocked + pmtAmount)), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight))] ++ leasePart), unit) | |
394 | + | } | |
395 | + | else throw("Strict value is not equal to itself.") | |
396 | + | } | |
397 | + | else throw("Strict value is not equal to itself.") | |
398 | + | } | |
399 | + | ||
400 | + | ||
401 | + | @Callable(i) | |
402 | + | func commonWithdraw (account,index,swapTxId,withdrawTxId) = { | |
403 | + | let checkCaller = thisOnly(i) | |
404 | + | if ((checkCaller == checkCaller)) | |
405 | + | then { | |
406 | + | let userAddress = addressFromStringValue(account) | |
407 | + | let feeManagerAddress = feeManagerAddressREAD() | |
408 | + | let dataArray = swapDataFailOrREAD(account, swapTxId) | |
409 | + | let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight]) | |
410 | + | let swapType = dataArray[sIdxSwapType] | |
411 | + | let inAmount = parseIntValue(dataArray[sIdxInAmount]) | |
412 | + | let swapStatus = dataArray[sIdxStatus] | |
413 | + | let startHeight = parseIntValue(dataArray[sIdxStartHeight]) | |
414 | + | let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE) | |
415 | + | let totalLocked = totalLockedREAD(swapType) | |
416 | + | let totalLockedByUser = totalLockedByUserREAD(swapType, account) | |
417 | + | let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType))) | |
418 | + | let indexHeight = getHeightPriceByIndex(index) | |
419 | + | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
420 | + | let priceByIndex = getPriceHistory(indexHeight) | |
421 | + | let outAmountGrossTuple = if ((swapType == "waves")) | |
422 | + | then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId) | |
423 | + | else if ((swapType == "neutrino")) | |
424 | + | then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit) | |
425 | + | else throw(("Unsupported swap type " + swapType)) | |
426 | + | let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart) | |
427 | + | let outNetAmount = payoutsArray[IdxNetAmount] | |
428 | + | let outFeeAmount = payoutsArray[IdxFeeAmount] | |
429 | + | if (isBlocked) | |
430 | + | then emergencyShutdownFAIL() | |
431 | + | else if ((swapStatus != "PENDING")) | |
432 | + | then throw("swap has been already processed") | |
433 | + | else if ((unlockHeight > height)) | |
434 | + | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds")) | |
435 | + | else if (if (if ((index > priceIndex)) | |
400 | 436 | then true | |
401 | - | else (outFeePart >= PAULI)) | |
402 | - | then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart))) | |
403 | - | else { | |
404 | - | let leasePart = if (if ((swapType == "neutrino")) | |
405 | - | then (outAmountGrossTuple._1 > 0) | |
406 | - | else false) | |
407 | - | then prepareUnleaseAndLease(outAmountGrossTuple._1) | |
408 | - | else nil | |
409 | - | $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) | |
410 | - | } | |
437 | + | else (unlockHeight > indexHeight)) | |
438 | + | then true | |
439 | + | else if ((prevIndexHeight != 0)) | |
440 | + | then (prevIndexHeight >= unlockHeight) | |
441 | + | else false) | |
442 | + | then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight) | |
443 | + | else if ((0 >= payoutsArray[IdxGrossAmount])) | |
444 | + | then throw("balance equals zero") | |
445 | + | else if (if ((0 > outFeePart)) | |
446 | + | then true | |
447 | + | else (outFeePart >= PAULI)) | |
448 | + | then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart))) | |
449 | + | else { | |
450 | + | let leasePart = if (if ((swapType == "neutrino")) | |
451 | + | then (outAmountGrossTuple._1 > 0) | |
452 | + | else false) | |
453 | + | then prepareUnleaseAndLease(outAmountGrossTuple._1) | |
454 | + | else nil | |
455 | + | let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)]) | |
456 | + | if ((nsbtStakingDeposit == nsbtStakingDeposit)) | |
457 | + | then $Tuple2((leasePart ++ [IntegerEntry(totalLockedByUserKEY(swapType, account), (totalLockedByUser - inAmount)), IntegerEntry(totalLockedKEY(swapType), (totalLocked - inAmount)), ScriptTransfer(userAddress, outNetAmount, outAmountGrossTuple._2), StringEntry(swapKEY(account, swapTxId), finishSwapDATA(dataArray, priceByIndex, outNetAmount, outFeeAmount, unlockHeight, index, toBase58String(i.transactionId)))]), unit) | |
458 | + | else throw("Strict value is not equal to itself.") | |
459 | + | } | |
460 | + | } | |
461 | + | else throw("Strict value is not equal to itself.") | |
411 | 462 | } | |
463 | + | ||
412 | 464 | ||
413 | 465 | ||
414 | 466 | @Callable(i) | |
415 | 467 | func constructor (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = { | |
416 | 468 | let checkCaller = thisOnly(i) | |
417 | 469 | if ((checkCaller == checkCaller)) | |
418 | 470 | then [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(MinWavesSwapAmountKey, minWavesSwapAmountPrm), IntegerEntry(MinNeutrinoSwapAmountKey, minNeutrinoSwapAmountPrm), IntegerEntry(NeutrinoOutFeePartKey, neutrinoOutFeePartPrm), IntegerEntry(WavesOutFeePartKey, wavesOutFeePartPrm)] | |
419 | 471 | else throw("Strict value is not equal to itself.") | |
420 | 472 | } | |
421 | 473 | ||
422 | 474 | ||
423 | 475 | ||
424 | 476 | @Callable(i) | |
425 | 477 | func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = { | |
426 | 478 | let checkCaller = thisOnly(i) | |
427 | 479 | if ((checkCaller == checkCaller)) | |
428 | 480 | then [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)] | |
429 | 481 | else throw("Strict value is not equal to itself.") | |
430 | 482 | } | |
431 | 483 | ||
432 | 484 | ||
433 | 485 | ||
434 | 486 | @Callable(i) | |
435 | - | func commonSwap (swapType,pmtAmount,userAddressStr,txId58) = { | |
436 | - | let checkThisOriginCaller = if ((i.caller != this)) | |
437 | - | then throw("Permission denied. Wrong caller.") | |
438 | - | else true | |
439 | - | if ((checkThisOriginCaller == checkThisOriginCaller)) | |
440 | - | then { | |
441 | - | let checkCaller = if ((i.originCaller != addressFromStringValue(userAddressStr))) | |
442 | - | then throw("Permission denied. Wrong origin caller.") | |
443 | - | else true | |
444 | - | if ((checkCaller == checkCaller)) | |
445 | - | then { | |
446 | - | let minSwapAmount = minSwapAmountREAD(swapType) | |
447 | - | let totalLocked = totalLockedREAD(swapType) | |
448 | - | let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr) | |
449 | - | let nodeAddress = getStakingNodeByIndex(0) | |
450 | - | let balanceLockMaxInterval = if ((nodeAddress == userAddressStr)) | |
451 | - | then nodeBalanceLockIntervalREAD() | |
452 | - | else balanceLockIntervalREAD(swapType) | |
453 | - | let selfUnlockHeight = (height + balanceLockMaxInterval) | |
454 | - | let amountCheck = if ((minSwapAmount > pmtAmount)) | |
455 | - | then minSwapAmountFAIL(swapType, minSwapAmount) | |
456 | - | else true | |
457 | - | if ((amountCheck == amountCheck)) | |
458 | - | then { | |
459 | - | let lastSwapHeight = getNumberByKey(keyUserLastQuickSwapHeight(userAddressStr)) | |
460 | - | let swapsTimeframeBlocks = swapsTimeframeREAD() | |
461 | - | if ((swapsTimeframeBlocks > (height - lastSwapHeight))) | |
462 | - | then throw(("You have exceeded swap limit for 24h! Next allowed swap height is " + toString((lastSwapHeight + swapsTimeframeBlocks)))) | |
463 | - | else { | |
464 | - | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
465 | - | let quickSwapLimitTotal = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil)) | |
466 | - | if ((quickSwapLimitTotal == quickSwapLimitTotal)) | |
467 | - | then { | |
468 | - | let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex)) | |
469 | - | let swapUsdnVolume = if ((swapType == "neutrino")) | |
470 | - | then pmtAmount | |
471 | - | else convertWavesToNeutrino(pmtAmount, priceByIndex) | |
472 | - | if ((swapUsdnVolume > quickSwapLimitTotal)) | |
473 | - | then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(quickSwapLimitTotal))) | |
474 | - | else if (isBlocked) | |
475 | - | then emergencyShutdownFAIL() | |
476 | - | else { | |
477 | - | let leasePart = if ((swapType == "waves")) | |
478 | - | then prepareUnleaseAndLease(0) | |
479 | - | else nil | |
480 | - | $Tuple2(([IntegerEntry(keyQuickSwapUserSpentInPeriod(userAddressStr), swapUsdnVolume), IntegerEntry(keyUserLastQuickSwapHeight(userAddressStr), height), IntegerEntry(totalLockedByUserKEY(swapType, userAddressStr), (totalLockedByUser + pmtAmount)), IntegerEntry(getBalanceUnlockBlockKey(userAddressStr), selfUnlockHeight), IntegerEntry(totalLockedKEY(swapType), (totalLocked + pmtAmount)), StringEntry(swapKEY(userAddressStr, txId58), pendingSwapDATA(swapType, pmtAmount, selfUnlockHeight))] ++ leasePart), unit) | |
481 | - | } | |
482 | - | } | |
483 | - | else throw("Strict value is not equal to itself.") | |
484 | - | } | |
485 | - | } | |
486 | - | else throw("Strict value is not equal to itself.") | |
487 | - | } | |
488 | - | else throw("Strict value is not equal to itself.") | |
489 | - | } | |
490 | - | else throw("Strict value is not equal to itself.") | |
491 | - | } | |
492 | - | ||
493 | - | ||
494 | - | ||
495 | - | @Callable(i) | |
496 | 487 | func swapWavesToNeutrino () = { | |
497 | 488 | let pmt = value(i.payments[0]) | |
498 | 489 | if (isDefined(pmt.assetId)) | |
499 | 490 | then throw("Only Waves token is allowed for swapping.") | |
500 | 491 | else { | |
501 | 492 | let userAddress = toString(i.caller) | |
502 | 493 | let txId58 = toBase58String(i.transactionId) | |
503 | - | let | |
504 | - | | |
505 | - | | |
506 | - | | |
494 | + | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddress)), 0) | |
495 | + | let swapLimit = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil)) | |
496 | + | let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapLimit) | |
497 | + | commonSwapResult | |
507 | 498 | } | |
508 | 499 | } | |
509 | 500 | ||
510 | 501 | ||
511 | 502 | ||
512 | 503 | @Callable(i) | |
513 | 504 | func swapNeutrinoToWaves () = { | |
514 | 505 | let pmt = value(i.payments[0]) | |
515 | 506 | if ((pmt.assetId != neutrinoAssetId)) | |
516 | 507 | then throw("Only appropriate Neutrino tokens are allowed for swapping.") | |
517 | 508 | else { | |
518 | 509 | let userAddress = toString(i.caller) | |
519 | 510 | let txId58 = toBase58String(i.transactionId) | |
520 | - | let | |
521 | - | | |
522 | - | | |
523 | - | | |
511 | + | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddress)), 0) | |
512 | + | let swapLimitTotal = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil)) | |
513 | + | let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapLimitTotal) | |
514 | + | commonSwapResult | |
524 | 515 | } | |
525 | 516 | } | |
526 | 517 | ||
527 | 518 | ||
528 | 519 | ||
529 | 520 | @Callable(i) | |
530 | - | func withdraw (account,index,swapTxId) = commonWithdraw(account, index, swapTxId, i) | |
521 | + | func withdraw (account,index,swapTxId) = { | |
522 | + | let commonWithdrawInv = invoke(this, "commonWithdraw", [account, index, swapTxId, toBase58String(i.transactionId)], nil) | |
523 | + | if ((commonWithdrawInv == commonWithdrawInv)) | |
524 | + | then nil | |
525 | + | else throw("Strict value is not equal to itself.") | |
526 | + | } | |
531 | 527 | ||
532 | 528 | ||
533 | 529 | ||
534 | 530 | @Callable(i) | |
535 | 531 | func transferToAuction () = { | |
536 | - | let neutrinoMetrics = asAnyList(invoke(mathContract, " | |
532 | + | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
537 | 533 | let reserve = asInt(neutrinoMetrics[3]) | |
538 | 534 | let neutrinoSupply = asInt(neutrinoMetrics[5]) | |
539 | 535 | let surplus = asInt(neutrinoMetrics[6]) | |
540 | 536 | let nsbtSupply = asInt(neutrinoMetrics[9]) | |
541 | 537 | let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId)) | |
542 | 538 | let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId)) | |
543 | 539 | if (isBlocked) | |
544 | 540 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
545 | 541 | else if ((auctionNBAmount > (1 * PAULI))) | |
546 | 542 | then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)] | |
547 | 543 | else if ((surplusWithLiquidation >= (1 * PAULI))) | |
548 | 544 | then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)] | |
549 | 545 | else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus))) | |
550 | 546 | } | |
551 | 547 | ||
552 | 548 | ||
553 | 549 | ||
554 | 550 | @Callable(i) | |
555 | 551 | func transferUsdnToUser (amount,addr) = if ((i.caller != addressFromStringValue(auctionContract))) | |
556 | 552 | then throw("Only auction contract is authorized") | |
557 | 553 | else [ScriptTransfer(addressFromStringValue(addr), amount, neutrinoAssetId)] | |
558 | 554 | ||
559 | 555 | ||
560 | 556 | ||
561 | 557 | @Callable(i) | |
562 | 558 | func acceptWaves () = if ((i.caller != addressFromStringValue(auctionContract))) | |
563 | 559 | then throw("Currently only auction contract is allowed to call") | |
564 | 560 | else $Tuple2(prepareUnleaseAndLease(0), "success") | |
565 | 561 | ||
566 | 562 | ||
567 | 563 | @Verifier(tx) | |
568 | 564 | func verify () = { | |
569 | 565 | let id = toBase58String(tx.id) | |
570 | 566 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
571 | 567 | then 1 | |
572 | 568 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
573 | 569 | then 1 | |
574 | 570 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
575 | 571 | then 1 | |
576 | 572 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
577 | 573 | then 2 | |
578 | 574 | else 0)) | |
579 | 575 | match tx { | |
580 | 576 | case sponsorTx: SponsorFeeTransaction => | |
581 | 577 | if (checkIsValidMinSponsoredFee(sponsorTx)) | |
582 | 578 | then (count >= 3) | |
583 | 579 | else false | |
584 | 580 | case _ => | |
585 | 581 | (count >= 3) | |
586 | 582 | } | |
587 | 583 | } | |
588 | 584 |
github/deemru/w8io/026f985 71.95 ms ◑