tx · CDXvADv3kUngJyDT8DMhMZDkSF19t8tkLA29sEdJhC6r

3NByubtNDUK9QoGKEBZ1D6Ta2JrEYY6PFoH:  -0.02100000 Waves

2024.10.14 17:29 [3326622] smart account 3NByubtNDUK9QoGKEBZ1D6Ta2JrEYY6PFoH > SELF 0.00000000 Waves

{ "type": 13, "id": "CDXvADv3kUngJyDT8DMhMZDkSF19t8tkLA29sEdJhC6r", "fee": 2100000, "feeAssetId": null, "timestamp": 1728916226971, "version": 2, "chainId": 84, "sender": "3NByubtNDUK9QoGKEBZ1D6Ta2JrEYY6PFoH", "senderPublicKey": "2utLYjNqrLZkZMyUQgDJnD23EKeqw3xkVAdtjuoYRdfg", "proofs": [ "65g5uhWSaAKciwtq5NQ7oJpaK5Ze11TQSBFu3pyDPAZ94XG8xacCsGQd1uJJXLZ7uzDmeiWdnRdjBYjMWivaeWrf" ], "script": "base64:BgItCAISBwoFCAgICAESBwoFCAgICAESABIDCgEIEgQKAggBEgUKAwgIARIDCgEIRwAHVkVSU0lPTgIIUE0tMC43LjAACWNvbmZpZ1N0cgkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzAg1jb25maWdBZGRyZXNzAiMzTjkxZTd3SGlWN1FhZERzeDNSVUpReHgxZXRxY0FLcmZIagAOQ09ORklHX0FERFJFU1MDCQAAAgUJY29uZmlnU3RyAgAFBHRoaXMJAQdBZGRyZXNzAQkA2QQBBQljb25maWdTdHIAFUFzc2V0c1dlaWdodHNEZWNpbWFscwAEAAVTY2FsZQCQTgAGU2NhbGU4AIDC1y8AB1NjYWxlMTYAgICE/qbe4REACEZlZVNjYWxlAJBOABFQb29sVG9rZW5EZWNpbWFscwAIAA5Qb29sVG9rZW5TY2FsZQkAbAYACgAABRFQb29sVG9rZW5EZWNpbWFscwAAAAAFBkhBTEZVUAAQTUlOX1NURVBTX0FNT1VOVAkBC3ZhbHVlT3JFbHNlAgkAmggCBQ5DT05GSUdfQUREUkVTUwIQbWluX3N0ZXBzX2Ftb3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gFAWkGY2FsbGVyCQEMdHJ5R2V0U3RyaW5nAQIQc3RhdGljX3Bvb2xPd25lcgkAAgECJ3RoaXMgY2FsbCBhdmFpbGFibGUgb25seSBmb3IgcG9vbCBvd25lcgkAzAgCCQELU3RyaW5nRW50cnkCAhBzdGF0aWNfcG9vbE93bmVyBQ9uZXdPd25lckFkZHJlc3MFA25pbAAV4HGf", "height": 3326622, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AJW4vqSQcMVRsLdzgYKNrntskX2saFtnMUVDoVSbcXp7 Next: DTmuBiV93EvgGKeeymD7KwapemnwE75rAtqXr3pekYVp Diff:
OldNewDifferences
216216
217217 func getPoolStatus () = {
218218 let poolId = valueOrElse(getString(factoryAccount, ("pool__" + toString(this))), "")
219- let status = valueOrElse(getInteger(factoryAccount, ("pool__" + poolId)), 2)
219+ let status = valueOrElse(getInteger(factoryAccount, ("pool__status__" + poolId)), 2)
220220 status
221221 }
222222
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VERSION = "PM-0.7.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 MIN_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_amount"), 1)
2727
2828 let MAX_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_amount"), 500)
2929
3030 let MIN_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_interval"), 1)
3131
3232 let MAX_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_interval"), 10000)
3333
3434 let MIN_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_weight"), 100)
3535
3636 let MAX_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_weight"), 9900)
3737
3838 func tryGetInteger (key) = match getInteger(this, key) {
3939 case b: Int =>
4040 b
4141 case _ =>
4242 0
4343 }
4444
4545
4646 func tryGetBinary (key) = match getBinary(this, key) {
4747 case b: ByteVector =>
4848 b
4949 case _ =>
5050 base58''
5151 }
5252
5353
5454 func tryGetString (key) = match getString(this, key) {
5555 case b: String =>
5656 b
5757 case _ =>
5858 ""
5959 }
6060
6161
6262 func tryGetStringOrThrow (key) = match getString(this, key) {
6363 case b: String =>
6464 b
6565 case _ =>
6666 throw(("no such key in data storage: " + key))
6767 }
6868
6969
7070 func getAssetString (assetId) = match assetId {
7171 case b: ByteVector =>
7272 toBase58String(b)
7373 case _ =>
7474 "WAVES"
7575 }
7676
7777
7878 func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
7979 then unit
8080 else fromBase58String(assetIdStr)
8181
8282
8383 func getTokenBalance (assetId) = match assetId {
8484 case t: ByteVector =>
8585 assetBalance(this, t)
8686 case _ =>
8787 wavesBalance(this).available
8888 }
8989
9090
9191 func addAssetBytesToList (accum,item) = (accum ++ [getAssetBytes(item)])
9292
9393
9494 func addAssetWeightToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_weight"))])
9595
9696
9797 func addAssetWeightToStrList (accum,item) = (accum ++ [toString(tryGetInteger((("static_" + item) + "_weight")))])
9898
9999
100100 func addAssetDecimalsToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_decimals"))])
101101
102102
103103 func addAssetScaleToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_scale"))])
104104
105105
106106 func addIntToList (accum,item) = (accum ++ [parseIntValue(item)])
107107
108108
109109 let usdnAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdnAssetIdStr"), "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p")
110110
111111 let puzzleAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "puzzleAssetIdStr"), "HEB8Qaw9xrWpWs8tHsiATYGBWDBtP2S7kcPALrMu43AS")
112112
113113 let usdtAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtAssetIdStr"), "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ")
114114
115115 let usdtPptAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtPptAssetIdStr"), "9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi")
116116
117117 let romeAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "romeAssetIdStr"), "AP4Cb5xLYGH6ZigHreCZHoXpQTWDkPsG2BHqfDUx6taJ")
118118
119119 let wavesAssetIdStr = "WAVES"
120120
121121 let usdnAssetId = fromBase58String(usdnAssetIdStr)
122122
123123 let puzzleAssetId = fromBase58String(puzzleAssetIdStr)
124124
125125 let usdtAssetId = fromBase58String(usdtAssetIdStr)
126126
127127 let usdtPptAssetId = fromBase58String(usdtPptAssetIdStr)
128128
129129 let romeAssetId = fromBase58String(romeAssetIdStr)
130130
131131 let wavesAssetId = unit
132132
133133 let supportedFeeAssetsStr = [usdnAssetIdStr, puzzleAssetIdStr, usdtAssetIdStr, usdtPptAssetIdStr, wavesAssetIdStr, romeAssetIdStr]
134134
135135 let oracleAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "oracleAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
136136
137137 let feesAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "feesAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
138138
139139 let shutdownAddressStr = valueOrElse(getString(CONFIG_ADDRESS, "shutdownAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
140140
141141 let layer2Addresses = valueOrElse(getString(CONFIG_ADDRESS, "layer2Addresses"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
142142
143143 let coldMasterAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "coldMasterAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
144144
145145 let calculatorAccount = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "factoryAddress"), "3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr")))
146146
147147 let factoryAccount = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "factoryAddress"), "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T")))
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 getPoolStatus () = {
218218 let poolId = valueOrElse(getString(factoryAccount, ("pool__" + toString(this))), "")
219- let status = valueOrElse(getInteger(factoryAccount, ("pool__" + poolId)), 2)
219+ let status = valueOrElse(getInteger(factoryAccount, ("pool__status__" + poolId)), 2)
220220 status
221221 }
222222
223223
224224 func getSetting (key) = getIntegerValue(factoryAccount, ("setup__" + key))
225225
226226
227227 let InitalWavesLiquidity = getSetting("virtualLiquidity")
228228
229229 let CreationFee = getSetting("creationFee")
230230
231231 let CurveTarget = getSetting("curveTarget")
232232
233233 func isShutdown () = {
234234 let shutdownAddress = addressFromString(shutdownAddressStr)
235235 if ((shutdownAddress == unit))
236236 then false
237237 else match getBoolean(value(shutdownAddress), "is_shutdown") {
238238 case x: Boolean =>
239239 x
240240 case _ =>
241241 false
242242 }
243243 }
244244
245245
246246 func getPriceFromOracle (assetIdStr) = match getInteger(oracleAddress, (assetIdStr + "_twap5B")) {
247247 case x: Int =>
248248 x
249249 case _ =>
250250 1000000
251251 }
252252
253253
254254 func calculateUsdValue (assetId,amount,aBalance) = {
255255 let assetWeight = tryGetInteger((("static_" + getAssetString(assetId)) + "_weight"))
256256 let feeAssetStr = tryGetString("static_feeToken")
257257 let feeAssetScale = getIntegerValue(this, (("static_" + feeAssetStr) + "_scale"))
258258 let feeAssetNum = value(indexOf(assetIds, getAssetBytes(feeAssetStr)))
259259 let feeAssetWeight = AssetsWeights[feeAssetNum]
260260 let feeAssetBalance = tryGetInteger((("global_" + feeAssetStr) + "_balance"))
261261 let valInFeeAsset = fraction(amount, (feeAssetBalance / feeAssetWeight), (aBalance / assetWeight))
262262 let feeAssetPrice = getPriceFromOracle(feeAssetStr)
263263 fraction(valInFeeAsset, feeAssetPrice, feeAssetScale)
264264 }
265265
266266
267267 func calculateOutAmount (AmountIn,assetIn,assetOut,BalanceIn,BalanceOut) = {
268268 let IndexIn = value(indexOf(assetIds, assetIn))
269269 let IndexOut = value(indexOf(assetIds, assetOut))
270270 if ((IndexIn == IndexOut))
271271 then AmountIn
272272 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)
273273 }
274274
275275
276276 func calculateCurrentAssetInterest (assetId,assetIdStr,aBalance,tokenEarningsLastCheck) = {
277277 let totalStaked = tryGetInteger("global_indexStaked")
278278 let tokenBalanceLastCheck = tokenEarningsLastCheck
279279 let currentBalanceDelta = (getTokenBalance(assetId) - aBalance)
280280 let currentTokenEarnings = if ((currentBalanceDelta > tokenBalanceLastCheck))
281281 then currentBalanceDelta
282282 else tokenBalanceLastCheck
283283 let newEarnings = (currentTokenEarnings - tokenBalanceLastCheck)
284284 let newInterest = if ((totalStaked == 0))
285285 then 0
286286 else fraction(newEarnings, Scale8, totalStaked)
287287 let lastCheckInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest"))
288288 (lastCheckInterest + newInterest)
289289 }
290290
291291
292292 func claimResult (address) = {
293293 let addressStr = toString(address)
294294 let puzzleAmount = tryGetInteger((addressStr + "_indexStaked"))
295295 func handler (accum,assetId) = {
296296 let assetIdStr = getAssetString(assetId)
297297 let aBalance = tryGetInteger((("global_" + getAssetString(assetId)) + "_balance"))
298298 let tokenEarningsLastCheck = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_earnings"))
299299 let currentTokenInterest = calculateCurrentAssetInterest(assetId, assetIdStr, aBalance, tokenEarningsLastCheck)
300300 let currentTokenEarnings = max([tokenEarningsLastCheck, (getTokenBalance(assetId) - aBalance)])
301301 let rewardAmount = fraction(puzzleAmount, (currentTokenInterest - tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"))), Scale8)
302302 let transfer = if ((rewardAmount == 0))
303303 then nil
304304 else [ScriptTransfer(address, rewardAmount, assetId)]
305305 $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)))
306306 }
307307
308308 let accum = {
309309 let $l = earnedAssets
310310 let $s = size($l)
311311 let $acc0 = $Tuple2(nil, 0)
312312 func $f4_1 ($a,$i) = if (($i >= $s))
313313 then $a
314314 else handler($a, $l[$i])
315315
316316 func $f4_2 ($a,$i) = if (($i >= $s))
317317 then $a
318318 else throw("List size exceeds 10")
319319
320320 $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)
321321 }
322322 $Tuple2((accum._1 ++ [IntegerEntry((addressStr + "_claimedRewardUSD"), (tryGetInteger((addressStr + "_claimedRewardUSD")) + accum._2)), IntegerEntry((addressStr + "_lastClaim"), lastBlock.timestamp)]), accum._2)
323323 }
324324
325325
326326 func sum (accum,n) = (accum + parseIntValue(n))
327327
328328
329329 func checkFeeAsset (accum,next) = if (if ((indexOf(supportedFeeAssetsStr, next) != unit))
330330 then (accum == "")
331331 else false)
332332 then next
333333 else accum
334334
335335
336336 func swapInternal (assetIn,assetOut,amountIn,minimum,receipientAddressStr) = {
337337 let AmountIn = amountIn
338338 let AssetIn = getAssetBytes(assetIn)
339339 let AssetOut = getAssetBytes(assetOut)
340340 let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale")))
341341 let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale")))
342342 let feeAssetOutStr = tryGetString("static_feeToken")
343343 let feeAssetOut = if ((feeAssetOutStr == ""))
344344 then wavesAssetId
345345 else getAssetBytes(feeAssetOutStr)
346346 let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance"))
347347 let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance"))
348348 let AssetInBalanceScaled = (AssetInBalance * scaleIn)
349349 let AssetOutBalanceScaled = (AssetOutBalance * scaleOut)
350350 let feeAmountIn = fraction(AmountIn, Fee, FeeScale)
351351 let cleanAmountIn = (AmountIn - feeAmountIn)
352352 let cleanAmountInScaled = (cleanAmountIn * scaleIn)
353353 let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled)
354354 let AmountOut = fraction(AmountOut1, 1, scaleOut)
355355 let AssetOutBalance2 = (AssetOutBalance - AmountOut)
356356 let AssetInBalance2 = (AssetInBalance + cleanAmountIn)
357357 let feeAssetOutBalance = if ((feeAssetOut == AssetIn))
358358 then AssetInBalance2
359359 else if ((feeAssetOut == AssetOut))
360360 then AssetOutBalance2
361361 else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance"))
362362 let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance)
363363 if ((minimum > AmountOut))
364364 then throw("amount to recieve is lower than given one")
365365 else if ((AssetOut == AssetIn))
366366 then throw("this swap is not allowed")
367367 else if ((0 > (AssetOutBalance - AmountOut)))
368368 then throw("contract is out of reserves")
369369 else if (isShutdown())
370370 then throw("contract is on stop")
371371 else {
372372 let creatorFee = fraction(feeAmountOut, 1, 10)
373373 let protocolFee = fraction(feeAmountOut, 4, 10)
374374 let newBalanceIn = AssetInBalance2
375375 let newBalanceOut = (AssetOutBalance2 - (if ((AssetOut == feeAssetOut))
376376 then feeAmountOut
377377 else 0))
378378 let newBalanceFeeAsset = if (if ((feeAssetOut != AssetIn))
379379 then (feeAssetOut != AssetOut)
380380 else false)
381381 then (feeAssetOutBalance - feeAmountOut)
382382 else unit
383383 let assetInChange = IntegerEntry((("global_" + getAssetString(AssetIn)) + "_balance"), newBalanceIn)
384384 let assetOutChange = IntegerEntry((("global_" + assetOut) + "_balance"), newBalanceOut)
385385 let feeAssetOutChange = if ((newBalanceFeeAsset != unit))
386386 then IntegerEntry((("global_" + getAssetString(feeAssetOut)) + "_balance"), value(newBalanceFeeAsset))
387387 else StringEntry("hello", "world")
388388 let volumeUsdUpdate = calculateUsdValue(AssetIn, AmountIn, AssetInBalance)
389389 $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)
390390 }
391391 }
392392
393393
394394 @Callable(i)
395395 func initPool (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = {
396396 func calculatePoolTokensAmount (payments) = {
397397 func handler (accum,pmt) = {
398398 let assetId = pmt.assetId
399399 func handler2 (accum,n) = if ((n == assetId))
400400 then value(indexOf(assetIds, n))
401401 else accum
402402
403403 let Token = {
404404 let $l = assetIds
405405 let $s = size($l)
406406 let $acc0 = 1
407407 func $f4_1 ($a,$i) = if (($i >= $s))
408408 then $a
409409 else handler2($a, $l[$i])
410410
411411 func $f4_2 ($a,$i) = if (($i >= $s))
412412 then $a
413413 else throw("List size exceeds 10")
414414
415415 $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)
416416 }
417417 fraction(accum, pow(pmt.amount, Decimals[Token], AssetsWeights[Token], AssetsWeightsDecimals, 8, FLOOR), Scale8)
418418 }
419419
420420 let $l = payments
421421 let $s = size($l)
422422 let $acc0 = PoolTokenScale
423423 func $f4_1 ($a,$i) = if (($i >= $s))
424424 then $a
425425 else handler($a, $l[$i])
426426
427427 func $f4_2 ($a,$i) = if (($i >= $s))
428428 then $a
429429 else throw("List size exceeds 10")
430430
431431 $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)
432432 }
433433
434434 let meme = Issue(tokenName, tokenDesc, tokenQuantity, 8, false)
435435 let memeId = calculateAssetId(meme)
436436 let memeIdStr = getAssetString(memeId)
437437 let assetWeightsStr = "5000,5000"
438438 let baseTokenIdStr = "WAVES"
439439 let poolOwnerAddress = Address(fromBase58String(poolOwner))
440440 let assetIdsStr = ("WAVES," + memeIdStr)
441441 let assetIdsStrLi = split(assetIdsStr, ",")
442442 let assetIdsLi = {
443443 let $l = assetIdsStrLi
444444 let $s = size($l)
445445 let $acc0 = nil
446446 func $f4_1 ($a,$i) = if (($i >= $s))
447447 then $a
448448 else addAssetBytesToList($a, $l[$i])
449449
450450 func $f4_2 ($a,$i) = if (($i >= $s))
451451 then $a
452452 else throw("List size exceeds 10")
453453
454454 $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)
455455 }
456456 let fee = 100
457457 let feeAssetStr = {
458458 let $l = assetIdsStrLi
459459 let $s = size($l)
460460 let $acc0 = ""
461461 func $f5_1 ($a,$i) = if (($i >= $s))
462462 then $a
463463 else checkFeeAsset($a, $l[$i])
464464
465465 func $f5_2 ($a,$i) = if (($i >= $s))
466466 then $a
467467 else throw("List size exceeds 10")
468468
469469 $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)
470470 }
471471 let pmt = i.payments[0]
472472 let amount = pmt.amount
473473 let pmtAsset = if ((pmt.assetId == unit))
474474 then "WAVES"
475475 else throw("you have to attach some WAVES")
476476 if ((this != this))
477477 then throw("self-invoke only")
478478 else if ((feeAssetStr == ""))
479479 then throw("pool must have one of the supported fee assets in the composition")
480480 else if ((size(poolDomain) > 13))
481481 then throw("too large pool domain")
482482 else if (if ((fee > 500))
483483 then true
484484 else (0 > fee))
485485 then throw("fee value must be between 50 and 500 (0.5-5%)")
486486 else if (isShutdown())
487487 then throw("contract is on stop")
488488 else {
489489 let assetWeightsStrLi = split(assetWeightsStr, ",")
490490 let assetWeightsSum = {
491491 let $l = assetWeightsStrLi
492492 let $s = size($l)
493493 let $acc0 = 0
494494 func $f6_1 ($a,$i) = if (($i >= $s))
495495 then $a
496496 else sum($a, $l[$i])
497497
498498 func $f6_2 ($a,$i) = if (($i >= $s))
499499 then $a
500500 else throw("List size exceeds 10")
501501
502502 $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)
503503 }
504504 func addTokenDataEntries (accum,assetNum) = if ((assetNum >= size(assetIdsLi)))
505505 then accum
506506 else {
507507 let assetDecimals = 8
508508 (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])))])
509509 }
510510
511511 let initialPoolTokens = calculatePoolTokensAmount(i.payments)
512512 if ((assetWeightsSum != 10000))
513513 then throw("sum of token weights must be equal to 10000")
514514 else if ((initialPoolTokens == 0))
515515 then throw("you need a bigger tokens amount to launch the pool")
516516 else {
517517 let poolTokenIssue = Issue(("PZ " + poolDomain), "Puzzle Swap: pool index token", initialPoolTokens, PoolTokenDecimals, true, unit, 0)
518518 let poolTokenId = calculateAssetId(poolTokenIssue)
519519 $Tuple2(((({
520520 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
521521 let $s = size($l)
522522 let $acc0 = nil
523523 func $f7_1 ($a,$i) = if (($i >= $s))
524524 then $a
525525 else addTokenDataEntries($a, $l[$i])
526526
527527 func $f7_2 ($a,$i) = if (($i >= $s))
528528 then $a
529529 else throw("List size exceeds 10")
530530
531531 $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)
532532 } ++ [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)
533533 }
534534 }
535535 }
536536
537537
538538
539539 @Callable(i)
540540 func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((i.caller != factoryAccount))
541541 then throw("admin only")
542542 else {
543543 let inv1 = invoke(this, "initPool", [poolDomain, poolOwner, tokenName, tokenDesc, tokenQuantity], nil)
544544 if ((inv1 == inv1))
545545 then {
546546 let memeIdStr = {
547547 let @ = inv1
548548 if ($isInstanceOf(@, "String"))
549549 then @
550550 else throw(($getType(@) + " couldn't be cast to String"))
551551 }
552552 swapInternal("WAVES", memeIdStr, (i.payments[0].amount - CreationFee), 0, toString(i.caller))._1
553553 }
554554 else throw("Strict value is not equal to itself.")
555555 }
556556
557557
558558
559559 @Callable(i)
560560 func claimIndexRewards () = if (isShutdown())
561561 then throw("contract is on stop")
562562 else claimResult(i.caller)
563563
564564
565565
566566 @Callable(i)
567567 func evaluateClaim (user) = $Tuple2(nil, claimResult(addressFromStringValue(user))._2)
568568
569569
570570
571571 @Callable(i)
572572 func swap (assetOut,minimum) = {
573573 let status = getPoolStatus()
574574 if ((2 > status))
575575 then {
576576 let pmt = if ((size(i.payments) == 1))
577577 then value(i.payments[0])
578578 else throw("please attach exactly one payment")
579579 let AmountIn = value(i.payments[0].amount)
580580 let AssetIn = i.payments[0].assetId
581581 let res = swapInternal(getAssetString(AssetIn), assetOut, AmountIn, minimum, toString(i.caller))
582582 if ((getIntegerValue("global_WAVES_balance") > CurveTarget))
583583 then {
584584 let notifyInv = invoke(factoryAccount, "notifyStatusUpdate", [2], nil)
585585 if ((notifyInv == notifyInv))
586586 then res
587587 else throw("Strict value is not equal to itself.")
588588 }
589589 else res
590590 }
591591 else throw("pool is stopped: most probably it reached the target liquidity")
592592 }
593593
594594
595595
596596 @Callable(i)
597597 func swapReadOnly (assetIn,assetOut,AmountIn) = {
598598 let AssetIn = getAssetBytes(assetIn)
599599 let AssetOut = getAssetBytes(assetOut)
600600 let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale")))
601601 let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale")))
602602 let feeAssetOutStr = tryGetString("static_feeToken")
603603 let feeAssetOut = if ((feeAssetOutStr == ""))
604604 then usdnAssetId
605605 else getAssetBytes(feeAssetOutStr)
606606 let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance"))
607607 let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance"))
608608 let AssetInBalanceScaled = (AssetInBalance * scaleIn)
609609 let AssetOutBalanceScaled = (AssetOutBalance * scaleOut)
610610 let feeAmountIn = fraction(AmountIn, Fee, FeeScale)
611611 let cleanAmountIn = (AmountIn - feeAmountIn)
612612 let cleanAmountInScaled = (cleanAmountIn * scaleIn)
613613 let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled)
614614 let AmountOut = fraction(AmountOut1, 1, scaleOut)
615615 let AssetOutBalance2 = (AssetOutBalance - AmountOut)
616616 let AssetInBalance2 = (AssetInBalance + cleanAmountIn)
617617 let feeAssetOutBalance = if ((feeAssetOut == AssetIn))
618618 then AssetInBalance2
619619 else if ((feeAssetOut == AssetOut))
620620 then AssetOutBalance2
621621 else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance"))
622622 let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance)
623623 if ((AssetOut == AssetIn))
624624 then throw("this swap is not allowed")
625625 else if ((0 > (AssetOutBalance - AmountOut)))
626626 then throw("contract is out of reserves")
627627 else if (isShutdown())
628628 then throw("contract is on stop")
629629 else $Tuple2(nil, AmountOut)
630630 }
631631
632632
633633
634634 @Callable(i)
635635 func transferOwnership (newOwnerAddress) = if ((toString(i.caller) != tryGetString("static_poolOwner")))
636636 then throw("this call available only for pool owner")
637637 else [StringEntry("static_poolOwner", newOwnerAddress)]
638638
639639

github/deemru/w8io/026f985 
73.68 ms