tx · FekpVVzU1ksVabzXNpWmss297XTrHuSAz7A2dwcDUgnz

3N8CWjTs5UpEzPFzDJaeBk1HoBfqgHHeZha:  -0.03000000 Waves

2024.09.26 18:44 [3300781] smart account 3N8CWjTs5UpEzPFzDJaeBk1HoBfqgHHeZha > SELF 0.00000000 Waves

{ "type": 13, "id": "FekpVVzU1ksVabzXNpWmss297XTrHuSAz7A2dwcDUgnz", "fee": 3000000, "feeAssetId": null, "timestamp": 1727365502107, "version": 2, "chainId": 84, "sender": "3N8CWjTs5UpEzPFzDJaeBk1HoBfqgHHeZha", "senderPublicKey": "G9fBiYjdwgbKSKBBNehAA9qmo89uq3iFPqVUB3qtj4nk", "proofs": [ "3GRjHro9Z2SJnpebRkcV5fiSaaCyZvgvBmWkibeETnnTy6tgxtvAhk15vrRCT6r6icZNjtB3SkkVH6Y9twghHjpK" ], "script": "base64:BgJACAISABIHCgUICAgIARIHCgUICAgIARIDCgEEEgASAwoBCBIDCgEBEgASAwoBCBIECgIIARIFCgMICAESAwoBCEoAB1ZFUlNJT04CCFBNLTAuNC4wAAljb25maWdTdHIJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwINY29uZmlnQWRkcmVzcwIjM045MWU3d0hpVjdRYWREc3gzUlVKUXh4MWV0cWNBS3JmSGoADkNPTkZJR19BRERSRVNTAwkAAAIFCWNvbmZpZ1N0cgIABQR0aGlzCQEHQWRkcmVzcwEJANkEAQUJY29uZmlnU3RyABVBc3NldHNXZWlnaHRzRGVjaW1hbHMABAAFU2NhbGUAkE4ABlNjYWxlOACAwtcvAAdTY2FsZTE2AICAhP6m3uERAAhGZWVTY2FsZQCQTgARUG9vbFRva2VuRGVjaW1hbHMACAAOUG9vbFRva2VuU2NhbGUJAGwGAAoAAAURUG9vbFRva2VuRGVjaW1hbHMAAAAABQZIQUxGVVAAFEluaXRhbFdhdmVzTGlxdWlkaXR5BQZTY2FsZTgAEE1JTl9TVEVQU19BTU9VTlQJAQt2YWx1ZU9yRWxz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UPQXNzZXRPdXRCYWxhbmNlBQlBbW91bnRPdXQED0Fzc2V0SW5CYWxhbmNlMgkAZAIFDkFzc2V0SW5CYWxhbmNlBQ1jbGVhbkFtb3VudEluBBJmZWVBc3NldE91dEJhbGFuY2UDCQAAAgULZmVlQXNzZXRPdXQFB0Fzc2V0SW4FD0Fzc2V0SW5CYWxhbmNlMgMJAAACBQtmZWVBc3NldE91dAUIQXNzZXRPdXQFEEFzc2V0T3V0QmFsYW5jZTIJAQ10cnlHZXRJbnRlZ2VyAQkArAICCQCsAgICB2dsb2JhbF8JAQ5nZXRBc3NldFN0cmluZwEFC2ZlZUFzc2V0T3V0AghfYmFsYW5jZQQMZmVlQW1vdW50T3V0CQESY2FsY3VsYXRlT3V0QW1vdW50BQULZmVlQW1vdW50SW4FB0Fzc2V0SW4FC2ZlZUFzc2V0T3V0BQ5Bc3NldEluQmFsYW5jZQUSZmVlQXNzZXRPdXRCYWxhbmNlAwkAAAIFCEFzc2V0T3V0BQdBc3NldEluCQACAQIYdGhpcyBzd2FwIGlzIG5vdCBhbGxvd2VkAwkAZgIAAAkAZQIFD0Fzc2V0T3V0QmFsYW5jZQUJQW1vdW50T3V0CQACAQIbY29udHJhY3QgaXMgb3V0IG9mIHJlc2VydmVzAwkBCmlzU2h1dGRvd24ACQACAQITY29udHJhY3QgaXMgb24gc3RvcAkAlAoCBQNuaWwFCUFtb3VudE91dAFpARF0cmFuc2Zlck93bmVyc2hpcAEPbmV3T3duZXJBZGRyZXNzAwkBAiE9AgkApQgBCAUBaQZjYWxsZXIJAQx0cnlHZXRTdHJpbmcBAhBzdGF0aWNfcG9vbE93bmVyCQACAQIndGhpcyBjYWxsIGF2YWlsYWJsZSBvbmx5IGZvciBwb29sIG93bmVyCQDMCAIJAQtTdHJpbmdFbnRyeQICEHN0YXRpY19wb29sT3duZXIFD25ld093bmVyQWRkcmVzcwUDbmlsALsQLKY=", "height": 3300781, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: h2ZYAWrvTs9UE7Nu7yaxBGEgV2CesNKwLKedmYbMTy2 Next: 3U8aZ6YEksvh7BDKmqyFDNcUnpXQiRjSp4sqhyqmZUkS Diff:
OldNewDifferences
143143 let layer2Addresses = valueOrElse(getString(CONFIG_ADDRESS, "layer2Addresses"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")
144144
145145 let coldMasterAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "coldMasterAddress"), "3N91e7wHiV7QadDsx3RUJQxx1etqcAKrfHj")))
146+
147+let factoryAccount = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "factoryAddress"), "3MvowVxVnqTUZZyRL6i3vkHNGabjmFxkHBr")))
146148
147149 let masterPubKey = fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "masterPubKey"), "4z8CKSYQBKkzx7PBb5uBP1YPa6YAHRNTApW1sQVHT5eU"))
148150
635637 let pmtAsset = if ((pmt.assetId == unit))
636638 then "WAVES"
637639 else throw("you have to attach some WAVES")
638- if ((this != i.caller))
640+ if ((this != this))
639641 then throw("admin only")
640642 else if ((feeAssetStr == ""))
641643 then throw("pool must have one of the supported fee assets in the composition")
699701
700702
701703 @Callable(i)
702-func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if (if ((this != i.caller))
703- then (i.caller != Address(base58'3P9xX849YJXg7C87v82cDyDy5VhKiPJpHo8'))
704- else false)
704+func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((this != 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")))
146+
147+let factoryAccount = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "factoryAddress"), "3MvowVxVnqTUZZyRL6i3vkHNGabjmFxkHBr")))
146148
147149 let masterPubKey = fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "masterPubKey"), "4z8CKSYQBKkzx7PBb5uBP1YPa6YAHRNTApW1sQVHT5eU"))
148150
149151 let T = tryGetInteger("static_tokensAmount")
150152
151153 let assetIds = {
152154 let $l = split(tryGetString("static_tokenIds"), ",")
153155 let $s = size($l)
154156 let $acc0 = nil
155157 func $f0_1 ($a,$i) = if (($i >= $s))
156158 then $a
157159 else addAssetBytesToList($a, $l[$i])
158160
159161 func $f0_2 ($a,$i) = if (($i >= $s))
160162 then $a
161163 else throw("List size exceeds 10")
162164
163165 $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)
164166 }
165167
166168 let AssetsWeights = {
167169 let $l = assetIds
168170 let $s = size($l)
169171 let $acc0 = nil
170172 func $f1_1 ($a,$i) = if (($i >= $s))
171173 then $a
172174 else addAssetWeightToList($a, $l[$i])
173175
174176 func $f1_2 ($a,$i) = if (($i >= $s))
175177 then $a
176178 else throw("List size exceeds 10")
177179
178180 $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)
179181 }
180182
181183 let Decimals = {
182184 let $l = assetIds
183185 let $s = size($l)
184186 let $acc0 = nil
185187 func $f2_1 ($a,$i) = if (($i >= $s))
186188 then $a
187189 else addAssetDecimalsToList($a, $l[$i])
188190
189191 func $f2_2 ($a,$i) = if (($i >= $s))
190192 then $a
191193 else throw("List size exceeds 10")
192194
193195 $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)
194196 }
195197
196198 let Scales = {
197199 let $l = assetIds
198200 let $s = size($l)
199201 let $acc0 = nil
200202 func $f3_1 ($a,$i) = if (($i >= $s))
201203 then $a
202204 else addAssetScaleToList($a, $l[$i])
203205
204206 func $f3_2 ($a,$i) = if (($i >= $s))
205207 then $a
206208 else throw("List size exceeds 10")
207209
208210 $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)
209211 }
210212
211213 let Fee = tryGetInteger("static_fee")
212214
213215 let earnedAssets = assetIds
214216
215217 func isShutdown () = {
216218 let shutdownAddress = addressFromString(shutdownAddressStr)
217219 if ((shutdownAddress == unit))
218220 then false
219221 else match getBoolean(value(shutdownAddress), "is_shutdown") {
220222 case x: Boolean =>
221223 x
222224 case _ =>
223225 false
224226 }
225227 }
226228
227229
228230 func getCurrentTokenBalance (tokenNum) = {
229231 let tokenIdStr = getAssetString(assetIds[tokenNum])
230232 tryGetInteger((("global_" + tokenIdStr) + "_balance"))
231233 }
232234
233235
234236 func getKMult () = match getInteger("static_KMult") {
235237 case x: Int =>
236238 x
237239 case _ =>
238240 Scale16
239241 }
240242
241243
242244 func getVirtualPoolTokenAmount () = fraction(tryGetInteger("global_poolToken_amount"), getKMult(), Scale16)
243245
244246
245247 func getPriceFromOracle (assetIdStr) = match getInteger(oracleAddress, (assetIdStr + "_twap5B")) {
246248 case x: Int =>
247249 x
248250 case _ =>
249251 1000000
250252 }
251253
252254
253255 func calculateUsdValue (assetId,amount,aBalance) = {
254256 let assetWeight = tryGetInteger((("static_" + getAssetString(assetId)) + "_weight"))
255257 let feeAssetStr = tryGetString("static_feeToken")
256258 let feeAssetScale = getIntegerValue(this, (("static_" + feeAssetStr) + "_scale"))
257259 let feeAssetNum = value(indexOf(assetIds, getAssetBytes(feeAssetStr)))
258260 let feeAssetWeight = AssetsWeights[feeAssetNum]
259261 let feeAssetBalance = tryGetInteger((("global_" + feeAssetStr) + "_balance"))
260262 let valInFeeAsset = fraction(amount, (feeAssetBalance / feeAssetWeight), (aBalance / assetWeight))
261263 let feeAssetPrice = getPriceFromOracle(feeAssetStr)
262264 fraction(valInFeeAsset, feeAssetPrice, feeAssetScale)
263265 }
264266
265267
266268 func handlePoolTokensRedeem (PRedeemed,userAddress) = {
267269 func handleTokenRedeem (accum,tokenId) = {
268270 let Bk = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance"))
269271 let PSupply = getVirtualPoolTokenAmount()
270272 let tokenDecimals = tryGetInteger((("static_" + getAssetString(tokenId)) + "_scale"))
271273 let psuppl = fraction((toBigInt((PSupply - PRedeemed)) * toBigInt(Scale8)), toBigInt(Scale8), toBigInt(PSupply), DOWN)
272274 let amount = toInt(fraction((toBigInt(Scale16) - psuppl), toBigInt(Bk), toBigInt(Scale16), CEILING))
273275 (accum ++ [IntegerEntry((("global_" + getAssetString(tokenId)) + "_balance"), (Bk - amount)), ScriptTransfer(userAddress, amount, tokenId)])
274276 }
275277
276278 let $l = assetIds
277279 let $s = size($l)
278280 let $acc0 = nil
279281 func $f4_1 ($a,$i) = if (($i >= $s))
280282 then $a
281283 else handleTokenRedeem($a, $l[$i])
282284
283285 func $f4_2 ($a,$i) = if (($i >= $s))
284286 then $a
285287 else throw("List size exceeds 10")
286288
287289 $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)
288290 }
289291
290292
291293 func calculateOutAmount (AmountIn,assetIn,assetOut,BalanceIn,BalanceOut) = {
292294 let IndexIn = value(indexOf(assetIds, assetIn))
293295 let IndexOut = value(indexOf(assetIds, assetOut))
294296 if ((IndexIn == IndexOut))
295297 then AmountIn
296298 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)
297299 }
298300
299301
300302 func calculateCurrentAssetInterest (assetId,assetIdStr,aBalance,tokenEarningsLastCheck) = {
301303 let totalStaked = tryGetInteger("global_indexStaked")
302304 let tokenBalanceLastCheck = tokenEarningsLastCheck
303305 let currentBalanceDelta = (getTokenBalance(assetId) - aBalance)
304306 let currentTokenEarnings = if ((currentBalanceDelta > tokenBalanceLastCheck))
305307 then currentBalanceDelta
306308 else tokenBalanceLastCheck
307309 let newEarnings = (currentTokenEarnings - tokenBalanceLastCheck)
308310 let newInterest = if ((totalStaked == 0))
309311 then 0
310312 else fraction(newEarnings, Scale8, totalStaked)
311313 let lastCheckInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest"))
312314 (lastCheckInterest + newInterest)
313315 }
314316
315317
316318 func claimResult (address) = {
317319 let addressStr = toString(address)
318320 let puzzleAmount = tryGetInteger((addressStr + "_indexStaked"))
319321 func handler (accum,assetId) = {
320322 let assetIdStr = getAssetString(assetId)
321323 let aBalance = tryGetInteger((("global_" + getAssetString(assetId)) + "_balance"))
322324 let tokenEarningsLastCheck = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_earnings"))
323325 let currentTokenInterest = calculateCurrentAssetInterest(assetId, assetIdStr, aBalance, tokenEarningsLastCheck)
324326 let currentTokenEarnings = max([tokenEarningsLastCheck, (getTokenBalance(assetId) - aBalance)])
325327 let rewardAmount = fraction(puzzleAmount, (currentTokenInterest - tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"))), Scale8)
326328 let transfer = if ((rewardAmount == 0))
327329 then nil
328330 else [ScriptTransfer(address, rewardAmount, assetId)]
329331 $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)))
330332 }
331333
332334 let accum = {
333335 let $l = earnedAssets
334336 let $s = size($l)
335337 let $acc0 = $Tuple2(nil, 0)
336338 func $f4_1 ($a,$i) = if (($i >= $s))
337339 then $a
338340 else handler($a, $l[$i])
339341
340342 func $f4_2 ($a,$i) = if (($i >= $s))
341343 then $a
342344 else throw("List size exceeds 10")
343345
344346 $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)
345347 }
346348 $Tuple2((accum._1 ++ [IntegerEntry((addressStr + "_claimedRewardUSD"), (tryGetInteger((addressStr + "_claimedRewardUSD")) + accum._2)), IntegerEntry((addressStr + "_lastClaim"), lastBlock.timestamp)]), accum._2)
347349 }
348350
349351
350352 func indexStakeResult (addressStr,amount) = {
351353 let li = claimResult(addressFromStringValue(addressStr))._1
352354 (li ++ [IntegerEntry((addressStr + "_indexStaked"), (tryGetInteger((addressStr + "_indexStaked")) + amount)), IntegerEntry("global_indexStaked", (tryGetInteger("global_indexStaked") + amount))])
353355 }
354356
355357
356358 func sum (accum,n) = (accum + parseIntValue(n))
357359
358360
359361 func checkFeeAsset (accum,next) = if (if ((indexOf(supportedFeeAssetsStr, next) != unit))
360362 then (accum == "")
361363 else false)
362364 then next
363365 else accum
364366
365367
366368 func getTmpRebalanceIds (newAssetIdsLi) = {
367369 let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",")
368370 let result = newAssetIdsLi
369371 func f (accum,assetId) = if ((indexOf(result, assetId) == unit))
370372 then (accum ++ [assetId])
371373 else accum
372374
373375 let $l = currentAssetIdsLi
374376 let $s = size($l)
375377 let $acc0 = result
376378 func $f4_1 ($a,$i) = if (($i >= $s))
377379 then $a
378380 else f($a, $l[$i])
379381
380382 func $f4_2 ($a,$i) = if (($i >= $s))
381383 then $a
382384 else throw("List size exceeds 10")
383385
384386 $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)
385387 }
386388
387389
388390 func checkTokensChange (newAssetIdsLi) = {
389391 let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",")
390392 func rem (accum,assetId) = if ((indexOf(newAssetIdsLi, assetId) == unit))
391393 then (accum + 1)
392394 else accum
393395
394396 func add (accum,assetId) = if ((indexOf(currentAssetIdsLi, assetId) == unit))
395397 then (accum + 1)
396398 else accum
397399
398400 let removed = {
399401 let $l = currentAssetIdsLi
400402 let $s = size($l)
401403 let $acc0 = 0
402404 func $f4_1 ($a,$i) = if (($i >= $s))
403405 then $a
404406 else rem($a, $l[$i])
405407
406408 func $f4_2 ($a,$i) = if (($i >= $s))
407409 then $a
408410 else throw("List size exceeds 10")
409411
410412 $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)
411413 }
412414 let added = {
413415 let $l = newAssetIdsLi
414416 let $s = size($l)
415417 let $acc0 = 0
416418 func $f5_1 ($a,$i) = if (($i >= $s))
417419 then $a
418420 else add($a, $l[$i])
419421
420422 func $f5_2 ($a,$i) = if (($i >= $s))
421423 then $a
422424 else throw("List size exceeds 10")
423425
424426 $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)
425427 }
426428 (removed + added)
427429 }
428430
429431
430432 func validatePayments (assetsList,payments) = {
431433 func getPaymentAssets (accum,next) = if ((0 >= next.amount))
432434 then throw(((("Too low payment amount for " + getAssetString(next.assetId)) + ": ") + toString(next.amount)))
433435 else (accum ++ [getAssetString(next.assetId)])
434436
435437 let paymentList = {
436438 let $l = payments
437439 let $s = size($l)
438440 let $acc0 = nil
439441 func $f4_1 ($a,$i) = if (($i >= $s))
440442 then $a
441443 else getPaymentAssets($a, $l[$i])
442444
443445 func $f4_2 ($a,$i) = if (($i >= $s))
444446 then $a
445447 else throw("List size exceeds 10")
446448
447449 $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)
448450 }
449451 func f1 (accum,next) = if ((indexOf(assetsList, next) == unit))
450452 then throw(((next + " asset is present in payments, but is not in new assets: ") + makeString(assetsList, ",")))
451453 else (accum + 1)
452454
453455 func f2 (accum,next) = if ((indexOf(paymentList, next) == unit))
454456 then throw(((next + " asset is present in new assets, but is not in payments: ") + makeString(paymentList, ",")))
455457 else (accum + 1)
456458
457459 let a1 = {
458460 let $l = paymentList
459461 let $s = size($l)
460462 let $acc0 = 0
461463 func $f5_1 ($a,$i) = if (($i >= $s))
462464 then $a
463465 else f1($a, $l[$i])
464466
465467 func $f5_2 ($a,$i) = if (($i >= $s))
466468 then $a
467469 else throw("List size exceeds 10")
468470
469471 $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)
470472 }
471473 let a2 = {
472474 let $l = assetsList
473475 let $s = size($l)
474476 let $acc0 = 0
475477 func $f6_1 ($a,$i) = if (($i >= $s))
476478 then $a
477479 else f2($a, $l[$i])
478480
479481 func $f6_2 ($a,$i) = if (($i >= $s))
480482 then $a
481483 else throw("List size exceeds 10")
482484
483485 $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)
484486 }
485487 (a1 + a2)
486488 }
487489
488490
489491 func swapInternal (assetIn,assetOut,amountIn,minimum,receipientAddressStr) = {
490492 let AmountIn = amountIn
491493 let AssetIn = getAssetBytes(assetIn)
492494 let AssetOut = getAssetBytes(assetOut)
493495 let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale")))
494496 let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale")))
495497 let feeAssetOutStr = tryGetString("static_feeToken")
496498 let feeAssetOut = if ((feeAssetOutStr == ""))
497499 then wavesAssetId
498500 else getAssetBytes(feeAssetOutStr)
499501 let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance"))
500502 let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance"))
501503 let AssetInBalanceScaled = (AssetInBalance * scaleIn)
502504 let AssetOutBalanceScaled = (AssetOutBalance * scaleOut)
503505 let feeAmountIn = fraction(AmountIn, Fee, FeeScale)
504506 let cleanAmountIn = (AmountIn - feeAmountIn)
505507 let cleanAmountInScaled = (cleanAmountIn * scaleIn)
506508 let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled)
507509 let AmountOut = fraction(AmountOut1, 1, scaleOut)
508510 let AssetOutBalance2 = (AssetOutBalance - AmountOut)
509511 let AssetInBalance2 = (AssetInBalance + cleanAmountIn)
510512 let feeAssetOutBalance = if ((feeAssetOut == AssetIn))
511513 then AssetInBalance2
512514 else if ((feeAssetOut == AssetOut))
513515 then AssetOutBalance2
514516 else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance"))
515517 let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance)
516518 if ((minimum > AmountOut))
517519 then throw("amount to recieve is lower than given one")
518520 else if ((AssetOut == AssetIn))
519521 then throw("this swap is not allowed")
520522 else if ((0 > (AssetOutBalance - AmountOut)))
521523 then throw("contract is out of reserves")
522524 else if (isShutdown())
523525 then throw("contract is on stop")
524526 else {
525527 let creatorFee = fraction(feeAmountOut, 1, 10)
526528 let protocolFee = fraction(feeAmountOut, 4, 10)
527529 let newBalanceIn = AssetInBalance2
528530 let newBalanceOut = (AssetOutBalance2 - (if ((AssetOut == feeAssetOut))
529531 then feeAmountOut
530532 else 0))
531533 let newBalanceFeeAsset = if (if ((feeAssetOut != AssetIn))
532534 then (feeAssetOut != AssetOut)
533535 else false)
534536 then (feeAssetOutBalance - feeAmountOut)
535537 else unit
536538 let assetInChange = IntegerEntry((("global_" + getAssetString(AssetIn)) + "_balance"), newBalanceIn)
537539 let assetOutChange = IntegerEntry((("global_" + assetOut) + "_balance"), newBalanceOut)
538540 let feeAssetOutChange = if ((newBalanceFeeAsset != unit))
539541 then IntegerEntry((("global_" + getAssetString(feeAssetOut)) + "_balance"), value(newBalanceFeeAsset))
540542 else StringEntry("hello", "world")
541543 let volumeUsdUpdate = calculateUsdValue(AssetIn, AmountIn, AssetInBalance)
542544 $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)
543545 }
544546 }
545547
546548
547549 @Callable(i)
548550 func deInit () = if (isShutdown())
549551 then throw("contract is on stop")
550552 else if ((i.caller != this))
551553 then throw("admin only")
552554 else [IntegerEntry("global_wasInited", 0)]
553555
554556
555557
556558 @Callable(i)
557559 func initPool (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = {
558560 func calculatePoolTokensAmount (payments) = {
559561 func handler (accum,pmt) = {
560562 let assetId = pmt.assetId
561563 func handler2 (accum,n) = if ((n == assetId))
562564 then value(indexOf(assetIds, n))
563565 else accum
564566
565567 let Token = {
566568 let $l = assetIds
567569 let $s = size($l)
568570 let $acc0 = 1
569571 func $f4_1 ($a,$i) = if (($i >= $s))
570572 then $a
571573 else handler2($a, $l[$i])
572574
573575 func $f4_2 ($a,$i) = if (($i >= $s))
574576 then $a
575577 else throw("List size exceeds 10")
576578
577579 $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)
578580 }
579581 fraction(accum, pow(pmt.amount, Decimals[Token], AssetsWeights[Token], AssetsWeightsDecimals, 8, FLOOR), Scale8)
580582 }
581583
582584 let $l = payments
583585 let $s = size($l)
584586 let $acc0 = PoolTokenScale
585587 func $f4_1 ($a,$i) = if (($i >= $s))
586588 then $a
587589 else handler($a, $l[$i])
588590
589591 func $f4_2 ($a,$i) = if (($i >= $s))
590592 then $a
591593 else throw("List size exceeds 10")
592594
593595 $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)
594596 }
595597
596598 let meme = Issue(tokenName, tokenDesc, tokenQuantity, 8, false)
597599 let memeId = calculateAssetId(meme)
598600 let memeIdStr = getAssetString(memeId)
599601 let assetWeightsStr = "5000,5000"
600602 let baseTokenIdStr = "WAVES"
601603 let poolOwnerAddress = Address(fromBase58String(poolOwner))
602604 let assetIdsStr = ("WAVES," + memeIdStr)
603605 let assetIdsStrLi = split(assetIdsStr, ",")
604606 let assetIdsLi = {
605607 let $l = assetIdsStrLi
606608 let $s = size($l)
607609 let $acc0 = nil
608610 func $f4_1 ($a,$i) = if (($i >= $s))
609611 then $a
610612 else addAssetBytesToList($a, $l[$i])
611613
612614 func $f4_2 ($a,$i) = if (($i >= $s))
613615 then $a
614616 else throw("List size exceeds 10")
615617
616618 $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)
617619 }
618620 let fee = 100
619621 let feeAssetStr = {
620622 let $l = assetIdsStrLi
621623 let $s = size($l)
622624 let $acc0 = ""
623625 func $f5_1 ($a,$i) = if (($i >= $s))
624626 then $a
625627 else checkFeeAsset($a, $l[$i])
626628
627629 func $f5_2 ($a,$i) = if (($i >= $s))
628630 then $a
629631 else throw("List size exceeds 10")
630632
631633 $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)
632634 }
633635 let pmt = i.payments[0]
634636 let amount = pmt.amount
635637 let pmtAsset = if ((pmt.assetId == unit))
636638 then "WAVES"
637639 else throw("you have to attach some WAVES")
638- if ((this != i.caller))
640+ if ((this != this))
639641 then throw("admin only")
640642 else if ((feeAssetStr == ""))
641643 then throw("pool must have one of the supported fee assets in the composition")
642644 else if ((size(poolDomain) > 13))
643645 then throw("too large pool domain")
644646 else if (if ((fee > 500))
645647 then true
646648 else (0 > fee))
647649 then throw("fee value must be between 50 and 500 (0.5-5%)")
648650 else if (isShutdown())
649651 then throw("contract is on stop")
650652 else {
651653 let assetWeightsStrLi = split(assetWeightsStr, ",")
652654 let assetWeightsSum = {
653655 let $l = assetWeightsStrLi
654656 let $s = size($l)
655657 let $acc0 = 0
656658 func $f6_1 ($a,$i) = if (($i >= $s))
657659 then $a
658660 else sum($a, $l[$i])
659661
660662 func $f6_2 ($a,$i) = if (($i >= $s))
661663 then $a
662664 else throw("List size exceeds 10")
663665
664666 $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)
665667 }
666668 func addTokenDataEntries (accum,assetNum) = if ((assetNum >= size(assetIdsLi)))
667669 then accum
668670 else {
669671 let assetDecimals = 8
670672 (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])))])
671673 }
672674
673675 let initialPoolTokens = calculatePoolTokensAmount(i.payments)
674676 if ((assetWeightsSum != 10000))
675677 then throw("sum of token weights must be equal to 10000")
676678 else if ((initialPoolTokens == 0))
677679 then throw("you need a bigger tokens amount to launch the pool")
678680 else {
679681 let poolTokenIssue = Issue(("PZ " + poolDomain), "Puzzle Swap: pool index token", initialPoolTokens, PoolTokenDecimals, true, unit, 0)
680682 let poolTokenId = calculateAssetId(poolTokenIssue)
681683 $Tuple2(((({
682684 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
683685 let $s = size($l)
684686 let $acc0 = nil
685687 func $f7_1 ($a,$i) = if (($i >= $s))
686688 then $a
687689 else addTokenDataEntries($a, $l[$i])
688690
689691 func $f7_2 ($a,$i) = if (($i >= $s))
690692 then $a
691693 else throw("List size exceeds 10")
692694
693695 $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)
694696 } ++ [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)
695697 }
696698 }
697699 }
698700
699701
700702
701703 @Callable(i)
702-func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if (if ((this != i.caller))
703- then (i.caller != Address(base58'3P9xX849YJXg7C87v82cDyDy5VhKiPJpHo8'))
704- else false)
704+func init (poolDomain,poolOwner,tokenName,tokenDesc,tokenQuantity) = if ((this != 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 
144.18 ms