tx · Hmt2U1HBWakXvid12118nvFqEyxFqneteFfGBCYMEsos

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03100000 Waves

2022.09.12 14:50 [2225842] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "Hmt2U1HBWakXvid12118nvFqEyxFqneteFfGBCYMEsos", "fee": 3100000, "feeAssetId": null, "timestamp": 1662983425017, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "4c4EsXFXhoX3BXkuPYZ2PqcamuJVfeZ33RkdM5qV23g4sCmWZ6x9eeTqVfCtPwiHvnJcrf1kWM9NVS33eStyGq98" ], "script": "base64:BgKGAQgCEgMKAQgSAwoBCBIAEgQKAgEEEgcKBQEBAQEEEgUKAwEBBBIDCgEBEgASBwoFAQEBCAESBAoCAQESAwoBARIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEITgAGc2NhbGU4AIDC1y8ADHNjYWxlOEJpZ0ludAkAtgIBAIDC1y8AB3NjYWxlMTgJALYCAQCAgJC7utat8A0ACnplcm9CaWdJbnQJALYCAQAAAAlvbmVCaWdJbnQJALYCAQABAApzbGlwcGFnZTRECQC2AgEJAGUCBQZzY2FsZTgJAGkCCQBoAgUGc2NhbGU4AAEFBnNjYWxlOAAFQW11bHQCAzEwMAAFRGNvbnYCATEAA1NFUAICX18ABUVNUFRZAgAAClBvb2xBY3RpdmUAAQAKUG9vbFB1dERpcwACAA5Qb29sTWF0Y2hlckRpcwADAAxQb29sU2h1dGRvd24ABAAOaWR4UG9vbEFkZHJlc3MAAQAJaWR4UG9vbFN0AAIACWlkeExQQXNJZAADAAlpZHhBbUFzSWQABAAJaWR4UHJBc0lk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diff:
OldNewDifferences
705705 then i.originCaller
706706 else i.caller
707707 let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
708- let check = reentrantInvoke(addonContract, "ensureCanPutOneTkn", [toString(userAddress)], nil)
709- if ((check == check))
710- then if ((size(i.payments) != 1))
711- then throw("1 pmnt expd")
712- else {
713- let pmt = value(i.payments[0])
714- let pmtAssetId = toBase58String(value(pmt.assetId))
715- let pmtAmt = pmt.amount
716- if ((10000000 > pmtAmt))
717- then throw("Wrong pmt amt")
718- else {
719- let amBalance = getAccBalance(amId)
720- let prBalance = getAccBalance(prId)
721- let $t02888829276 = if ((pmtAssetId == amId))
722- then if ((pmtAmt > amBalance))
708+ if ((size(i.payments) != 1))
709+ then throw("1 pmnt expd")
710+ else {
711+ let pmt = value(i.payments[0])
712+ let pmtAssetId = toBase58String(value(pmt.assetId))
713+ let pmtAmt = pmt.amount
714+ if ((10000000 > pmtAmt))
715+ then throw("Wrong pmt amt")
716+ else {
717+ let amBalance = getAccBalance(amId)
718+ let prBalance = getAccBalance(prId)
719+ let $t02878529173 = if ((pmtAssetId == amId))
720+ then if ((pmtAmt > amBalance))
721+ then throw("invalid payment amount")
722+ else $Tuple2((amBalance - pmtAmt), prBalance)
723+ else if ((pmtAssetId == prId))
724+ then if ((pmtAmt > prBalance))
723725 then throw("invalid payment amount")
724- else $Tuple2((amBalance - pmtAmt), prBalance)
725- else if ((pmtAssetId == prId))
726- then if ((pmtAmt > prBalance))
727- then throw("invalid payment amount")
728- else $Tuple2(amBalance, (prBalance - pmtAmt))
729- else throw("wrong pmtAssetId")
730- let amBalanceNow = $t02888829276._1
731- let prBalanceNow = $t02888829276._2
732- let $t02928229416 = if ((pmtAssetId == amId))
733- then $Tuple2(amBalanceNow, prBalanceNow)
734- else $Tuple2(prBalanceNow, amBalanceNow)
735- let amBalanceForCalc = $t02928229416._1
736- let prBalanceForCalc = $t02928229416._2
737- let xPrecision = 1
738- let result = {
739- let @ = invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)
740- if ($isInstanceOf(@, "(Int, Int)"))
741- then @
742- else throw(($getType(invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)) + " couldn't be cast to (Int, Int)"))
726+ else $Tuple2(amBalance, (prBalance - pmtAmt))
727+ else throw("wrong pmtAssetId")
728+ let amBalanceNow = $t02878529173._1
729+ let prBalanceNow = $t02878529173._2
730+ let $t02917929313 = if ((pmtAssetId == amId))
731+ then $Tuple2(amBalanceNow, prBalanceNow)
732+ else $Tuple2(prBalanceNow, amBalanceNow)
733+ let amBalanceForCalc = $t02917929313._1
734+ let prBalanceForCalc = $t02917929313._2
735+ let xPrecision = 1
736+ let result = {
737+ let @ = invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)
738+ if ($isInstanceOf(@, "(Int, Int)"))
739+ then @
740+ else throw(($getType(invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)) + " couldn't be cast to (Int, Int)"))
741+ }
742+ let $t02982529921 = if ((pmtAssetId == amId))
743+ then result
744+ else $Tuple2(result._2, result._1)
745+ let amAssetPart = $t02982529921._1
746+ let prAssetPart = $t02982529921._2
747+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
748+ let estimLP = estPut._2
749+ let lpAssetId = estPut._7
750+ let state = estPut._9
751+ let amDiff = estPut._10
752+ let prDiff = estPut._11
753+ let emitLpAmt = if ((outLp > 0))
754+ then {
755+ let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
756+ toInt(lpCalcRes._2)
743757 }
744- let $t02992830024 = if ((pmtAssetId == amId))
745- then result
746- else $Tuple2(result._2, result._1)
747- let amAssetPart = $t02992830024._1
748- let prAssetPart = $t02992830024._2
749- let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
750- let estimLP = estPut._2
751- let lpAssetId = estPut._7
752- let state = estPut._9
753- let amDiff = estPut._10
754- let prDiff = estPut._11
755- let emitLpAmt = if ((outLp > 0))
756- then {
757- let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
758- toInt(lpCalcRes._2)
759- }
760- else estimLP
761- let e = invoke(fca, "emit", [emitLpAmt], nil)
762- if ((e == e))
763- then {
764- let el = match e {
765- case legacy: Address =>
766- invoke(legacy, "emit", [emitLpAmt], nil)
767- case _ =>
768- unit
769- }
770- if ((el == el))
771- then {
772- let sa = if ((amDiff > 0))
773- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
774- else nil
775- if ((sa == sa))
776- then {
777- let sp = if ((prDiff > 0))
778- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
779- else nil
780- if ((sp == sp))
781- then {
782- let lpTrnsfr = if (autoStake)
783- then {
784- let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
785- if ((ss == ss))
786- then nil
787- else throw("Strict value is not equal to itself.")
788- }
789- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
790- (state ++ lpTrnsfr)
791- }
792- else throw("Strict value is not equal to itself.")
793- }
794- else throw("Strict value is not equal to itself.")
795- }
796- else throw("Strict value is not equal to itself.")
797- }
798- else throw("Strict value is not equal to itself.")
799- }
800- }
801- else throw("Strict value is not equal to itself.")
758+ else estimLP
759+ let e = invoke(fca, "emit", [emitLpAmt], nil)
760+ if ((e == e))
761+ then {
762+ let el = match e {
763+ case legacy: Address =>
764+ invoke(legacy, "emit", [emitLpAmt], nil)
765+ case _ =>
766+ unit
767+ }
768+ if ((el == el))
769+ then {
770+ let sa = if ((amDiff > 0))
771+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
772+ else nil
773+ if ((sa == sa))
774+ then {
775+ let sp = if ((prDiff > 0))
776+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
777+ else nil
778+ if ((sp == sp))
779+ then {
780+ let lpTrnsfr = if (autoStake)
781+ then {
782+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
783+ if ((ss == ss))
784+ then nil
785+ else throw("Strict value is not equal to itself.")
786+ }
787+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
788+ (state ++ lpTrnsfr)
789+ }
790+ else throw("Strict value is not equal to itself.")
791+ }
792+ else throw("Strict value is not equal to itself.")
793+ }
794+ else throw("Strict value is not equal to itself.")
795+ }
796+ else throw("Strict value is not equal to itself.")
797+ }
798+ }
802799 }
803800
804801
871868 let estimPrAmt = r._2
872869 let amBalance = getAccBalance(amId)
873870 let prBalance = getAccBalance(prId)
874- let $t03459335050 = if ((outAssetId == amId))
871+ let $t03449034947 = if ((outAssetId == amId))
875872 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
876873 else if ((outAssetId == prId))
877874 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
878875 else throw("wrong outAssetId")
879- let amBalanceNow = $t03459335050._1
880- let prBalanceNow = $t03459335050._2
881- let virtSwapInAm = $t03459335050._3
882- let virtSwapOutPr = $t03459335050._4
883- let virtSwapInPr = $t03459335050._5
884- let virtSwapOutAm = $t03459335050._6
885- let totalGet = $t03459335050._7
876+ let amBalanceNow = $t03449034947._1
877+ let prBalanceNow = $t03449034947._2
878+ let virtSwapInAm = $t03449034947._3
879+ let virtSwapOutPr = $t03449034947._4
880+ let virtSwapInPr = $t03449034947._5
881+ let virtSwapOutAm = $t03449034947._6
882+ let totalGet = $t03449034947._7
886883 if (if ((0 > virtSwapInAm))
887884 then true
888885 else (0 > virtSwapInPr))
896893 let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
897894 if ((finalRes == finalRes))
898895 then {
899- let $t03575535859 = if ((outAssetId == amId))
896+ let $t03565235756 = if ((outAssetId == amId))
900897 then $Tuple2(toInt(finalRes._2), 0)
901898 else $Tuple2(0, toInt(finalRes._2))
902- let outAm = $t03575535859._1
903- let outPr = $t03575535859._2
899+ let outAm = $t03565235756._1
900+ let outPr = $t03565235756._2
904901 let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
905902 let curPr = f1(curPrX18, scale8)
906903 let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES"))
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 oneBigInt = toBigInt(1)
1313
1414 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1515
1616 let Amult = "100"
1717
1818 let Dconv = "1"
1919
2020 let SEP = "__"
2121
2222 let EMPTY = ""
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDis = 2
2727
2828 let PoolMatcherDis = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolSt = 2
3535
3636 let idxLPAsId = 3
3737
3838 let idxAmAsId = 4
3939
4040 let idxPrAsId = 5
4141
4242 let idxAmtAsDcm = 6
4343
4444 let idxPriceAsDcm = 7
4545
4646 let idxIAmtAsId = 8
4747
4848 let idxIPriceAsId = 9
4949
5050 let idxFactStakCntr = 1
5151
5252 let idxFactSlippCntr = 7
5353
5454 let idxFactGwxRewCntr = 10
5555
5656 let delay = "%s__delay"
5757
5858 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
5959
6060
6161 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6262
6363
6464 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6565
6666
6767 func abs (val) = if ((zeroBigInt > val))
6868 then -(val)
6969 else val
7070
7171
7272 func fc () = "%s__factoryContract"
7373
7474
7575 func mpk () = "%s__managerPublicKey"
7676
7777
7878 func pmpk () = "%s__pendingManagerPublicKey"
7979
8080
8181 func pl () = "%s%s__price__last"
8282
8383
8484 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
8585
8686
8787 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
8888
8989
9090 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
9191
9292
9393 func aa () = "%s__amountAsset"
9494
9595
9696 func pa () = "%s__priceAsset"
9797
9898
9999 func amp () = "%s__amp"
100100
101101
102102 func ada () = "%s__addonAddr"
103103
104104
105105 func lgotc (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP)
106106
107107
108108 func lsotc (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP)
109109
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"
127127
128128
129129 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
130130
131131
132132 func str (val) = match val {
133133 case valStr: String =>
134134 valStr
135135 case _ =>
136136 throw("fail cast to String")
137137 }
138138
139139
140140 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
141141
142142
143143 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
144144
145145
146146 let fca = addressFromStringValue(strf(this, fc()))
147147
148148 let A = strf(this, amp())
149149
150150 func igs () = valueOrElse(getBoolean(fca, aps()), false)
151151
152152
153153 func mp () = fromBase58String(strf(fca, mtpk()))
154154
155155
156156 func gpc () = {
157157 let amtAs = strf(this, aa())
158158 let priceAs = strf(this, pa())
159159 let iPriceAs = intf(fca, mba(priceAs))
160160 let iAmtAs = intf(fca, mba(amtAs))
161161 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
162162 }
163163
164164
165165 func gfc () = split(strf(fca, fcfg()), SEP)
166166
167167
168168 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)
169169
170170
171171 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)
172172
173173
174174 func getAccBalance (assetId) = if ((assetId == "WAVES"))
175175 then wavesBalance(this).available
176176 else assetBalance(this, fromBase58String(assetId))
177177
178178
179179 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
180180
181181
182182 func vad (A1,A2,slippage) = {
183183 let diff = fraction((A1 - A2), scale8BigInt, A2)
184184 let pass = ((slippage - abs(diff)) > zeroBigInt)
185185 if (!(pass))
186186 then throw(("Big slpg: " + toString(diff)))
187187 else $Tuple2(pass, min([A1, A2]))
188188 }
189189
190190
191191 func vd (D1,D0,slpg) = {
192192 let diff = fraction(D0, scale8BigInt, D1)
193193 let fail = (slpg > diff)
194194 if (if (fail)
195195 then true
196196 else (D0 > D1))
197197 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
198198 else fail
199199 }
200200
201201
202202 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
203203 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
204204 let prAsAmtX18 = t1(prAmt, prAssetDcm)
205205 cpbi(prAsAmtX18, amtAsAmtX18)
206206 }
207207
208208
209209 func calcPrices (amAmt,prAmt,lpAmt) = {
210210 let cfg = gpc()
211211 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
212212 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
213213 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
214214 let amAmtX18 = t1(amAmt, amtAsDcm)
215215 let prAmtX18 = t1(prAmt, prAsDcm)
216216 let lpAmtX18 = t1(lpAmt, scale8)
217217 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
218218 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
219219 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
220220 }
221221
222222
223223 func calculatePrices (amAmt,prAmt,lpAmt) = {
224224 let p = calcPrices(amAmt, prAmt, lpAmt)
225225 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
226226 }
227227
228228
229229 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
230230 let cfg = gpc()
231231 let lpId = cfg[idxLPAsId]
232232 let amId = cfg[idxAmAsId]
233233 let prId = cfg[idxPrAsId]
234234 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
235235 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
236236 let sts = cfg[idxPoolSt]
237237 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
238238 if ((lpId != pmtAssetId))
239239 then throw("Wrong pmt asset")
240240 else {
241241 let amBalance = getAccBalance(amId)
242242 let amBalanceX18 = t1(amBalance, amDcm)
243243 let prBalance = getAccBalance(prId)
244244 let prBalanceX18 = t1(prBalance, prDcm)
245245 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
246246 let curPrice = f1(curPriceX18, scale8)
247247 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
248248 let lpEmissX18 = t1(lpEmiss, scale8)
249249 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
250250 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
251251 let outAmAmt = f1(outAmAmtX18, amDcm)
252252 let outPrAmt = f1(outPrAmtX18, prDcm)
253253 let state = if ((txId58 == ""))
254254 then nil
255255 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
256256 then unit
257257 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
258258 then unit
259259 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)]
260260 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
261261 }
262262 }
263263
264264
265265 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = {
266266 let cfg = gpc()
267267 let lpId = fromBase58String(cfg[idxLPAsId])
268268 let amIdStr = cfg[idxAmAsId]
269269 let prIdStr = cfg[idxPrAsId]
270270 let inAmIdStr = cfg[idxIAmtAsId]
271271 let inPrIdStr = cfg[idxIPriceAsId]
272272 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
273273 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
274274 let sts = cfg[idxPoolSt]
275275 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
276276 let amBalance = if (isEval)
277277 then getAccBalance(amIdStr)
278278 else if (if (isOneAsset)
279279 then (pmtId == amIdStr)
280280 else false)
281281 then (getAccBalance(amIdStr) - pmtAmt)
282282 else if (isOneAsset)
283283 then getAccBalance(amIdStr)
284284 else (getAccBalance(amIdStr) - inAmAmt)
285285 let prBalance = if (isEval)
286286 then getAccBalance(prIdStr)
287287 else if (if (isOneAsset)
288288 then (pmtId == prIdStr)
289289 else false)
290290 then (getAccBalance(prIdStr) - pmtAmt)
291291 else if (isOneAsset)
292292 then getAccBalance(prIdStr)
293293 else (getAccBalance(prIdStr) - inPrAmt)
294294 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
295295 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
296296 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
297297 let amBalanceX18 = t1(amBalance, amtDcm)
298298 let prBalanceX18 = t1(prBalance, priceDcm)
299299 let r = if ((lpEm == 0))
300300 then {
301301 let curPriceX18 = zeroBigInt
302302 let slippageX18 = zeroBigInt
303303 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
304304 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
305305 }
306306 else {
307307 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
308308 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
309309 let slippageX18 = t1(slippage, scale8)
310310 if (if ((curPriceX18 != zeroBigInt))
311311 then (slippageRealX18 > slippageX18)
312312 else false)
313313 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
314314 else {
315315 let lpEmissionX18 = t1(lpEm, scale8)
316316 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
317317 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
318318 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
319319 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
320320 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
321321 let expAmtAssetAmtX18 = expectedAmts._1
322322 let expPriceAssetAmtX18 = expectedAmts._2
323323 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
324324 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
325325 }
326326 }
327327 let calcLpAmt = r._1
328328 let calcAmAssetPmt = r._2
329329 let calcPrAssetPmt = r._3
330330 let curPrice = f1(r._4, scale8)
331331 let slippageCalc = f1(r._5, scale8)
332332 if ((0 >= calcLpAmt))
333333 then throw("LP <= 0")
334334 else {
335335 let emitLpAmt = if (!(emitLp))
336336 then 0
337337 else calcLpAmt
338338 let amDiff = (inAmAmt - calcAmAssetPmt)
339339 let prDiff = (inPrAmt - calcPrAssetPmt)
340340 let $t01560115946 = if (if (isOneAsset)
341341 then (pmtId == amIdStr)
342342 else false)
343343 then $Tuple2(pmtAmt, 0)
344344 else if (if (isOneAsset)
345345 then (pmtId == prIdStr)
346346 else false)
347347 then $Tuple2(0, pmtAmt)
348348 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
349349 let writeAmAmt = $t01560115946._1
350350 let writePrAmt = $t01560115946._2
351351 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))]
352352 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
353353 }
354354 }
355355
356356
357357 func moa (order) = {
358358 let cfg = gpc()
359359 let amtAsId = cfg[idxAmAsId]
360360 let prAsId = cfg[idxPrAsId]
361361 let sts = parseIntValue(cfg[idxPoolSt])
362362 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
363363 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
364364 let accAmtAsBalance = getAccBalance(amtAsId)
365365 let accPrAsBalance = getAccBalance(prAsId)
366366 let curPriceX18 = if ((order.orderType == Buy))
367367 then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
368368 else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
369369 let curPrice = f1(curPriceX18, scale8)
370370 if (if (if (igs())
371371 then true
372372 else (sts == PoolMatcherDis))
373373 then true
374374 else (sts == PoolShutdown))
375375 then throw("Admin blocked")
376376 else {
377377 let orAmtAsset = order.assetPair.amountAsset
378378 let orAmtAsStr = if ((orAmtAsset == unit))
379379 then "WAVES"
380380 else toBase58String(value(orAmtAsset))
381381 let orPrAsset = order.assetPair.priceAsset
382382 let orPrAsStr = if ((orPrAsset == unit))
383383 then "WAVES"
384384 else toBase58String(value(orPrAsset))
385385 if (if ((orAmtAsStr != amtAsId))
386386 then true
387387 else (orPrAsStr != prAsId))
388388 then throw("Wr assets")
389389 else {
390390 let orderPrice = order.price
391391 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
392392 let castOrderPrice = ts(orderPrice, scale8, priceDcm)
393393 let isOrderPriceValid = if ((order.orderType == Buy))
394394 then (curPrice >= castOrderPrice)
395395 else (castOrderPrice >= curPrice)
396396 true
397397 }
398398 }
399399 }
400400
401401
402402 func cg (i) = if ((size(i.payments) != 1))
403403 then throw("1 pmnt exp")
404404 else {
405405 let pmt = value(i.payments[0])
406406 let pmtAssetId = value(pmt.assetId)
407407 let pmtAmt = pmt.amount
408408 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
409409 let outAmAmt = r._1
410410 let outPrAmt = r._2
411411 let sts = parseIntValue(r._9)
412412 let state = r._10
413413 if (if (igs())
414414 then true
415415 else (sts == PoolShutdown))
416416 then throw(("Admin blocked: " + toString(sts)))
417417 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
418418 }
419419
420420
421421 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = {
422422 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId)
423423 let sts = parseIntValue(r._8)
424424 if (if (if (igs())
425425 then true
426426 else (sts == PoolPutDis))
427427 then true
428428 else (sts == PoolShutdown))
429429 then throw(("Blocked:" + toString(sts)))
430430 else r
431431 }
432432
433433
434434 func m () = match getString(mpk()) {
435435 case s: String =>
436436 fromBase58String(s)
437437 case _: Unit =>
438438 unit
439439 case _ =>
440440 throw("Match error")
441441 }
442442
443443
444444 func pm () = match getString(pmpk()) {
445445 case s: String =>
446446 fromBase58String(s)
447447 case _: Unit =>
448448 unit
449449 case _ =>
450450 throw("Match error")
451451 }
452452
453453
454454 let pd = throw("Permission denied")
455455
456456 func mm (i) = match m() {
457457 case pk: ByteVector =>
458458 if ((i.callerPublicKey == pk))
459459 then true
460460 else pd
461461 case _: Unit =>
462462 if ((i.caller == this))
463463 then true
464464 else pd
465465 case _ =>
466466 throw("Match error")
467467 }
468468
469469
470470 @Callable(i)
471471 func constructor (fc) = {
472472 let c = mm(i)
473473 if ((c == c))
474474 then [StringEntry(fc(), fc)]
475475 else throw("Strict value is not equal to itself.")
476476 }
477477
478478
479479
480480 @Callable(i)
481481 func setManager (pendingManagerPublicKey) = {
482482 let c = mm(i)
483483 if ((c == c))
484484 then {
485485 let cm = fromBase58String(pendingManagerPublicKey)
486486 if ((cm == cm))
487487 then [StringEntry(pmpk(), pendingManagerPublicKey)]
488488 else throw("Strict value is not equal to itself.")
489489 }
490490 else throw("Strict value is not equal to itself.")
491491 }
492492
493493
494494
495495 @Callable(i)
496496 func confirmManager () = {
497497 let p = pm()
498498 let hpm = if (isDefined(p))
499499 then true
500500 else throw("No pending manager")
501501 if ((hpm == hpm))
502502 then {
503503 let cpm = if ((i.callerPublicKey == value(p)))
504504 then true
505505 else throw("You are not pending manager")
506506 if ((cpm == cpm))
507507 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
508508 else throw("Strict value is not equal to itself.")
509509 }
510510 else throw("Strict value is not equal to itself.")
511511 }
512512
513513
514514
515515 @Callable(i)
516516 func put (slip,autoStake) = {
517517 let factCfg = gfc()
518518 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
519519 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
520520 if ((0 > slip))
521521 then throw("Wrong slippage")
522522 else if ((size(i.payments) != 2))
523523 then throw("2 pmnts expd")
524524 else {
525525 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, "")
526526 let emitLpAmt = e._2
527527 let lpAssetId = e._7
528528 let state = e._9
529529 let amDiff = e._10
530530 let prDiff = e._11
531531 let amId = e._12
532532 let prId = e._13
533533 let r = invoke(fca, "emit", [emitLpAmt], nil)
534534 if ((r == r))
535535 then {
536536 let el = match r {
537537 case legacy: Address =>
538538 invoke(legacy, "emit", [emitLpAmt], nil)
539539 case _ =>
540540 unit
541541 }
542542 if ((el == el))
543543 then {
544544 let sa = if ((amDiff > 0))
545545 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
546546 else nil
547547 if ((sa == sa))
548548 then {
549549 let sp = if ((prDiff > 0))
550550 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
551551 else nil
552552 if ((sp == sp))
553553 then {
554554 let lpTrnsfr = if (autoStake)
555555 then {
556556 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
557557 if ((ss == ss))
558558 then nil
559559 else throw("Strict value is not equal to itself.")
560560 }
561561 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
562562 (state ++ lpTrnsfr)
563563 }
564564 else throw("Strict value is not equal to itself.")
565565 }
566566 else throw("Strict value is not equal to itself.")
567567 }
568568 else throw("Strict value is not equal to itself.")
569569 }
570570 else throw("Strict value is not equal to itself.")
571571 }
572572 }
573573
574574
575575
576576 @Callable(i)
577577 func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = {
578578 let cfg = gfc()
579579 let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr")
580580 let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr")
581581 let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr")
582582 let poolCfg = gpc()
583583 let amId = poolCfg[idxAmAsId]
584584 let prId = poolCfg[idxPrAsId]
585585 let amDcm = parseIntValue(poolCfg[idxAmtAsDcm])
586586 let prDcm = parseIntValue(poolCfg[idxPriceAsDcm])
587587 let addon = valueOrElse(getString(this, ada()), "")
588588 let userAddress = if ((addon == toString(i.caller)))
589589 then i.originCaller
590590 else i.caller
591591 let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
592592 let check = reentrantInvoke(addonContract, "ensureCanPutOneTkn", [toString(userAddress)], nil)
593593 if ((check == check))
594594 then if (if (if (if ((0 >= slippage))
595595 then true
596596 else (0 >= amAssetPart))
597597 then true
598598 else (0 >= prAssetPart))
599599 then true
600600 else (0 >= outLp))
601601 then throw("Wrong params")
602602 else if ((size(i.payments) != 1))
603603 then throw("1 pmnt expd")
604604 else {
605605 let pmt = value(i.payments[0])
606606 let pmtAssetId = toBase58String(value(pmt.assetId))
607607 let pmtAmt = pmt.amount
608608 if ((10000000 > pmtAmt))
609609 then throw("Wrong pmt amt")
610610 else {
611611 let amBalance = getAccBalance(amId)
612612 let prBalance = getAccBalance(prId)
613613 let $t02485925435 = if ((pmtAssetId == amId))
614614 then if (if ((pmtAmt > amBalance))
615615 then true
616616 else (amAssetPart > pmtAmt))
617617 then throw("invalid payment amount")
618618 else $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
619619 else if ((pmtAssetId == prId))
620620 then if (if ((pmtAmt > prBalance))
621621 then true
622622 else (prAssetPart > pmtAmt))
623623 then throw("invalid payment amount")
624624 else $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
625625 else throw("wrong pmtAssetId")
626626 let amBalanceNow = $t02485925435._1
627627 let prBalanceNow = $t02485925435._2
628628 let virtSwapInAm = $t02485925435._3
629629 let virtSwapOutPr = $t02485925435._4
630630 let virtSwapInPr = $t02485925435._5
631631 let virtSwapOutAm = $t02485925435._6
632632 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
633633 let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
634634 let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
635635 if ((D0vsD1 == D0vsD1))
636636 then {
637637 let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
638638 let estimLP = estPut._2
639639 let lpAssetId = estPut._7
640640 let state = estPut._9
641641 let amDiff = estPut._10
642642 let prDiff = estPut._11
643643 let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
644644 let emitLpAmt = toInt(lpCalcRes._2)
645645 let e = invoke(fca, "emit", [emitLpAmt], nil)
646646 if ((e == e))
647647 then {
648648 let el = match e {
649649 case legacy: Address =>
650650 invoke(legacy, "emit", [emitLpAmt], nil)
651651 case _ =>
652652 unit
653653 }
654654 if ((el == el))
655655 then {
656656 let sa = if ((amDiff > 0))
657657 then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
658658 else nil
659659 if ((sa == sa))
660660 then {
661661 let sp = if ((prDiff > 0))
662662 then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
663663 else nil
664664 if ((sp == sp))
665665 then {
666666 let lpTrnsfr = if (autoStake)
667667 then {
668668 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
669669 if ((ss == ss))
670670 then nil
671671 else throw("Strict value is not equal to itself.")
672672 }
673673 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
674674 (state ++ lpTrnsfr)
675675 }
676676 else throw("Strict value is not equal to itself.")
677677 }
678678 else throw("Strict value is not equal to itself.")
679679 }
680680 else throw("Strict value is not equal to itself.")
681681 }
682682 else throw("Strict value is not equal to itself.")
683683 }
684684 else throw("Strict value is not equal to itself.")
685685 }
686686 }
687687 else throw("Strict value is not equal to itself.")
688688 }
689689
690690
691691
692692 @Callable(i)
693693 func putOneTknV2 (outLp,slippage,autoStake) = {
694694 let cfg = gfc()
695695 let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr")
696696 let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr")
697697 let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr")
698698 let poolCfg = gpc()
699699 let amId = poolCfg[idxAmAsId]
700700 let prId = poolCfg[idxPrAsId]
701701 let amDcm = parseIntValue(poolCfg[idxAmtAsDcm])
702702 let prDcm = parseIntValue(poolCfg[idxPriceAsDcm])
703703 let addon = valueOrElse(getString(this, ada()), "")
704704 let userAddress = if ((addon == toString(i.caller)))
705705 then i.originCaller
706706 else i.caller
707707 let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
708- let check = reentrantInvoke(addonContract, "ensureCanPutOneTkn", [toString(userAddress)], nil)
709- if ((check == check))
710- then if ((size(i.payments) != 1))
711- then throw("1 pmnt expd")
712- else {
713- let pmt = value(i.payments[0])
714- let pmtAssetId = toBase58String(value(pmt.assetId))
715- let pmtAmt = pmt.amount
716- if ((10000000 > pmtAmt))
717- then throw("Wrong pmt amt")
718- else {
719- let amBalance = getAccBalance(amId)
720- let prBalance = getAccBalance(prId)
721- let $t02888829276 = if ((pmtAssetId == amId))
722- then if ((pmtAmt > amBalance))
708+ if ((size(i.payments) != 1))
709+ then throw("1 pmnt expd")
710+ else {
711+ let pmt = value(i.payments[0])
712+ let pmtAssetId = toBase58String(value(pmt.assetId))
713+ let pmtAmt = pmt.amount
714+ if ((10000000 > pmtAmt))
715+ then throw("Wrong pmt amt")
716+ else {
717+ let amBalance = getAccBalance(amId)
718+ let prBalance = getAccBalance(prId)
719+ let $t02878529173 = if ((pmtAssetId == amId))
720+ then if ((pmtAmt > amBalance))
721+ then throw("invalid payment amount")
722+ else $Tuple2((amBalance - pmtAmt), prBalance)
723+ else if ((pmtAssetId == prId))
724+ then if ((pmtAmt > prBalance))
723725 then throw("invalid payment amount")
724- else $Tuple2((amBalance - pmtAmt), prBalance)
725- else if ((pmtAssetId == prId))
726- then if ((pmtAmt > prBalance))
727- then throw("invalid payment amount")
728- else $Tuple2(amBalance, (prBalance - pmtAmt))
729- else throw("wrong pmtAssetId")
730- let amBalanceNow = $t02888829276._1
731- let prBalanceNow = $t02888829276._2
732- let $t02928229416 = if ((pmtAssetId == amId))
733- then $Tuple2(amBalanceNow, prBalanceNow)
734- else $Tuple2(prBalanceNow, amBalanceNow)
735- let amBalanceForCalc = $t02928229416._1
736- let prBalanceForCalc = $t02928229416._2
737- let xPrecision = 1
738- let result = {
739- let @ = invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)
740- if ($isInstanceOf(@, "(Int, Int)"))
741- then @
742- else throw(($getType(invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)) + " couldn't be cast to (Int, Int)"))
726+ else $Tuple2(amBalance, (prBalance - pmtAmt))
727+ else throw("wrong pmtAssetId")
728+ let amBalanceNow = $t02878529173._1
729+ let prBalanceNow = $t02878529173._2
730+ let $t02917929313 = if ((pmtAssetId == amId))
731+ then $Tuple2(amBalanceNow, prBalanceNow)
732+ else $Tuple2(prBalanceNow, amBalanceNow)
733+ let amBalanceForCalc = $t02917929313._1
734+ let prBalanceForCalc = $t02917929313._2
735+ let xPrecision = 1
736+ let result = {
737+ let @ = invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)
738+ if ($isInstanceOf(@, "(Int, Int)"))
739+ then @
740+ else throw(($getType(invoke(gwxCntr, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)) + " couldn't be cast to (Int, Int)"))
741+ }
742+ let $t02982529921 = if ((pmtAssetId == amId))
743+ then result
744+ else $Tuple2(result._2, result._1)
745+ let amAssetPart = $t02982529921._1
746+ let prAssetPart = $t02982529921._2
747+ let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
748+ let estimLP = estPut._2
749+ let lpAssetId = estPut._7
750+ let state = estPut._9
751+ let amDiff = estPut._10
752+ let prDiff = estPut._11
753+ let emitLpAmt = if ((outLp > 0))
754+ then {
755+ let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
756+ toInt(lpCalcRes._2)
743757 }
744- let $t02992830024 = if ((pmtAssetId == amId))
745- then result
746- else $Tuple2(result._2, result._1)
747- let amAssetPart = $t02992830024._1
748- let prAssetPart = $t02992830024._2
749- let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId)
750- let estimLP = estPut._2
751- let lpAssetId = estPut._7
752- let state = estPut._9
753- let amDiff = estPut._10
754- let prDiff = estPut._11
755- let emitLpAmt = if ((outLp > 0))
756- then {
757- let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
758- toInt(lpCalcRes._2)
759- }
760- else estimLP
761- let e = invoke(fca, "emit", [emitLpAmt], nil)
762- if ((e == e))
763- then {
764- let el = match e {
765- case legacy: Address =>
766- invoke(legacy, "emit", [emitLpAmt], nil)
767- case _ =>
768- unit
769- }
770- if ((el == el))
771- then {
772- let sa = if ((amDiff > 0))
773- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
774- else nil
775- if ((sa == sa))
776- then {
777- let sp = if ((prDiff > 0))
778- then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
779- else nil
780- if ((sp == sp))
781- then {
782- let lpTrnsfr = if (autoStake)
783- then {
784- let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
785- if ((ss == ss))
786- then nil
787- else throw("Strict value is not equal to itself.")
788- }
789- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
790- (state ++ lpTrnsfr)
791- }
792- else throw("Strict value is not equal to itself.")
793- }
794- else throw("Strict value is not equal to itself.")
795- }
796- else throw("Strict value is not equal to itself.")
797- }
798- else throw("Strict value is not equal to itself.")
799- }
800- }
801- else throw("Strict value is not equal to itself.")
758+ else estimLP
759+ let e = invoke(fca, "emit", [emitLpAmt], nil)
760+ if ((e == e))
761+ then {
762+ let el = match e {
763+ case legacy: Address =>
764+ invoke(legacy, "emit", [emitLpAmt], nil)
765+ case _ =>
766+ unit
767+ }
768+ if ((el == el))
769+ then {
770+ let sa = if ((amDiff > 0))
771+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
772+ else nil
773+ if ((sa == sa))
774+ then {
775+ let sp = if ((prDiff > 0))
776+ then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
777+ else nil
778+ if ((sp == sp))
779+ then {
780+ let lpTrnsfr = if (autoStake)
781+ then {
782+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
783+ if ((ss == ss))
784+ then nil
785+ else throw("Strict value is not equal to itself.")
786+ }
787+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
788+ (state ++ lpTrnsfr)
789+ }
790+ else throw("Strict value is not equal to itself.")
791+ }
792+ else throw("Strict value is not equal to itself.")
793+ }
794+ else throw("Strict value is not equal to itself.")
795+ }
796+ else throw("Strict value is not equal to itself.")
797+ }
798+ }
802799 }
803800
804801
805802
806803 @Callable(i)
807804 func putForFree (maxSlpg) = if ((0 > maxSlpg))
808805 then throw("Wrong slpg")
809806 else if ((size(i.payments) != 2))
810807 then throw("2 pmnts expd")
811808 else {
812809 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, "")
813810 estPut._9
814811 }
815812
816813
817814
818815 @Callable(i)
819816 func get () = {
820817 let r = cg(i)
821818 let outAmtAmt = r._1
822819 let outPrAmt = r._2
823820 let pmtAmt = r._3
824821 let pmtAssetId = r._4
825822 let state = r._5
826823 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
827824 if ((b == b))
828825 then state
829826 else throw("Strict value is not equal to itself.")
830827 }
831828
832829
833830
834831 @Callable(i)
835832 func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1))
836833 then throw("1 pmnt expd")
837834 else {
838835 let cfg = gpc()
839836 let lpId = cfg[idxLPAsId]
840837 let amId = cfg[idxAmAsId]
841838 let prId = cfg[idxPrAsId]
842839 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
843840 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
844841 let sts = cfg[idxPoolSt]
845842 let factCfg = gfc()
846843 let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr")
847844 let pmt = value(i.payments[0])
848845 let addon = valueOrElse(getString(this, ada()), "")
849846 let userAddress = if ((addon == toString(i.caller)))
850847 then i.originCaller
851848 else i.caller
852849 let txId58 = toBase58String(i.transactionId)
853850 let pmtAssetId = value(pmt.assetId)
854851 let pmtAmt = pmt.amount
855852 let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid")
856853 let check = reentrantInvoke(addonContract, "ensureCanGetOneTkn", [toString(userAddress)], nil)
857854 if ((check == check))
858855 then if ((1000000000 > pmtAmt))
859856 then throw("Min pmt 10 LP")
860857 else if (if (if ((0 > slippage))
861858 then true
862859 else (0 > exchResult))
863860 then true
864861 else (0 > outAmount))
865862 then throw("Wrong params")
866863 else if ((lpId != toBase58String(pmtAssetId)))
867864 then throw("Wrong LP")
868865 else {
869866 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
870867 let estimAmAmt = r._1
871868 let estimPrAmt = r._2
872869 let amBalance = getAccBalance(amId)
873870 let prBalance = getAccBalance(prId)
874- let $t03459335050 = if ((outAssetId == amId))
871+ let $t03449034947 = if ((outAssetId == amId))
875872 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
876873 else if ((outAssetId == prId))
877874 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
878875 else throw("wrong outAssetId")
879- let amBalanceNow = $t03459335050._1
880- let prBalanceNow = $t03459335050._2
881- let virtSwapInAm = $t03459335050._3
882- let virtSwapOutPr = $t03459335050._4
883- let virtSwapInPr = $t03459335050._5
884- let virtSwapOutAm = $t03459335050._6
885- let totalGet = $t03459335050._7
876+ let amBalanceNow = $t03449034947._1
877+ let prBalanceNow = $t03449034947._2
878+ let virtSwapInAm = $t03449034947._3
879+ let virtSwapOutPr = $t03449034947._4
880+ let virtSwapInPr = $t03449034947._5
881+ let virtSwapOutAm = $t03449034947._6
882+ let totalGet = $t03449034947._7
886883 if (if ((0 > virtSwapInAm))
887884 then true
888885 else (0 > virtSwapInPr))
889886 then throw("Wrong calc")
890887 else {
891888 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
892889 let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
893890 let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
894891 if ((D0vsD1 == D0vsD1))
895892 then {
896893 let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
897894 if ((finalRes == finalRes))
898895 then {
899- let $t03575535859 = if ((outAssetId == amId))
896+ let $t03565235756 = if ((outAssetId == amId))
900897 then $Tuple2(toInt(finalRes._2), 0)
901898 else $Tuple2(0, toInt(finalRes._2))
902- let outAm = $t03575535859._1
903- let outPr = $t03575535859._2
899+ let outAm = $t03565235756._1
900+ let outPr = $t03565235756._2
904901 let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
905902 let curPr = f1(curPrX18, scale8)
906903 let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES"))
907904 then unit
908905 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)]
909906 if ((state == state))
910907 then {
911908 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
912909 if ((burn == burn))
913910 then state
914911 else throw("Strict value is not equal to itself.")
915912 }
916913 else throw("Strict value is not equal to itself.")
917914 }
918915 else throw("Strict value is not equal to itself.")
919916 }
920917 else throw("Strict value is not equal to itself.")
921918 }
922919 }
923920 else throw("Strict value is not equal to itself.")
924921 }
925922
926923
927924
928925 @Callable(i)
929926 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
930927 let r = cg(i)
931928 let outAmAmt = r._1
932929 let outPrAmt = r._2
933930 let pmtAmt = r._3
934931 let pmtAssetId = r._4
935932 let state = r._5
936933 if ((noLessThenAmtAsset > outAmAmt))
937934 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
938935 else if ((noLessThenPriceAsset > outPrAmt))
939936 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
940937 else {
941938 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
942939 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
943940 then state
944941 else throw("Strict value is not equal to itself.")
945942 }
946943 }
947944
948945
949946
950947 @Callable(i)
951948 func unstakeAndGet (amount) = {
952949 let checkPayments = if ((size(i.payments) != 0))
953950 then throw("No pmnts expd")
954951 else true
955952 if ((checkPayments == checkPayments))
956953 then {
957954 let cfg = gpc()
958955 let factoryCfg = gfc()
959956 let lpAssetId = fromBase58String(cfg[idxLPAsId])
960957 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
961958 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
962959 if ((unstakeInv == unstakeInv))
963960 then {
964961 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
965962 let sts = parseIntValue(r._9)
966963 let state = r._10
967964 let v = if (if (igs())
968965 then true
969966 else (sts == PoolShutdown))
970967 then throw(("Blocked: " + toString(sts)))
971968 else true
972969 if ((v == v))
973970 then {
974971 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
975972 if ((burnA == burnA))
976973 then state
977974 else throw("Strict value is not equal to itself.")
978975 }
979976 else throw("Strict value is not equal to itself.")
980977 }
981978 else throw("Strict value is not equal to itself.")
982979 }
983980 else throw("Strict value is not equal to itself.")
984981 }
985982
986983
987984
988985 @Callable(i)
989986 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
990987 then throw("denied")
991988 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
992989
993990
994991
995992 @Callable(i)
996993 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
997994 then pd
998995 else [StringEntry(k, v)]
999996
1000997
1001998
1002999 @Callable(i)
10031000 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
10041001 then pd
10051002 else [IntegerEntry(k, v)]
10061003
10071004
10081005
10091006 @Callable(i)
10101007 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
10111008
10121009
10131010
10141011 @Callable(i)
10151012 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
10161013
10171014
10181015
10191016 @Callable(i)
10201017 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
10211018 let pr = calcPrices(amAmt, prAmt, lpAmt)
10221019 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
10231020 }
10241021
10251022
10261023
10271024 @Callable(i)
10281025 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
10291026
10301027
10311028
10321029 @Callable(i)
10331030 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
10341031
10351032
10361033
10371034 @Callable(i)
10381035 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
10391036
10401037
10411038
10421039 @Callable(i)
10431040 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, ""))
10441041
10451042
10461043
10471044 @Callable(i)
10481045 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
10491046 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
10501047 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
10511048 }
10521049
10531050
10541051 @Verifier(tx)
10551052 func verify () = {
10561053 let targetPublicKey = match m() {
10571054 case pk: ByteVector =>
10581055 pk
10591056 case _: Unit =>
10601057 tx.senderPublicKey
10611058 case _ =>
10621059 throw("Match error")
10631060 }
10641061 match tx {
10651062 case order: Order =>
10661063 let matcherPub = mp()
10671064 let orderValid = moa(order)
10681065 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
10691066 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
10701067 if (if (if (orderValid)
10711068 then senderValid
10721069 else false)
10731070 then matcherValid
10741071 else false)
10751072 then true
10761073 else toe(orderValid, senderValid, matcherValid)
10771074 case s: SetScriptTransaction =>
10781075 let newHash = blake2b256(value(s.script))
10791076 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
10801077 let currentHash = scriptHash(this)
10811078 if (if ((allowedHash == newHash))
10821079 then (currentHash != newHash)
10831080 else false)
10841081 then true
10851082 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
10861083 case _ =>
10871084 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
10881085 }
10891086 }
10901087

github/deemru/w8io/169f3d6 
126.94 ms