tx · FDj8QtC1s8vsDUgNLcqTgGmusySRwSZnFcR4qWk1PpXa

3MzJRUHCJrsxXR2etJkQsnfxJoAm83YXzZx:  -0.02600000 Waves

2024.10.14 09:26 [3326153] smart account 3MzJRUHCJrsxXR2etJkQsnfxJoAm83YXzZx > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
52.24 ms