tx · GYffL1ZfVL6Lwz5DfunscQ3hkzUvnyFiBCKMMKSYkZD5

3N9be2mwrA52WJho6DiesZkk4351GvpnWuj:  -0.01400000 Waves

2022.03.22 12:31 [1974953] smart account 3N9be2mwrA52WJho6DiesZkk4351GvpnWuj > SELF 0.00000000 Waves

{ "type": 13, "id": "GYffL1ZfVL6Lwz5DfunscQ3hkzUvnyFiBCKMMKSYkZD5", "fee": 1400000, "feeAssetId": null, "timestamp": 1647941480646, "version": 1, "sender": "3N9be2mwrA52WJho6DiesZkk4351GvpnWuj", "senderPublicKey": "6mzmbCza9iqbzxMEELcEA4Xc9NeF4CYpbTtz1zMK3C7x", "proofs": [ "3XnRvhDtTNNaf4YcDzzb64gNEThVMqhy72bXYE8dXujb7cDoxRQQpWywSHPDees8Z1Sfw1HB2Jgzs18iojkTKDxS", "2s19jRMMNvCq3huFxaA6ijtbCzVcmanX1SHaKEcQsbGjJfmb9qqwtZdD4oN4tX2EMm61fTvHYQTuxdyNoH2Xbrrt", "aDTQftkjHwpz5s3BYwEH1buNRKFLN2SbLYR1Y68kantAKxSSB6HdcS2Lg3U7VpfUuQkmGLyTiiQ4u99v8mjYpCy" ], "script": "base64:AAIFAAAAAAAAADwIAhIGCgQIAQgIEg4KDAgICAgICAEBAQEBARIFCgMICAESABIAEgUKAwgBCBIAEgQKAgEIEgASBAoCCAEAAAB0AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkCAAAAAAEAAAAMZ2V0Qm9vbEJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5BwEAAAAYZ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AAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFVNwb25zb3JGZWVUcmFuc2FjdGlvbgQAAAAJc3BvbnNvclR4BQAAAAckbWF0Y2gwAwkBAAAAG2NoZWNrSXNWYWxpZE1pblNwb25zb3JlZEZlZQAAAAEFAAAACXNwb25zb3JUeAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAAwcJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAO6sqdi", "chainId": 84, "height": 1974953, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BzHtZBJmtJt9EmiZF2JjcbMFmXhkZRHnSZJYGRRmTpqc Next: HrYmWNzyHft45jNm2oSb2azkTdfvvAQAeqHWKtjwUW8k Diff:
OldNewDifferences
404404 func commonWithdraw (account,index,swapTxId,withdrawTxId) = {
405405 let checkCaller = thisOnly(i)
406406 if ((checkCaller == checkCaller))
407- then {
408- let userAddress = addressFromStringValue(account)
409- let feeManagerAddress = feeManagerAddressREAD()
410- let dataArray = swapDataFailOrREAD(account, swapTxId)
411- let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
412- let swapType = dataArray[sIdxSwapType]
413- let inAmount = parseIntValue(dataArray[sIdxInAmount])
414- let swapStatus = dataArray[sIdxStatus]
415- let startHeight = parseIntValue(dataArray[sIdxStartHeight])
416- let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
417- let totalLocked = totalLockedREAD(swapType)
418- let totalLockedByUser = totalLockedByUserREAD(swapType, account)
419- let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
420- let indexHeight = getHeightPriceByIndex(index)
421- let prevIndexHeight = getHeightPriceByIndex((index - 1))
422- let priceByIndex = getPriceHistory(indexHeight)
423- let outAmountGrossTuple = if ((swapType == "waves"))
424- then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
425- else if ((swapType == "neutrino"))
426- then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
427- else throw(("Unsupported swap type " + swapType))
428- let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
429- let outNetAmount = payoutsArray[IdxNetAmount]
430- let outFeeAmount = payoutsArray[IdxFeeAmount]
431- if (isBlocked)
432- then emergencyShutdownFAIL()
433- else if ((swapStatus != "PENDING"))
434- then throw("swap has been already processed")
435- else if ((unlockHeight > height))
436- then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
437- else if (if (if ((index > priceIndex))
438- then true
439- else (unlockHeight > indexHeight))
440- then true
441- else if ((prevIndexHeight != 0))
442- then (prevIndexHeight >= unlockHeight)
443- else false)
444- then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
445- else if ((0 >= payoutsArray[IdxGrossAmount]))
446- then throw("balance equals zero")
447- else if (if ((0 > outFeePart))
448- then true
449- else (outFeePart >= PAULI))
450- then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
451- else {
452- let leasePart = if (if ((swapType == "neutrino"))
453- then (outAmountGrossTuple._1 > 0)
454- else false)
455- then prepareUnleaseAndLease(outAmountGrossTuple._1)
456- else nil
457- let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)])
458- if ((nsbtStakingDeposit == nsbtStakingDeposit))
459- 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)
460- else throw("Strict value is not equal to itself.")
461- }
462- }
407+ then if ((size(i.payments) != 0))
408+ then throw("no payments allowed")
409+ else {
410+ let userAddress = addressFromStringValue(account)
411+ let feeManagerAddress = feeManagerAddressREAD()
412+ let dataArray = swapDataFailOrREAD(account, swapTxId)
413+ let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
414+ let swapType = dataArray[sIdxSwapType]
415+ let inAmount = parseIntValue(dataArray[sIdxInAmount])
416+ let swapStatus = dataArray[sIdxStatus]
417+ let startHeight = parseIntValue(dataArray[sIdxStartHeight])
418+ let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
419+ let totalLocked = totalLockedREAD(swapType)
420+ let totalLockedByUser = totalLockedByUserREAD(swapType, account)
421+ let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
422+ let indexHeight = getHeightPriceByIndex(index)
423+ let prevIndexHeight = getHeightPriceByIndex((index - 1))
424+ let priceByIndex = getPriceHistory(indexHeight)
425+ let outAmountGrossTuple = if ((swapType == "waves"))
426+ then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
427+ else if ((swapType == "neutrino"))
428+ then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
429+ else throw(("Unsupported swap type " + swapType))
430+ let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
431+ let outNetAmount = payoutsArray[IdxNetAmount]
432+ let outFeeAmount = payoutsArray[IdxFeeAmount]
433+ if (isBlocked)
434+ then emergencyShutdownFAIL()
435+ else if ((swapStatus != "PENDING"))
436+ then throw("swap has been already processed")
437+ else if ((unlockHeight > height))
438+ then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
439+ else if (if (if ((index > priceIndex))
440+ then true
441+ else (unlockHeight > indexHeight))
442+ then true
443+ else if ((prevIndexHeight != 0))
444+ then (prevIndexHeight >= unlockHeight)
445+ else false)
446+ then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
447+ else if ((0 >= payoutsArray[IdxGrossAmount]))
448+ then throw("balance equals zero")
449+ else if (if ((0 > outFeePart))
450+ then true
451+ else (outFeePart >= PAULI))
452+ then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
453+ else {
454+ let leasePart = if (if ((swapType == "neutrino"))
455+ then (outAmountGrossTuple._1 > 0)
456+ else false)
457+ then prepareUnleaseAndLease(outAmountGrossTuple._1)
458+ else nil
459+ let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)])
460+ if ((nsbtStakingDeposit == nsbtStakingDeposit))
461+ 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)
462+ else throw("Strict value is not equal to itself.")
463+ }
464+ }
463465 else throw("Strict value is not equal to itself.")
464466 }
465467
469471 func constructor (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = {
470472 let checkCaller = thisOnly(i)
471473 if ((checkCaller == checkCaller))
472- 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)]
474+ then if ((size(i.payments) != 0))
475+ then throw("no payments allowed")
476+ 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(MinWavesSwapAmountKey, minWavesSwapAmountPrm), IntegerEntry(MinNeutrinoSwapAmountKey, minNeutrinoSwapAmountPrm), IntegerEntry(NeutrinoOutFeePartKey, neutrinoOutFeePartPrm), IntegerEntry(WavesOutFeePartKey, wavesOutFeePartPrm)]
473477 else throw("Strict value is not equal to itself.")
474478 }
475479
479483 func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = {
480484 let checkCaller = thisOnly(i)
481485 if ((checkCaller == checkCaller))
482- then [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)]
486+ then if ((size(i.payments) != 0))
487+ then throw("no payments allowed")
488+ else [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)]
483489 else throw("Strict value is not equal to itself.")
484490 }
485491
490496 let pmt = value(i.payments[0])
491497 if (isDefined(pmt.assetId))
492498 then throw("Only Waves token is allowed for swapping.")
493- else {
494- let userAddress = toString(i.caller)
495- let txId58 = toBase58String(i.transactionId)
496- let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
497- let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
498- commonSwapResult
499- }
499+ else if ((size(i.payments) > 1))
500+ then throw("swapWavesToNeutrino require only one payment")
501+ else {
502+ let userAddress = toString(i.caller)
503+ let txId58 = toBase58String(i.transactionId)
504+ let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
505+ let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
506+ commonSwapResult
507+ }
500508 }
501509
502510
506514 let pmt = value(i.payments[0])
507515 if ((pmt.assetId != neutrinoAssetId))
508516 then throw("Only appropriate Neutrino tokens are allowed for swapping.")
509- else {
510- let userAddress = toString(i.caller)
511- let txId58 = toBase58String(i.transactionId)
512- let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
513- let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
514- commonSwapResult
515- }
517+ else if ((size(i.payments) > 1))
518+ then throw("swapNeutrinoToWaves require only one payment")
519+ else {
520+ let userAddress = toString(i.caller)
521+ let txId58 = toBase58String(i.transactionId)
522+ let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
523+ let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
524+ commonSwapResult
525+ }
516526 }
517527
518528
519529
520530 @Callable(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+func withdraw (account,index,swapTxId) = if ((size(i.payments) != 0))
532+ then throw("no payments allowed")
533+ else {
534+ let commonWithdrawInv = invoke(this, "commonWithdraw", [account, index, swapTxId, toBase58String(i.transactionId)], nil)
535+ if ((commonWithdrawInv == commonWithdrawInv))
536+ then nil
537+ else throw("Strict value is not equal to itself.")
538+ }
527539
528540
529541
530542 @Callable(i)
531-func transferToAuction () = {
532- let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
533- let reserve = asInt(neutrinoMetrics[3])
534- let neutrinoSupply = asInt(neutrinoMetrics[5])
535- let surplus = asInt(neutrinoMetrics[6])
536- let nsbtSupply = asInt(neutrinoMetrics[9])
537- let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
538- let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId))
539- if (isBlocked)
540- then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
541- else if ((auctionNBAmount > (1 * PAULI)))
542- then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)]
543- else if ((surplusWithLiquidation >= (1 * PAULI)))
544- then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)]
545- else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus)))
546- }
543+func transferToAuction () = if ((size(i.payments) != 0))
544+ then throw("no payments allowed")
545+ else {
546+ let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
547+ let reserve = asInt(neutrinoMetrics[3])
548+ let neutrinoSupply = asInt(neutrinoMetrics[5])
549+ let surplus = asInt(neutrinoMetrics[6])
550+ let nsbtSupply = asInt(neutrinoMetrics[9])
551+ let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
552+ let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId))
553+ if (isBlocked)
554+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
555+ else if ((auctionNBAmount > (1 * PAULI)))
556+ then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)]
557+ else if ((surplusWithLiquidation >= (1 * PAULI)))
558+ then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)]
559+ else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus)))
560+ }
547561
548562
549563
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
55
66
77 func getStringByKey (key) = valueOrElse(getString(this, key), "")
88
99
1010 func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false)
1111
1212
1313 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0)
1414
1515
1616 func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "")
1717
1818
1919 func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false)
2020
2121
2222 func asAnyList (val) = match val {
2323 case valAnyLyst: List[Any] =>
2424 valAnyLyst
2525 case _ =>
2626 throw("fail to cast into List[Any]")
2727 }
2828
2929
3030 func asString (val) = match val {
3131 case valStr: String =>
3232 valStr
3333 case _ =>
3434 throw("fail to cast into String")
3535 }
3636
3737
3838 func asInt (val) = match val {
3939 case valInt: Int =>
4040 valInt
4141 case _ =>
4242 throw("fail to cast into Int")
4343 }
4444
4545
4646 func asSwapParamsSTRUCT (val) = match val {
4747 case struct: (Int, Int, Int, Int, Int) =>
4848 struct
4949 case _ =>
5050 throw("fail to cast into Int")
5151 }
5252
5353
5454 let pubKeyAdminsList = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
5555
5656 let SEP = "__"
5757
5858 let WAVELET = 100000000
5959
6060 let PAULI = 1000000
6161
6262 let PRICELET = 1000000
6363
6464 let DEFAULTSWAPFEE = 20000
6565
6666 let IdxNetAmount = 0
6767
6868 let IdxFeeAmount = 1
6969
7070 let IdxGrossAmount = 2
7171
7272 let NeutrinoAssetIdKey = "neutrino_asset_id"
7373
7474 let BondAssetIdKey = "bond_asset_id"
7575
7676 let AuctionContractKey = "auction_contract"
7777
7878 let NsbtStakingContractKey = "nsbtStakingContract"
7979
8080 let LiquidationContractKey = "liquidation_contract"
8181
8282 let RPDContractKey = "rpd_contract"
8383
8484 let ContolContractKey = "control_contract"
8585
8686 let MathContractKey = "math_contract"
8787
8888 let BalanceWavesLockIntervalKey = "balance_waves_lock_interval"
8989
9090 let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval"
9191
9292 let MinWavesSwapAmountKey = "min_waves_swap_amount"
9393
9494 let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount"
9595
9696 let NodeOracleProviderPubKeyKey = "node_oracle_provider"
9797
9898 let NeutrinoOutFeePartKey = "neutrinoOut_swap_feePart"
9999
100100 let WavesOutFeePartKey = "wavesOut_swap_feePart"
101101
102102 let FeesManagerAddressKey = "fees_manager_address"
103103
104104 let PriceKey = "price"
105105
106106 let PriceIndexKey = "price_index"
107107
108108 let IsBlockedKey = "is_blocked"
109109
110110 func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
111111
112112
113113 func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index))
114114
115115
116116 func getStakingNodeByIndex (idx) = getStringByKey(makeString(["%s%d%s", "lease", toString(idx), "nodeAddress"], SEP))
117117
118118
119119 func getStakingNodeAddressByIndex (idx) = addressFromStringValue(getStakingNodeByIndex(idx))
120120
121121
122122 func getReservedAmountForSponsorship () = valueOrElse(getInteger(this, makeString(["%s%s", "lease", "sponsorshipWavesReserve"], SEP)), (1000 * WAVELET))
123123
124124
125125 func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner)
126126
127127
128128 func getLeaseIdKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "id"], SEP)
129129
130130
131131 func getLeaseAmountKey (nodeIndex) = makeString(["%s%d%s", "lease", toString(nodeIndex), "amount"], SEP)
132132
133133
134134 func minSwapAmountKEY (swapType) = (("min_" + swapType) + "_swap_amount")
135135
136136
137137 func totalLockedKEY (swapType) = ("balance_lock_" + swapType)
138138
139139
140140 func totalLockedByUserKEY (swapType,owner) = makeString(["balance_lock", swapType, owner], "_")
141141
142142
143143 func balanceLockIntervalKEY (swapType) = (("balance_" + swapType) + "_lock_interval")
144144
145145
146146 func nodeBalanceLockIntervalKEY () = "balance_node_lock_interval"
147147
148148
149149 func outFeePartKEY (swapType) = (swapType + "Out_swap_feePart")
150150
151151
152152 func swapsTimeframeKEY () = "swaps_timeframe"
153153
154154
155155 func minSwapAmountREAD (swapType) = valueOrElse(getInteger(this, minSwapAmountKEY(swapType)), 0)
156156
157157
158158 func swapsTimeframeREAD () = valueOrElse(getInteger(this, swapsTimeframeKEY()), 1440)
159159
160160
161161 func totalLockedREAD (swapType) = valueOrElse(getInteger(this, totalLockedKEY(swapType)), 0)
162162
163163
164164 func totalLockedByUserREAD (swapType,owner) = valueOrElse(getInteger(this, totalLockedByUserKEY(swapType, owner)), 0)
165165
166166
167167 func balanceLockIntervalREAD (swapType) = valueOrElse(getInteger(this, balanceLockIntervalKEY(swapType)), 1440)
168168
169169
170170 func nodeBalanceLockIntervalREAD () = valueOrElse(getInteger(this, nodeBalanceLockIntervalKEY()), 1)
171171
172172
173173 func keySwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "swapUserSpentInPeriod", userAddress], SEP)
174174
175175
176176 func keyUserLastSwapHeight (userAddress) = makeString(["%s%s", "userLastSwapHeight", userAddress], SEP)
177177
178178
179179 func feeManagerAddressREAD () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, FeesManagerAddressKey), (FeesManagerAddressKey + " is not specified"))), (FeesManagerAddressKey + " invalid address format"))
180180
181181
182182 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI)
183183
184184
185185 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET)
186186
187187
188188 func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price)
189189
190190
191191 func convertJsonArrayToList (jsonArray) = split(jsonArray, ",")
192192
193193
194194 func minSwapAmountFAIL (swapType,minSwapAmount) = throw(((("The specified amount in " + swapType) + " swap is less than the required minimum of ") + toString(minSwapAmount)))
195195
196196
197197 func emergencyShutdownFAIL () = throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
198198
199199
200200 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)))
201201
202202
203203 let liquidationContract = getStringByKey(LiquidationContractKey)
204204
205205 let nsbtStakingContractStr = getStringByKey(NsbtStakingContractKey)
206206
207207 let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
208208
209209 let auctionContract = getStringByKey(AuctionContractKey)
210210
211211 let rpdContract = getStringByKey(RPDContractKey)
212212
213213 let controlContract = getStringByKey(ContolContractKey)
214214
215215 let mathContractAddress = getStringByKey(MathContractKey)
216216
217217 let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey)
218218
219219 let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey)
220220
221221 let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey))
222222
223223 let bondAssetId = fromBase58String("F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z")
224224
225225 let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF")
226226
227227 let neutrinoContract = this
228228
229229 let mathContract = addressFromStringValue(mathContractAddress)
230230
231231 let nsbtStakingContract = addressFromStringValue(nsbtStakingContractStr)
232232
233233 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
234234
235235 func checkIsValidMinSponsoredFee (tx) = {
236236 let MINTRANSFERFEE = 100000
237237 let SponsoredFeeUpperBound = 1000
238238 let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, currentPrice)
239239 let minNeutrinoFee = (realNeutrinoFee * 2)
240240 let maxNeutrinoFee = fraction(realNeutrinoFee, SponsoredFeeUpperBound, 100)
241241 let inputFee = value(tx.minSponsoredAssetFee)
242242 if (if ((inputFee >= minNeutrinoFee))
243243 then (maxNeutrinoFee >= inputFee)
244244 else false)
245245 then (tx.assetId == neutrinoAssetId)
246246 else false
247247 }
248248
249249
250250 func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block))
251251
252252
253253 func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index))
254254
255255
256256 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
257257
258258
259259 let sIdxSwapType = 1
260260
261261 let sIdxStatus = 2
262262
263263 let sIdxInAmount = 3
264264
265265 let sIdxPrice = 4
266266
267267 let sIdxOutNetAmount = 5
268268
269269 let sIdxOutFeeAmount = 6
270270
271271 let sIdxStartHeight = 7
272272
273273 let sIdxStartTimestamp = 8
274274
275275 let sIdxEndHeight = 9
276276
277277 let sIdxEndTimestamp = 10
278278
279279 let sIdxSelfUnlockHeight = 11
280280
281281 let sIdxRandUnlockHeight = 12
282282
283283 let sIdxIndex = 13
284284
285285 let sIdxWithdrawTxId = 14
286286
287287 let sIdxMinRand = 15
288288
289289 let sIdxMaxRand = 16
290290
291291 func swapKEY (userAddress,txId) = makeString(["%s%s", userAddress, txId], SEP)
292292
293293
294294 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)
295295
296296
297297 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")
298298
299299
300300 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])
301301
302302
303303 func swapDataFailOrREAD (userAddress,swapTxId) = {
304304 let swapKey = swapKEY(userAddress, swapTxId)
305305 split(valueOrErrorMessage(getString(this, swapKey), ("no swap data for " + swapKey)), SEP)
306306 }
307307
308308
309309 func applyFees (amountGross,feePart) = {
310310 let feeAmount = fraction(amountGross, feePart, PAULI)
311311 [(amountGross - feeAmount), feeAmount, amountGross]
312312 }
313313
314314
315315 func abs (x) = if ((0 > x))
316316 then -(x)
317317 else x
318318
319319
320320 func selectNode (unleaseAmount) = {
321321 let amountToLease = ((wavesBalance(neutrinoContract).available - unleaseAmount) - getReservedAmountForSponsorship())
322322 let oldLeased0 = getNumberByKey(getLeaseAmountKey(0))
323323 let oldLeased1 = getNumberByKey(getLeaseAmountKey(1))
324324 let newLeased0 = (amountToLease + oldLeased0)
325325 let newLeased1 = (amountToLease + oldLeased1)
326326 if (if ((newLeased0 > 0))
327327 then true
328328 else (newLeased1 > 0))
329329 then {
330330 let delta0 = abs((newLeased0 - oldLeased1))
331331 let delta1 = abs((newLeased1 - oldLeased0))
332332 if ((delta1 >= delta0))
333333 then $Tuple2(0, newLeased0)
334334 else $Tuple2(1, newLeased1)
335335 }
336336 else $Tuple2(-1, 0)
337337 }
338338
339339
340340 func thisOnly (i) = if ((i.caller != this))
341341 then throw("Permission denied: this contract only allowed")
342342 else true
343343
344344
345345 func prepareUnleaseAndLease (unleaseAmount) = {
346346 let nodeTuple = selectNode(unleaseAmount)
347347 let nodeIndex = nodeTuple._1
348348 let newLeaseAmount = nodeTuple._2
349349 if ((newLeaseAmount > 0))
350350 then {
351351 let leaseIdKey = getLeaseIdKey(nodeIndex)
352352 let oldLease = getBinary(this, leaseIdKey)
353353 let unleaseOrEmpty = if (isDefined(oldLease))
354354 then [LeaseCancel(value(oldLease))]
355355 else nil
356356 let leaseAmountKey = getLeaseAmountKey(nodeIndex)
357357 let lease = Lease(getStakingNodeAddressByIndex(nodeIndex), newLeaseAmount)
358358 (unleaseOrEmpty ++ [lease, BinaryEntry(leaseIdKey, calculateLeaseId(lease)), IntegerEntry(getLeaseAmountKey(nodeIndex), newLeaseAmount)])
359359 }
360360 else nil
361361 }
362362
363363
364364 func commonSwap (swapType,pmtAmount,userAddressStr,txId58,swapParamsByUserSYSREADONLY) = {
365365 let $t01560515685 = swapParamsByUserSYSREADONLY
366366 let swapLimitMax = $t01560515685._1
367367 let swapLimitSpent = $t01560515685._2
368368 let blcks2LmtReset = $t01560515685._3
369369 let minSwapAmount = minSwapAmountREAD(swapType)
370370 let totalLocked = totalLockedREAD(swapType)
371371 let totalLockedByUser = totalLockedByUserREAD(swapType, userAddressStr)
372372 let nodeAddress = getStakingNodeByIndex(0)
373373 let priceByIndex = getPriceHistory(getHeightPriceByIndex(priceIndex))
374374 let isSwapByNode = (nodeAddress == userAddressStr)
375375 let balanceLockMaxInterval = if (isSwapByNode)
376376 then nodeBalanceLockIntervalREAD()
377377 else balanceLockIntervalREAD(swapType)
378378 let selfUnlockHeight = (height + balanceLockMaxInterval)
379379 let swapUsdnVolume = if ((swapType == "neutrino"))
380380 then pmtAmount
381381 else convertWavesToNeutrino(pmtAmount, priceByIndex)
382382 if ((minSwapAmount > pmtAmount))
383383 then minSwapAmountFAIL(swapType, minSwapAmount)
384384 else if (if (!(isSwapByNode))
385385 then (swapLimitSpent > 0)
386386 else false)
387387 then throw(("You have exceeded swap limit! Next allowed swap height is " + toString((height + blcks2LmtReset))))
388388 else if (if (!(isSwapByNode))
389389 then (swapUsdnVolume > swapLimitMax)
390390 else false)
391391 then throw(((("You have exceeded your swap limit! Requested: " + toString(swapUsdnVolume)) + ", available: ") + toString(swapLimitMax)))
392392 else if (isBlocked)
393393 then emergencyShutdownFAIL()
394394 else {
395395 let leasePart = if ((swapType == "waves"))
396396 then prepareUnleaseAndLease(0)
397397 else nil
398398 $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)
399399 }
400400 }
401401
402402
403403 @Callable(i)
404404 func commonWithdraw (account,index,swapTxId,withdrawTxId) = {
405405 let checkCaller = thisOnly(i)
406406 if ((checkCaller == checkCaller))
407- then {
408- let userAddress = addressFromStringValue(account)
409- let feeManagerAddress = feeManagerAddressREAD()
410- let dataArray = swapDataFailOrREAD(account, swapTxId)
411- let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
412- let swapType = dataArray[sIdxSwapType]
413- let inAmount = parseIntValue(dataArray[sIdxInAmount])
414- let swapStatus = dataArray[sIdxStatus]
415- let startHeight = parseIntValue(dataArray[sIdxStartHeight])
416- let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
417- let totalLocked = totalLockedREAD(swapType)
418- let totalLockedByUser = totalLockedByUserREAD(swapType, account)
419- let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
420- let indexHeight = getHeightPriceByIndex(index)
421- let prevIndexHeight = getHeightPriceByIndex((index - 1))
422- let priceByIndex = getPriceHistory(indexHeight)
423- let outAmountGrossTuple = if ((swapType == "waves"))
424- then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
425- else if ((swapType == "neutrino"))
426- then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
427- else throw(("Unsupported swap type " + swapType))
428- let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
429- let outNetAmount = payoutsArray[IdxNetAmount]
430- let outFeeAmount = payoutsArray[IdxFeeAmount]
431- if (isBlocked)
432- then emergencyShutdownFAIL()
433- else if ((swapStatus != "PENDING"))
434- then throw("swap has been already processed")
435- else if ((unlockHeight > height))
436- then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
437- else if (if (if ((index > priceIndex))
438- then true
439- else (unlockHeight > indexHeight))
440- then true
441- else if ((prevIndexHeight != 0))
442- then (prevIndexHeight >= unlockHeight)
443- else false)
444- then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
445- else if ((0 >= payoutsArray[IdxGrossAmount]))
446- then throw("balance equals zero")
447- else if (if ((0 > outFeePart))
448- then true
449- else (outFeePart >= PAULI))
450- then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
451- else {
452- let leasePart = if (if ((swapType == "neutrino"))
453- then (outAmountGrossTuple._1 > 0)
454- else false)
455- then prepareUnleaseAndLease(outAmountGrossTuple._1)
456- else nil
457- let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)])
458- if ((nsbtStakingDeposit == nsbtStakingDeposit))
459- 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)
460- else throw("Strict value is not equal to itself.")
461- }
462- }
407+ then if ((size(i.payments) != 0))
408+ then throw("no payments allowed")
409+ else {
410+ let userAddress = addressFromStringValue(account)
411+ let feeManagerAddress = feeManagerAddressREAD()
412+ let dataArray = swapDataFailOrREAD(account, swapTxId)
413+ let selfUnlockHeight = parseIntValue(dataArray[sIdxSelfUnlockHeight])
414+ let swapType = dataArray[sIdxSwapType]
415+ let inAmount = parseIntValue(dataArray[sIdxInAmount])
416+ let swapStatus = dataArray[sIdxStatus]
417+ let startHeight = parseIntValue(dataArray[sIdxStartHeight])
418+ let outFeePart = valueOrElse(getInteger(this, outFeePartKEY(swapType)), DEFAULTSWAPFEE)
419+ let totalLocked = totalLockedREAD(swapType)
420+ let totalLockedByUser = totalLockedByUserREAD(swapType, account)
421+ let unlockHeight = (startHeight + getIntegerValue(this, balanceLockIntervalKEY(swapType)))
422+ let indexHeight = getHeightPriceByIndex(index)
423+ let prevIndexHeight = getHeightPriceByIndex((index - 1))
424+ let priceByIndex = getPriceHistory(indexHeight)
425+ let outAmountGrossTuple = if ((swapType == "waves"))
426+ then $Tuple2(convertWavesToNeutrino(inAmount, priceByIndex), neutrinoAssetId)
427+ else if ((swapType == "neutrino"))
428+ then $Tuple2(convertNeutrinoToWaves(inAmount, priceByIndex), unit)
429+ else throw(("Unsupported swap type " + swapType))
430+ let payoutsArray = applyFees(outAmountGrossTuple._1, outFeePart)
431+ let outNetAmount = payoutsArray[IdxNetAmount]
432+ let outFeeAmount = payoutsArray[IdxFeeAmount]
433+ if (isBlocked)
434+ then emergencyShutdownFAIL()
435+ else if ((swapStatus != "PENDING"))
436+ then throw("swap has been already processed")
437+ else if ((unlockHeight > height))
438+ then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw funds"))
439+ else if (if (if ((index > priceIndex))
440+ then true
441+ else (unlockHeight > indexHeight))
442+ then true
443+ else if ((prevIndexHeight != 0))
444+ then (prevIndexHeight >= unlockHeight)
445+ else false)
446+ then priceIndexFAIL(index, priceIndex, indexHeight, unlockHeight, prevIndexHeight)
447+ else if ((0 >= payoutsArray[IdxGrossAmount]))
448+ then throw("balance equals zero")
449+ else if (if ((0 > outFeePart))
450+ then true
451+ else (outFeePart >= PAULI))
452+ then throw(((("invalid outFeePart config for " + swapType) + " swap: outFeePart=") + toString(outFeePart)))
453+ else {
454+ let leasePart = if (if ((swapType == "neutrino"))
455+ then (outAmountGrossTuple._1 > 0)
456+ else false)
457+ then prepareUnleaseAndLease(outAmountGrossTuple._1)
458+ else nil
459+ let nsbtStakingDeposit = invoke(nsbtStakingContract, "deposit", nil, [AttachedPayment(outAmountGrossTuple._2, outFeeAmount)])
460+ if ((nsbtStakingDeposit == nsbtStakingDeposit))
461+ 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)
462+ else throw("Strict value is not equal to itself.")
463+ }
464+ }
463465 else throw("Strict value is not equal to itself.")
464466 }
465467
466468
467469
468470 @Callable(i)
469471 func constructor (neutrinoAssetIdPrm,bondAssetIdPrm,auctionContractPrm,liquidationContractPrm,rpdContractPrm,nodeOracleProviderPubKeyPrm,balanceWavesLockIntervalPrm,balanceNeutrinoLockIntervalPrm,minWavesSwapAmountPrm,minNeutrinoSwapAmountPrm,neutrinoOutFeePartPrm,wavesOutFeePartPrm) = {
470472 let checkCaller = thisOnly(i)
471473 if ((checkCaller == checkCaller))
472- 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)]
474+ then if ((size(i.payments) != 0))
475+ then throw("no payments allowed")
476+ 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(MinWavesSwapAmountKey, minWavesSwapAmountPrm), IntegerEntry(MinNeutrinoSwapAmountKey, minNeutrinoSwapAmountPrm), IntegerEntry(NeutrinoOutFeePartKey, neutrinoOutFeePartPrm), IntegerEntry(WavesOutFeePartKey, wavesOutFeePartPrm)]
473477 else throw("Strict value is not equal to itself.")
474478 }
475479
476480
477481
478482 @Callable(i)
479483 func constructorV2 (mathContract,nsbtStakingContract,swapsTimeframeBlocks) = {
480484 let checkCaller = thisOnly(i)
481485 if ((checkCaller == checkCaller))
482- then [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)]
486+ then if ((size(i.payments) != 0))
487+ then throw("no payments allowed")
488+ else [StringEntry(MathContractKey, mathContract), StringEntry(NsbtStakingContractKey, nsbtStakingContract), IntegerEntry(swapsTimeframeKEY(), swapsTimeframeBlocks)]
483489 else throw("Strict value is not equal to itself.")
484490 }
485491
486492
487493
488494 @Callable(i)
489495 func swapWavesToNeutrino () = {
490496 let pmt = value(i.payments[0])
491497 if (isDefined(pmt.assetId))
492498 then throw("Only Waves token is allowed for swapping.")
493- else {
494- let userAddress = toString(i.caller)
495- let txId58 = toBase58String(i.transactionId)
496- let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
497- let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
498- commonSwapResult
499- }
499+ else if ((size(i.payments) > 1))
500+ then throw("swapWavesToNeutrino require only one payment")
501+ else {
502+ let userAddress = toString(i.caller)
503+ let txId58 = toBase58String(i.transactionId)
504+ let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
505+ let commonSwapResult = commonSwap("waves", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
506+ commonSwapResult
507+ }
500508 }
501509
502510
503511
504512 @Callable(i)
505513 func swapNeutrinoToWaves () = {
506514 let pmt = value(i.payments[0])
507515 if ((pmt.assetId != neutrinoAssetId))
508516 then throw("Only appropriate Neutrino tokens are allowed for swapping.")
509- else {
510- let userAddress = toString(i.caller)
511- let txId58 = toBase58String(i.transactionId)
512- let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
513- let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
514- commonSwapResult
515- }
517+ else if ((size(i.payments) > 1))
518+ then throw("swapNeutrinoToWaves require only one payment")
519+ else {
520+ let userAddress = toString(i.caller)
521+ let txId58 = toBase58String(i.transactionId)
522+ let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(this, "swapParamsByUserSYSREADONLY", [userAddress, 0], nil))
523+ let commonSwapResult = commonSwap("neutrino", pmt.amount, userAddress, txId58, swapParamsSTRUCT)
524+ commonSwapResult
525+ }
516526 }
517527
518528
519529
520530 @Callable(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+func withdraw (account,index,swapTxId) = if ((size(i.payments) != 0))
532+ then throw("no payments allowed")
533+ else {
534+ let commonWithdrawInv = invoke(this, "commonWithdraw", [account, index, swapTxId, toBase58String(i.transactionId)], nil)
535+ if ((commonWithdrawInv == commonWithdrawInv))
536+ then nil
537+ else throw("Strict value is not equal to itself.")
538+ }
527539
528540
529541
530542 @Callable(i)
531-func transferToAuction () = {
532- let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
533- let reserve = asInt(neutrinoMetrics[3])
534- let neutrinoSupply = asInt(neutrinoMetrics[5])
535- let surplus = asInt(neutrinoMetrics[6])
536- let nsbtSupply = asInt(neutrinoMetrics[9])
537- let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
538- let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId))
539- if (isBlocked)
540- then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
541- else if ((auctionNBAmount > (1 * PAULI)))
542- then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)]
543- else if ((surplusWithLiquidation >= (1 * PAULI)))
544- then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)]
545- else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus)))
546- }
543+func transferToAuction () = if ((size(i.payments) != 0))
544+ then throw("no payments allowed")
545+ else {
546+ let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
547+ let reserve = asInt(neutrinoMetrics[3])
548+ let neutrinoSupply = asInt(neutrinoMetrics[5])
549+ let surplus = asInt(neutrinoMetrics[6])
550+ let nsbtSupply = asInt(neutrinoMetrics[9])
551+ let auctionNBAmount = (neutrinoSupply - assetBalance(addressFromStringValue(auctionContract), bondAssetId))
552+ let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId))
553+ if (isBlocked)
554+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
555+ else if ((auctionNBAmount > (1 * PAULI)))
556+ then [ScriptTransfer(addressFromStringValue(auctionContract), auctionNBAmount, bondAssetId)]
557+ else if ((surplusWithLiquidation >= (1 * PAULI)))
558+ then [ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)]
559+ else throw(((((((("bond were generated or do not need it. Deficit:" + toString(auctionNBAmount)) + "|") + toString(0)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus)))
560+ }
547561
548562
549563
550564 @Callable(i)
551565 func transferUsdnToUser (amount,addr) = if ((i.caller != addressFromStringValue(auctionContract)))
552566 then throw("Only auction contract is authorized")
553567 else [ScriptTransfer(addressFromStringValue(addr), amount, neutrinoAssetId)]
554568
555569
556570
557571 @Callable(i)
558572 func acceptWaves () = if ((i.caller != addressFromStringValue(auctionContract)))
559573 then throw("Currently only auction contract is allowed to call")
560574 else $Tuple2(prepareUnleaseAndLease(0), "success")
561575
562576
563577
564578 @Callable(i)
565579 func swapParamsByUserSYSREADONLY (userAddressStr,nsbtDiff) = {
566580 let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressStr], nil))
567581 if ((nsbtData == nsbtData))
568582 then {
569583 let gnsbtAmt = (asInt(nsbtData[0]) + nsbtDiff)
570584 let gnsbtAmtTotal = (asInt(nsbtData[1]) + nsbtDiff)
571585 let swapLimitMax = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [gnsbtAmt], nil))
572586 let lastSwapHeight = valueOrElse(getInteger(this, keyUserLastSwapHeight(userAddressStr)), 0)
573587 let swapLimitTimelifeBlocks = swapsTimeframeREAD()
574588 let passedBlocksAfterLastSwap = (height - lastSwapHeight)
575589 let isSwapTimelifeNew = (passedBlocksAfterLastSwap >= swapLimitTimelifeBlocks)
576590 let swapLimitSpent = if (isSwapTimelifeNew)
577591 then 0
578592 else valueOrElse(getInteger(this, keySwapUserSpentInPeriod(userAddressStr)), 0)
579593 let blcks2LmtReset = if (isSwapTimelifeNew)
580594 then 0
581595 else (swapLimitTimelifeBlocks - passedBlocksAfterLastSwap)
582596 $Tuple2(nil, $Tuple5(swapLimitMax, swapLimitSpent, blcks2LmtReset, gnsbtAmt, gnsbtAmtTotal))
583597 }
584598 else throw("Strict value is not equal to itself.")
585599 }
586600
587601
588602 @Verifier(tx)
589603 func verify () = {
590604 let id = toBase58String(tx.id)
591605 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
592606 then 1
593607 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
594608 then 1
595609 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
596610 then 1
597611 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
598612 then 2
599613 else 0))
600614 match tx {
601615 case sponsorTx: SponsorFeeTransaction =>
602616 if (checkIsValidMinSponsoredFee(sponsorTx))
603617 then (count >= 3)
604618 else false
605619 case _ =>
606620 (count >= 3)
607621 }
608622 }
609623

github/deemru/w8io/026f985 
64.89 ms