tx · 4cdXmFVwkHueEF7gNBf1tBb12wj9pDsMB4aiSubEPSsS

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.02900000 Waves

2022.09.02 12:48 [2211347] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "4cdXmFVwkHueEF7gNBf1tBb12wj9pDsMB4aiSubEPSsS", "fee": 2900000, "feeAssetId": null, "timestamp": 1662112162423, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "45KeZtcEY1F19JtEJnt7YSg4gBoMgX1PpAyo7mjkFLXKJxE1KVBZeMoJ66qpH5xpXT3V3Q3oAkVjKcNjmLfYGnNj" ], "script": "base64:BgJ/CAISAwoBCBIDCgEIEgASBAoCAQQSBwoFAQEBAQQSAwoBARIAEgcKBQEBAQgBEgQKAgEBEgMKAQESBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCE4ABnNjYWxlOACAwtcvAAxzY2FsZThCaWdJbnQJALYCAQCAwtcvAAdzY2FsZTE4CQC2AgEAgICQu7rWrfANAAp6ZXJvQmlnSW50CQC2AgEAAAAJb25lQmlnSW50CQC2AgEAAQAKc2xpcHBhZ2U0RAkAtgIBCQBlAgUGc2NhbGU4CQBpAgkAaAIFBnNjYWxlOAABBQZzY2FsZTgABUFtdWx0AgMxMDAABURjb252AgExAANTRVACAl9fAAVFTVBUWQIAAApQb29sQWN0aXZlAAEAClBvb2xQdXREaXMAAgAOUG9vbE1hdGNoZXJEaXMAAwAMUG9vbFNodXRkb3duAAQADmlkeFBvb2xBZGRyZXNzAAEACWlkeFBvb2xTdAACAAlpZHhMUEFzSWQAAwAJaWR4QW1Bc0lkAAQACWlkeFByQXNJZAAFAAtpZHh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JAQJtcAAECm9yZGVyVmFsaWQJAQNtb2EBBQVvcmRlcgQLc2VuZGVyVmFsaWQJAPQDAwgFBW9yZGVyCWJvZHlCeXRlcwkAkQMCCAUFb3JkZXIGcHJvb2ZzAAAIBQVvcmRlcg9zZW5kZXJQdWJsaWNLZXkEDG1hdGNoZXJWYWxpZAkA9AMDCAUFb3JkZXIJYm9keUJ5dGVzCQCRAwIIBQVvcmRlcgZwcm9vZnMAAQUKbWF0Y2hlclB1YgMDAwUKb3JkZXJWYWxpZAULc2VuZGVyVmFsaWQHBQxtYXRjaGVyVmFsaWQHBgkBA3RvZQMFCm9yZGVyVmFsaWQFC3NlbmRlclZhbGlkBQxtYXRjaGVyVmFsaWQDCQABAgUHJG1hdGNoMAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAXMFByRtYXRjaDAEB25ld0hhc2gJAPYDAQkBBXZhbHVlAQgFAXMGc2NyaXB0BAthbGxvd2VkSGFzaAkA2wQBCQEFdmFsdWUBCQCdCAIFA2ZjYQkBHGtleUFsbG93ZWRMcFN0YWJsZVNjcmlwdEhhc2gABAtjdXJyZW50SGFzaAkA8QcBBQR0aGlzAwMJAAACBQthbGxvd2VkSGFzaAUHbmV3SGFzaAkBAiE9AgULY3VycmVudEhhc2gFB25ld0hhc2gHBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXm8emkr", "chainId": 84, "height": 2211347, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8YRGC7LDpimMae5GjudvT2HyNEJfdA9VUC44sYrQBxLP Next: 4Jcijpp9oVerjvVEMg36E7372DfQjXRpwnSZxW7XDpUp Diff:
OldNewDifferences
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
9-
10-let thousand = 1000
119
1210 let zeroBigInt = toBigInt(0)
1311
5553
5654 let idxFactGwxRewCntr = 10
5755
58-let feePermilleDefault = 0
56+let delay = "%s__delay"
5957
6058 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6159
104102 func ada () = "%s__addonAddr"
105103
106104
107-let keyFeePermille = "%s__feePermille"
105+func lgotc (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP)
108106
109-let feePermille = valueOrElse(getInteger(this, keyFeePermille), feePermilleDefault)
107+
108+func lsotc (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP)
109+
110110
111111 func fcfg () = "%s__factoryConfig"
112112
124124
125125
126126 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
127-
128-
129-func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
130127
131128
132129 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
155152
156153 func mp () = fromBase58String(strf(fca, mtpk()))
157154
158-
159-let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
160155
161156 func gpc () = {
162157 let amtAs = strf(this, aa())
342337 else calcLpAmt
343338 let amDiff = (inAmAmt - calcAmAssetPmt)
344339 let prDiff = (inPrAmt - calcPrAssetPmt)
345- let $t01568216027 = if (if (isOneAsset)
340+ let $t01560115946 = if (if (isOneAsset)
346341 then (pmtId == amIdStr)
347342 else false)
348343 then $Tuple2(pmtAmt, 0)
351346 else false)
352347 then $Tuple2(0, pmtAmt)
353348 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
354- let writeAmAmt = $t01568216027._1
355- let writePrAmt = $t01568216027._2
349+ let writeAmAmt = $t01560115946._1
350+ let writePrAmt = $t01560115946._2
356351 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
357352 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
358353 }
433428 else (sts == PoolShutdown))
434429 then throw(("Blocked:" + toString(sts)))
435430 else r
436- }
437-
438-
439-func takeFee (amount) = {
440- let fee = fraction(amount, feePermille, thousand)
441- $Tuple2((amount - fee), fee)
442431 }
443432
444433
599588 let userAddress = if ((addon == toString(i.caller)))
600589 then i.originCaller
601590 else i.caller
602- if (if (if (if ((0 >= slippage))
603- then true
604- else (0 >= amAssetPart))
605- then true
606- else (0 >= prAssetPart))
607- then true
608- else (0 >= outLp))
609- then throw("Wrong params")
610- else if ((size(i.payments) != 1))
611- then throw("1 pmnt expd")
612- else {
613- let pmt = value(i.payments[0])
614- let pmtAssetId = toBase58String(value(pmt.assetId))
615- let paymentAmountRaw = pmt.amount
616- let $t02464424696 = takeFee(paymentAmountRaw)
617- let pmtAmt = $t02464424696._1
618- let feeAmount = $t02464424696._2
619- if ((10000000 > paymentAmountRaw))
620- then throw("Wrong pmt amt")
621- else {
622- let amBalance = getAccBalance(amId)
623- let prBalance = getAccBalance(prId)
624- let $t02485625472 = if ((pmtAssetId == amId))
625- then if (if ((paymentAmountRaw > amBalance))
626- then true
627- else (amAssetPart > pmtAmt))
628- then throw("invalid payment amount")
629- else $Tuple6((amBalance - paymentAmountRaw), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
630- else if ((pmtAssetId == prId))
631- then if (if ((paymentAmountRaw > prBalance))
591+ let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
592+ let check = reentrantInvoke(addonContract, "ensureCanPutOneTkn", [toString(userAddress)], nil)
593+ if ((check == check))
594+ then if (if (if (if ((0 >= slippage))
595+ then true
596+ else (0 >= amAssetPart))
597+ then true
598+ else (0 >= prAssetPart))
599+ then true
600+ else (0 >= outLp))
601+ then throw("Wrong params")
602+ else if ((size(i.payments) != 1))
603+ then throw("1 pmnt expd")
604+ else {
605+ let pmt = value(i.payments[0])
606+ let pmtAssetId = toBase58String(value(pmt.assetId))
607+ let pmtAmt = pmt.amount
608+ if ((10000000 > pmtAmt))
609+ then throw("Wrong pmt amt")
610+ else {
611+ let amBalance = getAccBalance(amId)
612+ let prBalance = getAccBalance(prId)
613+ let $t02485925435 = if ((pmtAssetId == amId))
614+ then if (if ((pmtAmt > amBalance))
632615 then true
633- else (prAssetPart > pmtAmt))
616+ else (amAssetPart > pmtAmt))
634617 then throw("invalid payment amount")
635- else $Tuple6(amBalance, (prBalance - paymentAmountRaw), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
636- else throw("wrong pmtAssetId")
637- let amBalanceNow = $t02485625472._1
638- let prBalanceNow = $t02485625472._2
639- let virtSwapInAm = $t02485625472._3
640- let virtSwapOutPr = $t02485625472._4
641- let virtSwapInPr = $t02485625472._5
642- let virtSwapOutAm = $t02485625472._6
643- let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
644- let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
645- let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
646- if ((D0vsD1 == D0vsD1))
647- then {
648- let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
649- let estimLP = estPut._2
650- let lpAssetId = estPut._7
651- let state = estPut._9
652- let amDiff = estPut._10
653- let prDiff = estPut._11
654- let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
655- let emitLpAmt = toInt(lpCalcRes._2)
656- let e = invoke(fca, "emit", [emitLpAmt], nil)
657- if ((e == e))
658- then {
659- let el = match e {
660- case legacy: Address =>
661- invoke(legacy, "emit", [emitLpAmt], nil)
662- case _ =>
663- unit
664- }
665- if ((el == el))
666- then {
667- let sa = if ((amDiff > 0))
668- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
669- else nil
670- if ((sa == sa))
671- then {
672- let sp = if ((prDiff > 0))
673- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
674- else nil
675- if ((sp == sp))
676- then {
677- let lpTrnsfr = if (autoStake)
678- then {
679- let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
680- if ((ss == ss))
681- then nil
682- else throw("Strict value is not equal to itself.")
683- }
684- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
685- let sendFeeToMatcher = if ((feeAmount > 0))
686- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
687- else nil
688- ((state ++ lpTrnsfr) ++ sendFeeToMatcher)
689- }
690- else throw("Strict value is not equal to itself.")
691- }
692- else throw("Strict value is not equal to itself.")
693- }
694- else throw("Strict value is not equal to itself.")
695- }
696- else throw("Strict value is not equal to itself.")
697- }
698- else throw("Strict value is not equal to itself.")
699- }
700- }
618+ else $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
619+ else if ((pmtAssetId == prId))
620+ then if (if ((pmtAmt > prBalance))
621+ then true
622+ else (prAssetPart > pmtAmt))
623+ then throw("invalid payment amount")
624+ else $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
625+ else throw("wrong pmtAssetId")
626+ let amBalanceNow = $t02485925435._1
627+ let prBalanceNow = $t02485925435._2
628+ let virtSwapInAm = $t02485925435._3
629+ let virtSwapOutPr = $t02485925435._4
630+ let virtSwapInPr = $t02485925435._5
631+ let virtSwapOutAm = $t02485925435._6
632+ let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
633+ let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
634+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
635+ if ((D0vsD1 == D0vsD1))
636+ then {
637+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
638+ let estimLP = estPut._2
639+ let lpAssetId = estPut._7
640+ let state = estPut._9
641+ let amDiff = estPut._10
642+ let prDiff = estPut._11
643+ let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
644+ let emitLpAmt = toInt(lpCalcRes._2)
645+ let e = invoke(fca, "emit", [emitLpAmt], nil)
646+ if ((e == e))
647+ then {
648+ let el = match e {
649+ case legacy: Address =>
650+ invoke(legacy, "emit", [emitLpAmt], nil)
651+ case _ =>
652+ unit
653+ }
654+ if ((el == el))
655+ then {
656+ let sa = if ((amDiff > 0))
657+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
658+ else nil
659+ if ((sa == sa))
660+ then {
661+ let sp = if ((prDiff > 0))
662+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
663+ else nil
664+ if ((sp == sp))
665+ then {
666+ let lpTrnsfr = if (autoStake)
667+ then {
668+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
669+ if ((ss == ss))
670+ then nil
671+ else throw("Strict value is not equal to itself.")
672+ }
673+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
674+ (state ++ lpTrnsfr)
675+ }
676+ else throw("Strict value is not equal to itself.")
677+ }
678+ else throw("Strict value is not equal to itself.")
679+ }
680+ else throw("Strict value is not equal to itself.")
681+ }
682+ else throw("Strict value is not equal to itself.")
683+ }
684+ else throw("Strict value is not equal to itself.")
685+ }
686+ }
687+ else throw("Strict value is not equal to itself.")
701688 }
702689
703690
751738 let txId58 = toBase58String(i.transactionId)
752739 let pmtAssetId = value(pmt.assetId)
753740 let pmtAmt = pmt.amount
754- if ((1000000000 > pmtAmt))
755- then throw("Min pmt 10 LP")
756- else if (if (if ((0 > slippage))
757- then true
758- else (0 > exchResult))
759- then true
760- else (0 > outAmount))
761- then throw("Wrong params")
762- else if ((lpId != toBase58String(pmtAssetId)))
763- then throw("Wrong LP")
764- else {
765- let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
766- let estimAmAmt = r._1
767- let estimPrAmt = r._2
768- let amBalance = getAccBalance(amId)
769- let prBalance = getAccBalance(prId)
770- let $t03041530875 = if ((outAssetId == amId))
771- then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
772- else if ((outAssetId == prId))
773- then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
774- else throw("wrong outAssetId")
775- let amBalanceNow = $t03041530875._1
776- let prBalanceNow = $t03041530875._2
777- let virtSwapInAm = $t03041530875._3
778- let virtSwapOutPr = $t03041530875._4
779- let virtSwapInPr = $t03041530875._5
780- let virtSwapOutAm = $t03041530875._6
781- let totalGetRaw = $t03041530875._7
782- if (if ((0 > virtSwapInAm))
783- then true
784- else (0 > virtSwapInPr))
785- then throw("Wrong calc")
786- else {
787- let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
788- let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
789- let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
790- if ((D0vsD1 == D0vsD1))
791- then {
792- let totalGet = takeFee(totalGetRaw)._1
793- let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
794- if ((finalRes == finalRes))
795- then {
796- let $t03162231726 = if ((outAssetId == amId))
797- then $Tuple2(toInt(finalRes._2), 0)
798- else $Tuple2(0, toInt(finalRes._2))
799- let outAm = $t03162231726._1
800- let outPr = $t03162231726._2
801- let totalAmount = (outAm + outPr)
802- let feeAmount = (totalGetRaw - totalGet)
803- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
804- then unit
805- else fromBase58String(outAssetId)
806- let sendFeeToMatcher = if ((feeAmount > 0))
807- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
808- else nil
809- let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
810- let curPr = f1(curPrX18, scale8)
811- let state = [ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)]
812- if ((state == state))
813- then {
814- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
815- if ((burn == burn))
816- then (state ++ sendFeeToMatcher)
817- else throw("Strict value is not equal to itself.")
818- }
819- else throw("Strict value is not equal to itself.")
820- }
821- else throw("Strict value is not equal to itself.")
822- }
823- else throw("Strict value is not equal to itself.")
824- }
825- }
741+ let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
742+ let check = reentrantInvoke(addonContract, "ensureCanGetOneTkn", [toString(userAddress)], nil)
743+ if ((check == check))
744+ then if ((1000000000 > pmtAmt))
745+ then throw("Min pmt 10 LP")
746+ else if (if (if ((0 > slippage))
747+ then true
748+ else (0 > exchResult))
749+ then true
750+ else (0 > outAmount))
751+ then throw("Wrong params")
752+ else if ((lpId != toBase58String(pmtAssetId)))
753+ then throw("Wrong LP")
754+ else {
755+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
756+ let estimAmAmt = r._1
757+ let estimPrAmt = r._2
758+ let amBalance = getAccBalance(amId)
759+ let prBalance = getAccBalance(prId)
760+ let $t03046630923 = if ((outAssetId == amId))
761+ then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
762+ else if ((outAssetId == prId))
763+ then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
764+ else throw("wrong outAssetId")
765+ let amBalanceNow = $t03046630923._1
766+ let prBalanceNow = $t03046630923._2
767+ let virtSwapInAm = $t03046630923._3
768+ let virtSwapOutPr = $t03046630923._4
769+ let virtSwapInPr = $t03046630923._5
770+ let virtSwapOutAm = $t03046630923._6
771+ let totalGet = $t03046630923._7
772+ if (if ((0 > virtSwapInAm))
773+ then true
774+ else (0 > virtSwapInPr))
775+ then throw("Wrong calc")
776+ else {
777+ let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
778+ let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
779+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
780+ if ((D0vsD1 == D0vsD1))
781+ then {
782+ let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
783+ if ((finalRes == finalRes))
784+ then {
785+ let $t03162831732 = if ((outAssetId == amId))
786+ then $Tuple2(toInt(finalRes._2), 0)
787+ else $Tuple2(0, toInt(finalRes._2))
788+ let outAm = $t03162831732._1
789+ let outPr = $t03162831732._2
790+ let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
791+ let curPr = f1(curPrX18, scale8)
792+ let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES"))
793+ then unit
794+ else fromBase58String(outAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)]
795+ if ((state == state))
796+ then {
797+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
798+ if ((burn == burn))
799+ then state
800+ else throw("Strict value is not equal to itself.")
801+ }
802+ else throw("Strict value is not equal to itself.")
803+ }
804+ else throw("Strict value is not equal to itself.")
805+ }
806+ else throw("Strict value is not equal to itself.")
807+ }
808+ }
809+ else throw("Strict value is not equal to itself.")
826810 }
827811
828812
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
9-
10-let thousand = 1000
119
1210 let zeroBigInt = toBigInt(0)
1311
1412 let oneBigInt = toBigInt(1)
1513
1614 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1715
1816 let Amult = "100"
1917
2018 let Dconv = "1"
2119
2220 let SEP = "__"
2321
2422 let EMPTY = ""
2523
2624 let PoolActive = 1
2725
2826 let PoolPutDis = 2
2927
3028 let PoolMatcherDis = 3
3129
3230 let PoolShutdown = 4
3331
3432 let idxPoolAddress = 1
3533
3634 let idxPoolSt = 2
3735
3836 let idxLPAsId = 3
3937
4038 let idxAmAsId = 4
4139
4240 let idxPrAsId = 5
4341
4442 let idxAmtAsDcm = 6
4543
4644 let idxPriceAsDcm = 7
4745
4846 let idxIAmtAsId = 8
4947
5048 let idxIPriceAsId = 9
5149
5250 let idxFactStakCntr = 1
5351
5452 let idxFactSlippCntr = 7
5553
5654 let idxFactGwxRewCntr = 10
5755
58-let feePermilleDefault = 0
56+let delay = "%s__delay"
5957
6058 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6159
6260
6361 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6462
6563
6664 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6765
6866
6967 func abs (val) = if ((zeroBigInt > val))
7068 then -(val)
7169 else val
7270
7371
7472 func fc () = "%s__factoryContract"
7573
7674
7775 func mpk () = "%s__managerPublicKey"
7876
7977
8078 func pmpk () = "%s__pendingManagerPublicKey"
8179
8280
8381 func pl () = "%s%s__price__last"
8482
8583
8684 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
8785
8886
8987 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
9088
9189
9290 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
9391
9492
9593 func aa () = "%s__amountAsset"
9694
9795
9896 func pa () = "%s__priceAsset"
9997
10098
10199 func amp () = "%s__amp"
102100
103101
104102 func ada () = "%s__addonAddr"
105103
106104
107-let keyFeePermille = "%s__feePermille"
105+func lgotc (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP)
108106
109-let feePermille = valueOrElse(getInteger(this, keyFeePermille), feePermilleDefault)
107+
108+func lsotc (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP)
109+
110110
111111 func fcfg () = "%s__factoryConfig"
112112
113113
114114 func mtpk () = "%s%s__matcher__publicKey"
115115
116116
117117 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
118118
119119
120120 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
121121
122122
123123 func aps () = "%s__shutdown"
124124
125125
126126 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
127-
128-
129-func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
130127
131128
132129 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
133130
134131
135132 func str (val) = match val {
136133 case valStr: String =>
137134 valStr
138135 case _ =>
139136 throw("fail cast to String")
140137 }
141138
142139
143140 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
144141
145142
146143 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
147144
148145
149146 let fca = addressFromStringValue(strf(this, fc()))
150147
151148 let A = strf(this, amp())
152149
153150 func igs () = valueOrElse(getBoolean(fca, aps()), false)
154151
155152
156153 func mp () = fromBase58String(strf(fca, mtpk()))
157154
158-
159-let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
160155
161156 func gpc () = {
162157 let amtAs = strf(this, aa())
163158 let priceAs = strf(this, pa())
164159 let iPriceAs = intf(fca, mba(priceAs))
165160 let iAmtAs = intf(fca, mba(amtAs))
166161 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
167162 }
168163
169164
170165 func gfc () = split(strf(fca, fcfg()), SEP)
171166
172167
173168 func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP)
174169
175170
176171 func dataGetActionInfo (outAmtAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmtAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP)
177172
178173
179174 func getAccBalance (assetId) = if ((assetId == "WAVES"))
180175 then wavesBalance(this).available
181176 else assetBalance(this, fromBase58String(assetId))
182177
183178
184179 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
185180
186181
187182 func vad (A1,A2,slippage) = {
188183 let diff = fraction((A1 - A2), scale8BigInt, A2)
189184 let pass = ((slippage - abs(diff)) > zeroBigInt)
190185 if (!(pass))
191186 then throw(("Big slpg: " + toString(diff)))
192187 else $Tuple2(pass, min([A1, A2]))
193188 }
194189
195190
196191 func vd (D1,D0,slpg) = {
197192 let diff = fraction(D0, scale8BigInt, D1)
198193 let fail = (slpg > diff)
199194 if (if (fail)
200195 then true
201196 else (D0 > D1))
202197 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
203198 else fail
204199 }
205200
206201
207202 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
208203 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
209204 let prAsAmtX18 = t1(prAmt, prAssetDcm)
210205 cpbi(prAsAmtX18, amtAsAmtX18)
211206 }
212207
213208
214209 func calcPrices (amAmt,prAmt,lpAmt) = {
215210 let cfg = gpc()
216211 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
217212 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
218213 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
219214 let amAmtX18 = t1(amAmt, amtAsDcm)
220215 let prAmtX18 = t1(prAmt, prAsDcm)
221216 let lpAmtX18 = t1(lpAmt, scale8)
222217 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
223218 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
224219 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
225220 }
226221
227222
228223 func calculatePrices (amAmt,prAmt,lpAmt) = {
229224 let p = calcPrices(amAmt, prAmt, lpAmt)
230225 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
231226 }
232227
233228
234229 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
235230 let cfg = gpc()
236231 let lpId = cfg[idxLPAsId]
237232 let amId = cfg[idxAmAsId]
238233 let prId = cfg[idxPrAsId]
239234 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
240235 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
241236 let sts = cfg[idxPoolSt]
242237 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
243238 if ((lpId != pmtAssetId))
244239 then throw("Wrong pmt asset")
245240 else {
246241 let amBalance = getAccBalance(amId)
247242 let amBalanceX18 = t1(amBalance, amDcm)
248243 let prBalance = getAccBalance(prId)
249244 let prBalanceX18 = t1(prBalance, prDcm)
250245 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
251246 let curPrice = f1(curPriceX18, scale8)
252247 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
253248 let lpEmissX18 = t1(lpEmiss, scale8)
254249 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
255250 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
256251 let outAmAmt = f1(outAmAmtX18, amDcm)
257252 let outPrAmt = f1(outPrAmtX18, prDcm)
258253 let state = if ((txId58 == ""))
259254 then nil
260255 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
261256 then unit
262257 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
263258 then unit
264259 else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
265260 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
266261 }
267262 }
268263
269264
270265 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = {
271266 let cfg = gpc()
272267 let lpId = fromBase58String(cfg[idxLPAsId])
273268 let amIdStr = cfg[idxAmAsId]
274269 let prIdStr = cfg[idxPrAsId]
275270 let inAmIdStr = cfg[idxIAmtAsId]
276271 let inPrIdStr = cfg[idxIPriceAsId]
277272 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
278273 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
279274 let sts = cfg[idxPoolSt]
280275 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
281276 let amBalance = if (isEval)
282277 then getAccBalance(amIdStr)
283278 else if (if (isOneAsset)
284279 then (pmtId == amIdStr)
285280 else false)
286281 then (getAccBalance(amIdStr) - pmtAmt)
287282 else if (isOneAsset)
288283 then getAccBalance(amIdStr)
289284 else (getAccBalance(amIdStr) - inAmAmt)
290285 let prBalance = if (isEval)
291286 then getAccBalance(prIdStr)
292287 else if (if (isOneAsset)
293288 then (pmtId == prIdStr)
294289 else false)
295290 then (getAccBalance(prIdStr) - pmtAmt)
296291 else if (isOneAsset)
297292 then getAccBalance(prIdStr)
298293 else (getAccBalance(prIdStr) - inPrAmt)
299294 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
300295 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
301296 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
302297 let amBalanceX18 = t1(amBalance, amtDcm)
303298 let prBalanceX18 = t1(prBalance, priceDcm)
304299 let r = if ((lpEm == 0))
305300 then {
306301 let curPriceX18 = zeroBigInt
307302 let slippageX18 = zeroBigInt
308303 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
309304 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
310305 }
311306 else {
312307 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
313308 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
314309 let slippageX18 = t1(slippage, scale8)
315310 if (if ((curPriceX18 != zeroBigInt))
316311 then (slippageRealX18 > slippageX18)
317312 else false)
318313 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
319314 else {
320315 let lpEmissionX18 = t1(lpEm, scale8)
321316 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
322317 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
323318 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
324319 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
325320 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
326321 let expAmtAssetAmtX18 = expectedAmts._1
327322 let expPriceAssetAmtX18 = expectedAmts._2
328323 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
329324 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
330325 }
331326 }
332327 let calcLpAmt = r._1
333328 let calcAmAssetPmt = r._2
334329 let calcPrAssetPmt = r._3
335330 let curPrice = f1(r._4, scale8)
336331 let slippageCalc = f1(r._5, scale8)
337332 if ((0 >= calcLpAmt))
338333 then throw("LP <= 0")
339334 else {
340335 let emitLpAmt = if (!(emitLp))
341336 then 0
342337 else calcLpAmt
343338 let amDiff = (inAmAmt - calcAmAssetPmt)
344339 let prDiff = (inPrAmt - calcPrAssetPmt)
345- let $t01568216027 = if (if (isOneAsset)
340+ let $t01560115946 = if (if (isOneAsset)
346341 then (pmtId == amIdStr)
347342 else false)
348343 then $Tuple2(pmtAmt, 0)
349344 else if (if (isOneAsset)
350345 then (pmtId == prIdStr)
351346 else false)
352347 then $Tuple2(0, pmtAmt)
353348 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
354- let writeAmAmt = $t01568216027._1
355- let writePrAmt = $t01568216027._2
349+ let writeAmAmt = $t01560115946._1
350+ let writePrAmt = $t01560115946._2
356351 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
357352 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
358353 }
359354 }
360355
361356
362357 func moa (order) = {
363358 let cfg = gpc()
364359 let amtAsId = cfg[idxAmAsId]
365360 let prAsId = cfg[idxPrAsId]
366361 let sts = parseIntValue(cfg[idxPoolSt])
367362 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
368363 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
369364 let accAmtAsBalance = getAccBalance(amtAsId)
370365 let accPrAsBalance = getAccBalance(prAsId)
371366 let curPriceX18 = if ((order.orderType == Buy))
372367 then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
373368 else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
374369 let curPrice = f1(curPriceX18, scale8)
375370 if (if (if (igs())
376371 then true
377372 else (sts == PoolMatcherDis))
378373 then true
379374 else (sts == PoolShutdown))
380375 then throw("Admin blocked")
381376 else {
382377 let orAmtAsset = order.assetPair.amountAsset
383378 let orAmtAsStr = if ((orAmtAsset == unit))
384379 then "WAVES"
385380 else toBase58String(value(orAmtAsset))
386381 let orPrAsset = order.assetPair.priceAsset
387382 let orPrAsStr = if ((orPrAsset == unit))
388383 then "WAVES"
389384 else toBase58String(value(orPrAsset))
390385 if (if ((orAmtAsStr != amtAsId))
391386 then true
392387 else (orPrAsStr != prAsId))
393388 then throw("Wr assets")
394389 else {
395390 let orderPrice = order.price
396391 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
397392 let castOrderPrice = ts(orderPrice, scale8, priceDcm)
398393 let isOrderPriceValid = if ((order.orderType == Buy))
399394 then (curPrice >= castOrderPrice)
400395 else (castOrderPrice >= curPrice)
401396 true
402397 }
403398 }
404399 }
405400
406401
407402 func cg (i) = if ((size(i.payments) != 1))
408403 then throw("1 pmnt exp")
409404 else {
410405 let pmt = value(i.payments[0])
411406 let pmtAssetId = value(pmt.assetId)
412407 let pmtAmt = pmt.amount
413408 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
414409 let outAmAmt = r._1
415410 let outPrAmt = r._2
416411 let sts = parseIntValue(r._9)
417412 let state = r._10
418413 if (if (igs())
419414 then true
420415 else (sts == PoolShutdown))
421416 then throw(("Admin blocked: " + toString(sts)))
422417 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
423418 }
424419
425420
426421 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = {
427422 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId)
428423 let sts = parseIntValue(r._8)
429424 if (if (if (igs())
430425 then true
431426 else (sts == PoolPutDis))
432427 then true
433428 else (sts == PoolShutdown))
434429 then throw(("Blocked:" + toString(sts)))
435430 else r
436- }
437-
438-
439-func takeFee (amount) = {
440- let fee = fraction(amount, feePermille, thousand)
441- $Tuple2((amount - fee), fee)
442431 }
443432
444433
445434 func m () = match getString(mpk()) {
446435 case s: String =>
447436 fromBase58String(s)
448437 case _: Unit =>
449438 unit
450439 case _ =>
451440 throw("Match error")
452441 }
453442
454443
455444 func pm () = match getString(pmpk()) {
456445 case s: String =>
457446 fromBase58String(s)
458447 case _: Unit =>
459448 unit
460449 case _ =>
461450 throw("Match error")
462451 }
463452
464453
465454 let pd = throw("Permission denied")
466455
467456 func mm (i) = match m() {
468457 case pk: ByteVector =>
469458 if ((i.callerPublicKey == pk))
470459 then true
471460 else pd
472461 case _: Unit =>
473462 if ((i.caller == this))
474463 then true
475464 else pd
476465 case _ =>
477466 throw("Match error")
478467 }
479468
480469
481470 @Callable(i)
482471 func constructor (fc) = {
483472 let c = mm(i)
484473 if ((c == c))
485474 then [StringEntry(fc(), fc)]
486475 else throw("Strict value is not equal to itself.")
487476 }
488477
489478
490479
491480 @Callable(i)
492481 func setManager (pendingManagerPublicKey) = {
493482 let c = mm(i)
494483 if ((c == c))
495484 then {
496485 let cm = fromBase58String(pendingManagerPublicKey)
497486 if ((cm == cm))
498487 then [StringEntry(pmpk(), pendingManagerPublicKey)]
499488 else throw("Strict value is not equal to itself.")
500489 }
501490 else throw("Strict value is not equal to itself.")
502491 }
503492
504493
505494
506495 @Callable(i)
507496 func confirmManager () = {
508497 let p = pm()
509498 let hpm = if (isDefined(p))
510499 then true
511500 else throw("No pending manager")
512501 if ((hpm == hpm))
513502 then {
514503 let cpm = if ((i.callerPublicKey == value(p)))
515504 then true
516505 else throw("You are not pending manager")
517506 if ((cpm == cpm))
518507 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
519508 else throw("Strict value is not equal to itself.")
520509 }
521510 else throw("Strict value is not equal to itself.")
522511 }
523512
524513
525514
526515 @Callable(i)
527516 func put (slip,autoStake) = {
528517 let factCfg = gfc()
529518 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
530519 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
531520 if ((0 > slip))
532521 then throw("Wrong slippage")
533522 else if ((size(i.payments) != 2))
534523 then throw("2 pmnts expd")
535524 else {
536525 let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, 0, "")
537526 let emitLpAmt = e._2
538527 let lpAssetId = e._7
539528 let state = e._9
540529 let amDiff = e._10
541530 let prDiff = e._11
542531 let amId = e._12
543532 let prId = e._13
544533 let r = invoke(fca, "emit", [emitLpAmt], nil)
545534 if ((r == r))
546535 then {
547536 let el = match r {
548537 case legacy: Address =>
549538 invoke(legacy, "emit", [emitLpAmt], nil)
550539 case _ =>
551540 unit
552541 }
553542 if ((el == el))
554543 then {
555544 let sa = if ((amDiff > 0))
556545 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
557546 else nil
558547 if ((sa == sa))
559548 then {
560549 let sp = if ((prDiff > 0))
561550 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
562551 else nil
563552 if ((sp == sp))
564553 then {
565554 let lpTrnsfr = if (autoStake)
566555 then {
567556 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
568557 if ((ss == ss))
569558 then nil
570559 else throw("Strict value is not equal to itself.")
571560 }
572561 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
573562 (state ++ lpTrnsfr)
574563 }
575564 else throw("Strict value is not equal to itself.")
576565 }
577566 else throw("Strict value is not equal to itself.")
578567 }
579568 else throw("Strict value is not equal to itself.")
580569 }
581570 else throw("Strict value is not equal to itself.")
582571 }
583572 }
584573
585574
586575
587576 @Callable(i)
588577 func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = {
589578 let cfg = gfc()
590579 let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr")
591580 let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr")
592581 let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr")
593582 let poolCfg = gpc()
594583 let amId = poolCfg[idxAmAsId]
595584 let prId = poolCfg[idxPrAsId]
596585 let amDcm = parseIntValue(poolCfg[idxAmtAsDcm])
597586 let prDcm = parseIntValue(poolCfg[idxPriceAsDcm])
598587 let addon = valueOrElse(getString(this, ada()), "")
599588 let userAddress = if ((addon == toString(i.caller)))
600589 then i.originCaller
601590 else i.caller
602- if (if (if (if ((0 >= slippage))
603- then true
604- else (0 >= amAssetPart))
605- then true
606- else (0 >= prAssetPart))
607- then true
608- else (0 >= outLp))
609- then throw("Wrong params")
610- else if ((size(i.payments) != 1))
611- then throw("1 pmnt expd")
612- else {
613- let pmt = value(i.payments[0])
614- let pmtAssetId = toBase58String(value(pmt.assetId))
615- let paymentAmountRaw = pmt.amount
616- let $t02464424696 = takeFee(paymentAmountRaw)
617- let pmtAmt = $t02464424696._1
618- let feeAmount = $t02464424696._2
619- if ((10000000 > paymentAmountRaw))
620- then throw("Wrong pmt amt")
621- else {
622- let amBalance = getAccBalance(amId)
623- let prBalance = getAccBalance(prId)
624- let $t02485625472 = if ((pmtAssetId == amId))
625- then if (if ((paymentAmountRaw > amBalance))
626- then true
627- else (amAssetPart > pmtAmt))
628- then throw("invalid payment amount")
629- else $Tuple6((amBalance - paymentAmountRaw), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
630- else if ((pmtAssetId == prId))
631- then if (if ((paymentAmountRaw > prBalance))
591+ let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
592+ let check = reentrantInvoke(addonContract, "ensureCanPutOneTkn", [toString(userAddress)], nil)
593+ if ((check == check))
594+ then if (if (if (if ((0 >= slippage))
595+ then true
596+ else (0 >= amAssetPart))
597+ then true
598+ else (0 >= prAssetPart))
599+ then true
600+ else (0 >= outLp))
601+ then throw("Wrong params")
602+ else if ((size(i.payments) != 1))
603+ then throw("1 pmnt expd")
604+ else {
605+ let pmt = value(i.payments[0])
606+ let pmtAssetId = toBase58String(value(pmt.assetId))
607+ let pmtAmt = pmt.amount
608+ if ((10000000 > pmtAmt))
609+ then throw("Wrong pmt amt")
610+ else {
611+ let amBalance = getAccBalance(amId)
612+ let prBalance = getAccBalance(prId)
613+ let $t02485925435 = if ((pmtAssetId == amId))
614+ then if (if ((pmtAmt > amBalance))
632615 then true
633- else (prAssetPart > pmtAmt))
616+ else (amAssetPart > pmtAmt))
634617 then throw("invalid payment amount")
635- else $Tuple6(amBalance, (prBalance - paymentAmountRaw), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
636- else throw("wrong pmtAssetId")
637- let amBalanceNow = $t02485625472._1
638- let prBalanceNow = $t02485625472._2
639- let virtSwapInAm = $t02485625472._3
640- let virtSwapOutPr = $t02485625472._4
641- let virtSwapInPr = $t02485625472._5
642- let virtSwapOutAm = $t02485625472._6
643- let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
644- let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
645- let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
646- if ((D0vsD1 == D0vsD1))
647- then {
648- let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
649- let estimLP = estPut._2
650- let lpAssetId = estPut._7
651- let state = estPut._9
652- let amDiff = estPut._10
653- let prDiff = estPut._11
654- let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
655- let emitLpAmt = toInt(lpCalcRes._2)
656- let e = invoke(fca, "emit", [emitLpAmt], nil)
657- if ((e == e))
658- then {
659- let el = match e {
660- case legacy: Address =>
661- invoke(legacy, "emit", [emitLpAmt], nil)
662- case _ =>
663- unit
664- }
665- if ((el == el))
666- then {
667- let sa = if ((amDiff > 0))
668- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
669- else nil
670- if ((sa == sa))
671- then {
672- let sp = if ((prDiff > 0))
673- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
674- else nil
675- if ((sp == sp))
676- then {
677- let lpTrnsfr = if (autoStake)
678- then {
679- let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
680- if ((ss == ss))
681- then nil
682- else throw("Strict value is not equal to itself.")
683- }
684- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
685- let sendFeeToMatcher = if ((feeAmount > 0))
686- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
687- else nil
688- ((state ++ lpTrnsfr) ++ sendFeeToMatcher)
689- }
690- else throw("Strict value is not equal to itself.")
691- }
692- else throw("Strict value is not equal to itself.")
693- }
694- else throw("Strict value is not equal to itself.")
695- }
696- else throw("Strict value is not equal to itself.")
697- }
698- else throw("Strict value is not equal to itself.")
699- }
700- }
618+ else $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
619+ else if ((pmtAssetId == prId))
620+ then if (if ((pmtAmt > prBalance))
621+ then true
622+ else (prAssetPart > pmtAmt))
623+ then throw("invalid payment amount")
624+ else $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
625+ else throw("wrong pmtAssetId")
626+ let amBalanceNow = $t02485925435._1
627+ let prBalanceNow = $t02485925435._2
628+ let virtSwapInAm = $t02485925435._3
629+ let virtSwapOutPr = $t02485925435._4
630+ let virtSwapInPr = $t02485925435._5
631+ let virtSwapOutAm = $t02485925435._6
632+ let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
633+ let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
634+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
635+ if ((D0vsD1 == D0vsD1))
636+ then {
637+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
638+ let estimLP = estPut._2
639+ let lpAssetId = estPut._7
640+ let state = estPut._9
641+ let amDiff = estPut._10
642+ let prDiff = estPut._11
643+ let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
644+ let emitLpAmt = toInt(lpCalcRes._2)
645+ let e = invoke(fca, "emit", [emitLpAmt], nil)
646+ if ((e == e))
647+ then {
648+ let el = match e {
649+ case legacy: Address =>
650+ invoke(legacy, "emit", [emitLpAmt], nil)
651+ case _ =>
652+ unit
653+ }
654+ if ((el == el))
655+ then {
656+ let sa = if ((amDiff > 0))
657+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
658+ else nil
659+ if ((sa == sa))
660+ then {
661+ let sp = if ((prDiff > 0))
662+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
663+ else nil
664+ if ((sp == sp))
665+ then {
666+ let lpTrnsfr = if (autoStake)
667+ then {
668+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
669+ if ((ss == ss))
670+ then nil
671+ else throw("Strict value is not equal to itself.")
672+ }
673+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
674+ (state ++ lpTrnsfr)
675+ }
676+ else throw("Strict value is not equal to itself.")
677+ }
678+ else throw("Strict value is not equal to itself.")
679+ }
680+ else throw("Strict value is not equal to itself.")
681+ }
682+ else throw("Strict value is not equal to itself.")
683+ }
684+ else throw("Strict value is not equal to itself.")
685+ }
686+ }
687+ else throw("Strict value is not equal to itself.")
701688 }
702689
703690
704691
705692 @Callable(i)
706693 func putForFree (maxSlpg) = if ((0 > maxSlpg))
707694 then throw("Wrong slpg")
708695 else if ((size(i.payments) != 2))
709696 then throw("2 pmnts expd")
710697 else {
711698 let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, 0, "")
712699 estPut._9
713700 }
714701
715702
716703
717704 @Callable(i)
718705 func get () = {
719706 let r = cg(i)
720707 let outAmtAmt = r._1
721708 let outPrAmt = r._2
722709 let pmtAmt = r._3
723710 let pmtAssetId = r._4
724711 let state = r._5
725712 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
726713 if ((b == b))
727714 then state
728715 else throw("Strict value is not equal to itself.")
729716 }
730717
731718
732719
733720 @Callable(i)
734721 func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1))
735722 then throw("1 pmnt expd")
736723 else {
737724 let cfg = gpc()
738725 let lpId = cfg[idxLPAsId]
739726 let amId = cfg[idxAmAsId]
740727 let prId = cfg[idxPrAsId]
741728 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
742729 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
743730 let sts = cfg[idxPoolSt]
744731 let factCfg = gfc()
745732 let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr")
746733 let pmt = value(i.payments[0])
747734 let addon = valueOrElse(getString(this, ada()), "")
748735 let userAddress = if ((addon == toString(i.caller)))
749736 then i.originCaller
750737 else i.caller
751738 let txId58 = toBase58String(i.transactionId)
752739 let pmtAssetId = value(pmt.assetId)
753740 let pmtAmt = pmt.amount
754- if ((1000000000 > pmtAmt))
755- then throw("Min pmt 10 LP")
756- else if (if (if ((0 > slippage))
757- then true
758- else (0 > exchResult))
759- then true
760- else (0 > outAmount))
761- then throw("Wrong params")
762- else if ((lpId != toBase58String(pmtAssetId)))
763- then throw("Wrong LP")
764- else {
765- let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
766- let estimAmAmt = r._1
767- let estimPrAmt = r._2
768- let amBalance = getAccBalance(amId)
769- let prBalance = getAccBalance(prId)
770- let $t03041530875 = if ((outAssetId == amId))
771- then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
772- else if ((outAssetId == prId))
773- then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
774- else throw("wrong outAssetId")
775- let amBalanceNow = $t03041530875._1
776- let prBalanceNow = $t03041530875._2
777- let virtSwapInAm = $t03041530875._3
778- let virtSwapOutPr = $t03041530875._4
779- let virtSwapInPr = $t03041530875._5
780- let virtSwapOutAm = $t03041530875._6
781- let totalGetRaw = $t03041530875._7
782- if (if ((0 > virtSwapInAm))
783- then true
784- else (0 > virtSwapInPr))
785- then throw("Wrong calc")
786- else {
787- let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
788- let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
789- let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
790- if ((D0vsD1 == D0vsD1))
791- then {
792- let totalGet = takeFee(totalGetRaw)._1
793- let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
794- if ((finalRes == finalRes))
795- then {
796- let $t03162231726 = if ((outAssetId == amId))
797- then $Tuple2(toInt(finalRes._2), 0)
798- else $Tuple2(0, toInt(finalRes._2))
799- let outAm = $t03162231726._1
800- let outPr = $t03162231726._2
801- let totalAmount = (outAm + outPr)
802- let feeAmount = (totalGetRaw - totalGet)
803- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
804- then unit
805- else fromBase58String(outAssetId)
806- let sendFeeToMatcher = if ((feeAmount > 0))
807- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
808- else nil
809- let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
810- let curPr = f1(curPrX18, scale8)
811- let state = [ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)]
812- if ((state == state))
813- then {
814- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
815- if ((burn == burn))
816- then (state ++ sendFeeToMatcher)
817- else throw("Strict value is not equal to itself.")
818- }
819- else throw("Strict value is not equal to itself.")
820- }
821- else throw("Strict value is not equal to itself.")
822- }
823- else throw("Strict value is not equal to itself.")
824- }
825- }
741+ let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
742+ let check = reentrantInvoke(addonContract, "ensureCanGetOneTkn", [toString(userAddress)], nil)
743+ if ((check == check))
744+ then if ((1000000000 > pmtAmt))
745+ then throw("Min pmt 10 LP")
746+ else if (if (if ((0 > slippage))
747+ then true
748+ else (0 > exchResult))
749+ then true
750+ else (0 > outAmount))
751+ then throw("Wrong params")
752+ else if ((lpId != toBase58String(pmtAssetId)))
753+ then throw("Wrong LP")
754+ else {
755+ let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
756+ let estimAmAmt = r._1
757+ let estimPrAmt = r._2
758+ let amBalance = getAccBalance(amId)
759+ let prBalance = getAccBalance(prId)
760+ let $t03046630923 = if ((outAssetId == amId))
761+ then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
762+ else if ((outAssetId == prId))
763+ then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
764+ else throw("wrong outAssetId")
765+ let amBalanceNow = $t03046630923._1
766+ let prBalanceNow = $t03046630923._2
767+ let virtSwapInAm = $t03046630923._3
768+ let virtSwapOutPr = $t03046630923._4
769+ let virtSwapInPr = $t03046630923._5
770+ let virtSwapOutAm = $t03046630923._6
771+ let totalGet = $t03046630923._7
772+ if (if ((0 > virtSwapInAm))
773+ then true
774+ else (0 > virtSwapInPr))
775+ then throw("Wrong calc")
776+ else {
777+ let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
778+ let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
779+ let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
780+ if ((D0vsD1 == D0vsD1))
781+ then {
782+ let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
783+ if ((finalRes == finalRes))
784+ then {
785+ let $t03162831732 = if ((outAssetId == amId))
786+ then $Tuple2(toInt(finalRes._2), 0)
787+ else $Tuple2(0, toInt(finalRes._2))
788+ let outAm = $t03162831732._1
789+ let outPr = $t03162831732._2
790+ let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
791+ let curPr = f1(curPrX18, scale8)
792+ let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES"))
793+ then unit
794+ else fromBase58String(outAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)]
795+ if ((state == state))
796+ then {
797+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
798+ if ((burn == burn))
799+ then state
800+ else throw("Strict value is not equal to itself.")
801+ }
802+ else throw("Strict value is not equal to itself.")
803+ }
804+ else throw("Strict value is not equal to itself.")
805+ }
806+ else throw("Strict value is not equal to itself.")
807+ }
808+ }
809+ else throw("Strict value is not equal to itself.")
826810 }
827811
828812
829813
830814 @Callable(i)
831815 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
832816 let r = cg(i)
833817 let outAmAmt = r._1
834818 let outPrAmt = r._2
835819 let pmtAmt = r._3
836820 let pmtAssetId = r._4
837821 let state = r._5
838822 if ((noLessThenAmtAsset > outAmAmt))
839823 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
840824 else if ((noLessThenPriceAsset > outPrAmt))
841825 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
842826 else {
843827 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
844828 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
845829 then state
846830 else throw("Strict value is not equal to itself.")
847831 }
848832 }
849833
850834
851835
852836 @Callable(i)
853837 func unstakeAndGet (amount) = {
854838 let checkPayments = if ((size(i.payments) != 0))
855839 then throw("No pmnts expd")
856840 else true
857841 if ((checkPayments == checkPayments))
858842 then {
859843 let cfg = gpc()
860844 let factoryCfg = gfc()
861845 let lpAssetId = fromBase58String(cfg[idxLPAsId])
862846 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
863847 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
864848 if ((unstakeInv == unstakeInv))
865849 then {
866850 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
867851 let sts = parseIntValue(r._9)
868852 let state = r._10
869853 let v = if (if (igs())
870854 then true
871855 else (sts == PoolShutdown))
872856 then throw(("Blocked: " + toString(sts)))
873857 else true
874858 if ((v == v))
875859 then {
876860 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
877861 if ((burnA == burnA))
878862 then state
879863 else throw("Strict value is not equal to itself.")
880864 }
881865 else throw("Strict value is not equal to itself.")
882866 }
883867 else throw("Strict value is not equal to itself.")
884868 }
885869 else throw("Strict value is not equal to itself.")
886870 }
887871
888872
889873
890874 @Callable(i)
891875 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
892876 then throw("denied")
893877 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
894878
895879
896880
897881 @Callable(i)
898882 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
899883 then pd
900884 else [StringEntry(k, v)]
901885
902886
903887
904888 @Callable(i)
905889 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
906890 then pd
907891 else [IntegerEntry(k, v)]
908892
909893
910894
911895 @Callable(i)
912896 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
913897
914898
915899
916900 @Callable(i)
917901 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
918902
919903
920904
921905 @Callable(i)
922906 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
923907 let pr = calcPrices(amAmt, prAmt, lpAmt)
924908 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
925909 }
926910
927911
928912
929913 @Callable(i)
930914 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
931915
932916
933917
934918 @Callable(i)
935919 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
936920
937921
938922
939923 @Callable(i)
940924 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
941925
942926
943927
944928 @Callable(i)
945929 func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, false, 0, ""))
946930
947931
948932
949933 @Callable(i)
950934 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
951935 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
952936 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
953937 }
954938
955939
956940 @Verifier(tx)
957941 func verify () = {
958942 let targetPublicKey = match m() {
959943 case pk: ByteVector =>
960944 pk
961945 case _: Unit =>
962946 tx.senderPublicKey
963947 case _ =>
964948 throw("Match error")
965949 }
966950 match tx {
967951 case order: Order =>
968952 let matcherPub = mp()
969953 let orderValid = moa(order)
970954 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
971955 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
972956 if (if (if (orderValid)
973957 then senderValid
974958 else false)
975959 then matcherValid
976960 else false)
977961 then true
978962 else toe(orderValid, senderValid, matcherValid)
979963 case s: SetScriptTransaction =>
980964 let newHash = blake2b256(value(s.script))
981965 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
982966 let currentHash = scriptHash(this)
983967 if (if ((allowedHash == newHash))
984968 then (currentHash != newHash)
985969 else false)
986970 then true
987971 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
988972 case _ =>
989973 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
990974 }
991975 }
992976

github/deemru/w8io/026f985 
128.71 ms