tx · DVDQukct2e1wH2BXhz4B9qmwVwReuN8rQZjw8w1eTgG7 3MvL7gGU5kW19cNCnPbWPMPvjBYvt4VWK6y: -0.01000000 Waves 2022.04.12 03:19 [2004638] smart account 3MvL7gGU5kW19cNCnPbWPMPvjBYvt4VWK6y > SELF 0.00000000 Waves
{ "type": 13, "id": "DVDQukct2e1wH2BXhz4B9qmwVwReuN8rQZjw8w1eTgG7", "fee": 1000000, "feeAssetId": null, "timestamp": 1649722779828, "version": 2, "chainId": 84, "sender": "3MvL7gGU5kW19cNCnPbWPMPvjBYvt4VWK6y", "senderPublicKey": "3zGZHX2ZHn9VvocqGK6mLJEhKCTkVW1ygzcxAC37V7Dt", "proofs": [ "xVTqrE8aTHvCg3cbmyQ99GtvEemyf4eMdbriQCEJQcxVSnGpopBvuQdtRvrSzsWTDmBNYTR7hqvpouyBiWgSD3o" ], "script": "base64:AAIFAAAAAAAAAC4IAhIGCgQICAgIEgASABIDCgEEEgASAwoBARIAEgMKAQQSBAoCCAESBQoDCAEIAAAAJQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAAAQAAAAx0cnlHZXRCaW5hcnkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBwAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIBAAAAAAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAA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4FAAAADkFzc2V0SW5CYWxhbmNlBQAAAANuaWwFAAAADmJhbGFuY2VDaGFuZ2VzBQAAAA5jbGVhbkFtb3VudE91dAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAJZmxhc2hMb2FuAAAAAwAAAAphc3NldElkU3RyAAAABmFtb3VudAAAAAphY3Rpb25zU3RyBAAAAAdhY3Rpb25zCQAEtQAAAAIFAAAACmFjdGlvbnNTdHICAAAAAXwFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADCQEAAAAKaXNTaHV0ZG93bgAAAAAHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUN/k70=", "height": 2004638, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func tryGetInteger (key) = match getInteger(this, key) { | |
5 | + | case b: Int => | |
6 | + | b | |
7 | + | case _ => | |
8 | + | 0 | |
9 | + | } | |
10 | + | ||
11 | + | ||
12 | + | func tryGetBinary (key) = match getBinary(this, key) { | |
13 | + | case b: ByteVector => | |
14 | + | b | |
15 | + | case _ => | |
16 | + | base58'' | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | func tryGetString (key) = match getString(this, key) { | |
21 | + | case b: String => | |
22 | + | b | |
23 | + | case _ => | |
24 | + | "" | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | func getAssetString (assetId) = match assetId { | |
29 | + | case b: ByteVector => | |
30 | + | toBase58String(b) | |
31 | + | case _ => | |
32 | + | "WAVES" | |
33 | + | } | |
34 | + | ||
35 | + | ||
36 | + | func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES")) | |
37 | + | then unit | |
38 | + | else fromBase58String(assetIdStr) | |
39 | + | ||
40 | + | ||
41 | + | func addAssetBytesToList (accum,item) = (accum ++ [getAssetBytes(item)]) | |
42 | + | ||
43 | + | ||
44 | + | func addAssetWeightToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_weight"))]) | |
45 | + | ||
46 | + | ||
47 | + | func addAssetDecimalsToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_decimals"))]) | |
48 | + | ||
49 | + | ||
50 | + | func addAssetScaleToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_scale"))]) | |
51 | + | ||
52 | + | ||
53 | + | func addIntToList (accum,item) = (accum ++ [parseIntValue(item)]) | |
54 | + | ||
55 | + | ||
56 | + | let T = tryGetInteger("static_tokensAmount") | |
57 | + | ||
58 | + | let assetIds = { | |
59 | + | let $l = split(tryGetString("static_tokenIds"), ",") | |
60 | + | let $s = size($l) | |
61 | + | let $acc0 = nil | |
62 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
63 | + | then $a | |
64 | + | else addAssetBytesToList($a, $l[$i]) | |
65 | + | ||
66 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
67 | + | then $a | |
68 | + | else throw("List size exceeds 10") | |
69 | + | ||
70 | + | $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) | |
71 | + | } | |
72 | + | ||
73 | + | let AssetsWeights = { | |
74 | + | let $l = assetIds | |
75 | + | let $s = size($l) | |
76 | + | let $acc0 = nil | |
77 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
78 | + | then $a | |
79 | + | else addAssetWeightToList($a, $l[$i]) | |
80 | + | ||
81 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
82 | + | then $a | |
83 | + | else throw("List size exceeds 10") | |
84 | + | ||
85 | + | $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) | |
86 | + | } | |
87 | + | ||
88 | + | let Decimals = { | |
89 | + | let $l = assetIds | |
90 | + | let $s = size($l) | |
91 | + | let $acc0 = nil | |
92 | + | func $f2_1 ($a,$i) = if (($i >= $s)) | |
93 | + | then $a | |
94 | + | else addAssetDecimalsToList($a, $l[$i]) | |
95 | + | ||
96 | + | func $f2_2 ($a,$i) = if (($i >= $s)) | |
97 | + | then $a | |
98 | + | else throw("List size exceeds 10") | |
99 | + | ||
100 | + | $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) | |
101 | + | } | |
102 | + | ||
103 | + | let Scales = { | |
104 | + | let $l = assetIds | |
105 | + | let $s = size($l) | |
106 | + | let $acc0 = nil | |
107 | + | func $f3_1 ($a,$i) = if (($i >= $s)) | |
108 | + | then $a | |
109 | + | else addAssetScaleToList($a, $l[$i]) | |
110 | + | ||
111 | + | func $f3_2 ($a,$i) = if (($i >= $s)) | |
112 | + | then $a | |
113 | + | else throw("List size exceeds 10") | |
114 | + | ||
115 | + | $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) | |
116 | + | } | |
117 | + | ||
118 | + | let Fee = tryGetInteger("static_fee") | |
119 | + | ||
120 | + | let AssetsWeightsDecimals = 2 | |
121 | + | ||
122 | + | let Scale = 10000 | |
123 | + | ||
124 | + | let Scale8 = 100000000 | |
125 | + | ||
126 | + | let FeeScale = 10000 | |
127 | + | ||
128 | + | let PoolTokenDecimals = 8 | |
129 | + | ||
130 | + | let PoolTokenScale = pow(10, 0, PoolTokenDecimals, 0, 0, HALFUP) | |
131 | + | ||
132 | + | let earnedAssets = assetIds | |
133 | + | ||
134 | + | func isShutdown () = match getBoolean(Address(base58'3PEpv9hRFWEEBU22WRnLsw1bH4YGtcU728o'), "is_shutdown") { | |
135 | + | case x: Boolean => | |
136 | + | x | |
137 | + | case _ => | |
138 | + | false | |
139 | + | } | |
140 | + | ||
141 | + | ||
142 | + | func getCurrentTokenBalance (tokenType) = { | |
143 | + | let tokenId = getAssetString(assetIds[tokenType]) | |
144 | + | tryGetInteger((("global_" + tokenId) + "_balance")) | |
145 | + | } | |
146 | + | ||
147 | + | ||
148 | + | func calculatePIssued (amount,tokenId) = { | |
149 | + | let Psupply = tryGetInteger("global_poolToken_amount") | |
150 | + | let Balance = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance")) | |
151 | + | fraction(amount, Psupply, Balance, DOWN) | |
152 | + | } | |
153 | + | ||
154 | + | ||
155 | + | func getMinPIssued (payments) = { | |
156 | + | func handler (accum,current) = { | |
157 | + | let PIssued = calculatePIssued(current.amount, current.assetId) | |
158 | + | if ((PIssued == 0)) | |
159 | + | then throw("one of the tokens amounts is too low") | |
160 | + | else if (if ((accum == 0)) | |
161 | + | then true | |
162 | + | else (accum > PIssued)) | |
163 | + | then PIssued | |
164 | + | else accum | |
165 | + | } | |
166 | + | ||
167 | + | let minPIssed = { | |
168 | + | let $l = payments | |
169 | + | let $s = size($l) | |
170 | + | let $acc0 = 0 | |
171 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
172 | + | then $a | |
173 | + | else handler($a, $l[$i]) | |
174 | + | ||
175 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
176 | + | then $a | |
177 | + | else throw("List size exceeds 10") | |
178 | + | ||
179 | + | $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) | |
180 | + | } | |
181 | + | minPIssed | |
182 | + | } | |
183 | + | ||
184 | + | ||
185 | + | func calculateUsdnValue (assetId,amount,aBalance) = { | |
186 | + | let usdnId = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
187 | + | let usdnWeight = AssetsWeights[value(indexOf(assetIds, usdnId))] | |
188 | + | let assetWeight = AssetsWeights[value(indexOf(assetIds, assetId))] | |
189 | + | let usdnBalance = tryGetInteger((("global_" + getAssetString(usdnId)) + "_balance")) | |
190 | + | fraction(amount, (usdnBalance / usdnWeight), (aBalance / assetWeight)) | |
191 | + | } | |
192 | + | ||
193 | + | ||
194 | + | func checkTokensValidity (payments) = { | |
195 | + | func handler1 (accum,payment) = (accum ++ [payment.assetId]) | |
196 | + | ||
197 | + | let ids = { | |
198 | + | let $l = payments | |
199 | + | let $s = size($l) | |
200 | + | let $acc0 = nil | |
201 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
202 | + | then $a | |
203 | + | else handler1($a, $l[$i]) | |
204 | + | ||
205 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
206 | + | then $a | |
207 | + | else throw("List size exceeds 10") | |
208 | + | ||
209 | + | $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) | |
210 | + | } | |
211 | + | if ((ids == ids)) | |
212 | + | then { | |
213 | + | func handler2 (accum,assetId) = if ((indexOf(ids, assetId) != unit)) | |
214 | + | then (accum + 1) | |
215 | + | else throw(("asset not attached: " + getAssetString(assetId))) | |
216 | + | ||
217 | + | let checks = { | |
218 | + | let $l = assetIds | |
219 | + | let $s = size($l) | |
220 | + | let $acc0 = 0 | |
221 | + | func $f5_1 ($a,$i) = if (($i >= $s)) | |
222 | + | then $a | |
223 | + | else handler2($a, $l[$i]) | |
224 | + | ||
225 | + | func $f5_2 ($a,$i) = if (($i >= $s)) | |
226 | + | then $a | |
227 | + | else throw("List size exceeds 10") | |
228 | + | ||
229 | + | $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) | |
230 | + | } | |
231 | + | if ((checks == checks)) | |
232 | + | then true | |
233 | + | else throw("Strict value is not equal to itself.") | |
234 | + | } | |
235 | + | else throw("Strict value is not equal to itself.") | |
236 | + | } | |
237 | + | ||
238 | + | ||
239 | + | func handlePoolTokensAdd (PIssued,payments,userAddress,needChange) = { | |
240 | + | func getTokenPaymentAmount (tokenId) = { | |
241 | + | func handler (accum,payment) = if ((payment.assetId == tokenId)) | |
242 | + | then payment.amount | |
243 | + | else accum | |
244 | + | ||
245 | + | let $l = payments | |
246 | + | let $s = size($l) | |
247 | + | let $acc0 = 0 | |
248 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
249 | + | then $a | |
250 | + | else handler($a, $l[$i]) | |
251 | + | ||
252 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
253 | + | then $a | |
254 | + | else throw("List size exceeds 10") | |
255 | + | ||
256 | + | $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) | |
257 | + | } | |
258 | + | ||
259 | + | func handleTokenChange (accum,tokenId) = { | |
260 | + | let Bk = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance")) | |
261 | + | let PSupply = tryGetInteger("global_poolToken_amount") | |
262 | + | let tokenDecimals = tryGetInteger((("static_" + getAssetString(tokenId)) + "_scale")) | |
263 | + | let Dk = fraction((fraction((PSupply + PIssued), tokenDecimals, PSupply, CEILING) - tokenDecimals), Bk, tokenDecimals, CEILING) | |
264 | + | let paymentAmount = getTokenPaymentAmount(tokenId) | |
265 | + | let toReturn = ((if ((paymentAmount != 0)) | |
266 | + | then paymentAmount | |
267 | + | else 0) - Dk) | |
268 | + | let t = if (if (needChange) | |
269 | + | then (toReturn > 0) | |
270 | + | else false) | |
271 | + | then [ScriptTransfer(userAddress, toReturn, tokenId)] | |
272 | + | else nil | |
273 | + | ((accum ++ t) ++ [IntegerEntry((("global_" + getAssetString(tokenId)) + "_balance"), (Bk + Dk))]) | |
274 | + | } | |
275 | + | ||
276 | + | let $l = assetIds | |
277 | + | let $s = size($l) | |
278 | + | let $acc0 = nil | |
279 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
280 | + | then $a | |
281 | + | else handleTokenChange($a, $l[$i]) | |
282 | + | ||
283 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
284 | + | then $a | |
285 | + | else throw("List size exceeds 10") | |
286 | + | ||
287 | + | $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) | |
288 | + | } | |
289 | + | ||
290 | + | ||
291 | + | func handlePoolTokensRedeem (PRedeemed,userAddress) = { | |
292 | + | func handleTokenRedeem (accum,tokenId) = { | |
293 | + | let Bk = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance")) | |
294 | + | let PSupply = tryGetInteger("global_poolToken_amount") | |
295 | + | let tokenDecimals = tryGetInteger((("static_" + getAssetString(tokenId)) + "_scale")) | |
296 | + | let amount = toInt(fraction((toBigInt(Scale8) - fraction(toBigInt((PSupply - PRedeemed)), toBigInt(Scale8), toBigInt(PSupply), CEILING)), toBigInt(Bk), toBigInt(Scale8), DOWN)) | |
297 | + | (accum ++ [IntegerEntry((("global_" + getAssetString(tokenId)) + "_balance"), (Bk - amount)), ScriptTransfer(userAddress, amount, tokenId)]) | |
298 | + | } | |
299 | + | ||
300 | + | let $l = assetIds | |
301 | + | let $s = size($l) | |
302 | + | let $acc0 = nil | |
303 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
304 | + | then $a | |
305 | + | else handleTokenRedeem($a, $l[$i]) | |
306 | + | ||
307 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
308 | + | then $a | |
309 | + | else throw("List size exceeds 10") | |
310 | + | ||
311 | + | $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) | |
312 | + | } | |
313 | + | ||
314 | + | ||
315 | + | func calculateOutAmount (AmountIn,assetIn,assetOut,BalanceIn,BalanceOut) = { | |
316 | + | let IndexIn = value(indexOf(assetIds, assetIn)) | |
317 | + | let IndexOut = value(indexOf(assetIds, assetOut)) | |
318 | + | if ((IndexIn == IndexOut)) | |
319 | + | then throw("wrong tokens pair") | |
320 | + | else fraction(BalanceOut, ((Scale8 * Scale8) - toInt(pow(fraction(toBigInt(BalanceIn), toBigInt((Scale8 * Scale8)), toBigInt((BalanceIn + AmountIn)), HALFUP), 16, toBigInt(fraction(AssetsWeights[IndexIn], 10000, AssetsWeights[IndexOut])), 4, 16, CEILING))), (Scale8 * Scale8), DOWN) | |
321 | + | } | |
322 | + | ||
323 | + | ||
324 | + | func getTokenBalance (assetId) = match assetId { | |
325 | + | case t: ByteVector => | |
326 | + | assetBalance(this, t) | |
327 | + | case _ => | |
328 | + | wavesBalance(this).available | |
329 | + | } | |
330 | + | ||
331 | + | ||
332 | + | func calculateCurrentAssetInterest (assetId,assetIdStr,aBalance,tokenEarningsLastCheck) = { | |
333 | + | let totalStaked = tryGetInteger("global_indexStaked") | |
334 | + | let tokenBalanceLastCheck = tokenEarningsLastCheck | |
335 | + | let currentBalanceDelta = (getTokenBalance(assetId) - aBalance) | |
336 | + | let currentTokenEarnings = if ((currentBalanceDelta > tokenBalanceLastCheck)) | |
337 | + | then currentBalanceDelta | |
338 | + | else tokenBalanceLastCheck | |
339 | + | let newEarnings = (currentTokenEarnings - tokenBalanceLastCheck) | |
340 | + | let newInterest = if ((totalStaked == 0)) | |
341 | + | then 0 | |
342 | + | else fraction(newEarnings, Scale8, totalStaked) | |
343 | + | let lastCheckInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest")) | |
344 | + | (lastCheckInterest + newInterest) | |
345 | + | } | |
346 | + | ||
347 | + | ||
348 | + | func claimResult (address) = { | |
349 | + | let addressStr = toString(address) | |
350 | + | let puzzleAmount = tryGetInteger((addressStr + "_indexStaked")) | |
351 | + | func handler (accum,assetId) = { | |
352 | + | let assetIdStr = getAssetString(assetId) | |
353 | + | let aBalance = tryGetInteger((("global_" + getAssetString(assetId)) + "_balance")) | |
354 | + | let tokenEarningsLastCheck = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_earnings")) | |
355 | + | let currentTokenInterest = calculateCurrentAssetInterest(assetId, assetIdStr, aBalance, tokenEarningsLastCheck) | |
356 | + | let currentTokenEarnings = max([tokenEarningsLastCheck, (getTokenBalance(assetId) - aBalance)]) | |
357 | + | let rewardAmount = fraction(puzzleAmount, (currentTokenInterest - tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"))), Scale8) | |
358 | + | let transfer = if ((rewardAmount == 0)) | |
359 | + | then nil | |
360 | + | else [ScriptTransfer(address, rewardAmount, assetId)] | |
361 | + | $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 + calculateUsdnValue(assetId, rewardAmount, aBalance))) | |
362 | + | } | |
363 | + | ||
364 | + | let accum = { | |
365 | + | let $l = earnedAssets | |
366 | + | let $s = size($l) | |
367 | + | let $acc0 = $Tuple2(nil, 0) | |
368 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
369 | + | then $a | |
370 | + | else handler($a, $l[$i]) | |
371 | + | ||
372 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
373 | + | then $a | |
374 | + | else throw("List size exceeds 10") | |
375 | + | ||
376 | + | $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) | |
377 | + | } | |
378 | + | (accum._1 ++ [IntegerEntry((addressStr + "_claimedRewardValue"), (tryGetInteger((addressStr + "_claimedRewardValue")) + accum._2)), IntegerEntry((addressStr + "_lastClaim"), lastBlock.timestamp)]) | |
379 | + | } | |
380 | + | ||
381 | + | ||
382 | + | func indexStakeResult (addressStr,amount) = { | |
383 | + | let li = claimResult(addressFromStringValue(addressStr)) | |
384 | + | (li ++ [IntegerEntry((addressStr + "_indexStaked"), (tryGetInteger((addressStr + "_indexStaked")) + amount)), IntegerEntry("global_indexStaked", (tryGetInteger("global_indexStaked") + amount))]) | |
385 | + | } | |
386 | + | ||
387 | + | ||
388 | + | func sum (accum,n) = (accum + parseIntValue(n)) | |
389 | + | ||
390 | + | ||
391 | + | @Callable(i) | |
392 | + | func preInit (assetIdsStr,assetWeightsStr,baseTokenIdStr,poolDomain) = if ((this != i.caller)) | |
393 | + | then throw("admin only") | |
394 | + | else if ((size(poolDomain) > 13)) | |
395 | + | then throw("too large pool domain") | |
396 | + | else { | |
397 | + | let assetIdsStrLi = split(assetIdsStr, ",") | |
398 | + | let assetIdsLi = { | |
399 | + | let $l = assetIdsStrLi | |
400 | + | let $s = size($l) | |
401 | + | let $acc0 = nil | |
402 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
403 | + | then $a | |
404 | + | else addAssetBytesToList($a, $l[$i]) | |
405 | + | ||
406 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
407 | + | then $a | |
408 | + | else throw("List size exceeds 10") | |
409 | + | ||
410 | + | $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) | |
411 | + | } | |
412 | + | let assetWeightsStrLi = split(assetWeightsStr, ",") | |
413 | + | let assetWeightsSum = { | |
414 | + | let $l = assetWeightsStrLi | |
415 | + | let $s = size($l) | |
416 | + | let $acc0 = 0 | |
417 | + | func $f5_1 ($a,$i) = if (($i >= $s)) | |
418 | + | then $a | |
419 | + | else sum($a, $l[$i]) | |
420 | + | ||
421 | + | func $f5_2 ($a,$i) = if (($i >= $s)) | |
422 | + | then $a | |
423 | + | else throw("List size exceeds 10") | |
424 | + | ||
425 | + | $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) | |
426 | + | } | |
427 | + | func addTokenDataEntries (accum,assetNum) = if ((assetNum >= size(assetIdsLi))) | |
428 | + | then accum | |
429 | + | else { | |
430 | + | let assetDecimals = match assetIdsLi[assetNum] { | |
431 | + | case x: ByteVector => | |
432 | + | value(assetInfo(assetIdsLi[assetNum])).decimals | |
433 | + | case _ => | |
434 | + | 8 | |
435 | + | } | |
436 | + | (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])))]) | |
437 | + | } | |
438 | + | ||
439 | + | if ((assetWeightsSum != 100)) | |
440 | + | then throw("sum of token weights must be equal to 100") | |
441 | + | else ({ | |
442 | + | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
443 | + | let $s = size($l) | |
444 | + | let $acc0 = nil | |
445 | + | func $f6_1 ($a,$i) = if (($i >= $s)) | |
446 | + | then $a | |
447 | + | else addTokenDataEntries($a, $l[$i]) | |
448 | + | ||
449 | + | func $f6_2 ($a,$i) = if (($i >= $s)) | |
450 | + | then $a | |
451 | + | else throw("List size exceeds 10") | |
452 | + | ||
453 | + | $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) | |
454 | + | } ++ [StringEntry("static_tokenIds", assetIdsStr), StringEntry("static_tokenWeights", assetWeightsStr), IntegerEntry("static_tokensAmount", size(assetIdsLi)), StringEntry("static_poolDomain", poolDomain), StringEntry("static_baseTokenId", baseTokenIdStr), IntegerEntry("static_fee", 200)]) | |
455 | + | } | |
456 | + | ||
457 | + | ||
458 | + | ||
459 | + | @Callable(i) | |
460 | + | func deInit () = if ((i.caller != this)) | |
461 | + | then throw("admin only") | |
462 | + | else [IntegerEntry("global_wasInited", 0)] | |
463 | + | ||
464 | + | ||
465 | + | ||
466 | + | @Callable(i) | |
467 | + | func init () = { | |
468 | + | func prepareList () = { | |
469 | + | func handler (accum,n) = (accum ++ [IntegerEntry((("global_" + getAssetString(n.assetId)) + "_balance"), n.amount)]) | |
470 | + | ||
471 | + | let $l = i.payments | |
472 | + | let $s = size($l) | |
473 | + | let $acc0 = nil | |
474 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
475 | + | then $a | |
476 | + | else handler($a, $l[$i]) | |
477 | + | ||
478 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
479 | + | then $a | |
480 | + | else throw("List size exceeds 10") | |
481 | + | ||
482 | + | $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) | |
483 | + | } | |
484 | + | ||
485 | + | func calculatePoolTokensAmount (payments) = { | |
486 | + | func handler (accum,pmt) = { | |
487 | + | let assetId = pmt.assetId | |
488 | + | func handler2 (accum,n) = if ((n == assetId)) | |
489 | + | then value(indexOf(assetIds, n)) | |
490 | + | else accum | |
491 | + | ||
492 | + | let Token = { | |
493 | + | let $l = assetIds | |
494 | + | let $s = size($l) | |
495 | + | let $acc0 = 1 | |
496 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
497 | + | then $a | |
498 | + | else handler2($a, $l[$i]) | |
499 | + | ||
500 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
501 | + | then $a | |
502 | + | else throw("List size exceeds 10") | |
503 | + | ||
504 | + | $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) | |
505 | + | } | |
506 | + | fraction(accum, pow(pmt.amount, Decimals[Token], AssetsWeights[Token], AssetsWeightsDecimals, 8, FLOOR), Scale8) | |
507 | + | } | |
508 | + | ||
509 | + | let $l = payments | |
510 | + | let $s = size($l) | |
511 | + | let $acc0 = PoolTokenScale | |
512 | + | func $f4_1 ($a,$i) = if (($i >= $s)) | |
513 | + | then $a | |
514 | + | else handler($a, $l[$i]) | |
515 | + | ||
516 | + | func $f4_2 ($a,$i) = if (($i >= $s)) | |
517 | + | then $a | |
518 | + | else throw("List size exceeds 10") | |
519 | + | ||
520 | + | $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) | |
521 | + | } | |
522 | + | ||
523 | + | if ((tryGetInteger("global_wasInited") > 0)) | |
524 | + | then throw("pool already inited") | |
525 | + | else { | |
526 | + | let initialPoolTokens = calculatePoolTokensAmount(i.payments) | |
527 | + | if ((initialPoolTokens == 0)) | |
528 | + | then throw("you need a bigger tokens amount to launch the pool") | |
529 | + | else { | |
530 | + | let poolTokenIssue = Issue(("PZ " + tryGetString("static_poolDomain")), "Puzzle Swap: pool index token", initialPoolTokens, PoolTokenDecimals, true, unit, 0) | |
531 | + | let poolTokenId = calculateAssetId(poolTokenIssue) | |
532 | + | (prepareList() ++ [poolTokenIssue, IntegerEntry("global_poolToken_amount", initialPoolTokens), IntegerEntry("global_wasInited", 1), BinaryEntry("global_poolToken_id", poolTokenId), StringEntry("static_poolToken_idStr", getAssetString(poolTokenId)), ScriptTransfer(i.caller, initialPoolTokens, poolTokenId)]) | |
533 | + | } | |
534 | + | } | |
535 | + | } | |
536 | + | ||
537 | + | ||
538 | + | ||
539 | + | @Callable(i) | |
540 | + | func generateIndex (needChange) = if ((size(i.payments) != T)) | |
541 | + | then throw(("you need to attach all pool tokens. amount of pool tokens: " + toString(T))) | |
542 | + | else if (!(checkTokensValidity(i.payments))) | |
543 | + | then throw("wrong assets attached") | |
544 | + | else { | |
545 | + | let PIssued = getMinPIssued(i.payments) | |
546 | + | let reissue = Reissue(getBinaryValue("global_poolToken_id"), PIssued, true) | |
547 | + | let result = handlePoolTokensAdd(PIssued, i.payments, i.originCaller, needChange) | |
548 | + | $Tuple2((result ++ [ScriptTransfer(i.caller, PIssued, tryGetBinary("global_poolToken_id")), reissue, IntegerEntry("global_poolToken_amount", (tryGetInteger("global_poolToken_amount") + PIssued))]), PIssued) | |
549 | + | } | |
550 | + | ||
551 | + | ||
552 | + | ||
553 | + | @Callable(i) | |
554 | + | func stakeIndex () = { | |
555 | + | let addressStr = toString(i.originCaller) | |
556 | + | let pmt = i.payments[0] | |
557 | + | if ((value(pmt.assetId) != tryGetBinary("global_poolToken_id"))) | |
558 | + | then throw("wrong asset attached") | |
559 | + | else indexStakeResult(addressStr, pmt.amount) | |
560 | + | } | |
561 | + | ||
562 | + | ||
563 | + | ||
564 | + | @Callable(i) | |
565 | + | func unstakeIndex (puzzleAmount) = { | |
566 | + | let addressStr = toString(i.originCaller) | |
567 | + | let puzzleAvailable = tryGetInteger((addressStr + "_indexStaked")) | |
568 | + | if ((puzzleAmount > puzzleAvailable)) | |
569 | + | then throw("you don't have index tokens available") | |
570 | + | else (claimResult(i.originCaller) ++ [IntegerEntry((addressStr + "_indexStaked"), (puzzleAvailable - puzzleAmount)), IntegerEntry("global_indexStaked", (tryGetInteger("global_indexStaked") - puzzleAmount)), ScriptTransfer(i.caller, puzzleAmount, getBinaryValue("global_poolToken_id"))]) | |
571 | + | } | |
572 | + | ||
573 | + | ||
574 | + | ||
575 | + | @Callable(i) | |
576 | + | func claimIndexRewards () = claimResult(i.caller) | |
577 | + | ||
578 | + | ||
579 | + | ||
580 | + | @Callable(i) | |
581 | + | func redeemIndex (sendToOrigin) = { | |
582 | + | let pmt = i.payments[0] | |
583 | + | if ((pmt.assetId != tryGetBinary("global_poolToken_id"))) | |
584 | + | then throw("please attach pool share token") | |
585 | + | else { | |
586 | + | let PRedeemed = pmt.amount | |
587 | + | let result = handlePoolTokensRedeem(PRedeemed, if (sendToOrigin) | |
588 | + | then i.originCaller | |
589 | + | else i.caller) | |
590 | + | (result ++ [Burn(tryGetBinary("global_poolToken_id"), PRedeemed), IntegerEntry("global_poolToken_amount", (tryGetInteger("global_poolToken_amount") - PRedeemed))]) | |
591 | + | } | |
592 | + | } | |
593 | + | ||
594 | + | ||
595 | + | ||
596 | + | @Callable(i) | |
597 | + | func swap (assetOut,minimum) = { | |
598 | + | let pmt = value(i.payments[0]) | |
599 | + | let AmountIn = value(i.payments[0].amount) | |
600 | + | let AssetIn = pmt.assetId | |
601 | + | let AssetOut = getAssetBytes(assetOut) | |
602 | + | let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance")) | |
603 | + | let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance")) | |
604 | + | let AmountOut = calculateOutAmount(AmountIn, AssetIn, AssetOut, AssetInBalance, AssetOutBalance) | |
605 | + | let feeAmount = fraction(AmountOut, Fee, FeeScale) | |
606 | + | let cleanAmountOut = (AmountOut - feeAmount) | |
607 | + | if ((minimum > cleanAmountOut)) | |
608 | + | then throw(("amount to recieve is lower than given one: " + toString(cleanAmountOut))) | |
609 | + | else if ((0 > (AssetOutBalance - AmountOut))) | |
610 | + | then throw("contract is out of reserves") | |
611 | + | else { | |
612 | + | let newBalanceIn = (AssetInBalance + AmountIn) | |
613 | + | let newBalanceOut = (AssetOutBalance - AmountOut) | |
614 | + | let usdnAssetId = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
615 | + | if ((usdnAssetId == AssetOut)) | |
616 | + | then { | |
617 | + | let usdnFeeAmount = feeAmount | |
618 | + | let protocolUsdnFee = fraction(usdnFeeAmount, 4, 10) | |
619 | + | let stakingTopUp = reentrantInvoke(Address(base58'3PFTbywqxtFfukX3HyT881g4iW5K4QL3FAS'), "topUpReward", nil, [AttachedPayment(usdnAssetId, protocolUsdnFee)]) | |
620 | + | if ((stakingTopUp == stakingTopUp)) | |
621 | + | then $Tuple2([IntegerEntry((("global_" + assetOut) + "_balance"), newBalanceOut), IntegerEntry((("global_" + getAssetString(AssetIn)) + "_balance"), newBalanceIn), ScriptTransfer(i.caller, cleanAmountOut, AssetOut), IntegerEntry("global_volume", (tryGetInteger("global_volume") + calculateUsdnValue(AssetIn, AmountIn, AssetInBalance)))], cleanAmountOut) | |
622 | + | else throw("Strict value is not equal to itself.") | |
623 | + | } | |
624 | + | else { | |
625 | + | let usdnBalance = if ((AssetIn == usdnAssetId)) | |
626 | + | then newBalanceIn | |
627 | + | else tryGetInteger((("global_" + getAssetString(usdnAssetId)) + "_balance")) | |
628 | + | let usdnFeeAmount = calculateOutAmount(feeAmount, AssetOut, usdnAssetId, newBalanceOut, usdnBalance) | |
629 | + | let protocolUsdnFee = fraction(usdnFeeAmount, 4, 10) | |
630 | + | let stakingTopUp = reentrantInvoke(Address(base58'3PFTbywqxtFfukX3HyT881g4iW5K4QL3FAS'), "topUpReward", nil, [AttachedPayment(usdnAssetId, protocolUsdnFee)]) | |
631 | + | if ((stakingTopUp == stakingTopUp)) | |
632 | + | then { | |
633 | + | let usdnBalanceChangeEntry = IntegerEntry((("global_" + toBase58String(usdnAssetId)) + "_balance"), (usdnBalance - usdnFeeAmount)) | |
634 | + | let balanceChanges = if ((AssetIn == usdnAssetId)) | |
635 | + | then [usdnBalanceChangeEntry] | |
636 | + | else [usdnBalanceChangeEntry, IntegerEntry((("global_" + getAssetString(AssetIn)) + "_balance"), newBalanceIn)] | |
637 | + | $Tuple2(([IntegerEntry((("global_" + assetOut) + "_balance"), (newBalanceOut + feeAmount)), ScriptTransfer(i.caller, cleanAmountOut, AssetOut), IntegerEntry("global_volume", (tryGetInteger("global_volume") + calculateUsdnValue(AssetIn, AmountIn, AssetInBalance)))] ++ balanceChanges), cleanAmountOut) | |
638 | + | } | |
639 | + | else throw("Strict value is not equal to itself.") | |
640 | + | } | |
641 | + | } | |
642 | + | } | |
643 | + | ||
644 | + | ||
645 | + | ||
646 | + | @Callable(i) | |
647 | + | func flashLoan (assetIdStr,amount,actionsStr) = { | |
648 | + | let actions = split(actionsStr, "|") | |
649 | + | nil | |
650 | + | } | |
651 | + | ||
652 | + | ||
653 | + | @Verifier(tx) | |
654 | + | func verify () = if (isShutdown()) | |
655 | + | then false | |
656 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
657 | + |
github/deemru/w8io/169f3d6 40.50 ms ◑