tx · 7MT5SuCVSV77LwmoEV9BgQLhJnd5wiVNRke6KNfqTAPt

3MstAuJdjcstykakArWP8VxVKifwLG2W9yA:  -0.02600000 Waves

2024.10.03 16:39 [3310735] smart account 3MstAuJdjcstykakArWP8VxVKifwLG2W9yA > SELF 0.00000000 Waves

{ "type": 13, "id": "7MT5SuCVSV77LwmoEV9BgQLhJnd5wiVNRke6KNfqTAPt", "fee": 2600000, "feeAssetId": null, "timestamp": 1727962791893, "version": 2, "chainId": 84, "sender": "3MstAuJdjcstykakArWP8VxVKifwLG2W9yA", "senderPublicKey": "DkbjqNkpZ5vgvUbWEZFoHUdgUFK8ziLVtw4Fox2YR2gz", "proofs": [ "4BqQtEJCv5VRZgAygJHLXpjVTgTxbVKwGgAXMFwZgVA7EftC6CMANwDg8GFCQpuHTaRvFHM4CC2Xgn5ZNPJ4R43Y" ], "script": "base64:BgJACAISABIHCgUICAgIARIHCgUICAgIARIDCgEEEgASAwoBCBIDCgEBEgASAwoBCBIECgIIARIFCgMICAESAwoBCEoAB1ZFUlNJT04CCFBNLTAuNC4wAAljb25maWdTdHIJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwINY29uZmlnQWRkcmVzcwIjM045MWU3d0hpVjdRYWREc3gzUlVKUXh4MWV0cWNBS3JmSGoADkNPTkZJR19BRERSRVNTAwkAAAIFCWNvbmZpZ1N0cgIABQR0aGlzCQEHQWRkcmVzcwEJANkEAQUJY29uZmlnU3RyABVBc3NldHNXZWlnaHRzRGVjaW1hbHMABAAFU2NhbGUAkE4ABlNjYWxlOACAwtcvAAdTY2FsZTE2AICAhP6m3uERAAhGZWVTY2FsZQCQTgARUG9vbFRva2VuRGVjaW1hbHMACAAOUG9vbFRva2VuU2NhbGUJAGwGAAoAAAURUG9vbFRva2VuRGVjaW1hbHMAAAAABQZIQUxGVVAAFEluaXRhbFdhdmVzTGlxdWlkaXR5BQZTY2FsZTgAEE1JTl9TVEVQU19BTU9VTlQJAQt2YWx1ZU9yRWx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cmVzcwUDbmlsAJCMMos=", "height": 3310735, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: C73KUhjcNi623LgtNESZtvhkBZTtC1StbT787SQ1P4VE Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let VERSION = "PM-0.4.0"
5+
6+let configStr = valueOrElse(getString(this, "configAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
7+
8+let CONFIG_ADDRESS = if ((configStr == ""))
9+ then this
10+ else Address(fromBase58String(configStr))
11+
12+let AssetsWeightsDecimals = 4
13+
14+let Scale = 10000
15+
16+let Scale8 = 100000000
17+
18+let Scale16 = 10000000000000000
19+
20+let FeeScale = 10000
21+
22+let PoolTokenDecimals = 8
23+
24+let PoolTokenScale = pow(10, 0, PoolTokenDecimals, 0, 0, HALFUP)
25+
26+let InitalWavesLiquidity = Scale8
27+
28+let MIN_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_amount"), 1)
29+
30+let MAX_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_amount"), 500)
31+
32+let MIN_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_interval"), 1)
33+
34+let MAX_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_interval"), 10000)
35+
36+let MIN_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_weight"), 100)
37+
38+let MAX_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_weight"), 9900)
39+
40+func tryGetInteger (key) = match getInteger(this, key) {
41+ case b: Int =>
42+ b
43+ case _ =>
44+ 0
45+}
46+
47+
48+func tryGetBinary (key) = match getBinary(this, key) {
49+ case b: ByteVector =>
50+ b
51+ case _ =>
52+ base58''
53+}
54+
55+
56+func tryGetString (key) = match getString(this, key) {
57+ case b: String =>
58+ b
59+ case _ =>
60+ ""
61+}
62+
63+
64+func tryGetStringOrThrow (key) = match getString(this, key) {
65+ case b: String =>
66+ b
67+ case _ =>
68+ throw(("no such key in data storage: " + key))
69+}
70+
71+
72+func getAssetString (assetId) = match assetId {
73+ case b: ByteVector =>
74+ toBase58String(b)
75+ case _ =>
76+ "WAVES"
77+}
78+
79+
80+func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
81+ then unit
82+ else fromBase58String(assetIdStr)
83+
84+
85+func getTokenBalance (assetId) = match assetId {
86+ case t: ByteVector =>
87+ assetBalance(this, t)
88+ case _ =>
89+ wavesBalance(this).available
90+}
91+
92+
93+func addAssetBytesToList (accum,item) = if ((item != ""))
94+ then (accum ++ [getAssetBytes(item)])
95+ else accum
96+
97+
98+func addAssetWeightToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_weight"))])
99+
100+
101+func addAssetWeightToStrList (accum,item) = (accum ++ [toString(tryGetInteger((("static_" + item) + "_weight")))])
102+
103+
104+func addAssetDecimalsToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_decimals"))])
105+
106+
107+func addAssetScaleToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_scale"))])
108+
109+
110+func addIntToList (accum,item) = (accum ++ [parseIntValue(item)])
111+
112+
113+let usdnAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdnAssetIdStr"), "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")
114+
115+let puzzleAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "puzzleAssetIdStr"), "HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS")
116+
117+let usdtAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtAssetIdStr"), "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ")
118+
119+let usdtPptAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtPptAssetIdStr"), "9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi")
120+
121+let romeAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "romeAssetIdStr"), "AP4Cb5xLYGH6ZigHreCZHoXpQTWDkPsG2BHqfDUx6taJ")
122+
123+let wavesAssetIdStr = "WAVES"
124+
125+let usdnAssetId = fromBase58String(usdnAssetIdStr)
126+
127+let puzzleAssetId = fromBase58String(puzzleAssetIdStr)
128+
129+let usdtAssetId = fromBase58String(usdtAssetIdStr)
130+
131+let usdtPptAssetId = fromBase58String(usdtPptAssetIdStr)
132+
133+let romeAssetId = fromBase58String(romeAssetIdStr)
134+
135+let wavesAssetId = unit
136+
137+let supportedFeeAssetsStr = [usdnAssetIdStr, puzzleAssetIdStr, usdtAssetIdStr, usdtPptAssetIdStr, wavesAssetIdStr, romeAssetIdStr]
138+
139+let oracleAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "oracleAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
140+
141+let feesAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "feesAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
142+
143+let shutdownAddressStr = valueOrElse(getString(CONFIG_ADDRESS, "shutdownAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
144+
145+let layer2Addresses = valueOrElse(getString(CONFIG_ADDRESS, "layer2Addresses"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
146+
147+let coldMasterAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "coldMasterAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
148+
149+let factoryAccount = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "factoryAddress"), "3MvowVxVnqTUZZyRL6i3vkHNGabjmFxkHBr")))
150+
151+let masterPubKey = fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "masterPubKey"), "4z8CKSYQBKkzx7PBb5uBP1YPa6YAHRNTApW1sQVHT5eU"))
152+
153+let T = tryGetInteger("static_tokensAmount")
154+
155+let assetIds = {
156+ let $l = split(tryGetString("static_tokenIds"), ",")
157+ let $s = size($l)
158+ let $acc0 = nil
159+ func $f0_1 ($a,$i) = if (($i >= $s))
160+ then $a
161+ else addAssetBytesToList($a, $l[$i])
162+
163+ func $f0_2 ($a,$i) = if (($i >= $s))
164+ then $a
165+ else throw("List size exceeds 10")
166+
167+ $f0_2($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)
168+ }
169+
170+let AssetsWeights = {
171+ let $l = assetIds
172+ let $s = size($l)
173+ let $acc0 = nil
174+ func $f1_1 ($a,$i) = if (($i >= $s))
175+ then $a
176+ else addAssetWeightToList($a, $l[$i])
177+
178+ func $f1_2 ($a,$i) = if (($i >= $s))
179+ then $a
180+ else throw("List size exceeds 10")
181+
182+ $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
183+ }
184+
185+let Decimals = {
186+ let $l = assetIds
187+ let $s = size($l)
188+ let $acc0 = nil
189+ func $f2_1 ($a,$i) = if (($i >= $s))
190+ then $a
191+ else addAssetDecimalsToList($a, $l[$i])
192+
193+ func $f2_2 ($a,$i) = if (($i >= $s))
194+ then $a
195+ else throw("List size exceeds 10")
196+
197+ $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
198+ }
199+
200+let Scales = {
201+ let $l = assetIds
202+ let $s = size($l)
203+ let $acc0 = nil
204+ func $f3_1 ($a,$i) = if (($i >= $s))
205+ then $a
206+ else addAssetScaleToList($a, $l[$i])
207+
208+ func $f3_2 ($a,$i) = if (($i >= $s))
209+ then $a
210+ else throw("List size exceeds 10")
211+
212+ $f3_2($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($f3_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
213+ }
214+
215+let Fee = tryGetInteger("static_fee")
216+
217+let earnedAssets = assetIds
218+
219+func isShutdown () = {
220+ let shutdownAddress = addressFromString(shutdownAddressStr)
221+ if ((shutdownAddress == unit))
222+ then false
223+ else match getBoolean(value(shutdownAddress), "is_shutdown") {
224+ case x: Boolean =>
225+ x
226+ case _ =>
227+ false
228+ }
229+ }
230+
231+
232+func getCurrentTokenBalance (tokenNum) = {
233+ let tokenIdStr = getAssetString(assetIds[tokenNum])
234+ tryGetInteger((("global_" + tokenIdStr) + "_balance"))
235+ }
236+
237+
238+func getKMult () = match getInteger("static_KMult") {
239+ case x: Int =>
240+ x
241+ case _ =>
242+ Scale16
243+}
244+
245+
246+func getVirtualPoolTokenAmount () = fraction(tryGetInteger("global_poolToken_amount"), getKMult(), Scale16)
247+
248+
249+func getPriceFromOracle (assetIdStr) = match getInteger(oracleAddress, (assetIdStr + "_twap5B")) {
250+ case x: Int =>
251+ x
252+ case _ =>
253+ 1000000
254+}
255+
256+
257+func calculateUsdValue (assetId,amount,aBalance) = {
258+ let assetWeight = tryGetInteger((("static_" + getAssetString(assetId)) + "_weight"))
259+ let feeAssetStr = tryGetString("static_feeToken")
260+ let feeAssetScale = getIntegerValue(this, (("static_" + feeAssetStr) + "_scale"))
261+ let feeAssetNum = value(indexOf(assetIds, getAssetBytes(feeAssetStr)))
262+ let feeAssetWeight = AssetsWeights[feeAssetNum]
263+ let feeAssetBalance = tryGetInteger((("global_" + feeAssetStr) + "_balance"))
264+ let valInFeeAsset = fraction(amount, (feeAssetBalance / feeAssetWeight), (aBalance / assetWeight))
265+ let feeAssetPrice = getPriceFromOracle(feeAssetStr)
266+ fraction(valInFeeAsset, feeAssetPrice, feeAssetScale)
267+ }
268+
269+
270+func handlePoolTokensRedeem (PRedeemed,userAddress) = {
271+ func handleTokenRedeem (accum,tokenId) = {
272+ let Bk = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance"))
273+ let PSupply = getVirtualPoolTokenAmount()
274+ let tokenDecimals = tryGetInteger((("static_" + getAssetString(tokenId)) + "_scale"))
275+ let psuppl = fraction((toBigInt((PSupply - PRedeemed)) * toBigInt(Scale8)), toBigInt(Scale8), toBigInt(PSupply), DOWN)
276+ let amount = toInt(fraction((toBigInt(Scale16) - psuppl), toBigInt(Bk), toBigInt(Scale16), CEILING))
277+ (accum ++ [IntegerEntry((("global_" + getAssetString(tokenId)) + "_balance"), (Bk - amount)), ScriptTransfer(userAddress, amount, tokenId)])
278+ }
279+
280+ let $l = assetIds
281+ let $s = size($l)
282+ let $acc0 = nil
283+ func $f4_1 ($a,$i) = if (($i >= $s))
284+ then $a
285+ else handleTokenRedeem($a, $l[$i])
286+
287+ func $f4_2 ($a,$i) = if (($i >= $s))
288+ then $a
289+ else throw("List size exceeds 10")
290+
291+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
292+ }
293+
294+
295+func calculateOutAmount (AmountIn,assetIn,assetOut,BalanceIn,BalanceOut) = {
296+ let IndexIn = value(indexOf(assetIds, assetIn))
297+ let IndexOut = value(indexOf(assetIds, assetOut))
298+ if ((IndexIn == IndexOut))
299+ then AmountIn
300+ else fraction(BalanceOut, ((Scale8 * Scale8) - toInt(pow(fraction((toBigInt(BalanceIn) * toBigInt(10000)), toBigInt((Scale8 * Scale8)), (toBigInt((BalanceIn + AmountIn)) * toBigInt(10000)), HALFUP), 16, toBigInt(fraction(AssetsWeights[IndexIn], 1000000000000, AssetsWeights[IndexOut])), 12, 16, CEILING))), (Scale8 * Scale8), HALFEVEN)
301+ }
302+
303+
304+func calculateCurrentAssetInterest (assetId,assetIdStr,aBalance,tokenEarningsLastCheck) = {
305+ let totalStaked = tryGetInteger("global_indexStaked")
306+ let tokenBalanceLastCheck = tokenEarningsLastCheck
307+ let currentBalanceDelta = (getTokenBalance(assetId) - aBalance)
308+ let currentTokenEarnings = if ((currentBalanceDelta > tokenBalanceLastCheck))
309+ then currentBalanceDelta
310+ else tokenBalanceLastCheck
311+ let newEarnings = (currentTokenEarnings - tokenBalanceLastCheck)
312+ let newInterest = if ((totalStaked == 0))
313+ then 0
314+ else fraction(newEarnings, Scale8, totalStaked)
315+ let lastCheckInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest"))
316+ (lastCheckInterest + newInterest)
317+ }
318+
319+
320+func claimResult (address) = {
321+ let addressStr = toString(address)
322+ let puzzleAmount = tryGetInteger((addressStr + "_indexStaked"))
323+ func handler (accum,assetId) = {
324+ let assetIdStr = getAssetString(assetId)
325+ let aBalance = tryGetInteger((("global_" + getAssetString(assetId)) + "_balance"))
326+ let tokenEarningsLastCheck = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_earnings"))
327+ let currentTokenInterest = calculateCurrentAssetInterest(assetId, assetIdStr, aBalance, tokenEarningsLastCheck)
328+ let currentTokenEarnings = max([tokenEarningsLastCheck, (getTokenBalance(assetId) - aBalance)])
329+ let rewardAmount = fraction(puzzleAmount, (currentTokenInterest - tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"))), Scale8)
330+ let transfer = if ((rewardAmount == 0))
331+ then nil
332+ else [ScriptTransfer(address, rewardAmount, assetId)]
333+ $Tuple2(((accum._1 ++ transfer) ++ [IntegerEntry((("global_lastCheck_" + assetIdStr) + "_earnings"), (currentTokenEarnings - rewardAmount)), IntegerEntry((("global_lastCheck_" + assetIdStr) + "_interest"), currentTokenInterest), IntegerEntry((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"), currentTokenInterest)]), (accum._2 + calculateUsdValue(assetId, rewardAmount, aBalance)))
334+ }
335+
336+ let accum = {
337+ let $l = earnedAssets
338+ let $s = size($l)
339+ let $acc0 = $Tuple2(nil, 0)
340+ func $f4_1 ($a,$i) = if (($i >= $s))
341+ then $a
342+ else handler($a, $l[$i])
343+
344+ func $f4_2 ($a,$i) = if (($i >= $s))
345+ then $a
346+ else throw("List size exceeds 10")
347+
348+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
349+ }
350+ $Tuple2((accum._1 ++ [IntegerEntry((addressStr + "_claimedRewardUSD"), (tryGetInteger((addressStr + "_claimedRewardUSD")) + accum._2)), IntegerEntry((addressStr + "_lastClaim"), lastBlock.timestamp)]), accum._2)
351+ }
352+
353+
354+func indexStakeResult (addressStr,amount) = {
355+ let li = claimResult(addressFromStringValue(addressStr))._1
356+ (li ++ [IntegerEntry((addressStr + "_indexStaked"), (tryGetInteger((addressStr + "_indexStaked")) + amount)), IntegerEntry("global_indexStaked", (tryGetInteger("global_indexStaked") + amount))])
357+ }
358+
359+
360+func sum (accum,n) = (accum + parseIntValue(n))
361+
362+
363+func checkFeeAsset (accum,next) = if (if ((indexOf(supportedFeeAssetsStr, next) != unit))
364+ then (accum == "")
365+ else false)
366+ then next
367+ else accum
368+
369+
370+func getTmpRebalanceIds (newAssetIdsLi) = {
371+ let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",")
372+ let result = newAssetIdsLi
373+ func f (accum,assetId) = if ((indexOf(result, assetId) == unit))
374+ then (accum ++ [assetId])
375+ else accum
376+
377+ let $l = currentAssetIdsLi
378+ let $s = size($l)
379+ let $acc0 = result
380+ func $f4_1 ($a,$i) = if (($i >= $s))
381+ then $a
382+ else f($a, $l[$i])
383+
384+ func $f4_2 ($a,$i) = if (($i >= $s))
385+ then $a
386+ else throw("List size exceeds 10")
387+
388+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
389+ }
390+
391+
392+func checkTokensChange (newAssetIdsLi) = {
393+ let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",")
394+ func rem (accum,assetId) = if ((indexOf(newAssetIdsLi, assetId) == unit))
395+ then (accum + 1)
396+ else accum
397+
398+ func add (accum,assetId) = if ((indexOf(currentAssetIdsLi, assetId) == unit))
399+ then (accum + 1)
400+ else accum
401+
402+ let removed = {
403+ let $l = currentAssetIdsLi
404+ let $s = size($l)
405+ let $acc0 = 0
406+ func $f4_1 ($a,$i) = if (($i >= $s))
407+ then $a
408+ else rem($a, $l[$i])
409+
410+ func $f4_2 ($a,$i) = if (($i >= $s))
411+ then $a
412+ else throw("List size exceeds 10")
413+
414+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
415+ }
416+ let added = {
417+ let $l = newAssetIdsLi
418+ let $s = size($l)
419+ let $acc0 = 0
420+ func $f5_1 ($a,$i) = if (($i >= $s))
421+ then $a
422+ else add($a, $l[$i])
423+
424+ func $f5_2 ($a,$i) = if (($i >= $s))
425+ then $a
426+ else throw("List size exceeds 10")
427+
428+ $f5_2($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
429+ }
430+ (removed + added)
431+ }
432+
433+
434+func validatePayments (assetsList,payments) = {
435+ func getPaymentAssets (accum,next) = if ((0 >= next.amount))
436+ then throw(((("Too low payment amount for " + getAssetString(next.assetId)) + ": ") + toString(next.amount)))
437+ else (accum ++ [getAssetString(next.assetId)])
438+
439+ let paymentList = {
440+ let $l = payments
441+ let $s = size($l)
442+ let $acc0 = nil
443+ func $f4_1 ($a,$i) = if (($i >= $s))
444+ then $a
445+ else getPaymentAssets($a, $l[$i])
446+
447+ func $f4_2 ($a,$i) = if (($i >= $s))
448+ then $a
449+ else throw("List size exceeds 10")
450+
451+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
452+ }
453+ func f1 (accum,next) = if ((indexOf(assetsList, next) == unit))
454+ then throw(((next + " asset is present in payments, but is not in new assets: ") + makeString(assetsList, ",")))
455+ else (accum + 1)
456+
457+ func f2 (accum,next) = if ((indexOf(paymentList, next) == unit))
458+ then throw(((next + " asset is present in new assets, but is not in payments: ") + makeString(paymentList, ",")))
459+ else (accum + 1)
460+
461+ let a1 = {
462+ let $l = paymentList
463+ let $s = size($l)
464+ let $acc0 = 0
465+ func $f5_1 ($a,$i) = if (($i >= $s))
466+ then $a
467+ else f1($a, $l[$i])
468+
469+ func $f5_2 ($a,$i) = if (($i >= $s))
470+ then $a
471+ else throw("List size exceeds 10")
472+
473+ $f5_2($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
474+ }
475+ let a2 = {
476+ let $l = assetsList
477+ let $s = size($l)
478+ let $acc0 = 0
479+ func $f6_1 ($a,$i) = if (($i >= $s))
480+ then $a
481+ else f2($a, $l[$i])
482+
483+ func $f6_2 ($a,$i) = if (($i >= $s))
484+ then $a
485+ else throw("List size exceeds 10")
486+
487+ $f6_2($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
488+ }
489+ (a1 + a2)
490+ }
491+
492+
493+func swapInternal (assetIn,assetOut,amountIn,minimum,receipientAddressStr) = {
494+ let AmountIn = amountIn
495+ let AssetIn = getAssetBytes(assetIn)
496+ let AssetOut = getAssetBytes(assetOut)
497+ let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale")))
498+ let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale")))
499+ let feeAssetOutStr = tryGetString("static_feeToken")
500+ let feeAssetOut = if ((feeAssetOutStr == ""))
501+ then wavesAssetId
502+ else getAssetBytes(feeAssetOutStr)
503+ let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance"))
504+ let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance"))
505+ let AssetInBalanceScaled = (AssetInBalance * scaleIn)
506+ let AssetOutBalanceScaled = (AssetOutBalance * scaleOut)
507+ let feeAmountIn = fraction(AmountIn, Fee, FeeScale)
508+ let cleanAmountIn = (AmountIn - feeAmountIn)
509+ let cleanAmountInScaled = (cleanAmountIn * scaleIn)
510+ let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled)
511+ let AmountOut = fraction(AmountOut1, 1, scaleOut)
512+ let AssetOutBalance2 = (AssetOutBalance - AmountOut)
513+ let AssetInBalance2 = (AssetInBalance + cleanAmountIn)
514+ let feeAssetOutBalance = if ((feeAssetOut == AssetIn))
515+ then AssetInBalance2
516+ else if ((feeAssetOut == AssetOut))
517+ then AssetOutBalance2
518+ else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance"))
519+ let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance)
520+ if ((minimum > AmountOut))
521+ then throw("amount to recieve is lower than given one")
522+ else if ((AssetOut == AssetIn))
523+ then throw("this swap is not allowed")
524+ else if ((0 > (AssetOutBalance - AmountOut)))
525+ then throw("contract is out of reserves")
526+ else if (isShutdown())
527+ then throw("contract is on stop")
528+ else {
529+ let creatorFee = fraction(feeAmountOut, 1, 10)
530+ let protocolFee = fraction(feeAmountOut, 4, 10)
531+ let newBalanceIn = AssetInBalance2
532+ let newBalanceOut = (AssetOutBalance2 - (if ((AssetOut == feeAssetOut))
533+ then feeAmountOut
534+ else 0))
535+ let newBalanceFeeAsset = if (if ((feeAssetOut != AssetIn))
536+ then (feeAssetOut != AssetOut)
537+ else false)
538+ then (feeAssetOutBalance - feeAmountOut)
539+ else unit
540+ let assetInChange = IntegerEntry((("global_" + getAssetString(AssetIn)) + "_balance"), newBalanceIn)
541+ let assetOutChange = IntegerEntry((("global_" + assetOut) + "_balance"), newBalanceOut)
542+ let feeAssetOutChange = if ((newBalanceFeeAsset != unit))
543+ then IntegerEntry((("global_" + getAssetString(feeAssetOut)) + "_balance"), value(newBalanceFeeAsset))
544+ else StringEntry("hello", "world")
545+ let volumeUsdUpdate = calculateUsdValue(AssetIn, AmountIn, AssetInBalance)
546+ $Tuple2([assetOutChange, assetInChange, feeAssetOutChange, ScriptTransfer(addressFromStringValue(receipientAddressStr), AmountOut, AssetOut), ScriptTransfer(addressFromStringValue(tryGetString("static_poolOwner")), creatorFee, feeAssetOut), IntegerEntry("global_earnedByOwner", (tryGetInteger("global_earnedByOwner") + creatorFee)), IntegerEntry("global_volume_usd", (tryGetInteger("global_volume_usd") + volumeUsdUpdate)), ScriptTransfer(feesAddress, protocolFee, feeAssetOut)], AmountOut)
547+ }
548+ }
549+
550+
551+@Callable(i)
552+func deInit () = if (isShutdown())
553+ then throw("contract is on stop")
554+ else if ((i.caller != this))
555+ then throw("admin only")
556+ else [IntegerEntry("global_wasInited", 0)]
557+
558+
559+
560+@Callable(i)
561+func initPool (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = {
562+ func calculatePoolTokensAmount (payments) = {
563+ func handler (accum,pmt) = {
564+ let assetId = pmt.assetId
565+ func handler2 (accum,n) = if ((n == assetId))
566+ then value(indexOf(assetIds, n))
567+ else accum
568+
569+ let Token = {
570+ let $l = assetIds
571+ let $s = size($l)
572+ let $acc0 = 1
573+ func $f4_1 ($a,$i) = if (($i >= $s))
574+ then $a
575+ else handler2($a, $l[$i])
576+
577+ func $f4_2 ($a,$i) = if (($i >= $s))
578+ then $a
579+ else throw("List size exceeds 10")
580+
581+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
582+ }
583+ fraction(accum, pow(pmt.amount, Decimals[Token], AssetsWeights[Token], AssetsWeightsDecimals, 8, FLOOR), Scale8)
584+ }
585+
586+ let $l = payments
587+ let $s = size($l)
588+ let $acc0 = PoolTokenScale
589+ func $f4_1 ($a,$i) = if (($i >= $s))
590+ then $a
591+ else handler($a, $l[$i])
592+
593+ func $f4_2 ($a,$i) = if (($i >= $s))
594+ then $a
595+ else throw("List size exceeds 10")
596+
597+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
598+ }
599+
600+ let meme = Issue(tokenName, tokenDesc, tokenQuantity, 8, false)
601+ let memeId = calculateAssetId(meme)
602+ let memeIdStr = getAssetString(memeId)
603+ let assetWeightsStr = "5000,5000"
604+ let baseTokenIdStr = "WAVES"
605+ let poolOwnerAddress = Address(fromBase58String(poolOwner))
606+ let assetIdsStr = ("WAVES," + memeIdStr)
607+ let assetIdsStrLi = split(assetIdsStr, ",")
608+ let assetIdsLi = {
609+ let $l = assetIdsStrLi
610+ let $s = size($l)
611+ let $acc0 = nil
612+ func $f4_1 ($a,$i) = if (($i >= $s))
613+ then $a
614+ else addAssetBytesToList($a, $l[$i])
615+
616+ func $f4_2 ($a,$i) = if (($i >= $s))
617+ then $a
618+ else throw("List size exceeds 10")
619+
620+ $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
621+ }
622+ let fee = 100
623+ let feeAssetStr = {
624+ let $l = assetIdsStrLi
625+ let $s = size($l)
626+ let $acc0 = ""
627+ func $f5_1 ($a,$i) = if (($i >= $s))
628+ then $a
629+ else checkFeeAsset($a, $l[$i])
630+
631+ func $f5_2 ($a,$i) = if (($i >= $s))
632+ then $a
633+ else throw("List size exceeds 10")
634+
635+ $f5_2($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($f5_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
636+ }
637+ let pmt = i.payments[0]
638+ let amount = pmt.amount
639+ let pmtAsset = if ((pmt.assetId == unit))
640+ then "WAVES"
641+ else throw("you have to attach some WAVES")
642+ if ((this != this))
643+ then throw("admin only")
644+ else if ((feeAssetStr == ""))
645+ then throw("pool must have one of the supported fee assets in the composition")
646+ else if ((size(poolDomain) > 13))
647+ then throw("too large pool domain")
648+ else if (if ((fee > 500))
649+ then true
650+ else (0 > fee))
651+ then throw("fee value must be between 50 and 500 (0.5-5%)")
652+ else if (isShutdown())
653+ then throw("contract is on stop")
654+ else {
655+ let assetWeightsStrLi = split(assetWeightsStr, ",")
656+ let assetWeightsSum = {
657+ let $l = assetWeightsStrLi
658+ let $s = size($l)
659+ let $acc0 = 0
660+ func $f6_1 ($a,$i) = if (($i >= $s))
661+ then $a
662+ else sum($a, $l[$i])
663+
664+ func $f6_2 ($a,$i) = if (($i >= $s))
665+ then $a
666+ else throw("List size exceeds 10")
667+
668+ $f6_2($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($f6_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
669+ }
670+ func addTokenDataEntries (accum,assetNum) = if ((assetNum >= size(assetIdsLi)))
671+ then accum
672+ else {
673+ let assetDecimals = 8
674+ (accum ++ [IntegerEntry((("static_" + assetIdsStrLi[assetNum]) + "_scale"), pow(10, 0, assetDecimals, 0, 0, DOWN)), IntegerEntry((("static_" + assetIdsStrLi[assetNum]) + "_decimals"), assetDecimals), IntegerEntry((("static_" + assetIdsStrLi[assetNum]) + "_weight"), value(parseInt(assetWeightsStrLi[assetNum])))])
675+ }
676+
677+ let initialPoolTokens = calculatePoolTokensAmount(i.payments)
678+ if ((assetWeightsSum != 10000))
679+ then throw("sum of token weights must be equal to 10000")
680+ else if ((initialPoolTokens == 0))
681+ then throw("you need a bigger tokens amount to launch the pool")
682+ else {
683+ let poolTokenIssue = Issue(("PZ " + poolDomain), "Puzzle Swap: pool index token", initialPoolTokens, PoolTokenDecimals, true, unit, 0)
684+ let poolTokenId = calculateAssetId(poolTokenIssue)
685+ $Tuple2(((({
686+ let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
687+ let $s = size($l)
688+ let $acc0 = nil
689+ func $f7_1 ($a,$i) = if (($i >= $s))
690+ then $a
691+ else addTokenDataEntries($a, $l[$i])
692+
693+ func $f7_2 ($a,$i) = if (($i >= $s))
694+ then $a
695+ else throw("List size exceeds 10")
696+
697+ $f7_2($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($f7_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
698+ } ++ [meme, StringEntry("static_tokenIds", assetIdsStr), StringEntry("static_feeToken", feeAssetStr), StringEntry("static_tokenWeights", assetWeightsStr), IntegerEntry("static_tokensAmount", size(assetIdsLi)), StringEntry("static_poolDomain", poolDomain), StringEntry("static_baseTokenId", baseTokenIdStr), StringEntry("static_poolOwner", poolOwner), IntegerEntry("static_fee", fee), IntegerEntry("static_KMult", Scale16), IntegerEntry("global_wasPreInited", 1)]) ++ [IntegerEntry("global_WAVES_balance", InitalWavesLiquidity), IntegerEntry((("global_" + memeIdStr) + "_balance"), tokenQuantity)]) ++ [poolTokenIssue, IntegerEntry("global_poolToken_amount", initialPoolTokens), IntegerEntry("global_wasInited", 1), BinaryEntry("global_poolToken_id", poolTokenId), StringEntry("static_poolToken_idStr", getAssetString(poolTokenId)), IntegerEntry((toString(i.caller) + "_indexStaked"), initialPoolTokens), IntegerEntry("global_indexStaked", initialPoolTokens)]), memeIdStr)
699+ }
700+ }
701+ }
702+
703+
704+
705+@Callable(i)
706+func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((i.caller != factoryAccount))
707+ then throw("admin only")
708+ else {
709+ let inv1 = invoke(this, "initPool", [poolDomain, poolOwner, tokenName, tokenDesc, tokenQuantity], nil)
710+ if ((inv1 == inv1))
711+ then {
712+ let memeIdStr = {
713+ let @ = inv1
714+ if ($isInstanceOf(@, "String"))
715+ then @
716+ else throw(($getType(@) + " couldn't be cast to String"))
717+ }
718+ swapInternal("WAVES", memeIdStr, (i.payments[0].amount - InitalWavesLiquidity), 0, toString(i.caller))._1
719+ }
720+ else throw("Strict value is not equal to itself.")
721+ }
722+
723+
724+
725+@Callable(i)
726+func redeemIndex (sendToOrigin) = {
727+ let pmt = i.payments[0]
728+ if ((pmt.assetId != tryGetBinary("global_poolToken_id")))
729+ then throw("please attach pool share token")
730+ else if (isShutdown())
731+ then throw("contract is on stop")
732+ else {
733+ let PRedeemedWithMult = pmt.amount
734+ let PRedeemedWithNoMult = fraction(PRedeemedWithMult, getKMult(), Scale16, DOWN)
735+ let result = handlePoolTokensRedeem(PRedeemedWithNoMult, if (sendToOrigin)
736+ then i.originCaller
737+ else i.caller)
738+ (result ++ [Burn(tryGetBinary("global_poolToken_id"), PRedeemedWithMult), IntegerEntry("global_poolToken_amount", (tryGetInteger("global_poolToken_amount") - PRedeemedWithMult))])
739+ }
740+ }
741+
742+
743+
744+@Callable(i)
745+func stakeIndex () = {
746+ let addressStr = toString(i.originCaller)
747+ let pmt = i.payments[0]
748+ if ((value(pmt.assetId) != tryGetBinary("global_poolToken_id")))
749+ then throw("wrong asset attached")
750+ else indexStakeResult(addressStr, pmt.amount)
751+ }
752+
753+
754+
755+@Callable(i)
756+func stakeIndexFor (addressStr) = {
757+ let pmt = i.payments[0]
758+ if ((value(pmt.assetId) != tryGetBinary("global_poolToken_id")))
759+ then throw("wrong asset attached")
760+ else indexStakeResult(addressStr, pmt.amount)
761+ }
762+
763+
764+
765+@Callable(i)
766+func unstakeIndex (indexAmount) = {
767+ let addressStr = if ((indexOf(layer2Addresses, toString(i.caller)) != unit))
768+ then toString(i.originCaller)
769+ else toString(i.caller)
770+ let indexAvailable = tryGetInteger((addressStr + "_indexStaked"))
771+ if (isShutdown())
772+ then throw("contract is on stop")
773+ else if ((indexAmount > indexAvailable))
774+ then throw("you don't have index tokens available")
775+ else if (isShutdown())
776+ then throw("contract is on stop")
777+ else (claimResult(addressFromStringValue(addressStr))._1 ++ [IntegerEntry((addressStr + "_indexStaked"), (indexAvailable - indexAmount)), IntegerEntry("global_indexStaked", (tryGetInteger("global_indexStaked") - indexAmount)), ScriptTransfer(i.caller, indexAmount, getBinaryValue("global_poolToken_id"))])
778+ }
779+
780+
781+
782+@Callable(i)
783+func claimIndexRewards () = if (isShutdown())
784+ then throw("contract is on stop")
785+ else claimResult(i.caller)
786+
787+
788+
789+@Callable(i)
790+func evaluateClaim (user) = $Tuple2(nil, claimResult(addressFromStringValue(user))._2)
791+
792+
793+
794+@Callable(i)
795+func swap (assetOut,minimum) = {
796+ let pmt = if ((size(i.payments) == 1))
797+ then value(i.payments[0])
798+ else throw("please attach exactly one payment")
799+ let AmountIn = value(i.payments[0].amount)
800+ let AssetIn = i.payments[0].assetId
801+ swapInternal(getAssetString(AssetIn), assetOut, AmountIn, minimum, toString(i.caller))
802+ }
803+
804+
805+
806+@Callable(i)
807+func swapReadOnly (assetIn,assetOut,AmountIn) = {
808+ let AssetIn = getAssetBytes(assetIn)
809+ let AssetOut = getAssetBytes(assetOut)
810+ let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale")))
811+ let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale")))
812+ let feeAssetOutStr = tryGetString("static_feeToken")
813+ let feeAssetOut = if ((feeAssetOutStr == ""))
814+ then usdnAssetId
815+ else getAssetBytes(feeAssetOutStr)
816+ let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance"))
817+ let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance"))
818+ let AssetInBalanceScaled = (AssetInBalance * scaleIn)
819+ let AssetOutBalanceScaled = (AssetOutBalance * scaleOut)
820+ let feeAmountIn = fraction(AmountIn, Fee, FeeScale)
821+ let cleanAmountIn = (AmountIn - feeAmountIn)
822+ let cleanAmountInScaled = (cleanAmountIn * scaleIn)
823+ let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled)
824+ let AmountOut = fraction(AmountOut1, 1, scaleOut)
825+ let AssetOutBalance2 = (AssetOutBalance - AmountOut)
826+ let AssetInBalance2 = (AssetInBalance + cleanAmountIn)
827+ let feeAssetOutBalance = if ((feeAssetOut == AssetIn))
828+ then AssetInBalance2
829+ else if ((feeAssetOut == AssetOut))
830+ then AssetOutBalance2
831+ else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance"))
832+ let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance)
833+ if ((AssetOut == AssetIn))
834+ then throw("this swap is not allowed")
835+ else if ((0 > (AssetOutBalance - AmountOut)))
836+ then throw("contract is out of reserves")
837+ else if (isShutdown())
838+ then throw("contract is on stop")
839+ else $Tuple2(nil, AmountOut)
840+ }
841+
842+
843+
844+@Callable(i)
845+func transferOwnership (newOwnerAddress) = if ((toString(i.caller) != tryGetString("static_poolOwner")))
846+ then throw("this call available only for pool owner")
847+ else [StringEntry("static_poolOwner", newOwnerAddress)]
848+
849+

github/deemru/w8io/169f3d6 
45.90 ms