tx · 78dGJqnFj9QiyyLomFFBrTFYcgV4weoDCwhM2k2UysRs

3N8CWjTs5UpEzPFzDJaeBk1HoBfqgHHeZha:  -0.03000000 Waves

2024.09.26 18:50 [3300788] smart account 3N8CWjTs5UpEzPFzDJaeBk1HoBfqgHHeZha > SELF 0.00000000 Waves

{ "type": 13, "id": "78dGJqnFj9QiyyLomFFBrTFYcgV4weoDCwhM2k2UysRs", "fee": 3000000, "feeAssetId": null, "timestamp": 1727365864836, "version": 2, "chainId": 84, "sender": "3N8CWjTs5UpEzPFzDJaeBk1HoBfqgHHeZha", "senderPublicKey": "G9fBiYjdwgbKSKBBNehAA9qmo89uq3iFPqVUB3qtj4nk", "proofs": [ "5hx7eTPAGak9nSokThgZubeePgosHV94f6UReSeGqy7CmvLj8AWLHg2sArPxauv5YJhrVEqLzXTc8cAcuURWeCYe" ], "script": "base64:BgJACAISABIHCgUICAgIARIHCgUICAgIARIDCgEEEgASAwoBCBIDCgEBEgASAwoBCBIECgIIARIFCgMICAESAwoBCEoAB1ZFUlNJT04CCFBNLTAuNC4wAAljb25maWdTdHIJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwINY29uZmlnQWRkcmVzcwIjM045MWU3d0hpVjdRYWREc3gzUlVKUXh4MWV0cWNBS3JmSGoADkNPTkZJR19BRERSRVNTAwkAAAIFCWNvbmZpZ1N0cgIABQR0aGlzCQEHQWRkcmVzcwEJANkEAQUJY29uZmlnU3RyABVBc3NldHNXZWlnaHRzRGVjaW1hbHMABAAFU2NhbGUAkE4ABlNjYWxlOACAwtcvAAdTY2FsZTE2AICAhP6m3uERAAhGZWVTY2FsZQCQTgARUG9vbFRva2VuRGVjaW1hbHMACAAOUG9vbFRva2VuU2NhbGUJAGwGAAoAAAURUG9vbFRva2VuRGVjaW1hbHMAAAAABQZIQUxGVVAAFEluaXRhbFdhdmVzTGlxdWlkaXR5BQZTY2FsZTgAEE1JTl9TVEVQU19BTU9VTlQJAQt2YWx1ZU9yRWxzZQ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exity": 0 } View: original | compacted Prev: 3U8aZ6YEksvh7BDKmqyFDNcUnpXQiRjSp4sqhyqmZUkS Next: none Diff:
OldNewDifferences
701701
702702
703703 @Callable(i)
704-func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((this != factoryAccount))
704+func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((i.caller != factoryAccount))
705705 then throw("admin only")
706706 else {
707707 let inv1 = invoke(this, "initPool", [poolDomain, poolOwner, tokenName, tokenDesc, tokenQuantity], nil)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VERSION = "PM-0.4.0"
55
66 let configStr = valueOrElse(getString(this, "configAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
77
88 let CONFIG_ADDRESS = if ((configStr == ""))
99 then this
1010 else Address(fromBase58String(configStr))
1111
1212 let AssetsWeightsDecimals = 4
1313
1414 let Scale = 10000
1515
1616 let Scale8 = 100000000
1717
1818 let Scale16 = 10000000000000000
1919
2020 let FeeScale = 10000
2121
2222 let PoolTokenDecimals = 8
2323
2424 let PoolTokenScale = pow(10, 0, PoolTokenDecimals, 0, 0, HALFUP)
2525
2626 let InitalWavesLiquidity = Scale8
2727
2828 let MIN_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_amount"), 1)
2929
3030 let MAX_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_amount"), 500)
3131
3232 let MIN_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_interval"), 1)
3333
3434 let MAX_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_interval"), 10000)
3535
3636 let MIN_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_weight"), 100)
3737
3838 let MAX_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_weight"), 9900)
3939
4040 func tryGetInteger (key) = match getInteger(this, key) {
4141 case b: Int =>
4242 b
4343 case _ =>
4444 0
4545 }
4646
4747
4848 func tryGetBinary (key) = match getBinary(this, key) {
4949 case b: ByteVector =>
5050 b
5151 case _ =>
5252 base58''
5353 }
5454
5555
5656 func tryGetString (key) = match getString(this, key) {
5757 case b: String =>
5858 b
5959 case _ =>
6060 ""
6161 }
6262
6363
6464 func tryGetStringOrThrow (key) = match getString(this, key) {
6565 case b: String =>
6666 b
6767 case _ =>
6868 throw(("no such key in data storage: " + key))
6969 }
7070
7171
7272 func getAssetString (assetId) = match assetId {
7373 case b: ByteVector =>
7474 toBase58String(b)
7575 case _ =>
7676 "WAVES"
7777 }
7878
7979
8080 func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
8181 then unit
8282 else fromBase58String(assetIdStr)
8383
8484
8585 func getTokenBalance (assetId) = match assetId {
8686 case t: ByteVector =>
8787 assetBalance(this, t)
8888 case _ =>
8989 wavesBalance(this).available
9090 }
9191
9292
9393 func addAssetBytesToList (accum,item) = (accum ++ [getAssetBytes(item)])
9494
9595
9696 func addAssetWeightToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_weight"))])
9797
9898
9999 func addAssetWeightToStrList (accum,item) = (accum ++ [toString(tryGetInteger((("static_" + item) + "_weight")))])
100100
101101
102102 func addAssetDecimalsToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_decimals"))])
103103
104104
105105 func addAssetScaleToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_scale"))])
106106
107107
108108 func addIntToList (accum,item) = (accum ++ [parseIntValue(item)])
109109
110110
111111 let usdnAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdnAssetIdStr"), "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")
112112
113113 let puzzleAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "puzzleAssetIdStr"), "HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS")
114114
115115 let usdtAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtAssetIdStr"), "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ")
116116
117117 let usdtPptAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtPptAssetIdStr"), "9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi")
118118
119119 let romeAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "romeAssetIdStr"), "AP4Cb5xLYGH6ZigHreCZHoXpQTWDkPsG2BHqfDUx6taJ")
120120
121121 let wavesAssetIdStr = "WAVES"
122122
123123 let usdnAssetId = fromBase58String(usdnAssetIdStr)
124124
125125 let puzzleAssetId = fromBase58String(puzzleAssetIdStr)
126126
127127 let usdtAssetId = fromBase58String(usdtAssetIdStr)
128128
129129 let usdtPptAssetId = fromBase58String(usdtPptAssetIdStr)
130130
131131 let romeAssetId = fromBase58String(romeAssetIdStr)
132132
133133 let wavesAssetId = unit
134134
135135 let supportedFeeAssetsStr = [usdnAssetIdStr, puzzleAssetIdStr, usdtAssetIdStr, usdtPptAssetIdStr, wavesAssetIdStr, romeAssetIdStr]
136136
137137 let oracleAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "oracleAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
138138
139139 let feesAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "feesAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
140140
141141 let shutdownAddressStr = valueOrElse(getString(CONFIG_ADDRESS, "shutdownAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
142142
143143 let layer2Addresses = valueOrElse(getString(CONFIG_ADDRESS, "layer2Addresses"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
144144
145145 let coldMasterAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "coldMasterAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
146146
147147 let factoryAccount = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "factoryAddress"), "3MvowVxVnqTUZZyRL6i3vkHNGabjmFxkHBr")))
148148
149149 let masterPubKey = fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "masterPubKey"), "4z8CKSYQBKkzx7PBb5uBP1YPa6YAHRNTApW1sQVHT5eU"))
150150
151151 let T = tryGetInteger("static_tokensAmount")
152152
153153 let assetIds = {
154154 let $l = split(tryGetString("static_tokenIds"), ",")
155155 let $s = size($l)
156156 let $acc0 = nil
157157 func $f0_1 ($a,$i) = if (($i >= $s))
158158 then $a
159159 else addAssetBytesToList($a, $l[$i])
160160
161161 func $f0_2 ($a,$i) = if (($i >= $s))
162162 then $a
163163 else throw("List size exceeds 10")
164164
165165 $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)
166166 }
167167
168168 let AssetsWeights = {
169169 let $l = assetIds
170170 let $s = size($l)
171171 let $acc0 = nil
172172 func $f1_1 ($a,$i) = if (($i >= $s))
173173 then $a
174174 else addAssetWeightToList($a, $l[$i])
175175
176176 func $f1_2 ($a,$i) = if (($i >= $s))
177177 then $a
178178 else throw("List size exceeds 10")
179179
180180 $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)
181181 }
182182
183183 let Decimals = {
184184 let $l = assetIds
185185 let $s = size($l)
186186 let $acc0 = nil
187187 func $f2_1 ($a,$i) = if (($i >= $s))
188188 then $a
189189 else addAssetDecimalsToList($a, $l[$i])
190190
191191 func $f2_2 ($a,$i) = if (($i >= $s))
192192 then $a
193193 else throw("List size exceeds 10")
194194
195195 $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)
196196 }
197197
198198 let Scales = {
199199 let $l = assetIds
200200 let $s = size($l)
201201 let $acc0 = nil
202202 func $f3_1 ($a,$i) = if (($i >= $s))
203203 then $a
204204 else addAssetScaleToList($a, $l[$i])
205205
206206 func $f3_2 ($a,$i) = if (($i >= $s))
207207 then $a
208208 else throw("List size exceeds 10")
209209
210210 $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)
211211 }
212212
213213 let Fee = tryGetInteger("static_fee")
214214
215215 let earnedAssets = assetIds
216216
217217 func isShutdown () = {
218218 let shutdownAddress = addressFromString(shutdownAddressStr)
219219 if ((shutdownAddress == unit))
220220 then false
221221 else match getBoolean(value(shutdownAddress), "is_shutdown") {
222222 case x: Boolean =>
223223 x
224224 case _ =>
225225 false
226226 }
227227 }
228228
229229
230230 func getCurrentTokenBalance (tokenNum) = {
231231 let tokenIdStr = getAssetString(assetIds[tokenNum])
232232 tryGetInteger((("global_" + tokenIdStr) + "_balance"))
233233 }
234234
235235
236236 func getKMult () = match getInteger("static_KMult") {
237237 case x: Int =>
238238 x
239239 case _ =>
240240 Scale16
241241 }
242242
243243
244244 func getVirtualPoolTokenAmount () = fraction(tryGetInteger("global_poolToken_amount"), getKMult(), Scale16)
245245
246246
247247 func getPriceFromOracle (assetIdStr) = match getInteger(oracleAddress, (assetIdStr + "_twap5B")) {
248248 case x: Int =>
249249 x
250250 case _ =>
251251 1000000
252252 }
253253
254254
255255 func calculateUsdValue (assetId,amount,aBalance) = {
256256 let assetWeight = tryGetInteger((("static_" + getAssetString(assetId)) + "_weight"))
257257 let feeAssetStr = tryGetString("static_feeToken")
258258 let feeAssetScale = getIntegerValue(this, (("static_" + feeAssetStr) + "_scale"))
259259 let feeAssetNum = value(indexOf(assetIds, getAssetBytes(feeAssetStr)))
260260 let feeAssetWeight = AssetsWeights[feeAssetNum]
261261 let feeAssetBalance = tryGetInteger((("global_" + feeAssetStr) + "_balance"))
262262 let valInFeeAsset = fraction(amount, (feeAssetBalance / feeAssetWeight), (aBalance / assetWeight))
263263 let feeAssetPrice = getPriceFromOracle(feeAssetStr)
264264 fraction(valInFeeAsset, feeAssetPrice, feeAssetScale)
265265 }
266266
267267
268268 func handlePoolTokensRedeem (PRedeemed,userAddress) = {
269269 func handleTokenRedeem (accum,tokenId) = {
270270 let Bk = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance"))
271271 let PSupply = getVirtualPoolTokenAmount()
272272 let tokenDecimals = tryGetInteger((("static_" + getAssetString(tokenId)) + "_scale"))
273273 let psuppl = fraction((toBigInt((PSupply - PRedeemed)) * toBigInt(Scale8)), toBigInt(Scale8), toBigInt(PSupply), DOWN)
274274 let amount = toInt(fraction((toBigInt(Scale16) - psuppl), toBigInt(Bk), toBigInt(Scale16), CEILING))
275275 (accum ++ [IntegerEntry((("global_" + getAssetString(tokenId)) + "_balance"), (Bk - amount)), ScriptTransfer(userAddress, amount, tokenId)])
276276 }
277277
278278 let $l = assetIds
279279 let $s = size($l)
280280 let $acc0 = nil
281281 func $f4_1 ($a,$i) = if (($i >= $s))
282282 then $a
283283 else handleTokenRedeem($a, $l[$i])
284284
285285 func $f4_2 ($a,$i) = if (($i >= $s))
286286 then $a
287287 else throw("List size exceeds 10")
288288
289289 $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)
290290 }
291291
292292
293293 func calculateOutAmount (AmountIn,assetIn,assetOut,BalanceIn,BalanceOut) = {
294294 let IndexIn = value(indexOf(assetIds, assetIn))
295295 let IndexOut = value(indexOf(assetIds, assetOut))
296296 if ((IndexIn == IndexOut))
297297 then AmountIn
298298 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)
299299 }
300300
301301
302302 func calculateCurrentAssetInterest (assetId,assetIdStr,aBalance,tokenEarningsLastCheck) = {
303303 let totalStaked = tryGetInteger("global_indexStaked")
304304 let tokenBalanceLastCheck = tokenEarningsLastCheck
305305 let currentBalanceDelta = (getTokenBalance(assetId) - aBalance)
306306 let currentTokenEarnings = if ((currentBalanceDelta > tokenBalanceLastCheck))
307307 then currentBalanceDelta
308308 else tokenBalanceLastCheck
309309 let newEarnings = (currentTokenEarnings - tokenBalanceLastCheck)
310310 let newInterest = if ((totalStaked == 0))
311311 then 0
312312 else fraction(newEarnings, Scale8, totalStaked)
313313 let lastCheckInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest"))
314314 (lastCheckInterest + newInterest)
315315 }
316316
317317
318318 func claimResult (address) = {
319319 let addressStr = toString(address)
320320 let puzzleAmount = tryGetInteger((addressStr + "_indexStaked"))
321321 func handler (accum,assetId) = {
322322 let assetIdStr = getAssetString(assetId)
323323 let aBalance = tryGetInteger((("global_" + getAssetString(assetId)) + "_balance"))
324324 let tokenEarningsLastCheck = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_earnings"))
325325 let currentTokenInterest = calculateCurrentAssetInterest(assetId, assetIdStr, aBalance, tokenEarningsLastCheck)
326326 let currentTokenEarnings = max([tokenEarningsLastCheck, (getTokenBalance(assetId) - aBalance)])
327327 let rewardAmount = fraction(puzzleAmount, (currentTokenInterest - tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"))), Scale8)
328328 let transfer = if ((rewardAmount == 0))
329329 then nil
330330 else [ScriptTransfer(address, rewardAmount, assetId)]
331331 $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)))
332332 }
333333
334334 let accum = {
335335 let $l = earnedAssets
336336 let $s = size($l)
337337 let $acc0 = $Tuple2(nil, 0)
338338 func $f4_1 ($a,$i) = if (($i >= $s))
339339 then $a
340340 else handler($a, $l[$i])
341341
342342 func $f4_2 ($a,$i) = if (($i >= $s))
343343 then $a
344344 else throw("List size exceeds 10")
345345
346346 $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)
347347 }
348348 $Tuple2((accum._1 ++ [IntegerEntry((addressStr + "_claimedRewardUSD"), (tryGetInteger((addressStr + "_claimedRewardUSD")) + accum._2)), IntegerEntry((addressStr + "_lastClaim"), lastBlock.timestamp)]), accum._2)
349349 }
350350
351351
352352 func indexStakeResult (addressStr,amount) = {
353353 let li = claimResult(addressFromStringValue(addressStr))._1
354354 (li ++ [IntegerEntry((addressStr + "_indexStaked"), (tryGetInteger((addressStr + "_indexStaked")) + amount)), IntegerEntry("global_indexStaked", (tryGetInteger("global_indexStaked") + amount))])
355355 }
356356
357357
358358 func sum (accum,n) = (accum + parseIntValue(n))
359359
360360
361361 func checkFeeAsset (accum,next) = if (if ((indexOf(supportedFeeAssetsStr, next) != unit))
362362 then (accum == "")
363363 else false)
364364 then next
365365 else accum
366366
367367
368368 func getTmpRebalanceIds (newAssetIdsLi) = {
369369 let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",")
370370 let result = newAssetIdsLi
371371 func f (accum,assetId) = if ((indexOf(result, assetId) == unit))
372372 then (accum ++ [assetId])
373373 else accum
374374
375375 let $l = currentAssetIdsLi
376376 let $s = size($l)
377377 let $acc0 = result
378378 func $f4_1 ($a,$i) = if (($i >= $s))
379379 then $a
380380 else f($a, $l[$i])
381381
382382 func $f4_2 ($a,$i) = if (($i >= $s))
383383 then $a
384384 else throw("List size exceeds 10")
385385
386386 $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)
387387 }
388388
389389
390390 func checkTokensChange (newAssetIdsLi) = {
391391 let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",")
392392 func rem (accum,assetId) = if ((indexOf(newAssetIdsLi, assetId) == unit))
393393 then (accum + 1)
394394 else accum
395395
396396 func add (accum,assetId) = if ((indexOf(currentAssetIdsLi, assetId) == unit))
397397 then (accum + 1)
398398 else accum
399399
400400 let removed = {
401401 let $l = currentAssetIdsLi
402402 let $s = size($l)
403403 let $acc0 = 0
404404 func $f4_1 ($a,$i) = if (($i >= $s))
405405 then $a
406406 else rem($a, $l[$i])
407407
408408 func $f4_2 ($a,$i) = if (($i >= $s))
409409 then $a
410410 else throw("List size exceeds 10")
411411
412412 $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)
413413 }
414414 let added = {
415415 let $l = newAssetIdsLi
416416 let $s = size($l)
417417 let $acc0 = 0
418418 func $f5_1 ($a,$i) = if (($i >= $s))
419419 then $a
420420 else add($a, $l[$i])
421421
422422 func $f5_2 ($a,$i) = if (($i >= $s))
423423 then $a
424424 else throw("List size exceeds 10")
425425
426426 $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)
427427 }
428428 (removed + added)
429429 }
430430
431431
432432 func validatePayments (assetsList,payments) = {
433433 func getPaymentAssets (accum,next) = if ((0 >= next.amount))
434434 then throw(((("Too low payment amount for " + getAssetString(next.assetId)) + ": ") + toString(next.amount)))
435435 else (accum ++ [getAssetString(next.assetId)])
436436
437437 let paymentList = {
438438 let $l = payments
439439 let $s = size($l)
440440 let $acc0 = nil
441441 func $f4_1 ($a,$i) = if (($i >= $s))
442442 then $a
443443 else getPaymentAssets($a, $l[$i])
444444
445445 func $f4_2 ($a,$i) = if (($i >= $s))
446446 then $a
447447 else throw("List size exceeds 10")
448448
449449 $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)
450450 }
451451 func f1 (accum,next) = if ((indexOf(assetsList, next) == unit))
452452 then throw(((next + " asset is present in payments, but is not in new assets: ") + makeString(assetsList, ",")))
453453 else (accum + 1)
454454
455455 func f2 (accum,next) = if ((indexOf(paymentList, next) == unit))
456456 then throw(((next + " asset is present in new assets, but is not in payments: ") + makeString(paymentList, ",")))
457457 else (accum + 1)
458458
459459 let a1 = {
460460 let $l = paymentList
461461 let $s = size($l)
462462 let $acc0 = 0
463463 func $f5_1 ($a,$i) = if (($i >= $s))
464464 then $a
465465 else f1($a, $l[$i])
466466
467467 func $f5_2 ($a,$i) = if (($i >= $s))
468468 then $a
469469 else throw("List size exceeds 10")
470470
471471 $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)
472472 }
473473 let a2 = {
474474 let $l = assetsList
475475 let $s = size($l)
476476 let $acc0 = 0
477477 func $f6_1 ($a,$i) = if (($i >= $s))
478478 then $a
479479 else f2($a, $l[$i])
480480
481481 func $f6_2 ($a,$i) = if (($i >= $s))
482482 then $a
483483 else throw("List size exceeds 10")
484484
485485 $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)
486486 }
487487 (a1 + a2)
488488 }
489489
490490
491491 func swapInternal (assetIn,assetOut,amountIn,minimum,receipientAddressStr) = {
492492 let AmountIn = amountIn
493493 let AssetIn = getAssetBytes(assetIn)
494494 let AssetOut = getAssetBytes(assetOut)
495495 let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale")))
496496 let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale")))
497497 let feeAssetOutStr = tryGetString("static_feeToken")
498498 let feeAssetOut = if ((feeAssetOutStr == ""))
499499 then wavesAssetId
500500 else getAssetBytes(feeAssetOutStr)
501501 let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance"))
502502 let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance"))
503503 let AssetInBalanceScaled = (AssetInBalance * scaleIn)
504504 let AssetOutBalanceScaled = (AssetOutBalance * scaleOut)
505505 let feeAmountIn = fraction(AmountIn, Fee, FeeScale)
506506 let cleanAmountIn = (AmountIn - feeAmountIn)
507507 let cleanAmountInScaled = (cleanAmountIn * scaleIn)
508508 let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled)
509509 let AmountOut = fraction(AmountOut1, 1, scaleOut)
510510 let AssetOutBalance2 = (AssetOutBalance - AmountOut)
511511 let AssetInBalance2 = (AssetInBalance + cleanAmountIn)
512512 let feeAssetOutBalance = if ((feeAssetOut == AssetIn))
513513 then AssetInBalance2
514514 else if ((feeAssetOut == AssetOut))
515515 then AssetOutBalance2
516516 else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance"))
517517 let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance)
518518 if ((minimum > AmountOut))
519519 then throw("amount to recieve is lower than given one")
520520 else if ((AssetOut == AssetIn))
521521 then throw("this swap is not allowed")
522522 else if ((0 > (AssetOutBalance - AmountOut)))
523523 then throw("contract is out of reserves")
524524 else if (isShutdown())
525525 then throw("contract is on stop")
526526 else {
527527 let creatorFee = fraction(feeAmountOut, 1, 10)
528528 let protocolFee = fraction(feeAmountOut, 4, 10)
529529 let newBalanceIn = AssetInBalance2
530530 let newBalanceOut = (AssetOutBalance2 - (if ((AssetOut == feeAssetOut))
531531 then feeAmountOut
532532 else 0))
533533 let newBalanceFeeAsset = if (if ((feeAssetOut != AssetIn))
534534 then (feeAssetOut != AssetOut)
535535 else false)
536536 then (feeAssetOutBalance - feeAmountOut)
537537 else unit
538538 let assetInChange = IntegerEntry((("global_" + getAssetString(AssetIn)) + "_balance"), newBalanceIn)
539539 let assetOutChange = IntegerEntry((("global_" + assetOut) + "_balance"), newBalanceOut)
540540 let feeAssetOutChange = if ((newBalanceFeeAsset != unit))
541541 then IntegerEntry((("global_" + getAssetString(feeAssetOut)) + "_balance"), value(newBalanceFeeAsset))
542542 else StringEntry("hello", "world")
543543 let volumeUsdUpdate = calculateUsdValue(AssetIn, AmountIn, AssetInBalance)
544544 $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)
545545 }
546546 }
547547
548548
549549 @Callable(i)
550550 func deInit () = if (isShutdown())
551551 then throw("contract is on stop")
552552 else if ((i.caller != this))
553553 then throw("admin only")
554554 else [IntegerEntry("global_wasInited", 0)]
555555
556556
557557
558558 @Callable(i)
559559 func initPool (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = {
560560 func calculatePoolTokensAmount (payments) = {
561561 func handler (accum,pmt) = {
562562 let assetId = pmt.assetId
563563 func handler2 (accum,n) = if ((n == assetId))
564564 then value(indexOf(assetIds, n))
565565 else accum
566566
567567 let Token = {
568568 let $l = assetIds
569569 let $s = size($l)
570570 let $acc0 = 1
571571 func $f4_1 ($a,$i) = if (($i >= $s))
572572 then $a
573573 else handler2($a, $l[$i])
574574
575575 func $f4_2 ($a,$i) = if (($i >= $s))
576576 then $a
577577 else throw("List size exceeds 10")
578578
579579 $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)
580580 }
581581 fraction(accum, pow(pmt.amount, Decimals[Token], AssetsWeights[Token], AssetsWeightsDecimals, 8, FLOOR), Scale8)
582582 }
583583
584584 let $l = payments
585585 let $s = size($l)
586586 let $acc0 = PoolTokenScale
587587 func $f4_1 ($a,$i) = if (($i >= $s))
588588 then $a
589589 else handler($a, $l[$i])
590590
591591 func $f4_2 ($a,$i) = if (($i >= $s))
592592 then $a
593593 else throw("List size exceeds 10")
594594
595595 $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)
596596 }
597597
598598 let meme = Issue(tokenName, tokenDesc, tokenQuantity, 8, false)
599599 let memeId = calculateAssetId(meme)
600600 let memeIdStr = getAssetString(memeId)
601601 let assetWeightsStr = "5000,5000"
602602 let baseTokenIdStr = "WAVES"
603603 let poolOwnerAddress = Address(fromBase58String(poolOwner))
604604 let assetIdsStr = ("WAVES," + memeIdStr)
605605 let assetIdsStrLi = split(assetIdsStr, ",")
606606 let assetIdsLi = {
607607 let $l = assetIdsStrLi
608608 let $s = size($l)
609609 let $acc0 = nil
610610 func $f4_1 ($a,$i) = if (($i >= $s))
611611 then $a
612612 else addAssetBytesToList($a, $l[$i])
613613
614614 func $f4_2 ($a,$i) = if (($i >= $s))
615615 then $a
616616 else throw("List size exceeds 10")
617617
618618 $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)
619619 }
620620 let fee = 100
621621 let feeAssetStr = {
622622 let $l = assetIdsStrLi
623623 let $s = size($l)
624624 let $acc0 = ""
625625 func $f5_1 ($a,$i) = if (($i >= $s))
626626 then $a
627627 else checkFeeAsset($a, $l[$i])
628628
629629 func $f5_2 ($a,$i) = if (($i >= $s))
630630 then $a
631631 else throw("List size exceeds 10")
632632
633633 $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)
634634 }
635635 let pmt = i.payments[0]
636636 let amount = pmt.amount
637637 let pmtAsset = if ((pmt.assetId == unit))
638638 then "WAVES"
639639 else throw("you have to attach some WAVES")
640640 if ((this != this))
641641 then throw("admin only")
642642 else if ((feeAssetStr == ""))
643643 then throw("pool must have one of the supported fee assets in the composition")
644644 else if ((size(poolDomain) > 13))
645645 then throw("too large pool domain")
646646 else if (if ((fee > 500))
647647 then true
648648 else (0 > fee))
649649 then throw("fee value must be between 50 and 500 (0.5-5%)")
650650 else if (isShutdown())
651651 then throw("contract is on stop")
652652 else {
653653 let assetWeightsStrLi = split(assetWeightsStr, ",")
654654 let assetWeightsSum = {
655655 let $l = assetWeightsStrLi
656656 let $s = size($l)
657657 let $acc0 = 0
658658 func $f6_1 ($a,$i) = if (($i >= $s))
659659 then $a
660660 else sum($a, $l[$i])
661661
662662 func $f6_2 ($a,$i) = if (($i >= $s))
663663 then $a
664664 else throw("List size exceeds 10")
665665
666666 $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)
667667 }
668668 func addTokenDataEntries (accum,assetNum) = if ((assetNum >= size(assetIdsLi)))
669669 then accum
670670 else {
671671 let assetDecimals = 8
672672 (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])))])
673673 }
674674
675675 let initialPoolTokens = calculatePoolTokensAmount(i.payments)
676676 if ((assetWeightsSum != 10000))
677677 then throw("sum of token weights must be equal to 10000")
678678 else if ((initialPoolTokens == 0))
679679 then throw("you need a bigger tokens amount to launch the pool")
680680 else {
681681 let poolTokenIssue = Issue(("PZ " + poolDomain), "Puzzle Swap: pool index token", initialPoolTokens, PoolTokenDecimals, true, unit, 0)
682682 let poolTokenId = calculateAssetId(poolTokenIssue)
683683 $Tuple2(((({
684684 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
685685 let $s = size($l)
686686 let $acc0 = nil
687687 func $f7_1 ($a,$i) = if (($i >= $s))
688688 then $a
689689 else addTokenDataEntries($a, $l[$i])
690690
691691 func $f7_2 ($a,$i) = if (($i >= $s))
692692 then $a
693693 else throw("List size exceeds 10")
694694
695695 $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)
696696 } ++ [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)
697697 }
698698 }
699699 }
700700
701701
702702
703703 @Callable(i)
704-func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((this != factoryAccount))
704+func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((i.caller != factoryAccount))
705705 then throw("admin only")
706706 else {
707707 let inv1 = invoke(this, "initPool", [poolDomain, poolOwner, tokenName, tokenDesc, tokenQuantity], nil)
708708 if ((inv1 == inv1))
709709 then {
710710 let memeIdStr = {
711711 let @ = inv1
712712 if ($isInstanceOf(@, "String"))
713713 then @
714714 else throw(($getType(@) + " couldn't be cast to String"))
715715 }
716716 swapInternal("WAVES", memeIdStr, (i.payments[0].amount - InitalWavesLiquidity), 0, toString(i.caller))._1
717717 }
718718 else throw("Strict value is not equal to itself.")
719719 }
720720
721721
722722
723723 @Callable(i)
724724 func redeemIndex (sendToOrigin) = {
725725 let pmt = i.payments[0]
726726 if ((pmt.assetId != tryGetBinary("global_poolToken_id")))
727727 then throw("please attach pool share token")
728728 else if (isShutdown())
729729 then throw("contract is on stop")
730730 else {
731731 let PRedeemedWithMult = pmt.amount
732732 let PRedeemedWithNoMult = fraction(PRedeemedWithMult, getKMult(), Scale16, DOWN)
733733 let result = handlePoolTokensRedeem(PRedeemedWithNoMult, if (sendToOrigin)
734734 then i.originCaller
735735 else i.caller)
736736 (result ++ [Burn(tryGetBinary("global_poolToken_id"), PRedeemedWithMult), IntegerEntry("global_poolToken_amount", (tryGetInteger("global_poolToken_amount") - PRedeemedWithMult))])
737737 }
738738 }
739739
740740
741741
742742 @Callable(i)
743743 func stakeIndex () = {
744744 let addressStr = toString(i.originCaller)
745745 let pmt = i.payments[0]
746746 if ((value(pmt.assetId) != tryGetBinary("global_poolToken_id")))
747747 then throw("wrong asset attached")
748748 else indexStakeResult(addressStr, pmt.amount)
749749 }
750750
751751
752752
753753 @Callable(i)
754754 func stakeIndexFor (addressStr) = {
755755 let pmt = i.payments[0]
756756 if ((value(pmt.assetId) != tryGetBinary("global_poolToken_id")))
757757 then throw("wrong asset attached")
758758 else indexStakeResult(addressStr, pmt.amount)
759759 }
760760
761761
762762
763763 @Callable(i)
764764 func unstakeIndex (indexAmount) = {
765765 let addressStr = if ((indexOf(layer2Addresses, toString(i.caller)) != unit))
766766 then toString(i.originCaller)
767767 else toString(i.caller)
768768 let indexAvailable = tryGetInteger((addressStr + "_indexStaked"))
769769 if (isShutdown())
770770 then throw("contract is on stop")
771771 else if ((indexAmount > indexAvailable))
772772 then throw("you don't have index tokens available")
773773 else if (isShutdown())
774774 then throw("contract is on stop")
775775 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"))])
776776 }
777777
778778
779779
780780 @Callable(i)
781781 func claimIndexRewards () = if (isShutdown())
782782 then throw("contract is on stop")
783783 else claimResult(i.caller)
784784
785785
786786
787787 @Callable(i)
788788 func evaluateClaim (user) = $Tuple2(nil, claimResult(addressFromStringValue(user))._2)
789789
790790
791791
792792 @Callable(i)
793793 func swap (assetOut,minimum) = {
794794 let pmt = if ((size(i.payments) == 1))
795795 then value(i.payments[0])
796796 else throw("please attach exactly one payment")
797797 let AmountIn = value(i.payments[0].amount)
798798 let AssetIn = i.payments[0].assetId
799799 swapInternal(getAssetString(AssetIn), assetOut, AmountIn, minimum, toString(i.caller))
800800 }
801801
802802
803803
804804 @Callable(i)
805805 func swapReadOnly (assetIn,assetOut,AmountIn) = {
806806 let AssetIn = getAssetBytes(assetIn)
807807 let AssetOut = getAssetBytes(assetOut)
808808 let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale")))
809809 let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale")))
810810 let feeAssetOutStr = tryGetString("static_feeToken")
811811 let feeAssetOut = if ((feeAssetOutStr == ""))
812812 then usdnAssetId
813813 else getAssetBytes(feeAssetOutStr)
814814 let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance"))
815815 let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance"))
816816 let AssetInBalanceScaled = (AssetInBalance * scaleIn)
817817 let AssetOutBalanceScaled = (AssetOutBalance * scaleOut)
818818 let feeAmountIn = fraction(AmountIn, Fee, FeeScale)
819819 let cleanAmountIn = (AmountIn - feeAmountIn)
820820 let cleanAmountInScaled = (cleanAmountIn * scaleIn)
821821 let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled)
822822 let AmountOut = fraction(AmountOut1, 1, scaleOut)
823823 let AssetOutBalance2 = (AssetOutBalance - AmountOut)
824824 let AssetInBalance2 = (AssetInBalance + cleanAmountIn)
825825 let feeAssetOutBalance = if ((feeAssetOut == AssetIn))
826826 then AssetInBalance2
827827 else if ((feeAssetOut == AssetOut))
828828 then AssetOutBalance2
829829 else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance"))
830830 let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance)
831831 if ((AssetOut == AssetIn))
832832 then throw("this swap is not allowed")
833833 else if ((0 > (AssetOutBalance - AmountOut)))
834834 then throw("contract is out of reserves")
835835 else if (isShutdown())
836836 then throw("contract is on stop")
837837 else $Tuple2(nil, AmountOut)
838838 }
839839
840840
841841
842842 @Callable(i)
843843 func transferOwnership (newOwnerAddress) = if ((toString(i.caller) != tryGetString("static_poolOwner")))
844844 then throw("this call available only for pool owner")
845845 else [StringEntry("static_poolOwner", newOwnerAddress)]
846846
847847

github/deemru/w8io/169f3d6 
100.83 ms