tx · J6zJc8H7j7v5VWi2yTdCGVhoho3kTJr7K8scWtyzJKZN

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03000000 Waves

2022.10.27 10:05 [2290508] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "J6zJc8H7j7v5VWi2yTdCGVhoho3kTJr7K8scWtyzJKZN", "fee": 3000000, "feeAssetId": null, "timestamp": 1666854342208, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "3mvn5wUEotQVrHPYpimxVSfWRRfgb2zdra7K9r83wSdKwVuy8bsWwknp62NFXcEd844p6P1Eec1459EwDstncTMi" ], "script": "base64:BgK0IQgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEIARIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZhY3RTdGFrQ250ciISaWR4RmFjdG9yeVJlc3RDbn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keAlib2R5Qnl0ZXMJAJEDAggFAmR4BnByb29mcwABBQJnSQMDAwUCZ0oFAmdLBwUCZ0wHBgkBAmFzAwUCZ0oFAmdLBQJnTAMJAAECBQJheAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmRYBQJheAQCZ00JAPYDAQkBBXZhbHVlAQgFAmRYBnNjcmlwdAQCZ04JANsEAQkBBXZhbHVlAQkAnQgCBQJhRgkBAmFxAAQCZ08JAPEHAQUEdGhpcwMDCQAAAgUCZ04FAmdNCQECIT0CBQJnTwUCZ00HBgkA9AMDCAUCZ0YJYm9keUJ5dGVzCQCRAwIIBQJnRgZwcm9vZnMAAAUCZ0gJAPQDAwgFAmdGCWJvZHlCeXRlcwkAkQMCCAUCZ0YGcHJvb2ZzAAAFAmdIHhnhLg==", "chainId": 84, "height": 2290508, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9fXw4HsATuXB24KrzkfqbD5qRD2SRws5Zi4dhCPjecLT Next: F8mAPqdVgW4161uCdeuwssjrcueqoKit8J7cArrtwnDD Diff:
OldNewDifferences
680680 let pmt = value(payments[0])
681681 let pmtAssetId = value(pmt.assetId)
682682 let pmtAmt = pmt.amount
683- let txId58 = toBase58String(transactionId)
684- if ((lpId != toBase58String(pmtAssetId)))
685- then throw("Wrong LP")
683+ if ((1000000000 > pmtAmt))
684+ then throw("Min pmt 10 LP")
686685 else {
687- let amBalance = getAccBalance(amId)
688- let prBalance = getAccBalance(prId)
689- let $t02723627344 = {
690- let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
691- if ($isInstanceOf(@, "(Int, Int)"))
692- then @
693- else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
694- }
695- let totalGet = $t02723627344._1
696- let feeAmount = $t02723627344._2
697- let totalAmount = if (if ((minOutAmount > 0))
698- then (minOutAmount > totalGet)
699- else false)
700- then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
701- else totalGet
702- let $t02753127838 = if ((outAssetId == amId))
703- then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
704- else if ((outAssetId == prId))
705- then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
706- else throw("invalid out asset id")
707- let outAm = $t02753127838._1
708- let outPr = $t02753127838._2
709- let amBalanceNew = $t02753127838._3
710- let prBalanceNew = $t02753127838._4
711- let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
712- let curPr = f1(curPrX18, scale8)
713- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
714- then unit
715- else fromBase58String(outAssetId)
716- let sendFeeToMatcher = if ((feeAmount > 0))
717- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
718- else nil
719- 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)] ++ sendFeeToMatcher)
720- if ((state == state))
721- then {
722- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
723- if ((burn == burn))
724- then $Tuple2(state, totalAmount)
686+ let txId58 = toBase58String(transactionId)
687+ if ((lpId != toBase58String(pmtAssetId)))
688+ then throw("Wrong LP")
689+ else {
690+ let amBalance = getAccBalance(amId)
691+ let prBalance = getAccBalance(prId)
692+ let $t02730027408 = {
693+ let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
694+ if ($isInstanceOf(@, "(Int, Int)"))
695+ then @
696+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
697+ }
698+ let totalGet = $t02730027408._1
699+ let feeAmount = $t02730027408._2
700+ let totalAmount = if (if ((minOutAmount > 0))
701+ then (minOutAmount > totalGet)
702+ else false)
703+ then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
704+ else totalGet
705+ let $t02759527902 = if ((outAssetId == amId))
706+ then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
707+ else if ((outAssetId == prId))
708+ then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
709+ else throw("invalid out asset id")
710+ let outAm = $t02759527902._1
711+ let outPr = $t02759527902._2
712+ let amBalanceNew = $t02759527902._3
713+ let prBalanceNew = $t02759527902._4
714+ let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
715+ let curPr = f1(curPrX18, scale8)
716+ let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
717+ then unit
718+ else fromBase58String(outAssetId)
719+ let sendFeeToMatcher = if ((feeAmount > 0))
720+ then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
721+ else nil
722+ 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)] ++ sendFeeToMatcher)
723+ if ((state == state))
724+ then {
725+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
726+ if ((burn == burn))
727+ then $Tuple2(state, totalAmount)
728+ else throw("Strict value is not equal to itself.")
729+ }
725730 else throw("Strict value is not equal to itself.")
726731 }
727- else throw("Strict value is not equal to itself.")
728732 }
729733 }
730734
905909 let pmt = value(i.payments[0])
906910 let pmtAssetId = toBase58String(value(pmt.assetId))
907911 let pmtAmt = pmt.amount
908- let $t03302433149 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId))
909- let estimLP = $t03302433149._1
910- let state = $t03302433149._2
911- let feeAmount = $t03302433149._3
912- let emitLpAmt = if (if ((minOutAmount > 0))
913- then (minOutAmount > estimLP)
914- else false)
915- then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
916- else estimLP
917- let e = invoke(fca, "emit", [emitLpAmt], nil)
918- if ((e == e))
919- then {
920- let el = match e {
921- case legacy: Address =>
922- invoke(legacy, "emit", [emitLpAmt], nil)
923- case _ =>
924- unit
925- }
926- if ((el == el))
912+ if ((10000000 > pmtAmt))
913+ then throw("Wrong pmt amt")
914+ else {
915+ let $t03315133276 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId))
916+ let estimLP = $t03315133276._1
917+ let state = $t03315133276._2
918+ let feeAmount = $t03315133276._3
919+ let emitLpAmt = if (if ((minOutAmount > 0))
920+ then (minOutAmount > estimLP)
921+ else false)
922+ then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
923+ else estimLP
924+ let e = invoke(fca, "emit", [emitLpAmt], nil)
925+ if ((e == e))
927926 then {
928- let lpTrnsfr = if (autoStake)
927+ let el = match e {
928+ case legacy: Address =>
929+ invoke(legacy, "emit", [emitLpAmt], nil)
930+ case _ =>
931+ unit
932+ }
933+ if ((el == el))
929934 then {
930- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
931- if ((ss == ss))
932- then nil
933- else throw("Strict value is not equal to itself.")
935+ let lpTrnsfr = if (autoStake)
936+ then {
937+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
938+ if ((ss == ss))
939+ then nil
940+ else throw("Strict value is not equal to itself.")
941+ }
942+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
943+ let sendFeeToMatcher = if ((feeAmount > 0))
944+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
945+ else nil
946+ $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
934947 }
935- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
936- let sendFeeToMatcher = if ((feeAmount > 0))
937- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
938- else nil
939- $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
948+ else throw("Strict value is not equal to itself.")
940949 }
941950 else throw("Strict value is not equal to itself.")
942951 }
943- else throw("Strict value is not equal to itself.")
944952 }
945953 else throw("Strict value is not equal to itself.")
946954 }
9951003 else throwErr("exactly 1 payment are expected")]
9961004 if ((checks == checks))
9971005 then {
998- let $t03573535890 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
999- let state = $t03573535890._1
1000- let totalAmount = $t03573535890._2
1006+ let $t03586236017 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1007+ let state = $t03586236017._1
1008+ let totalAmount = $t03586236017._2
10011009 $Tuple2(state, totalAmount)
10021010 }
10031011 else throw("Strict value is not equal to itself.")
10221030 else throw("invalid out asset id")
10231031 let newY = getYD(xp, index, D1)
10241032 let dy = (xp[index] - newY)
1025- let totalGetRaw = max([0, toInt((dy - big1))])
1026- let $t03668036729 = takeFee(totalGetRaw)
1027- let totalGet = $t03668036729._1
1028- let feeAmount = $t03668036729._2
1033+ let totalGetRaw = toInt((dy - big1))
1034+ let $t03679636845 = takeFee(totalGetRaw)
1035+ let totalGet = $t03679636845._1
1036+ let feeAmount = $t03679636845._2
10291037 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
10301038 }
10311039
10391047 let lpId = poolConfig[idxLPAsId]
10401048 let amBalance = getAccBalance(amId)
10411049 let prBalance = getAccBalance(prId)
1042- let $t03707437189 = {
1050+ let $t03719037305 = {
10431051 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
10441052 if ($isInstanceOf(@, "(Int, Int)"))
10451053 then @
10461054 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
10471055 }
1048- let totalGet = $t03707437189._1
1049- let feeAmount = $t03707437189._2
1056+ let totalGet = $t03719037305._1
1057+ let feeAmount = $t03719037305._2
10501058 let r = ego("", lpId, lpAssetAmount, this)
10511059 let outAmAmt = r._1
10521060 let outPrAmt = r._2
10531061 let sumOfGetAssets = (outAmAmt + outPrAmt)
1054- let bonus = if ((sumOfGetAssets == 0))
1055- then if ((totalGet == 0))
1056- then 0
1057- else throw("bonus calculation error")
1058- else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
1062+ let bonus = fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
10591063 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
10601064 }
10611065
11481152 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
11491153 if ((unstakeInv == unstakeInv))
11501154 then {
1151- let $t03992140109 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1152- let state = $t03992140109._1
1153- let totalAmount = $t03992140109._2
1155+ let $t03991740105 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1156+ let state = $t03991740105._1
1157+ let totalAmount = $t03991740105._2
11541158 $Tuple2(state, totalAmount)
11551159 }
11561160 else throw("Strict value is not equal to itself.")
11661170 let amId = poolConfig[idxAmAsId]
11671171 let prId = poolConfig[idxPrAsId]
11681172 let lpId = poolConfig[idxLPAsId]
1169- let $t04036840465 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "")
1170- let lpAmount = $t04036840465._1
1171- let state = $t04036840465._2
1172- let feeAmount = $t04036840465._3
1173- let bonus = $t04036840465._4
1173+ let $t04036440461 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "")
1174+ let lpAmount = $t04036440461._1
1175+ let state = $t04036440461._2
1176+ let feeAmount = $t04036440461._3
1177+ let bonus = $t04036440461._4
11741178 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
11751179 }
11761180
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)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1919
2020 let wavesString = "WAVES"
2121
2222 let Amult = "100"
2323
2424 let Dconv = "1"
2525
2626 let SEP = "__"
2727
2828 let EMPTY = ""
2929
3030 let PoolActive = 1
3131
3232 let PoolPutDis = 2
3333
3434 let PoolMatcherDis = 3
3535
3636 let PoolShutdown = 4
3737
3838 let idxPoolAddress = 1
3939
4040 let idxPoolSt = 2
4141
4242 let idxLPAsId = 3
4343
4444 let idxAmAsId = 4
4545
4646 let idxPrAsId = 5
4747
4848 let idxAmtAsDcm = 6
4949
5050 let idxPriceAsDcm = 7
5151
5252 let idxIAmtAsId = 8
5353
5454 let idxIPriceAsId = 9
5555
5656 let idxFactStakCntr = 1
5757
5858 let idxFactoryRestCntr = 6
5959
6060 let idxFactSlippCntr = 7
6161
6262 let idxFactGwxRewCntr = 10
6363
6464 let feeDefault = fraction(5, scale8, 10000)
6565
6666 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6767
6868
6969 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7070
7171
7272 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7373
7474
7575 func abs (val) = if ((zeroBigInt > val))
7676 then -(val)
7777 else val
7878
7979
8080 func absBigInt (val) = if ((zeroBigInt > val))
8181 then -(val)
8282 else val
8383
8484
8585 func fc () = "%s__factoryContract"
8686
8787
8888 func mpk () = "%s__managerPublicKey"
8989
9090
9191 func pmpk () = "%s__pendingManagerPublicKey"
9292
9393
9494 func pl () = "%s%s__price__last"
9595
9696
9797 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
9898
9999
100100 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
101101
102102
103103 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
104104
105105
106106 func aa () = "%s__amountAsset"
107107
108108
109109 func pa () = "%s__priceAsset"
110110
111111
112112 func amp () = "%s__amp"
113113
114114
115115 func ada () = "%s__addonAddr"
116116
117117
118118 let keyFee = "%s__fee"
119119
120120 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
121121
122122 func fcfg () = "%s__factoryConfig"
123123
124124
125125 func mtpk () = "%s%s__matcher__publicKey"
126126
127127
128128 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
129129
130130
131131 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
132132
133133
134134 func aps () = "%s__shutdown"
135135
136136
137137 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
138138
139139
140140 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
141141
142142
143143 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
144144
145145
146146 func str (val) = match val {
147147 case valStr: String =>
148148 valStr
149149 case _ =>
150150 throw("fail cast to String")
151151 }
152152
153153
154154 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
155155
156156
157157 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
158158
159159
160160 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
161161
162162
163163 let fca = addressFromStringValue(strf(this, fc()))
164164
165165 let A = strf(this, amp())
166166
167167 func igs () = valueOrElse(getBoolean(fca, aps()), false)
168168
169169
170170 func mp () = fromBase58String(strf(fca, mtpk()))
171171
172172
173173 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
174174
175175 func gpc () = {
176176 let amtAs = strf(this, aa())
177177 let priceAs = strf(this, pa())
178178 let iPriceAs = intf(fca, mba(priceAs))
179179 let iAmtAs = intf(fca, mba(amtAs))
180180 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
181181 }
182182
183183
184184 func parseAssetId (input) = if ((input == wavesString))
185185 then unit
186186 else fromBase58String(input)
187187
188188
189189 func assetIdToString (input) = if ((input == unit))
190190 then wavesString
191191 else toBase58String(value(input))
192192
193193
194194 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
195195
196196
197197 let poolConfigParsed = parsePoolConfig(gpc())
198198
199199 let $t068297015 = poolConfigParsed
200200
201201 let cfgPoolAddress = $t068297015._1
202202
203203 let cfgPoolStatus = $t068297015._2
204204
205205 let cfgLpAssetId = $t068297015._3
206206
207207 let cfgAmountAssetId = $t068297015._4
208208
209209 let cfgPriceAssetId = $t068297015._5
210210
211211 let cfgAmountAssetDecimals = $t068297015._6
212212
213213 let cfgPriceAssetDecimals = $t068297015._7
214214
215215 func gfc () = split(strf(fca, fcfg()), SEP)
216216
217217
218218 let factoryConfig = gfc()
219219
220220 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
221221
222222 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
223223
224224 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
225225
226226 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
227227
228228 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)
229229
230230
231231 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)
232232
233233
234234 func getAccBalance (assetId) = if ((assetId == "WAVES"))
235235 then wavesBalance(this).available
236236 else assetBalance(this, fromBase58String(assetId))
237237
238238
239239 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
240240
241241
242242 func vad (A1,A2,slippage) = {
243243 let diff = fraction((A1 - A2), scale8BigInt, A2)
244244 let pass = ((slippage - abs(diff)) > zeroBigInt)
245245 if (!(pass))
246246 then throw(("Big slpg: " + toString(diff)))
247247 else $Tuple2(pass, min([A1, A2]))
248248 }
249249
250250
251251 func vd (D1,D0,slpg) = {
252252 let diff = fraction(D0, scale8BigInt, D1)
253253 let fail = (slpg > diff)
254254 if (if (fail)
255255 then true
256256 else (D0 > D1))
257257 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
258258 else fail
259259 }
260260
261261
262262 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
263263 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
264264 let prAsAmtX18 = t1(prAmt, prAssetDcm)
265265 cpbi(prAsAmtX18, amtAsAmtX18)
266266 }
267267
268268
269269 func calcPrices (amAmt,prAmt,lpAmt) = {
270270 let cfg = gpc()
271271 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
272272 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
273273 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
274274 let amAmtX18 = t1(amAmt, amtAsDcm)
275275 let prAmtX18 = t1(prAmt, prAsDcm)
276276 let lpAmtX18 = t1(lpAmt, scale8)
277277 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
278278 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
279279 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
280280 }
281281
282282
283283 func calculatePrices (amAmt,prAmt,lpAmt) = {
284284 let p = calcPrices(amAmt, prAmt, lpAmt)
285285 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
286286 }
287287
288288
289289 func takeFee (amount) = {
290290 let feeAmount = fraction(amount, fee, scale8)
291291 $Tuple2((amount - feeAmount), feeAmount)
292292 }
293293
294294
295295 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
296296 let cfg = gpc()
297297 let lpId = cfg[idxLPAsId]
298298 let amId = cfg[idxAmAsId]
299299 let prId = cfg[idxPrAsId]
300300 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
301301 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
302302 let sts = cfg[idxPoolSt]
303303 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
304304 if ((lpId != pmtAssetId))
305305 then throw("Wrong pmt asset")
306306 else {
307307 let amBalance = getAccBalance(amId)
308308 let amBalanceX18 = t1(amBalance, amDcm)
309309 let prBalance = getAccBalance(prId)
310310 let prBalanceX18 = t1(prBalance, prDcm)
311311 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
312312 let curPrice = f1(curPriceX18, scale8)
313313 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
314314 let lpEmissX18 = t1(lpEmiss, scale8)
315315 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
316316 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
317317 let outAmAmt = f1(outAmAmtX18, amDcm)
318318 let outPrAmt = f1(outPrAmtX18, prDcm)
319319 let state = if ((txId58 == ""))
320320 then nil
321321 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
322322 then unit
323323 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
324324 then unit
325325 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)]
326326 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
327327 }
328328 }
329329
330330
331331 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
332332 let cfg = gpc()
333333 let lpId = fromBase58String(cfg[idxLPAsId])
334334 let amIdStr = cfg[idxAmAsId]
335335 let prIdStr = cfg[idxPrAsId]
336336 let inAmIdStr = cfg[idxIAmtAsId]
337337 let inPrIdStr = cfg[idxIPriceAsId]
338338 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
339339 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
340340 let sts = cfg[idxPoolSt]
341341 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
342342 let amBalance = if (isEval)
343343 then getAccBalance(amIdStr)
344344 else if (if (isOneAsset)
345345 then (pmtId == amIdStr)
346346 else false)
347347 then (getAccBalance(amIdStr) - pmtAmt)
348348 else if (isOneAsset)
349349 then getAccBalance(amIdStr)
350350 else (getAccBalance(amIdStr) - inAmAmt)
351351 let prBalance = if (isEval)
352352 then getAccBalance(prIdStr)
353353 else if (if (isOneAsset)
354354 then (pmtId == prIdStr)
355355 else false)
356356 then (getAccBalance(prIdStr) - pmtAmt)
357357 else if (isOneAsset)
358358 then getAccBalance(prIdStr)
359359 else (getAccBalance(prIdStr) - inPrAmt)
360360 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
361361 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
362362 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
363363 let amBalanceX18 = t1(amBalance, amtDcm)
364364 let prBalanceX18 = t1(prBalance, priceDcm)
365365 let r = if ((lpEm == 0))
366366 then {
367367 let curPriceX18 = zeroBigInt
368368 let slippageX18 = zeroBigInt
369369 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
370370 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
371371 }
372372 else {
373373 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
374374 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
375375 let slippageX18 = t1(slippage, scale8)
376376 if (if (if (validateSlippage)
377377 then (curPriceX18 != zeroBigInt)
378378 else false)
379379 then (slippageRealX18 > slippageX18)
380380 else false)
381381 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
382382 else {
383383 let lpEmissionX18 = t1(lpEm, scale8)
384384 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
385385 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
386386 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
387387 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
388388 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
389389 let expAmtAssetAmtX18 = expectedAmts._1
390390 let expPriceAssetAmtX18 = expectedAmts._2
391391 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
392392 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
393393 }
394394 }
395395 let calcLpAmt = r._1
396396 let calcAmAssetPmt = r._2
397397 let calcPrAssetPmt = r._3
398398 let curPrice = f1(r._4, scale8)
399399 let slippageCalc = f1(r._5, scale8)
400400 if ((0 >= calcLpAmt))
401401 then throw("LP <= 0")
402402 else {
403403 let emitLpAmt = if (!(emitLp))
404404 then 0
405405 else calcLpAmt
406406 let amDiff = (inAmAmt - calcAmAssetPmt)
407407 let prDiff = (inPrAmt - calcPrAssetPmt)
408408 let $t01744617791 = if (if (isOneAsset)
409409 then (pmtId == amIdStr)
410410 else false)
411411 then $Tuple2(pmtAmt, 0)
412412 else if (if (isOneAsset)
413413 then (pmtId == prIdStr)
414414 else false)
415415 then $Tuple2(0, pmtAmt)
416416 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
417417 let writeAmAmt = $t01744617791._1
418418 let writePrAmt = $t01744617791._2
419419 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))]
420420 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
421421 }
422422 }
423423
424424
425425 func moa (order) = {
426426 let cfg = gpc()
427427 let amtAsId = cfg[idxAmAsId]
428428 let prAsId = cfg[idxPrAsId]
429429 let sts = parseIntValue(cfg[idxPoolSt])
430430 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
431431 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
432432 let accAmtAsBalance = getAccBalance(amtAsId)
433433 let accPrAsBalance = getAccBalance(prAsId)
434434 let curPriceX18 = if ((order.orderType == Buy))
435435 then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
436436 else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
437437 let curPrice = f1(curPriceX18, scale8)
438438 if (if (if (igs())
439439 then true
440440 else (sts == PoolMatcherDis))
441441 then true
442442 else (sts == PoolShutdown))
443443 then throw("Admin blocked")
444444 else {
445445 let orAmtAsset = order.assetPair.amountAsset
446446 let orAmtAsStr = if ((orAmtAsset == unit))
447447 then "WAVES"
448448 else toBase58String(value(orAmtAsset))
449449 let orPrAsset = order.assetPair.priceAsset
450450 let orPrAsStr = if ((orPrAsset == unit))
451451 then "WAVES"
452452 else toBase58String(value(orPrAsset))
453453 if (if ((orAmtAsStr != amtAsId))
454454 then true
455455 else (orPrAsStr != prAsId))
456456 then throw("Wr assets")
457457 else {
458458 let orderPrice = order.price
459459 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
460460 let castOrderPrice = ts(orderPrice, scale8, priceDcm)
461461 let isOrderPriceValid = if ((order.orderType == Buy))
462462 then (curPrice >= castOrderPrice)
463463 else (castOrderPrice >= curPrice)
464464 true
465465 }
466466 }
467467 }
468468
469469
470470 func cg (i) = if ((size(i.payments) != 1))
471471 then throw("1 pmnt exp")
472472 else {
473473 let pmt = value(i.payments[0])
474474 let pmtAssetId = value(pmt.assetId)
475475 let pmtAmt = pmt.amount
476476 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
477477 let outAmAmt = r._1
478478 let outPrAmt = r._2
479479 let sts = parseIntValue(r._9)
480480 let state = r._10
481481 if (if (igs())
482482 then true
483483 else (sts == PoolShutdown))
484484 then throw(("Admin blocked: " + toString(sts)))
485485 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
486486 }
487487
488488
489489 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
490490 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
491491 let sts = parseIntValue(r._8)
492492 if (if (if (igs())
493493 then true
494494 else (sts == PoolPutDis))
495495 then true
496496 else (sts == PoolShutdown))
497497 then throw(("Blocked:" + toString(sts)))
498498 else r
499499 }
500500
501501
502502 func getD (xp) = {
503503 let n = big2
504504 let xp0 = xp[0]
505505 let xp1 = xp[1]
506506 let aPrecision = parseBigIntValue(Amult)
507507 let a = (parseBigIntValue(A) * aPrecision)
508508 let s = (xp0 + xp1)
509509 if ((s == big0))
510510 then big0
511511 else {
512512 let ann = (a * n)
513513 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
514514 let ann_s_aPrecision = ((ann * s) / aPrecision)
515515 let ann_aPrecision = (ann - aPrecision)
516516 let n1 = (n + big1)
517517 func calc (acc,cur) = {
518518 let $t02234322363 = acc
519519 let d = $t02234322363._1
520520 let found = $t02234322363._2
521521 if ((found != unit))
522522 then acc
523523 else {
524524 let dp = (((d * d) * d) / xp0_xp1_n_n)
525525 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
526526 let dDiff = absBigInt((dNext - value(d)))
527527 if ((big1 >= dDiff))
528528 then $Tuple2(dNext, cur)
529529 else $Tuple2(dNext, unit)
530530 }
531531 }
532532
533533 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
534534 let $t02278422831 = {
535535 let $l = arr
536536 let $s = size($l)
537537 let $acc0 = $Tuple2(s, unit)
538538 func $f0_1 ($a,$i) = if (($i >= $s))
539539 then $a
540540 else calc($a, $l[$i])
541541
542542 func $f0_2 ($a,$i) = if (($i >= $s))
543543 then $a
544544 else throw("List size exceeds 15")
545545
546546 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
547547 }
548548 let d = $t02278422831._1
549549 let found = $t02278422831._2
550550 if ((found != unit))
551551 then d
552552 else throw(("D calculation error, D = " + toString(d)))
553553 }
554554 }
555555
556556
557557 func getYD (xp,i,D) = {
558558 let n = big2
559559 let x = xp[if ((i == 0))
560560 then 1
561561 else 0]
562562 let aPrecision = parseBigIntValue(Amult)
563563 let a = (parseBigIntValue(A) * aPrecision)
564564 let s = x
565565 let ann = (a * n)
566566 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
567567 let b = ((s + ((D * aPrecision) / ann)) - D)
568568 func calc (acc,cur) = {
569569 let $t02333123351 = acc
570570 let y = $t02333123351._1
571571 let found = $t02333123351._2
572572 if ((found != unit))
573573 then acc
574574 else {
575575 let yNext = (((y * y) + c) / ((big2 * y) + b))
576576 let yDiff = absBigInt((yNext - value(y)))
577577 if ((big1 >= yDiff))
578578 then $Tuple2(yNext, cur)
579579 else $Tuple2(yNext, unit)
580580 }
581581 }
582582
583583 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
584584 let $t02365823705 = {
585585 let $l = arr
586586 let $s = size($l)
587587 let $acc0 = $Tuple2(D, unit)
588588 func $f0_1 ($a,$i) = if (($i >= $s))
589589 then $a
590590 else calc($a, $l[$i])
591591
592592 func $f0_2 ($a,$i) = if (($i >= $s))
593593 then $a
594594 else throw("List size exceeds 15")
595595
596596 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
597597 }
598598 let y = $t02365823705._1
599599 let found = $t02365823705._2
600600 if ((found != unit))
601601 then y
602602 else throw(("Y calculation error, Y = " + toString(y)))
603603 }
604604
605605
606606 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId) = {
607607 let poolConfig = gpc()
608608 let amId = poolConfig[idxAmAsId]
609609 let prId = poolConfig[idxPrAsId]
610610 let lpId = poolConfig[idxLPAsId]
611611 let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm])
612612 let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm])
613613 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
614614 let chechEmission = if ((lpAssetEmission > big0))
615615 then true
616616 else throw("initial deposit requires all coins")
617617 if ((chechEmission == chechEmission))
618618 then {
619619 let amBalance = getAccBalance(amId)
620620 let prBalance = getAccBalance(prId)
621621 let $t02446424926 = if ((txId == ""))
622622 then $Tuple2(amBalance, prBalance)
623623 else if ((pmtAssetId == amId))
624624 then if ((pmtAmtRaw > amBalance))
625625 then throw("invalid payment amount")
626626 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
627627 else if ((pmtAssetId == prId))
628628 then if ((pmtAmtRaw > prBalance))
629629 then throw("invalid payment amount")
630630 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
631631 else throw("wrong pmtAssetId")
632632 let amBalanceOld = $t02446424926._1
633633 let prBalanceOld = $t02446424926._2
634634 let $t02493225108 = if ((pmtAssetId == amId))
635635 then $Tuple2(pmtAmtRaw, 0)
636636 else if ((pmtAssetId == prId))
637637 then $Tuple2(0, pmtAmtRaw)
638638 else throw("invalid payment")
639639 let amAmountRaw = $t02493225108._1
640640 let prAmountRaw = $t02493225108._2
641641 let amAmount = takeFee(amAmountRaw)._1
642642 let prAmount = takeFee(prAmountRaw)._1
643643 let feeAmount = takeFee(pmtAmtRaw)._2
644644 let amBalanceNew = (amBalanceOld + amAmount)
645645 let prBalanceNew = (prBalanceOld + prAmount)
646646 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
647647 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
648648 let checkD = if ((D1 > D0))
649649 then true
650650 else throw()
651651 if ((checkD == checkD))
652652 then {
653653 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0)
654654 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
655655 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
656656 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
657657 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
658658 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
659659 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
660660 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
661661 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
662662 }
663663 else throw("Strict value is not equal to itself.")
664664 }
665665 else throw("Strict value is not equal to itself.")
666666 }
667667
668668
669669 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
670670 let poolConfig = gpc()
671671 let lpId = poolConfig[idxLPAsId]
672672 let amId = poolConfig[idxAmAsId]
673673 let prId = poolConfig[idxPrAsId]
674674 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
675675 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
676676 let poolStatus = poolConfig[idxPoolSt]
677677 let userAddress = if ((caller == restContract))
678678 then originCaller
679679 else caller
680680 let pmt = value(payments[0])
681681 let pmtAssetId = value(pmt.assetId)
682682 let pmtAmt = pmt.amount
683- let txId58 = toBase58String(transactionId)
684- if ((lpId != toBase58String(pmtAssetId)))
685- then throw("Wrong LP")
683+ if ((1000000000 > pmtAmt))
684+ then throw("Min pmt 10 LP")
686685 else {
687- let amBalance = getAccBalance(amId)
688- let prBalance = getAccBalance(prId)
689- let $t02723627344 = {
690- let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
691- if ($isInstanceOf(@, "(Int, Int)"))
692- then @
693- else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
694- }
695- let totalGet = $t02723627344._1
696- let feeAmount = $t02723627344._2
697- let totalAmount = if (if ((minOutAmount > 0))
698- then (minOutAmount > totalGet)
699- else false)
700- then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
701- else totalGet
702- let $t02753127838 = if ((outAssetId == amId))
703- then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
704- else if ((outAssetId == prId))
705- then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
706- else throw("invalid out asset id")
707- let outAm = $t02753127838._1
708- let outPr = $t02753127838._2
709- let amBalanceNew = $t02753127838._3
710- let prBalanceNew = $t02753127838._4
711- let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
712- let curPr = f1(curPrX18, scale8)
713- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
714- then unit
715- else fromBase58String(outAssetId)
716- let sendFeeToMatcher = if ((feeAmount > 0))
717- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
718- else nil
719- 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)] ++ sendFeeToMatcher)
720- if ((state == state))
721- then {
722- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
723- if ((burn == burn))
724- then $Tuple2(state, totalAmount)
686+ let txId58 = toBase58String(transactionId)
687+ if ((lpId != toBase58String(pmtAssetId)))
688+ then throw("Wrong LP")
689+ else {
690+ let amBalance = getAccBalance(amId)
691+ let prBalance = getAccBalance(prId)
692+ let $t02730027408 = {
693+ let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
694+ if ($isInstanceOf(@, "(Int, Int)"))
695+ then @
696+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
697+ }
698+ let totalGet = $t02730027408._1
699+ let feeAmount = $t02730027408._2
700+ let totalAmount = if (if ((minOutAmount > 0))
701+ then (minOutAmount > totalGet)
702+ else false)
703+ then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
704+ else totalGet
705+ let $t02759527902 = if ((outAssetId == amId))
706+ then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
707+ else if ((outAssetId == prId))
708+ then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
709+ else throw("invalid out asset id")
710+ let outAm = $t02759527902._1
711+ let outPr = $t02759527902._2
712+ let amBalanceNew = $t02759527902._3
713+ let prBalanceNew = $t02759527902._4
714+ let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
715+ let curPr = f1(curPrX18, scale8)
716+ let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
717+ then unit
718+ else fromBase58String(outAssetId)
719+ let sendFeeToMatcher = if ((feeAmount > 0))
720+ then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
721+ else nil
722+ 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)] ++ sendFeeToMatcher)
723+ if ((state == state))
724+ then {
725+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
726+ if ((burn == burn))
727+ then $Tuple2(state, totalAmount)
728+ else throw("Strict value is not equal to itself.")
729+ }
725730 else throw("Strict value is not equal to itself.")
726731 }
727- else throw("Strict value is not equal to itself.")
728732 }
729733 }
730734
731735
732736 func m () = match getString(mpk()) {
733737 case s: String =>
734738 fromBase58String(s)
735739 case _: Unit =>
736740 unit
737741 case _ =>
738742 throw("Match error")
739743 }
740744
741745
742746 func pm () = match getString(pmpk()) {
743747 case s: String =>
744748 fromBase58String(s)
745749 case _: Unit =>
746750 unit
747751 case _ =>
748752 throw("Match error")
749753 }
750754
751755
752756 let pd = throw("Permission denied")
753757
754758 func mm (i) = match m() {
755759 case pk: ByteVector =>
756760 if ((i.callerPublicKey == pk))
757761 then true
758762 else pd
759763 case _: Unit =>
760764 if ((i.caller == this))
761765 then true
762766 else pd
763767 case _ =>
764768 throw("Match error")
765769 }
766770
767771
768772 @Callable(i)
769773 func constructor (fc) = {
770774 let c = mm(i)
771775 if ((c == c))
772776 then [StringEntry(fc(), fc)]
773777 else throw("Strict value is not equal to itself.")
774778 }
775779
776780
777781
778782 @Callable(i)
779783 func setManager (pendingManagerPublicKey) = {
780784 let c = mm(i)
781785 if ((c == c))
782786 then {
783787 let cm = fromBase58String(pendingManagerPublicKey)
784788 if ((cm == cm))
785789 then [StringEntry(pmpk(), pendingManagerPublicKey)]
786790 else throw("Strict value is not equal to itself.")
787791 }
788792 else throw("Strict value is not equal to itself.")
789793 }
790794
791795
792796
793797 @Callable(i)
794798 func confirmManager () = {
795799 let p = pm()
796800 let hpm = if (isDefined(p))
797801 then true
798802 else throw("No pending manager")
799803 if ((hpm == hpm))
800804 then {
801805 let cpm = if ((i.callerPublicKey == value(p)))
802806 then true
803807 else throw("You are not pending manager")
804808 if ((cpm == cpm))
805809 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
806810 else throw("Strict value is not equal to itself.")
807811 }
808812 else throw("Strict value is not equal to itself.")
809813 }
810814
811815
812816
813817 @Callable(i)
814818 func put (slip,autoStake) = {
815819 let factCfg = gfc()
816820 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
817821 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
818822 if ((0 > slip))
819823 then throw("Wrong slippage")
820824 else if ((size(i.payments) != 2))
821825 then throw("2 pmnts expd")
822826 else {
823827 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, true, 0, "")
824828 let emitLpAmt = e._2
825829 let lpAssetId = e._7
826830 let state = e._9
827831 let amDiff = e._10
828832 let prDiff = e._11
829833 let amId = e._12
830834 let prId = e._13
831835 let r = invoke(fca, "emit", [emitLpAmt], nil)
832836 if ((r == r))
833837 then {
834838 let el = match r {
835839 case legacy: Address =>
836840 invoke(legacy, "emit", [emitLpAmt], nil)
837841 case _ =>
838842 unit
839843 }
840844 if ((el == el))
841845 then {
842846 let sa = if ((amDiff > 0))
843847 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
844848 else nil
845849 if ((sa == sa))
846850 then {
847851 let sp = if ((prDiff > 0))
848852 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
849853 else nil
850854 if ((sp == sp))
851855 then {
852856 let lpTrnsfr = if (autoStake)
853857 then {
854858 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
855859 if ((ss == ss))
856860 then nil
857861 else throw("Strict value is not equal to itself.")
858862 }
859863 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
860864 (state ++ lpTrnsfr)
861865 }
862866 else throw("Strict value is not equal to itself.")
863867 }
864868 else throw("Strict value is not equal to itself.")
865869 }
866870 else throw("Strict value is not equal to itself.")
867871 }
868872 else throw("Strict value is not equal to itself.")
869873 }
870874 }
871875
872876
873877
874878 @Callable(i)
875879 func putOneTknV2 (minOutAmount,autoStake) = {
876880 let isPoolOneTokenOperationsDisabled = {
877881 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
878882 if ($isInstanceOf(@, "Boolean"))
879883 then @
880884 else throw(($getType(@) + " couldn't be cast to Boolean"))
881885 }
882886 let isPutDisabled = if (if (if (igs())
883887 then true
884888 else (cfgPoolStatus == PoolPutDis))
885889 then true
886890 else (cfgPoolStatus == PoolShutdown))
887891 then true
888892 else isPoolOneTokenOperationsDisabled
889893 let checks = [if (!(isPutDisabled))
890894 then true
891895 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
892896 then true
893897 else throwErr("exactly 1 payment are expected")]
894898 if ((checks == checks))
895899 then {
896900 let poolConfig = gpc()
897901 let amId = poolConfig[idxAmAsId]
898902 let prId = poolConfig[idxPrAsId]
899903 let lpId = fromBase58String(poolConfig[idxLPAsId])
900904 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
901905 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
902906 let userAddress = if ((i.caller == this))
903907 then i.originCaller
904908 else i.caller
905909 let pmt = value(i.payments[0])
906910 let pmtAssetId = toBase58String(value(pmt.assetId))
907911 let pmtAmt = pmt.amount
908- let $t03302433149 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId))
909- let estimLP = $t03302433149._1
910- let state = $t03302433149._2
911- let feeAmount = $t03302433149._3
912- let emitLpAmt = if (if ((minOutAmount > 0))
913- then (minOutAmount > estimLP)
914- else false)
915- then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
916- else estimLP
917- let e = invoke(fca, "emit", [emitLpAmt], nil)
918- if ((e == e))
919- then {
920- let el = match e {
921- case legacy: Address =>
922- invoke(legacy, "emit", [emitLpAmt], nil)
923- case _ =>
924- unit
925- }
926- if ((el == el))
912+ if ((10000000 > pmtAmt))
913+ then throw("Wrong pmt amt")
914+ else {
915+ let $t03315133276 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId))
916+ let estimLP = $t03315133276._1
917+ let state = $t03315133276._2
918+ let feeAmount = $t03315133276._3
919+ let emitLpAmt = if (if ((minOutAmount > 0))
920+ then (minOutAmount > estimLP)
921+ else false)
922+ then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
923+ else estimLP
924+ let e = invoke(fca, "emit", [emitLpAmt], nil)
925+ if ((e == e))
927926 then {
928- let lpTrnsfr = if (autoStake)
927+ let el = match e {
928+ case legacy: Address =>
929+ invoke(legacy, "emit", [emitLpAmt], nil)
930+ case _ =>
931+ unit
932+ }
933+ if ((el == el))
929934 then {
930- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
931- if ((ss == ss))
932- then nil
933- else throw("Strict value is not equal to itself.")
935+ let lpTrnsfr = if (autoStake)
936+ then {
937+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
938+ if ((ss == ss))
939+ then nil
940+ else throw("Strict value is not equal to itself.")
941+ }
942+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
943+ let sendFeeToMatcher = if ((feeAmount > 0))
944+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
945+ else nil
946+ $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
934947 }
935- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
936- let sendFeeToMatcher = if ((feeAmount > 0))
937- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
938- else nil
939- $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
948+ else throw("Strict value is not equal to itself.")
940949 }
941950 else throw("Strict value is not equal to itself.")
942951 }
943- else throw("Strict value is not equal to itself.")
944952 }
945953 else throw("Strict value is not equal to itself.")
946954 }
947955
948956
949957
950958 @Callable(i)
951959 func putForFree (maxSlpg) = if ((0 > maxSlpg))
952960 then throw("Wrong slpg")
953961 else if ((size(i.payments) != 2))
954962 then throw("2 pmnts expd")
955963 else {
956964 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, true, 0, "")
957965 estPut._9
958966 }
959967
960968
961969
962970 @Callable(i)
963971 func get () = {
964972 let r = cg(i)
965973 let outAmtAmt = r._1
966974 let outPrAmt = r._2
967975 let pmtAmt = r._3
968976 let pmtAssetId = r._4
969977 let state = r._5
970978 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
971979 if ((b == b))
972980 then state
973981 else throw("Strict value is not equal to itself.")
974982 }
975983
976984
977985
978986 @Callable(i)
979987 func getOneTknV2 (outAssetId,minOutAmount) = {
980988 let isPoolOneTokenOperationsDisabled = {
981989 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
982990 if ($isInstanceOf(@, "Boolean"))
983991 then @
984992 else throw(($getType(@) + " couldn't be cast to Boolean"))
985993 }
986994 let isGetDisabled = if (if (igs())
987995 then true
988996 else (cfgPoolStatus == PoolShutdown))
989997 then true
990998 else isPoolOneTokenOperationsDisabled
991999 let checks = [if (!(isGetDisabled))
9921000 then true
9931001 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
9941002 then true
9951003 else throwErr("exactly 1 payment are expected")]
9961004 if ((checks == checks))
9971005 then {
998- let $t03573535890 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
999- let state = $t03573535890._1
1000- let totalAmount = $t03573535890._2
1006+ let $t03586236017 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1007+ let state = $t03586236017._1
1008+ let totalAmount = $t03586236017._2
10011009 $Tuple2(state, totalAmount)
10021010 }
10031011 else throw("Strict value is not equal to itself.")
10041012 }
10051013
10061014
10071015
10081016 @Callable(i)
10091017 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
10101018 let poolConfig = gpc()
10111019 let amId = poolConfig[idxAmAsId]
10121020 let prId = poolConfig[idxPrAsId]
10131021 let lpId = poolConfig[idxLPAsId]
10141022 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
10151023 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
10161024 let D0 = getD(xp)
10171025 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
10181026 let index = if ((outAssetId == amId))
10191027 then 0
10201028 else if ((outAssetId == prId))
10211029 then 1
10221030 else throw("invalid out asset id")
10231031 let newY = getYD(xp, index, D1)
10241032 let dy = (xp[index] - newY)
1025- let totalGetRaw = max([0, toInt((dy - big1))])
1026- let $t03668036729 = takeFee(totalGetRaw)
1027- let totalGet = $t03668036729._1
1028- let feeAmount = $t03668036729._2
1033+ let totalGetRaw = toInt((dy - big1))
1034+ let $t03679636845 = takeFee(totalGetRaw)
1035+ let totalGet = $t03679636845._1
1036+ let feeAmount = $t03679636845._2
10291037 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
10301038 }
10311039
10321040
10331041
10341042 @Callable(i)
10351043 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
10361044 let poolConfig = gpc()
10371045 let amId = poolConfig[idxAmAsId]
10381046 let prId = poolConfig[idxPrAsId]
10391047 let lpId = poolConfig[idxLPAsId]
10401048 let amBalance = getAccBalance(amId)
10411049 let prBalance = getAccBalance(prId)
1042- let $t03707437189 = {
1050+ let $t03719037305 = {
10431051 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
10441052 if ($isInstanceOf(@, "(Int, Int)"))
10451053 then @
10461054 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
10471055 }
1048- let totalGet = $t03707437189._1
1049- let feeAmount = $t03707437189._2
1056+ let totalGet = $t03719037305._1
1057+ let feeAmount = $t03719037305._2
10501058 let r = ego("", lpId, lpAssetAmount, this)
10511059 let outAmAmt = r._1
10521060 let outPrAmt = r._2
10531061 let sumOfGetAssets = (outAmAmt + outPrAmt)
1054- let bonus = if ((sumOfGetAssets == 0))
1055- then if ((totalGet == 0))
1056- then 0
1057- else throw("bonus calculation error")
1058- else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
1062+ let bonus = fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
10591063 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
10601064 }
10611065
10621066
10631067
10641068 @Callable(i)
10651069 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
10661070 let r = cg(i)
10671071 let outAmAmt = r._1
10681072 let outPrAmt = r._2
10691073 let pmtAmt = r._3
10701074 let pmtAssetId = r._4
10711075 let state = r._5
10721076 if ((noLessThenAmtAsset > outAmAmt))
10731077 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
10741078 else if ((noLessThenPriceAsset > outPrAmt))
10751079 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
10761080 else {
10771081 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10781082 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10791083 then state
10801084 else throw("Strict value is not equal to itself.")
10811085 }
10821086 }
10831087
10841088
10851089
10861090 @Callable(i)
10871091 func unstakeAndGet (amount) = {
10881092 let checkPayments = if ((size(i.payments) != 0))
10891093 then throw("No pmnts expd")
10901094 else true
10911095 if ((checkPayments == checkPayments))
10921096 then {
10931097 let cfg = gpc()
10941098 let factoryCfg = gfc()
10951099 let lpAssetId = fromBase58String(cfg[idxLPAsId])
10961100 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
10971101 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
10981102 if ((unstakeInv == unstakeInv))
10991103 then {
11001104 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11011105 let sts = parseIntValue(r._9)
11021106 let state = r._10
11031107 let v = if (if (igs())
11041108 then true
11051109 else (sts == PoolShutdown))
11061110 then throw(("Blocked: " + toString(sts)))
11071111 else true
11081112 if ((v == v))
11091113 then {
11101114 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11111115 if ((burnA == burnA))
11121116 then state
11131117 else throw("Strict value is not equal to itself.")
11141118 }
11151119 else throw("Strict value is not equal to itself.")
11161120 }
11171121 else throw("Strict value is not equal to itself.")
11181122 }
11191123 else throw("Strict value is not equal to itself.")
11201124 }
11211125
11221126
11231127
11241128 @Callable(i)
11251129 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
11261130 let isPoolOneTokenOperationsDisabled = {
11271131 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11281132 if ($isInstanceOf(@, "Boolean"))
11291133 then @
11301134 else throw(($getType(@) + " couldn't be cast to Boolean"))
11311135 }
11321136 let isGetDisabled = if (if (igs())
11331137 then true
11341138 else (cfgPoolStatus == PoolShutdown))
11351139 then true
11361140 else isPoolOneTokenOperationsDisabled
11371141 let checks = [if (!(isGetDisabled))
11381142 then true
11391143 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
11401144 then true
11411145 else throwErr("no payments are expected")]
11421146 if ((checks == checks))
11431147 then {
11441148 let cfg = gpc()
11451149 let factoryCfg = gfc()
11461150 let lpAssetId = fromBase58String(cfg[idxLPAsId])
11471151 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
11481152 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
11491153 if ((unstakeInv == unstakeInv))
11501154 then {
1151- let $t03992140109 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1152- let state = $t03992140109._1
1153- let totalAmount = $t03992140109._2
1155+ let $t03991740105 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1156+ let state = $t03991740105._1
1157+ let totalAmount = $t03991740105._2
11541158 $Tuple2(state, totalAmount)
11551159 }
11561160 else throw("Strict value is not equal to itself.")
11571161 }
11581162 else throw("Strict value is not equal to itself.")
11591163 }
11601164
11611165
11621166
11631167 @Callable(i)
11641168 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
11651169 let poolConfig = gpc()
11661170 let amId = poolConfig[idxAmAsId]
11671171 let prId = poolConfig[idxPrAsId]
11681172 let lpId = poolConfig[idxLPAsId]
1169- let $t04036840465 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "")
1170- let lpAmount = $t04036840465._1
1171- let state = $t04036840465._2
1172- let feeAmount = $t04036840465._3
1173- let bonus = $t04036840465._4
1173+ let $t04036440461 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "")
1174+ let lpAmount = $t04036440461._1
1175+ let state = $t04036440461._2
1176+ let feeAmount = $t04036440461._3
1177+ let bonus = $t04036440461._4
11741178 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
11751179 }
11761180
11771181
11781182
11791183 @Callable(i)
11801184 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
11811185 then throw("denied")
11821186 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
11831187
11841188
11851189
11861190 @Callable(i)
11871191 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
11881192 then pd
11891193 else [StringEntry(k, v)]
11901194
11911195
11921196
11931197 @Callable(i)
11941198 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
11951199 then pd
11961200 else [IntegerEntry(k, v)]
11971201
11981202
11991203
12001204 @Callable(i)
12011205 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
12021206
12031207
12041208
12051209 @Callable(i)
12061210 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
12071211
12081212
12091213
12101214 @Callable(i)
12111215 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
12121216 let pr = calcPrices(amAmt, prAmt, lpAmt)
12131217 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
12141218 }
12151219
12161220
12171221
12181222 @Callable(i)
12191223 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
12201224
12211225
12221226
12231227 @Callable(i)
12241228 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
12251229
12261230
12271231
12281232 @Callable(i)
12291233 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
12301234
12311235
12321236
12331237 @Callable(i)
12341238 func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, ""))
12351239
12361240
12371241
12381242 @Callable(i)
12391243 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
12401244 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
12411245 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
12421246 }
12431247
12441248
12451249
12461250 @Callable(i)
12471251 func getFeeREADONLY () = $Tuple2(nil, fee)
12481252
12491253
12501254 @Verifier(tx)
12511255 func verify () = {
12521256 let targetPublicKey = match m() {
12531257 case pk: ByteVector =>
12541258 pk
12551259 case _: Unit =>
12561260 tx.senderPublicKey
12571261 case _ =>
12581262 throw("Match error")
12591263 }
12601264 match tx {
12611265 case order: Order =>
12621266 let matcherPub = mp()
12631267 let orderValid = moa(order)
12641268 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
12651269 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
12661270 if (if (if (orderValid)
12671271 then senderValid
12681272 else false)
12691273 then matcherValid
12701274 else false)
12711275 then true
12721276 else toe(orderValid, senderValid, matcherValid)
12731277 case s: SetScriptTransaction =>
12741278 let newHash = blake2b256(value(s.script))
12751279 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
12761280 let currentHash = scriptHash(this)
12771281 if (if ((allowedHash == newHash))
12781282 then (currentHash != newHash)
12791283 else false)
12801284 then true
12811285 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
12821286 case _ =>
12831287 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
12841288 }
12851289 }
12861290

github/deemru/w8io/026f985 
117.56 ms