tx · JCAi6bvqJrBXAVTH8xk8pWdYvSJekwZAwU5A3CT15iza 3N6o2j6N9vuWruU51gEZ1quncAXCLRksuf5: -0.09000000 Waves 2024.04.28 23:37 [3083188] smart account 3N6o2j6N9vuWruU51gEZ1quncAXCLRksuf5 > SELF 0.00000000 Waves
{ "type": 13, "id": "JCAi6bvqJrBXAVTH8xk8pWdYvSJekwZAwU5A3CT15iza", "fee": 9000000, "feeAssetId": null, "timestamp": 1714336235988, "version": 2, "chainId": 84, "sender": "3N6o2j6N9vuWruU51gEZ1quncAXCLRksuf5", "senderPublicKey": "CSBog5DyfZ75B1usog9TncmEvV1gdLj4kV8NCbTvNwDx", "proofs": [ "4uHKxLRTFqS1MZBZgUBHhCTC3QwJGZCR4yyp5UT8uaRU56sZJ9TJgJYbh9rrwjXX6tLmJKAnN7ejtJMJfKUUusWy" ], "script": "base64:BgJbCAISCAoGCAgICAgBEgASABIDCgEEEgMKAQQSABIDCgEIEgMKAQESABIDCgEIEgQKAggBEgUKAwgIARIDCgEIEgMKAQESBwoFCAgIAQESABIDCgEIEgUKAwgICFMAB1ZFUlNJT04CDVBaLTEuMi4zIFBST0QACWNvbmZpZ1N0cgkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzAg1jb25maWdBZGRyZXNzAiMzTjJKcFFmcXRoNWVhcGJ4OGJIWjNlZUNYR2tOZmNZRWR5bwAOQ09ORklHX0FERFJFU1MDCQAAAgUJY29uZmlnU3RyAgAFBHRoaXMJAQdBZGRyZXNzAQkA2QQBBQljb25maWdTdHIAFUFzc2V0c1dlaWdodHNEZWNpbWFscwAEAAVTY2FsZQCQTgAGU2NhbGU4AIDC1y8AB1NjYWxlMTYAgICE/qbe4REACEZlZVNjYWxlAJBOABFQb29sVG9rZW5EZWNpbWFscwAIAA5Qb29sVG9rZW5TY2FsZQkAbAYACgAABRFQb29sVG9rZW5EZWNpbWFscwAAAAAFBkhBTEZVUAAQTUlOX1NURVBTX0FNT1VOVAkBC3ZhbHVl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lAgkAmggCBRFjb2xkTWFzdGVyQWRkcmVzcwkArAICAgthcHByb3ZlZFR4XwkA2AQBCAUCdHgCaWQAAAAAB6Uvdis=", "height": 3083188, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G962JVNuyfmmhpcMJ75matmq1KfF4ATEZyPiHxShoVUM Next: none Diff:
Old | New | Differences | |
---|---|---|---|
108 | 108 | ||
109 | 109 | let usdnAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdnAssetIdStr"), "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT") | |
110 | 110 | ||
111 | - | let puzzleAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "puzzleAssetIdStr"), " | |
111 | + | let puzzleAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "puzzleAssetIdStr"), "6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW") | |
112 | 112 | ||
113 | 113 | let usdtAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtAssetIdStr"), "5Sh9KghfkZyhjwuodovDhB6PghDUGBHiAPZ4MkrPgKtX") | |
114 | 114 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let VERSION = "PZ-1.2.3 PROD" | |
5 | 5 | ||
6 | 6 | let configStr = valueOrElse(getString(this, "configAddress"), "3N2JpQfqth5eapbx8bHZ3eeCXGkNfcYEdyo") | |
7 | 7 | ||
8 | 8 | let CONFIG_ADDRESS = if ((configStr == "")) | |
9 | 9 | then this | |
10 | 10 | else Address(fromBase58String(configStr)) | |
11 | 11 | ||
12 | 12 | let AssetsWeightsDecimals = 4 | |
13 | 13 | ||
14 | 14 | let Scale = 10000 | |
15 | 15 | ||
16 | 16 | let Scale8 = 100000000 | |
17 | 17 | ||
18 | 18 | let Scale16 = 10000000000000000 | |
19 | 19 | ||
20 | 20 | let FeeScale = 10000 | |
21 | 21 | ||
22 | 22 | let PoolTokenDecimals = 8 | |
23 | 23 | ||
24 | 24 | let PoolTokenScale = pow(10, 0, PoolTokenDecimals, 0, 0, HALFUP) | |
25 | 25 | ||
26 | 26 | let MIN_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_amount"), 1) | |
27 | 27 | ||
28 | 28 | let MAX_STEPS_AMOUNT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_amount"), 500) | |
29 | 29 | ||
30 | 30 | let MIN_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "min_steps_interval"), 1) | |
31 | 31 | ||
32 | 32 | let MAX_STEPS_INTERVAL = valueOrElse(getInteger(CONFIG_ADDRESS, "max_steps_interval"), 10000) | |
33 | 33 | ||
34 | 34 | let MIN_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "min_weight"), 100) | |
35 | 35 | ||
36 | 36 | let MAX_WEIGHT = valueOrElse(getInteger(CONFIG_ADDRESS, "max_weight"), 9900) | |
37 | 37 | ||
38 | 38 | func tryGetInteger (key) = match getInteger(this, key) { | |
39 | 39 | case b: Int => | |
40 | 40 | b | |
41 | 41 | case _ => | |
42 | 42 | 0 | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func tryGetBinary (key) = match getBinary(this, key) { | |
47 | 47 | case b: ByteVector => | |
48 | 48 | b | |
49 | 49 | case _ => | |
50 | 50 | base58'' | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func tryGetString (key) = match getString(this, key) { | |
55 | 55 | case b: String => | |
56 | 56 | b | |
57 | 57 | case _ => | |
58 | 58 | "" | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func tryGetStringOrThrow (key) = match getString(this, key) { | |
63 | 63 | case b: String => | |
64 | 64 | b | |
65 | 65 | case _ => | |
66 | 66 | throw(("no such key in data storage: " + key)) | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getAssetString (assetId) = match assetId { | |
71 | 71 | case b: ByteVector => | |
72 | 72 | toBase58String(b) | |
73 | 73 | case _ => | |
74 | 74 | "WAVES" | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES")) | |
79 | 79 | then unit | |
80 | 80 | else fromBase58String(assetIdStr) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getTokenBalance (assetId) = match assetId { | |
84 | 84 | case t: ByteVector => | |
85 | 85 | assetBalance(this, t) | |
86 | 86 | case _ => | |
87 | 87 | wavesBalance(this).available | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func addAssetBytesToList (accum,item) = (accum ++ [getAssetBytes(item)]) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func addAssetWeightToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_weight"))]) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func addAssetWeightToStrList (accum,item) = (accum ++ [toString(tryGetInteger((("static_" + item) + "_weight")))]) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func addAssetDecimalsToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_decimals"))]) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func addAssetScaleToList (accum,item) = (accum ++ [tryGetInteger((("static_" + getAssetString(item)) + "_scale"))]) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func addIntToList (accum,item) = (accum ++ [parseIntValue(item)]) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | let usdnAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdnAssetIdStr"), "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT") | |
110 | 110 | ||
111 | - | let puzzleAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "puzzleAssetIdStr"), " | |
111 | + | let puzzleAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "puzzleAssetIdStr"), "6fQRaL3L25nGqevXT8kxwjBS28fkBErrJ69JYcj7qKgW") | |
112 | 112 | ||
113 | 113 | let usdtAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtAssetIdStr"), "5Sh9KghfkZyhjwuodovDhB6PghDUGBHiAPZ4MkrPgKtX") | |
114 | 114 | ||
115 | 115 | let usdtPptAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "usdtPptAssetIdStr"), "DK8RCKSRv6xovfYciiXgz82Apiu1tiEraH3iBSeZmAhp") | |
116 | 116 | ||
117 | 117 | let romeAssetIdStr = valueOrElse(getString(CONFIG_ADDRESS, "romeAssetIdStr"), "CYZRD5FtNKwUU4zhn31WPEmdUXkXmGE1uLP8UZhMscHT") | |
118 | 118 | ||
119 | 119 | let wavesAssetIdStr = "WAVES" | |
120 | 120 | ||
121 | 121 | let usdnAssetId = fromBase58String(usdnAssetIdStr) | |
122 | 122 | ||
123 | 123 | let puzzleAssetId = fromBase58String(puzzleAssetIdStr) | |
124 | 124 | ||
125 | 125 | let usdtAssetId = fromBase58String(usdtAssetIdStr) | |
126 | 126 | ||
127 | 127 | let usdtPptAssetId = fromBase58String(usdtPptAssetIdStr) | |
128 | 128 | ||
129 | 129 | let romeAssetId = fromBase58String(romeAssetIdStr) | |
130 | 130 | ||
131 | 131 | let wavesAssetId = unit | |
132 | 132 | ||
133 | 133 | let supportedFeeAssetsStr = [usdnAssetIdStr, puzzleAssetIdStr, usdtAssetIdStr, usdtPptAssetIdStr, wavesAssetIdStr, romeAssetIdStr] | |
134 | 134 | ||
135 | 135 | let parentPoolAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "parentPoolAddress"), "3MyQLTCnK3Ui4Rm2ZYASb8e7EMqwLsHhZpb"))) | |
136 | 136 | ||
137 | 137 | let masterAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "masterAddress"), "3N2EacY3tD89zCPRzSsW87ALMXUPA3oELpd"))) | |
138 | 138 | ||
139 | 139 | let masterPubKey = fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "masterPubKey"), "EUFrMfKMM9ihGe6ksyYMGXAvKW81yu3AxHc8NGVQSJH4")) | |
140 | 140 | ||
141 | 141 | let oracleAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "oracleAddress"), "3Mr3heaFrZeT4iMafu9ahjvXwjQ7XqeWAeR"))) | |
142 | 142 | ||
143 | 143 | let stakingAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "stakingAddress"), "3Mu7VHAWmzFuC8CC1jL66egwWdzMmU3GMdN"))) | |
144 | 144 | ||
145 | 145 | let feesAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "feesAddress"), "3N44cXXhd7Xk7hr7JkLa3mTStLQnFpUfKgC"))) | |
146 | 146 | ||
147 | 147 | let poolsHubAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "poolsHubAddress"), "3NAD3Ww5D8d47qzXkk9aekQNroYUUtw4jdL"))) | |
148 | 148 | ||
149 | 149 | let shutdownAddressStr = valueOrElse(getString(CONFIG_ADDRESS, "shutdownAddress"), "3MtiMjKiFuMZAA3NW9YZH89bYmiYUQUBezx") | |
150 | 150 | ||
151 | 151 | let layer2Addresses = valueOrElse(getString(CONFIG_ADDRESS, "layer2Addresses"), "3Msp7W9rHyHkvvKBKU3rB44SqqcDALMbgbg,3Msp7W9rHyHkvvKBKU3rB44SqqcDALMbgbg") | |
152 | 152 | ||
153 | 153 | let govAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "govAddress"), "3MsAdLsHFmArSyEuYFG9xRRbsutUBovzBhn"))) | |
154 | 154 | ||
155 | 155 | let coldMasterAddress = Address(fromBase58String(valueOrElse(getString(CONFIG_ADDRESS, "coldMasterAddress"), "3N3LFeynYTFErCGXcABXenmYam1qbhbcNAH"))) | |
156 | 156 | ||
157 | 157 | let T = tryGetInteger("static_tokensAmount") | |
158 | 158 | ||
159 | 159 | let assetIds = { | |
160 | 160 | let $l = split(tryGetString("static_tokenIds"), ",") | |
161 | 161 | let $s = size($l) | |
162 | 162 | let $acc0 = nil | |
163 | 163 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
164 | 164 | then $a | |
165 | 165 | else addAssetBytesToList($a, $l[$i]) | |
166 | 166 | ||
167 | 167 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
168 | 168 | then $a | |
169 | 169 | else throw("List size exceeds 10") | |
170 | 170 | ||
171 | 171 | $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) | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | let AssetsWeights = { | |
175 | 175 | let $l = assetIds | |
176 | 176 | let $s = size($l) | |
177 | 177 | let $acc0 = nil | |
178 | 178 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
179 | 179 | then $a | |
180 | 180 | else addAssetWeightToList($a, $l[$i]) | |
181 | 181 | ||
182 | 182 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
183 | 183 | then $a | |
184 | 184 | else throw("List size exceeds 10") | |
185 | 185 | ||
186 | 186 | $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) | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | let Decimals = { | |
190 | 190 | let $l = assetIds | |
191 | 191 | let $s = size($l) | |
192 | 192 | let $acc0 = nil | |
193 | 193 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
194 | 194 | then $a | |
195 | 195 | else addAssetDecimalsToList($a, $l[$i]) | |
196 | 196 | ||
197 | 197 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
198 | 198 | then $a | |
199 | 199 | else throw("List size exceeds 10") | |
200 | 200 | ||
201 | 201 | $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) | |
202 | 202 | } | |
203 | 203 | ||
204 | 204 | let Scales = { | |
205 | 205 | let $l = assetIds | |
206 | 206 | let $s = size($l) | |
207 | 207 | let $acc0 = nil | |
208 | 208 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
209 | 209 | then $a | |
210 | 210 | else addAssetScaleToList($a, $l[$i]) | |
211 | 211 | ||
212 | 212 | func $f3_2 ($a,$i) = if (($i >= $s)) | |
213 | 213 | then $a | |
214 | 214 | else throw("List size exceeds 10") | |
215 | 215 | ||
216 | 216 | $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) | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | let Fee = tryGetInteger("static_fee") | |
220 | 220 | ||
221 | 221 | let earnedAssets = assetIds | |
222 | 222 | ||
223 | 223 | func isShutdown () = { | |
224 | 224 | let shutdownAddress = addressFromString(shutdownAddressStr) | |
225 | 225 | if ((shutdownAddress == unit)) | |
226 | 226 | then false | |
227 | 227 | else match getBoolean(value(shutdownAddress), "is_shutdown") { | |
228 | 228 | case x: Boolean => | |
229 | 229 | x | |
230 | 230 | case _ => | |
231 | 231 | false | |
232 | 232 | } | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func getCurrentTokenBalance (tokenNum) = { | |
237 | 237 | let tokenIdStr = getAssetString(assetIds[tokenNum]) | |
238 | 238 | tryGetInteger((("global_" + tokenIdStr) + "_balance")) | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func getKMult () = match getInteger("static_KMult") { | |
243 | 243 | case x: Int => | |
244 | 244 | x | |
245 | 245 | case _ => | |
246 | 246 | Scale16 | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func saveCurrentWeights () = { | |
251 | 251 | let assetIdsLi = split(tryGetString("static_tokenIds"), ",") | |
252 | 252 | func s (accum,assetId) = (accum ++ [IntegerEntry(("rebalance_startWeight_" + assetId), tryGetInteger((("static_" + assetId) + "_weight")))]) | |
253 | 253 | ||
254 | 254 | let $l = assetIdsLi | |
255 | 255 | let $s = size($l) | |
256 | 256 | let $acc0 = nil | |
257 | 257 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
258 | 258 | then $a | |
259 | 259 | else s($a, $l[$i]) | |
260 | 260 | ||
261 | 261 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
262 | 262 | then $a | |
263 | 263 | else throw("List size exceeds 10") | |
264 | 264 | ||
265 | 265 | $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) | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func getVirtualPoolTokenAmount () = fraction(tryGetInteger("global_poolToken_amount"), getKMult(), Scale16) | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func calculatePIssued (amount,tokenId) = { | |
273 | 273 | let Psupply = getVirtualPoolTokenAmount() | |
274 | 274 | let Balance = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance")) | |
275 | 275 | let t1 = fraction(amount, Psupply, Balance, DOWN) | |
276 | 276 | t1 | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func getMinPIssued (payments) = { | |
281 | 281 | func handler (accum,current) = { | |
282 | 282 | let PIssued = calculatePIssued(current.amount, current.assetId) | |
283 | 283 | if ((PIssued == 0)) | |
284 | 284 | then throw("one of the tokens amounts is too low") | |
285 | 285 | else if (if ((accum == 0)) | |
286 | 286 | then true | |
287 | 287 | else (accum > PIssued)) | |
288 | 288 | then PIssued | |
289 | 289 | else accum | |
290 | 290 | } | |
291 | 291 | ||
292 | 292 | let minPIssed = { | |
293 | 293 | let $l = payments | |
294 | 294 | let $s = size($l) | |
295 | 295 | let $acc0 = 0 | |
296 | 296 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
297 | 297 | then $a | |
298 | 298 | else handler($a, $l[$i]) | |
299 | 299 | ||
300 | 300 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
301 | 301 | then $a | |
302 | 302 | else throw("List size exceeds 10") | |
303 | 303 | ||
304 | 304 | $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) | |
305 | 305 | } | |
306 | 306 | minPIssed | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | func calculateUsdnValue (assetId,amount,aBalance,givenUsdnBalance) = { | |
311 | 311 | let usdnInPool = indexOf(assetIds, usdnAssetId) | |
312 | 312 | let puzzleInPool = indexOf(assetIds, puzzleAssetId) | |
313 | 313 | let usdtInPool = indexOf(assetIds, usdtAssetId) | |
314 | 314 | let usdtPptInPool = indexOf(assetIds, usdtPptAssetId) | |
315 | 315 | let wavesInPool = indexOf(assetIds, unit) | |
316 | 316 | let assetWeight = tryGetInteger((("static_" + getAssetString(assetId)) + "_weight")) | |
317 | 317 | let feeAssetStr = tryGetString("static_feeToken") | |
318 | 318 | if ((feeAssetStr == puzzleAssetIdStr)) | |
319 | 319 | then { | |
320 | 320 | let puzzleWeight = AssetsWeights[value(indexOf(assetIds, puzzleAssetId))] | |
321 | 321 | let puzzleBalance = tryGetInteger((("global_" + puzzleAssetIdStr) + "_balance")) | |
322 | 322 | let amountInPuzzle = fraction(amount, (puzzleBalance / puzzleWeight), (aBalance / assetWeight)) | |
323 | 323 | let puzzlePrice = getIntegerValue(parentPoolAddress, "global_lastPuzzlePrice") | |
324 | 324 | fraction((amountInPuzzle * puzzlePrice), 1, Scale8) | |
325 | 325 | } | |
326 | 326 | else if ((feeAssetStr == usdtAssetIdStr)) | |
327 | 327 | then { | |
328 | 328 | let usdtWeight = AssetsWeights[value(usdtInPool)] | |
329 | 329 | let usdtBalance = tryGetInteger((("global_" + usdtAssetIdStr) + "_balance")) | |
330 | 330 | fraction(amount, (usdtBalance / usdtWeight), (aBalance / assetWeight)) | |
331 | 331 | } | |
332 | 332 | else if ((feeAssetStr == usdtPptAssetIdStr)) | |
333 | 333 | then { | |
334 | 334 | let usdtWeight = AssetsWeights[value(usdtPptInPool)] | |
335 | 335 | let usdtBalance = tryGetInteger((("global_" + usdtPptAssetIdStr) + "_balance")) | |
336 | 336 | fraction(amount, (usdtBalance / usdtWeight), (aBalance / assetWeight)) | |
337 | 337 | } | |
338 | 338 | else if ((feeAssetStr == usdnAssetIdStr)) | |
339 | 339 | then { | |
340 | 340 | let usdnWeight = AssetsWeights[value(indexOf(assetIds, usdnAssetId))] | |
341 | 341 | let usdnBalance = match givenUsdnBalance { | |
342 | 342 | case x: Int => | |
343 | 343 | givenUsdnBalance | |
344 | 344 | case _ => | |
345 | 345 | tryGetInteger((("global_" + getAssetString(usdnAssetId)) + "_balance")) | |
346 | 346 | } | |
347 | 347 | fraction(amount, (value(usdnBalance) / usdnWeight), (aBalance / assetWeight)) | |
348 | 348 | } | |
349 | 349 | else { | |
350 | 350 | let wavesWeight = 3000 | |
351 | 351 | let wBalance = (tryGetInteger("global_WAVES_balance") / 50) | |
352 | 352 | fraction(amount, (wBalance / wavesWeight), (aBalance / assetWeight)) | |
353 | 353 | } | |
354 | 354 | } | |
355 | 355 | ||
356 | 356 | ||
357 | 357 | func getPriceFromOracle (assetIdStr) = match getInteger(oracleAddress, (assetIdStr + "_twap5B")) { | |
358 | 358 | case x: Int => | |
359 | 359 | x | |
360 | 360 | case _ => | |
361 | 361 | 0 | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | ||
365 | 365 | func calculateUsdValue (assetId,amount,aBalance) = { | |
366 | 366 | let assetWeight = tryGetInteger((("static_" + getAssetString(assetId)) + "_weight")) | |
367 | 367 | let feeAssetStr = tryGetString("static_feeToken") | |
368 | 368 | let feeAssetScale = getIntegerValue(this, (("static_" + feeAssetStr) + "_scale")) | |
369 | 369 | let feeAssetNum = value(indexOf(assetIds, getAssetBytes(feeAssetStr))) | |
370 | 370 | let feeAssetWeight = AssetsWeights[feeAssetNum] | |
371 | 371 | let feeAssetBalance = tryGetInteger((("global_" + feeAssetStr) + "_balance")) | |
372 | 372 | let valInFeeAsset = fraction(amount, (feeAssetBalance / feeAssetWeight), (aBalance / assetWeight)) | |
373 | 373 | let feeAssetPrice = getPriceFromOracle(feeAssetStr) | |
374 | 374 | fraction(valInFeeAsset, feeAssetPrice, feeAssetScale) | |
375 | 375 | } | |
376 | 376 | ||
377 | 377 | ||
378 | 378 | func checkTokensValidity (payments) = { | |
379 | 379 | func handler1 (accum,payment) = (accum ++ [payment.assetId]) | |
380 | 380 | ||
381 | 381 | let ids = { | |
382 | 382 | let $l = payments | |
383 | 383 | let $s = size($l) | |
384 | 384 | let $acc0 = nil | |
385 | 385 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
386 | 386 | then $a | |
387 | 387 | else handler1($a, $l[$i]) | |
388 | 388 | ||
389 | 389 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
390 | 390 | then $a | |
391 | 391 | else throw("List size exceeds 10") | |
392 | 392 | ||
393 | 393 | $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) | |
394 | 394 | } | |
395 | 395 | if ((ids == ids)) | |
396 | 396 | then { | |
397 | 397 | func handler2 (accum,assetId) = if ((indexOf(ids, assetId) != unit)) | |
398 | 398 | then (accum + 1) | |
399 | 399 | else throw(("asset not attached: " + getAssetString(assetId))) | |
400 | 400 | ||
401 | 401 | let checks = { | |
402 | 402 | let $l = assetIds | |
403 | 403 | let $s = size($l) | |
404 | 404 | let $acc0 = 0 | |
405 | 405 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
406 | 406 | then $a | |
407 | 407 | else handler2($a, $l[$i]) | |
408 | 408 | ||
409 | 409 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
410 | 410 | then $a | |
411 | 411 | else throw("List size exceeds 10") | |
412 | 412 | ||
413 | 413 | $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) | |
414 | 414 | } | |
415 | 415 | if ((checks == checks)) | |
416 | 416 | then true | |
417 | 417 | else throw("Strict value is not equal to itself.") | |
418 | 418 | } | |
419 | 419 | else throw("Strict value is not equal to itself.") | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 | ||
423 | 423 | func handlePoolTokensAdd (PIssued,payments,userAddress,needChange) = { | |
424 | 424 | func getTokenPaymentAmount (tokenId) = { | |
425 | 425 | func handler (accum,payment) = if ((payment.assetId == tokenId)) | |
426 | 426 | then payment.amount | |
427 | 427 | else accum | |
428 | 428 | ||
429 | 429 | let $l = payments | |
430 | 430 | let $s = size($l) | |
431 | 431 | let $acc0 = 0 | |
432 | 432 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
433 | 433 | then $a | |
434 | 434 | else handler($a, $l[$i]) | |
435 | 435 | ||
436 | 436 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
437 | 437 | then $a | |
438 | 438 | else throw("List size exceeds 10") | |
439 | 439 | ||
440 | 440 | $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) | |
441 | 441 | } | |
442 | 442 | ||
443 | 443 | func handleTokenChange (accum,tokenId) = { | |
444 | 444 | let Bk = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance")) | |
445 | 445 | let PSupply = getVirtualPoolTokenAmount() | |
446 | 446 | let tokenDecimals = tryGetInteger((("static_" + getAssetString(tokenId)) + "_scale")) | |
447 | 447 | let a1 = fraction((toBigInt((PSupply + PIssued)) * toBigInt(Scale8)), toBigInt(tokenDecimals), toBigInt(PSupply), CEILING) | |
448 | 448 | let Dk = toInt(fraction((a1 - (toBigInt(tokenDecimals) * toBigInt(Scale8))), toBigInt(Bk), (toBigInt(tokenDecimals) * toBigInt(Scale8)), CEILING)) | |
449 | 449 | let paymentAmount = getTokenPaymentAmount(tokenId) | |
450 | 450 | let toReturn = (paymentAmount - Dk) | |
451 | 451 | let t = if (if (needChange) | |
452 | 452 | then (toReturn > 0) | |
453 | 453 | else false) | |
454 | 454 | then [ScriptTransfer(userAddress, toReturn, tokenId)] | |
455 | 455 | else nil | |
456 | 456 | ((accum ++ t) ++ [IntegerEntry((("global_" + getAssetString(tokenId)) + "_balance"), (Bk + Dk))]) | |
457 | 457 | } | |
458 | 458 | ||
459 | 459 | let $l = assetIds | |
460 | 460 | let $s = size($l) | |
461 | 461 | let $acc0 = nil | |
462 | 462 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
463 | 463 | then $a | |
464 | 464 | else handleTokenChange($a, $l[$i]) | |
465 | 465 | ||
466 | 466 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
467 | 467 | then $a | |
468 | 468 | else throw("List size exceeds 10") | |
469 | 469 | ||
470 | 470 | $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) | |
471 | 471 | } | |
472 | 472 | ||
473 | 473 | ||
474 | 474 | func handlePoolTokensRedeem (PRedeemed,userAddress) = { | |
475 | 475 | func handleTokenRedeem (accum,tokenId) = { | |
476 | 476 | let Bk = tryGetInteger((("global_" + getAssetString(tokenId)) + "_balance")) | |
477 | 477 | let PSupply = getVirtualPoolTokenAmount() | |
478 | 478 | let tokenDecimals = tryGetInteger((("static_" + getAssetString(tokenId)) + "_scale")) | |
479 | 479 | let psuppl = fraction((toBigInt((PSupply - PRedeemed)) * toBigInt(Scale8)), toBigInt(Scale8), toBigInt(PSupply), DOWN) | |
480 | 480 | let amount = toInt(fraction((toBigInt(Scale16) - psuppl), toBigInt(Bk), toBigInt(Scale16), CEILING)) | |
481 | 481 | (accum ++ [IntegerEntry((("global_" + getAssetString(tokenId)) + "_balance"), (Bk - amount)), ScriptTransfer(userAddress, amount, tokenId)]) | |
482 | 482 | } | |
483 | 483 | ||
484 | 484 | let $l = assetIds | |
485 | 485 | let $s = size($l) | |
486 | 486 | let $acc0 = nil | |
487 | 487 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
488 | 488 | then $a | |
489 | 489 | else handleTokenRedeem($a, $l[$i]) | |
490 | 490 | ||
491 | 491 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
492 | 492 | then $a | |
493 | 493 | else throw("List size exceeds 10") | |
494 | 494 | ||
495 | 495 | $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) | |
496 | 496 | } | |
497 | 497 | ||
498 | 498 | ||
499 | 499 | func calculateOutAmount (AmountIn,assetIn,assetOut,BalanceIn,BalanceOut) = { | |
500 | 500 | let IndexIn = value(indexOf(assetIds, assetIn)) | |
501 | 501 | let IndexOut = value(indexOf(assetIds, assetOut)) | |
502 | 502 | if ((IndexIn == IndexOut)) | |
503 | 503 | then AmountIn | |
504 | 504 | 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) | |
505 | 505 | } | |
506 | 506 | ||
507 | 507 | ||
508 | 508 | func calculateCurrentAssetInterest (assetId,assetIdStr,aBalance,tokenEarningsLastCheck) = { | |
509 | 509 | let totalStaked = tryGetInteger("global_indexStaked") | |
510 | 510 | let tokenBalanceLastCheck = tokenEarningsLastCheck | |
511 | 511 | let currentBalanceDelta = (getTokenBalance(assetId) - aBalance) | |
512 | 512 | let currentTokenEarnings = if ((currentBalanceDelta > tokenBalanceLastCheck)) | |
513 | 513 | then currentBalanceDelta | |
514 | 514 | else tokenBalanceLastCheck | |
515 | 515 | let newEarnings = (currentTokenEarnings - tokenBalanceLastCheck) | |
516 | 516 | let newInterest = if ((totalStaked == 0)) | |
517 | 517 | then 0 | |
518 | 518 | else fraction(newEarnings, Scale8, totalStaked) | |
519 | 519 | let lastCheckInterest = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_interest")) | |
520 | 520 | (lastCheckInterest + newInterest) | |
521 | 521 | } | |
522 | 522 | ||
523 | 523 | ||
524 | 524 | func claimResult (address) = { | |
525 | 525 | let addressStr = toString(address) | |
526 | 526 | let puzzleAmount = tryGetInteger((addressStr + "_indexStaked")) | |
527 | 527 | func handler (accum,assetId) = { | |
528 | 528 | let assetIdStr = getAssetString(assetId) | |
529 | 529 | let aBalance = tryGetInteger((("global_" + getAssetString(assetId)) + "_balance")) | |
530 | 530 | let tokenEarningsLastCheck = tryGetInteger((("global_lastCheck_" + assetIdStr) + "_earnings")) | |
531 | 531 | let currentTokenInterest = calculateCurrentAssetInterest(assetId, assetIdStr, aBalance, tokenEarningsLastCheck) | |
532 | 532 | let currentTokenEarnings = max([tokenEarningsLastCheck, (getTokenBalance(assetId) - aBalance)]) | |
533 | 533 | let rewardAmount = fraction(puzzleAmount, (currentTokenInterest - tryGetInteger((((addressStr + "_lastCheck_") + assetIdStr) + "_interest"))), Scale8) | |
534 | 534 | let transfer = if ((rewardAmount == 0)) | |
535 | 535 | then nil | |
536 | 536 | else [ScriptTransfer(address, rewardAmount, assetId)] | |
537 | 537 | $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))) | |
538 | 538 | } | |
539 | 539 | ||
540 | 540 | let accum = { | |
541 | 541 | let $l = earnedAssets | |
542 | 542 | let $s = size($l) | |
543 | 543 | let $acc0 = $Tuple2(nil, 0) | |
544 | 544 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
545 | 545 | then $a | |
546 | 546 | else handler($a, $l[$i]) | |
547 | 547 | ||
548 | 548 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
549 | 549 | then $a | |
550 | 550 | else throw("List size exceeds 10") | |
551 | 551 | ||
552 | 552 | $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) | |
553 | 553 | } | |
554 | 554 | $Tuple2((accum._1 ++ [IntegerEntry((addressStr + "_claimedRewardUSD"), (tryGetInteger((addressStr + "_claimedRewardUSD")) + accum._2)), IntegerEntry((addressStr + "_lastClaim"), lastBlock.timestamp)]), accum._2) | |
555 | 555 | } | |
556 | 556 | ||
557 | 557 | ||
558 | 558 | func indexStakeResult (addressStr,amount) = { | |
559 | 559 | let li = claimResult(addressFromStringValue(addressStr))._1 | |
560 | 560 | (li ++ [IntegerEntry((addressStr + "_indexStaked"), (tryGetInteger((addressStr + "_indexStaked")) + amount)), IntegerEntry("global_indexStaked", (tryGetInteger("global_indexStaked") + amount))]) | |
561 | 561 | } | |
562 | 562 | ||
563 | 563 | ||
564 | 564 | func sum (accum,n) = (accum + parseIntValue(n)) | |
565 | 565 | ||
566 | 566 | ||
567 | 567 | func checkFeeAsset (accum,next) = if (if ((indexOf(supportedFeeAssetsStr, next) != unit)) | |
568 | 568 | then (accum == "") | |
569 | 569 | else false) | |
570 | 570 | then next | |
571 | 571 | else accum | |
572 | 572 | ||
573 | 573 | ||
574 | 574 | func getTmpRebalanceIds (newAssetIdsLi) = { | |
575 | 575 | let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",") | |
576 | 576 | let result = newAssetIdsLi | |
577 | 577 | func f (accum,assetId) = if ((indexOf(result, assetId) == unit)) | |
578 | 578 | then (accum ++ [assetId]) | |
579 | 579 | else accum | |
580 | 580 | ||
581 | 581 | let $l = currentAssetIdsLi | |
582 | 582 | let $s = size($l) | |
583 | 583 | let $acc0 = result | |
584 | 584 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
585 | 585 | then $a | |
586 | 586 | else f($a, $l[$i]) | |
587 | 587 | ||
588 | 588 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
589 | 589 | then $a | |
590 | 590 | else throw("List size exceeds 10") | |
591 | 591 | ||
592 | 592 | $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) | |
593 | 593 | } | |
594 | 594 | ||
595 | 595 | ||
596 | 596 | func checkTokensChange (newAssetIdsLi) = { | |
597 | 597 | let currentAssetIdsLi = split(tryGetString("static_tokenIds"), ",") | |
598 | 598 | func rem (accum,assetId) = if ((indexOf(newAssetIdsLi, assetId) == unit)) | |
599 | 599 | then (accum + 1) | |
600 | 600 | else accum | |
601 | 601 | ||
602 | 602 | func add (accum,assetId) = if ((indexOf(currentAssetIdsLi, assetId) == unit)) | |
603 | 603 | then (accum + 1) | |
604 | 604 | else accum | |
605 | 605 | ||
606 | 606 | let removed = { | |
607 | 607 | let $l = currentAssetIdsLi | |
608 | 608 | let $s = size($l) | |
609 | 609 | let $acc0 = 0 | |
610 | 610 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
611 | 611 | then $a | |
612 | 612 | else rem($a, $l[$i]) | |
613 | 613 | ||
614 | 614 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
615 | 615 | then $a | |
616 | 616 | else throw("List size exceeds 10") | |
617 | 617 | ||
618 | 618 | $f4_2($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($f4_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
619 | 619 | } | |
620 | 620 | let added = { | |
621 | 621 | let $l = newAssetIdsLi | |
622 | 622 | let $s = size($l) | |
623 | 623 | let $acc0 = 0 | |
624 | 624 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
625 | 625 | then $a | |
626 | 626 | else add($a, $l[$i]) | |
627 | 627 | ||
628 | 628 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
629 | 629 | then $a | |
630 | 630 | else throw("List size exceeds 10") | |
631 | 631 | ||
632 | 632 | $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) | |
633 | 633 | } | |
634 | 634 | (removed + added) | |
635 | 635 | } | |
636 | 636 | ||
637 | 637 | ||
638 | 638 | func validatePayments (assetsList,payments) = { | |
639 | 639 | func getPaymentAssets (accum,next) = if ((0 >= next.amount)) | |
640 | 640 | then throw(((("Too low payment amount for " + getAssetString(next.assetId)) + ": ") + toString(next.amount))) | |
641 | 641 | else (accum ++ [getAssetString(next.assetId)]) | |
642 | 642 | ||
643 | 643 | let paymentList = { | |
644 | 644 | let $l = payments | |
645 | 645 | let $s = size($l) | |
646 | 646 | let $acc0 = nil | |
647 | 647 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
648 | 648 | then $a | |
649 | 649 | else getPaymentAssets($a, $l[$i]) | |
650 | 650 | ||
651 | 651 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
652 | 652 | then $a | |
653 | 653 | else throw("List size exceeds 10") | |
654 | 654 | ||
655 | 655 | $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) | |
656 | 656 | } | |
657 | 657 | func f1 (accum,next) = if ((indexOf(assetsList, next) == unit)) | |
658 | 658 | then throw(((next + " asset is present in payments, but is not in new assets: ") + makeString(assetsList, ","))) | |
659 | 659 | else (accum + 1) | |
660 | 660 | ||
661 | 661 | func f2 (accum,next) = if ((indexOf(paymentList, next) == unit)) | |
662 | 662 | then throw(((next + " asset is present in new assets, but is not in payments: ") + makeString(paymentList, ","))) | |
663 | 663 | else (accum + 1) | |
664 | 664 | ||
665 | 665 | let a1 = { | |
666 | 666 | let $l = paymentList | |
667 | 667 | let $s = size($l) | |
668 | 668 | let $acc0 = 0 | |
669 | 669 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
670 | 670 | then $a | |
671 | 671 | else f1($a, $l[$i]) | |
672 | 672 | ||
673 | 673 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
674 | 674 | then $a | |
675 | 675 | else throw("List size exceeds 10") | |
676 | 676 | ||
677 | 677 | $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) | |
678 | 678 | } | |
679 | 679 | let a2 = { | |
680 | 680 | let $l = assetsList | |
681 | 681 | let $s = size($l) | |
682 | 682 | let $acc0 = 0 | |
683 | 683 | func $f6_1 ($a,$i) = if (($i >= $s)) | |
684 | 684 | then $a | |
685 | 685 | else f2($a, $l[$i]) | |
686 | 686 | ||
687 | 687 | func $f6_2 ($a,$i) = if (($i >= $s)) | |
688 | 688 | then $a | |
689 | 689 | else throw("List size exceeds 10") | |
690 | 690 | ||
691 | 691 | $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) | |
692 | 692 | } | |
693 | 693 | (a1 + a2) | |
694 | 694 | } | |
695 | 695 | ||
696 | 696 | ||
697 | 697 | func validateWeights (weights) = { | |
698 | 698 | func v (accum,w) = { | |
699 | 699 | let wInt = valueOrErrorMessage(parseInt(w), ("Wrong weight format: " + w)) | |
700 | 700 | if (if ((MIN_WEIGHT > wInt)) | |
701 | 701 | then true | |
702 | 702 | else (wInt > MAX_WEIGHT)) | |
703 | 703 | then throw(((((("Weight should be in range " + toString(MIN_WEIGHT)) + " - ") + toString(MAX_WEIGHT)) + ", current: ") + w)) | |
704 | 704 | else accum | |
705 | 705 | } | |
706 | 706 | ||
707 | 707 | let $l = weights | |
708 | 708 | let $s = size($l) | |
709 | 709 | let $acc0 = 0 | |
710 | 710 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
711 | 711 | then $a | |
712 | 712 | else v($a, $l[$i]) | |
713 | 713 | ||
714 | 714 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
715 | 715 | then $a | |
716 | 716 | else throw("List size exceeds 10") | |
717 | 717 | ||
718 | 718 | $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) | |
719 | 719 | } | |
720 | 720 | ||
721 | 721 | ||
722 | 722 | @Callable(i) | |
723 | 723 | func preInit (assetIdsStr,assetWeightsStr,baseTokenIdStr,poolDomain,poolOwner,fee) = { | |
724 | 724 | let poolOwnerAddress = Address(fromBase58String(poolOwner)) | |
725 | 725 | let assetIdsStrLi = split(assetIdsStr, ",") | |
726 | 726 | let assetIdsLi = { | |
727 | 727 | let $l = assetIdsStrLi | |
728 | 728 | let $s = size($l) | |
729 | 729 | let $acc0 = nil | |
730 | 730 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
731 | 731 | then $a | |
732 | 732 | else addAssetBytesToList($a, $l[$i]) | |
733 | 733 | ||
734 | 734 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
735 | 735 | then $a | |
736 | 736 | else throw("List size exceeds 10") | |
737 | 737 | ||
738 | 738 | $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) | |
739 | 739 | } | |
740 | 740 | let feeAssetStr = { | |
741 | 741 | let $l = assetIdsStrLi | |
742 | 742 | let $s = size($l) | |
743 | 743 | let $acc0 = "" | |
744 | 744 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
745 | 745 | then $a | |
746 | 746 | else checkFeeAsset($a, $l[$i]) | |
747 | 747 | ||
748 | 748 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
749 | 749 | then $a | |
750 | 750 | else throw("List size exceeds 10") | |
751 | 751 | ||
752 | 752 | $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) | |
753 | 753 | } | |
754 | 754 | if (isShutdown()) | |
755 | 755 | then throw("contract is on stop") | |
756 | 756 | else if ((this != i.caller)) | |
757 | 757 | then throw("admin only") | |
758 | 758 | else if ((feeAssetStr == "")) | |
759 | 759 | then throw("pool must have one of the supported fee assets in the composition") | |
760 | 760 | else if ((size(poolDomain) > 13)) | |
761 | 761 | then throw("too large pool domain") | |
762 | 762 | else if (if ((fee > 500)) | |
763 | 763 | then true | |
764 | 764 | else (0 > fee)) | |
765 | 765 | then throw("fee value must be between 50 and 500 (0.5-5%)") | |
766 | 766 | else { | |
767 | 767 | let assetWeightsStrLi = split(assetWeightsStr, ",") | |
768 | 768 | let assetWeightsSum = { | |
769 | 769 | let $l = assetWeightsStrLi | |
770 | 770 | let $s = size($l) | |
771 | 771 | let $acc0 = 0 | |
772 | 772 | func $f6_1 ($a,$i) = if (($i >= $s)) | |
773 | 773 | then $a | |
774 | 774 | else sum($a, $l[$i]) | |
775 | 775 | ||
776 | 776 | func $f6_2 ($a,$i) = if (($i >= $s)) | |
777 | 777 | then $a | |
778 | 778 | else throw("List size exceeds 10") | |
779 | 779 | ||
780 | 780 | $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) | |
781 | 781 | } | |
782 | 782 | func addTokenDataEntries (accum,assetNum) = if ((assetNum >= size(assetIdsLi))) | |
783 | 783 | then accum | |
784 | 784 | else { | |
785 | 785 | let assetDecimals = match assetIdsLi[assetNum] { | |
786 | 786 | case x: ByteVector => | |
787 | 787 | value(assetInfo(x)).decimals | |
788 | 788 | case _ => | |
789 | 789 | 8 | |
790 | 790 | } | |
791 | 791 | (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])))]) | |
792 | 792 | } | |
793 | 793 | ||
794 | 794 | if ((assetWeightsSum != 10000)) | |
795 | 795 | then throw("sum of token weights must be equal to 10000") | |
796 | 796 | else ({ | |
797 | 797 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
798 | 798 | let $s = size($l) | |
799 | 799 | let $acc0 = nil | |
800 | 800 | func $f7_1 ($a,$i) = if (($i >= $s)) | |
801 | 801 | then $a | |
802 | 802 | else addTokenDataEntries($a, $l[$i]) | |
803 | 803 | ||
804 | 804 | func $f7_2 ($a,$i) = if (($i >= $s)) | |
805 | 805 | then $a | |
806 | 806 | else throw("List size exceeds 10") | |
807 | 807 | ||
808 | 808 | $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) | |
809 | 809 | } ++ [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)]) | |
810 | 810 | } | |
811 | 811 | } | |
812 | 812 | ||
813 | 813 | ||
814 | 814 | ||
815 | 815 | @Callable(i) | |
816 | 816 | func deInit () = if (isShutdown()) | |
817 | 817 | then throw("contract is on stop") | |
818 | 818 | else if ((i.caller != this)) | |
819 | 819 | then throw("admin only") | |
820 | 820 | else [IntegerEntry("global_wasInited", 0)] | |
821 | 821 | ||
822 | 822 | ||
823 | 823 | ||
824 | 824 | @Callable(i) | |
825 | 825 | func init () = { | |
826 | 826 | func prepareList () = { | |
827 | 827 | func handler (accum,n) = (accum ++ [IntegerEntry((("global_" + getAssetString(n.assetId)) + "_balance"), n.amount)]) | |
828 | 828 | ||
829 | 829 | let $l = i.payments | |
830 | 830 | let $s = size($l) | |
831 | 831 | let $acc0 = nil | |
832 | 832 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
833 | 833 | then $a | |
834 | 834 | else handler($a, $l[$i]) | |
835 | 835 | ||
836 | 836 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
837 | 837 | then $a | |
838 | 838 | else throw("List size exceeds 10") | |
839 | 839 | ||
840 | 840 | $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) | |
841 | 841 | } | |
842 | 842 | ||
843 | 843 | func calculatePoolTokensAmount (payments) = { | |
844 | 844 | func handler (accum,pmt) = { | |
845 | 845 | let assetId = pmt.assetId | |
846 | 846 | func handler2 (accum,n) = if ((n == assetId)) | |
847 | 847 | then value(indexOf(assetIds, n)) | |
848 | 848 | else accum | |
849 | 849 | ||
850 | 850 | let Token = { | |
851 | 851 | let $l = assetIds | |
852 | 852 | let $s = size($l) | |
853 | 853 | let $acc0 = 1 | |
854 | 854 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
855 | 855 | then $a | |
856 | 856 | else handler2($a, $l[$i]) | |
857 | 857 | ||
858 | 858 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
859 | 859 | then $a | |
860 | 860 | else throw("List size exceeds 10") | |
861 | 861 | ||
862 | 862 | $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) | |
863 | 863 | } | |
864 | 864 | fraction(accum, pow(pmt.amount, Decimals[Token], AssetsWeights[Token], AssetsWeightsDecimals, 8, FLOOR), Scale8) | |
865 | 865 | } | |
866 | 866 | ||
867 | 867 | let $l = payments | |
868 | 868 | let $s = size($l) | |
869 | 869 | let $acc0 = PoolTokenScale | |
870 | 870 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
871 | 871 | then $a | |
872 | 872 | else handler($a, $l[$i]) | |
873 | 873 | ||
874 | 874 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
875 | 875 | then $a | |
876 | 876 | else throw("List size exceeds 10") | |
877 | 877 | ||
878 | 878 | $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) | |
879 | 879 | } | |
880 | 880 | ||
881 | 881 | if (isShutdown()) | |
882 | 882 | then throw("contract is on stop") | |
883 | 883 | else if ((tryGetInteger("global_wasInited") > 0)) | |
884 | 884 | then throw("pool already inited") | |
885 | 885 | else { | |
886 | 886 | let initialPoolTokens = calculatePoolTokensAmount(i.payments) | |
887 | 887 | if ((initialPoolTokens == 0)) | |
888 | 888 | then throw("you need a bigger tokens amount to launch the pool") | |
889 | 889 | else { | |
890 | 890 | let poolTokenIssue = Issue(("PZ " + tryGetString("static_poolDomain")), "Puzzle Swap: pool index token", initialPoolTokens, PoolTokenDecimals, true, unit, 0) | |
891 | 891 | let poolTokenId = calculateAssetId(poolTokenIssue) | |
892 | 892 | (prepareList() ++ [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)]) | |
893 | 893 | } | |
894 | 894 | } | |
895 | 895 | } | |
896 | 896 | ||
897 | 897 | ||
898 | 898 | ||
899 | 899 | @Callable(i) | |
900 | 900 | func generateIndex (needChange) = if ((size(i.payments) != T)) | |
901 | 901 | then throw(("you need to attach all pool tokens. amount of pool tokens: " + toString(T))) | |
902 | 902 | else if (!(checkTokensValidity(i.payments))) | |
903 | 903 | then throw("wrong assets attached") | |
904 | 904 | else { | |
905 | 905 | let PIssuedNoMult = getMinPIssued(i.payments) | |
906 | 906 | let result = handlePoolTokensAdd(PIssuedNoMult, i.payments, i.originCaller, needChange) | |
907 | 907 | let PIssuedWithMult = fraction(PIssuedNoMult, Scale16, getKMult(), DOWN) | |
908 | 908 | let reissue = Reissue(getBinaryValue("global_poolToken_id"), PIssuedWithMult, true) | |
909 | 909 | $Tuple2((result ++ [reissue, ScriptTransfer(i.caller, PIssuedWithMult, tryGetBinary("global_poolToken_id")), IntegerEntry("global_poolToken_amount", (tryGetInteger("global_poolToken_amount") + PIssuedWithMult))]), PIssuedWithMult) | |
910 | 910 | } | |
911 | 911 | ||
912 | 912 | ||
913 | 913 | ||
914 | 914 | @Callable(i) | |
915 | 915 | func redeemIndex (sendToOrigin) = { | |
916 | 916 | let pmt = i.payments[0] | |
917 | 917 | if ((pmt.assetId != tryGetBinary("global_poolToken_id"))) | |
918 | 918 | then throw("please attach pool share token") | |
919 | 919 | else if (isShutdown()) | |
920 | 920 | then throw("contract is on stop") | |
921 | 921 | else { | |
922 | 922 | let PRedeemedWithMult = pmt.amount | |
923 | 923 | let PRedeemedWithNoMult = fraction(PRedeemedWithMult, getKMult(), Scale16, DOWN) | |
924 | 924 | let result = handlePoolTokensRedeem(PRedeemedWithNoMult, if (sendToOrigin) | |
925 | 925 | then i.originCaller | |
926 | 926 | else i.caller) | |
927 | 927 | (result ++ [Burn(tryGetBinary("global_poolToken_id"), PRedeemedWithMult), IntegerEntry("global_poolToken_amount", (tryGetInteger("global_poolToken_amount") - PRedeemedWithMult))]) | |
928 | 928 | } | |
929 | 929 | } | |
930 | 930 | ||
931 | 931 | ||
932 | 932 | ||
933 | 933 | @Callable(i) | |
934 | 934 | func stakeIndex () = { | |
935 | 935 | let addressStr = toString(i.originCaller) | |
936 | 936 | let pmt = i.payments[0] | |
937 | 937 | if ((value(pmt.assetId) != tryGetBinary("global_poolToken_id"))) | |
938 | 938 | then throw("wrong asset attached") | |
939 | 939 | else indexStakeResult(addressStr, pmt.amount) | |
940 | 940 | } | |
941 | 941 | ||
942 | 942 | ||
943 | 943 | ||
944 | 944 | @Callable(i) | |
945 | 945 | func stakeIndexFor (addressStr) = { | |
946 | 946 | let pmt = i.payments[0] | |
947 | 947 | if ((value(pmt.assetId) != tryGetBinary("global_poolToken_id"))) | |
948 | 948 | then throw("wrong asset attached") | |
949 | 949 | else indexStakeResult(addressStr, pmt.amount) | |
950 | 950 | } | |
951 | 951 | ||
952 | 952 | ||
953 | 953 | ||
954 | 954 | @Callable(i) | |
955 | 955 | func unstakeIndex (indexAmount) = { | |
956 | 956 | let addressStr = if ((indexOf(layer2Addresses, toString(i.caller)) != unit)) | |
957 | 957 | then toString(i.originCaller) | |
958 | 958 | else toString(i.caller) | |
959 | 959 | let indexAvailable = tryGetInteger((addressStr + "_indexStaked")) | |
960 | 960 | if (isShutdown()) | |
961 | 961 | then throw("contract is on stop") | |
962 | 962 | else if ((indexAmount > indexAvailable)) | |
963 | 963 | then throw("you don't have index tokens available") | |
964 | 964 | else if (isShutdown()) | |
965 | 965 | then throw("contract is on stop") | |
966 | 966 | 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"))]) | |
967 | 967 | } | |
968 | 968 | ||
969 | 969 | ||
970 | 970 | ||
971 | 971 | @Callable(i) | |
972 | 972 | func claimIndexRewards () = if (isShutdown()) | |
973 | 973 | then throw("contract is on stop") | |
974 | 974 | else claimResult(i.caller) | |
975 | 975 | ||
976 | 976 | ||
977 | 977 | ||
978 | 978 | @Callable(i) | |
979 | 979 | func evaluateClaim (user) = $Tuple2(nil, claimResult(addressFromStringValue(user))._2) | |
980 | 980 | ||
981 | 981 | ||
982 | 982 | ||
983 | 983 | @Callable(i) | |
984 | 984 | func swap (assetOut,minimum) = { | |
985 | 985 | let pmt = if ((size(i.payments) == 1)) | |
986 | 986 | then value(i.payments[0]) | |
987 | 987 | else throw("please attach exactly one payment") | |
988 | 988 | let AmountIn = value(i.payments[0].amount) | |
989 | 989 | let AssetIn = pmt.assetId | |
990 | 990 | let AssetOut = getAssetBytes(assetOut) | |
991 | 991 | let assetIn = getAssetString(AssetIn) | |
992 | 992 | let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale"))) | |
993 | 993 | let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale"))) | |
994 | 994 | let feeAssetOutStr = tryGetString("static_feeToken") | |
995 | 995 | let feeAssetOut = if ((feeAssetOutStr == "")) | |
996 | 996 | then usdnAssetId | |
997 | 997 | else getAssetBytes(feeAssetOutStr) | |
998 | 998 | let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance")) | |
999 | 999 | let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance")) | |
1000 | 1000 | let AssetInBalanceScaled = (AssetInBalance * scaleIn) | |
1001 | 1001 | let AssetOutBalanceScaled = (AssetOutBalance * scaleOut) | |
1002 | 1002 | let feeAmountIn = fraction(AmountIn, Fee, FeeScale) | |
1003 | 1003 | let cleanAmountIn = (AmountIn - feeAmountIn) | |
1004 | 1004 | let cleanAmountInScaled = (cleanAmountIn * scaleIn) | |
1005 | 1005 | let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled) | |
1006 | 1006 | let AmountOut = fraction(AmountOut1, 1, scaleOut) | |
1007 | 1007 | let AssetOutBalance2 = (AssetOutBalance - AmountOut) | |
1008 | 1008 | let AssetInBalance2 = (AssetInBalance + cleanAmountIn) | |
1009 | 1009 | let feeAssetOutBalance = if ((feeAssetOut == AssetIn)) | |
1010 | 1010 | then AssetInBalance2 | |
1011 | 1011 | else if ((feeAssetOut == AssetOut)) | |
1012 | 1012 | then AssetOutBalance2 | |
1013 | 1013 | else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance")) | |
1014 | 1014 | let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance) | |
1015 | 1015 | if ((minimum > AmountOut)) | |
1016 | 1016 | then throw("amount to recieve is lower than given one") | |
1017 | 1017 | else if ((AssetOut == AssetIn)) | |
1018 | 1018 | then throw("this swap is not allowed") | |
1019 | 1019 | else if ((0 > (AssetOutBalance - AmountOut))) | |
1020 | 1020 | then throw("contract is out of reserves") | |
1021 | 1021 | else if (isShutdown()) | |
1022 | 1022 | then throw("contract is on stop") | |
1023 | 1023 | else { | |
1024 | 1024 | let creatorFee = fraction(feeAmountOut, 1, 10) | |
1025 | 1025 | let protocolFee = fraction(feeAmountOut, 4, 10) | |
1026 | 1026 | let newBalanceIn = AssetInBalance2 | |
1027 | 1027 | let newBalanceOut = (AssetOutBalance2 - (if ((AssetOut == feeAssetOut)) | |
1028 | 1028 | then feeAmountOut | |
1029 | 1029 | else 0)) | |
1030 | 1030 | let newBalanceFeeAsset = if (if ((feeAssetOut != AssetIn)) | |
1031 | 1031 | then (feeAssetOut != AssetOut) | |
1032 | 1032 | else false) | |
1033 | 1033 | then (feeAssetOutBalance - feeAmountOut) | |
1034 | 1034 | else unit | |
1035 | 1035 | let assetInChange = IntegerEntry((("global_" + getAssetString(AssetIn)) + "_balance"), newBalanceIn) | |
1036 | 1036 | let assetOutChange = IntegerEntry((("global_" + assetOut) + "_balance"), newBalanceOut) | |
1037 | 1037 | let feeAssetOutChange = if ((newBalanceFeeAsset != unit)) | |
1038 | 1038 | then IntegerEntry((("global_" + getAssetString(feeAssetOut)) + "_balance"), value(newBalanceFeeAsset)) | |
1039 | 1039 | else StringEntry("hello", "world") | |
1040 | 1040 | let volumeUpdate = calculateUsdnValue(AssetIn, AmountIn, AssetInBalance, feeAssetOutBalance) | |
1041 | 1041 | let volumeUsdUpdate = calculateUsdValue(AssetIn, AmountIn, AssetInBalance) | |
1042 | 1042 | $Tuple2([assetOutChange, assetInChange, feeAssetOutChange, ScriptTransfer(i.caller, AmountOut, AssetOut), ScriptTransfer(addressFromStringValue(tryGetString("static_poolOwner")), creatorFee, feeAssetOut), IntegerEntry("global_earnedByOwner", (tryGetInteger("global_earnedByOwner") + creatorFee)), IntegerEntry("global_volume", (tryGetInteger("global_volume") + volumeUpdate)), IntegerEntry("global_volume_usd", (tryGetInteger("global_volume_usd") + volumeUsdUpdate)), ScriptTransfer(feesAddress, protocolFee, feeAssetOut)], AmountOut) | |
1043 | 1043 | } | |
1044 | 1044 | } | |
1045 | 1045 | ||
1046 | 1046 | ||
1047 | 1047 | ||
1048 | 1048 | @Callable(i) | |
1049 | 1049 | func swapReadOnly (assetIn,assetOut,AmountIn) = { | |
1050 | 1050 | let AssetIn = getAssetBytes(assetIn) | |
1051 | 1051 | let AssetOut = getAssetBytes(assetOut) | |
1052 | 1052 | let scaleIn = (Scale8 / tryGetInteger((("static_" + assetIn) + "_scale"))) | |
1053 | 1053 | let scaleOut = (Scale8 / tryGetInteger((("static_" + assetOut) + "_scale"))) | |
1054 | 1054 | let feeAssetOutStr = tryGetString("static_feeToken") | |
1055 | 1055 | let feeAssetOut = if ((feeAssetOutStr == "")) | |
1056 | 1056 | then usdnAssetId | |
1057 | 1057 | else getAssetBytes(feeAssetOutStr) | |
1058 | 1058 | let AssetInBalance = tryGetInteger((("global_" + getAssetString(AssetIn)) + "_balance")) | |
1059 | 1059 | let AssetOutBalance = tryGetInteger((("global_" + assetOut) + "_balance")) | |
1060 | 1060 | let AssetInBalanceScaled = (AssetInBalance * scaleIn) | |
1061 | 1061 | let AssetOutBalanceScaled = (AssetOutBalance * scaleOut) | |
1062 | 1062 | let feeAmountIn = fraction(AmountIn, Fee, FeeScale) | |
1063 | 1063 | let cleanAmountIn = (AmountIn - feeAmountIn) | |
1064 | 1064 | let cleanAmountInScaled = (cleanAmountIn * scaleIn) | |
1065 | 1065 | let AmountOut1 = calculateOutAmount(cleanAmountInScaled, AssetIn, AssetOut, AssetInBalanceScaled, AssetOutBalanceScaled) | |
1066 | 1066 | let AmountOut = fraction(AmountOut1, 1, scaleOut) | |
1067 | 1067 | let AssetOutBalance2 = (AssetOutBalance - AmountOut) | |
1068 | 1068 | let AssetInBalance2 = (AssetInBalance + cleanAmountIn) | |
1069 | 1069 | let feeAssetOutBalance = if ((feeAssetOut == AssetIn)) | |
1070 | 1070 | then AssetInBalance2 | |
1071 | 1071 | else if ((feeAssetOut == AssetOut)) | |
1072 | 1072 | then AssetOutBalance2 | |
1073 | 1073 | else tryGetInteger((("global_" + getAssetString(feeAssetOut)) + "_balance")) | |
1074 | 1074 | let feeAmountOut = calculateOutAmount(feeAmountIn, AssetIn, feeAssetOut, AssetInBalance, feeAssetOutBalance) | |
1075 | 1075 | if ((AssetOut == AssetIn)) | |
1076 | 1076 | then throw("this swap is not allowed") | |
1077 | 1077 | else if ((0 > (AssetOutBalance - AmountOut))) | |
1078 | 1078 | then throw("contract is out of reserves") | |
1079 | 1079 | else if (isShutdown()) | |
1080 | 1080 | then throw("contract is on stop") | |
1081 | 1081 | else $Tuple2(nil, AmountOut) | |
1082 | 1082 | } | |
1083 | 1083 | ||
1084 | 1084 | ||
1085 | 1085 | ||
1086 | 1086 | @Callable(i) | |
1087 | 1087 | func transferOwnership (newOwnerAddress) = if ((toString(i.caller) != tryGetString("static_poolOwner"))) | |
1088 | 1088 | then throw("this call available only for pool owner") | |
1089 | 1089 | else [StringEntry("static_poolOwner", newOwnerAddress)] | |
1090 | 1090 | ||
1091 | 1091 | ||
1092 | 1092 | ||
1093 | 1093 | @Callable(i) | |
1094 | 1094 | func setFee (newFee) = if ((toString(i.caller) != tryGetString("static_poolOwner"))) | |
1095 | 1095 | then throw("this call available only for pool owner") | |
1096 | 1096 | else if ((1 > valueOrElse(getInteger(govAddress, ("approvedTx_" + toBase58String(i.transactionId))), 0))) | |
1097 | 1097 | then throw("this transaction needs approval from puzzle network") | |
1098 | 1098 | else [IntegerEntry("static_fee", newFee)] | |
1099 | 1099 | ||
1100 | 1100 | ||
1101 | 1101 | ||
1102 | 1102 | @Callable(i) | |
1103 | 1103 | func setRebalancingPlan (assetIdsStr,assetWeightsStr,baseTokenIdStr,stepsAmount,stepsInterval) = if ((i.caller != addressFromStringValue(tryGetString("static_poolOwner")))) | |
1104 | 1104 | then throw("this call available only for pool owner") | |
1105 | 1105 | else if (valueOrElse(getBoolean(this, "rebalance_inProgress"), false)) | |
1106 | 1106 | then throw("rebalancing in progress") | |
1107 | 1107 | else { | |
1108 | 1108 | let newAssetWeightsStrLi = split(assetWeightsStr, ",") | |
1109 | 1109 | let newAssetIdsStrLi = split(assetIdsStr, ",") | |
1110 | 1110 | let feeAssetStr = { | |
1111 | 1111 | let $l = newAssetIdsStrLi | |
1112 | 1112 | let $s = size($l) | |
1113 | 1113 | let $acc0 = "" | |
1114 | 1114 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
1115 | 1115 | then $a | |
1116 | 1116 | else checkFeeAsset($a, $l[$i]) | |
1117 | 1117 | ||
1118 | 1118 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
1119 | 1119 | then $a | |
1120 | 1120 | else throw("List size exceeds 10") | |
1121 | 1121 | ||
1122 | 1122 | $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) | |
1123 | 1123 | } | |
1124 | 1124 | let assetWeightsSum = { | |
1125 | 1125 | let $l = newAssetWeightsStrLi | |
1126 | 1126 | let $s = size($l) | |
1127 | 1127 | let $acc0 = 0 | |
1128 | 1128 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
1129 | 1129 | then $a | |
1130 | 1130 | else sum($a, $l[$i]) | |
1131 | 1131 | ||
1132 | 1132 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
1133 | 1133 | then $a | |
1134 | 1134 | else throw("List size exceeds 10") | |
1135 | 1135 | ||
1136 | 1136 | $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) | |
1137 | 1137 | } | |
1138 | 1138 | let oldAssetIds = getStringValue("static_tokenIds") | |
1139 | 1139 | let oldAssetIdsLi = split(oldAssetIds, ",") | |
1140 | 1140 | func findAdded (accum,next) = if ((indexOf(oldAssetIdsLi, next) == unit)) | |
1141 | 1141 | then (accum ++ [next]) | |
1142 | 1142 | else accum | |
1143 | 1143 | ||
1144 | 1144 | func findRemoved (accum,next) = if ((indexOf(newAssetIdsStrLi, next) == unit)) | |
1145 | 1145 | then (accum ++ [next]) | |
1146 | 1146 | else accum | |
1147 | 1147 | ||
1148 | 1148 | let addedAssets = { | |
1149 | 1149 | let $l = newAssetIdsStrLi | |
1150 | 1150 | let $s = size($l) | |
1151 | 1151 | let $acc0 = nil | |
1152 | 1152 | func $f6_1 ($a,$i) = if (($i >= $s)) | |
1153 | 1153 | then $a | |
1154 | 1154 | else findAdded($a, $l[$i]) | |
1155 | 1155 | ||
1156 | 1156 | func $f6_2 ($a,$i) = if (($i >= $s)) | |
1157 | 1157 | then $a | |
1158 | 1158 | else throw("List size exceeds 10") | |
1159 | 1159 | ||
1160 | 1160 | $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) | |
1161 | 1161 | } | |
1162 | 1162 | let removedAssets = { | |
1163 | 1163 | let $l = oldAssetIdsLi | |
1164 | 1164 | let $s = size($l) | |
1165 | 1165 | let $acc0 = nil | |
1166 | 1166 | func $f7_1 ($a,$i) = if (($i >= $s)) | |
1167 | 1167 | then $a | |
1168 | 1168 | else findRemoved($a, $l[$i]) | |
1169 | 1169 | ||
1170 | 1170 | func $f7_2 ($a,$i) = if (($i >= $s)) | |
1171 | 1171 | then $a | |
1172 | 1172 | else throw("List size exceeds 10") | |
1173 | 1173 | ||
1174 | 1174 | $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) | |
1175 | 1175 | } | |
1176 | 1176 | let validPayments = validatePayments(addedAssets, i.payments) | |
1177 | 1177 | let validWeights = validateWeights(newAssetWeightsStrLi) | |
1178 | 1178 | if ((validWeights == validWeights)) | |
1179 | 1179 | then if ((validPayments != (size(addedAssets) + size(i.payments)))) | |
1180 | 1180 | then throw("Payments not present or something wrong with them") | |
1181 | 1181 | else if ((size(newAssetIdsStrLi) != size(newAssetWeightsStrLi))) | |
1182 | 1182 | then throw("assetIds and assetWeights should have same length") | |
1183 | 1183 | else if ((validPayments != (size(addedAssets) + size(i.payments)))) | |
1184 | 1184 | then throw("Payments not present or something wrong with them") | |
1185 | 1185 | else if ((feeAssetStr == "")) | |
1186 | 1186 | then throw("pool must have one of the supported fee assets in the composition") | |
1187 | 1187 | else if ((indexOf(newAssetIdsStrLi, baseTokenIdStr) == unit)) | |
1188 | 1188 | then throw("baseTokenId should be present in assetIds") | |
1189 | 1189 | else if (if ((MIN_STEPS_AMOUNT > stepsAmount)) | |
1190 | 1190 | then true | |
1191 | 1191 | else (stepsAmount > MAX_STEPS_AMOUNT)) | |
1192 | 1192 | then throw(((((("Steps amount should be between " + toString(MIN_STEPS_AMOUNT)) + " and ") + toString(MAX_STEPS_AMOUNT)) + ", current: ") + toString(stepsAmount))) | |
1193 | 1193 | else if (if ((MIN_STEPS_INTERVAL > stepsInterval)) | |
1194 | 1194 | then true | |
1195 | 1195 | else (stepsInterval > MAX_STEPS_INTERVAL)) | |
1196 | 1196 | then throw(((((("Steps interval should be between " + toString(MIN_STEPS_INTERVAL)) + " and ") + toString(MAX_STEPS_INTERVAL)) + ", current: ") + toString(stepsInterval))) | |
1197 | 1197 | else if ((assetWeightsSum != 10000)) | |
1198 | 1198 | then throw(("sum of token weights must be equal to 10000, current: " + toString(assetWeightsSum))) | |
1199 | 1199 | else { | |
1200 | 1200 | func f (accum,assetIdStr) = { | |
1201 | 1201 | let oldWeight = tryGetInteger((("static_" + assetIdStr) + "_weight")) | |
1202 | 1202 | let newWeight = if ((indexOf(newAssetIdsStrLi, assetIdStr) == unit)) | |
1203 | 1203 | then 0 | |
1204 | 1204 | else parseIntValue(value(newAssetWeightsStrLi[value(indexOf(newAssetIdsStrLi, assetIdStr))])) | |
1205 | 1205 | let deltaPerStep = fraction((newWeight - oldWeight), 10000, stepsAmount) | |
1206 | 1206 | (accum ++ [toString(deltaPerStep)]) | |
1207 | 1207 | } | |
1208 | 1208 | ||
1209 | 1209 | let tmpAssetIdsLi = getTmpRebalanceIds(newAssetIdsStrLi) | |
1210 | 1210 | let assetDeltas = { | |
1211 | 1211 | let $l = tmpAssetIdsLi | |
1212 | 1212 | let $s = size($l) | |
1213 | 1213 | let $acc0 = nil | |
1214 | 1214 | func $f8_1 ($a,$i) = if (($i >= $s)) | |
1215 | 1215 | then $a | |
1216 | 1216 | else f($a, $l[$i]) | |
1217 | 1217 | ||
1218 | 1218 | func $f8_2 ($a,$i) = if (($i >= $s)) | |
1219 | 1219 | then $a | |
1220 | 1220 | else throw("List size exceeds 10") | |
1221 | 1221 | ||
1222 | 1222 | $f8_2($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1223 | 1223 | } | |
1224 | 1224 | let newTokensAdded = (checkTokensChange(newAssetIdsStrLi) > 0) | |
1225 | 1225 | func recordAssetPayment (accum,next) = (accum ++ [IntegerEntry(("rebalance_attachedPayment_" + getAssetString(next.assetId)), next.amount)]) | |
1226 | 1226 | ||
1227 | 1227 | let paymentEntries = { | |
1228 | 1228 | let $l = i.payments | |
1229 | 1229 | let $s = size($l) | |
1230 | 1230 | let $acc0 = nil | |
1231 | 1231 | func $f9_1 ($a,$i) = if (($i >= $s)) | |
1232 | 1232 | then $a | |
1233 | 1233 | else recordAssetPayment($a, $l[$i]) | |
1234 | 1234 | ||
1235 | 1235 | func $f9_2 ($a,$i) = if (($i >= $s)) | |
1236 | 1236 | then $a | |
1237 | 1237 | else throw("List size exceeds 10") | |
1238 | 1238 | ||
1239 | 1239 | $f9_2($f9_1($f9_1($f9_1($f9_1($f9_1($f9_1($f9_1($f9_1($f9_1($f9_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1240 | 1240 | } | |
1241 | 1241 | let storeWeights = saveCurrentWeights() | |
1242 | 1242 | let requestGovInvoke = invoke(govAddress, "requestRebalancing", [toBase58String(i.transactionId)], nil) | |
1243 | 1243 | if ((requestGovInvoke == requestGovInvoke)) | |
1244 | 1244 | then (([StringEntry("rebalance_addedAssets", makeString(addedAssets, ",")), StringEntry("rebalance_removedAssets", makeString(removedAssets, ",")), StringEntry("tmp_rebalanceAssetIds", makeString(tmpAssetIdsLi, ",")), BooleanEntry("rebalance_inProgress", true), BooleanEntry("rebalance_newTokensAdded", newTokensAdded), IntegerEntry("rebalance_stepsDone", 0), IntegerEntry("rebalance_lastStepHeight", height), IntegerEntry("rebalance_stepsAmount", stepsAmount), IntegerEntry("rebalance_stepsInterval", stepsInterval), StringEntry("rebalance_assetIds", assetIdsStr), StringEntry("rebalance_newBaseTokenId", baseTokenIdStr), StringEntry("rebalance_assetDeltas", makeString(assetDeltas, ","))] ++ paymentEntries) ++ storeWeights) | |
1245 | 1245 | else throw("Strict value is not equal to itself.") | |
1246 | 1246 | } | |
1247 | 1247 | else throw("Strict value is not equal to itself.") | |
1248 | 1248 | } | |
1249 | 1249 | ||
1250 | 1250 | ||
1251 | 1251 | ||
1252 | 1252 | @Callable(i) | |
1253 | 1253 | func stepRebalancing () = { | |
1254 | 1254 | let rebId = valueOrErrorMessage(getString(govAddress, ("pool_lastRebalancing_" + toString(this))), "rebalancing is not registered at gov address") | |
1255 | 1255 | if (!(valueOrElse(getBoolean(this, "rebalance_inProgress"), false))) | |
1256 | 1256 | then throw("no rebalancing in progress") | |
1257 | 1257 | else if ((valueOrElse(getInteger(govAddress, ("rebalancing_status_" + rebId)), 0) != 2)) | |
1258 | 1258 | then throw("this transaction needs approval from puzzle network") | |
1259 | 1259 | else { | |
1260 | 1260 | let lastStepHeight = getIntegerValue("rebalance_lastStepHeight") | |
1261 | 1261 | let stepInterval = getIntegerValue("rebalance_stepsInterval") | |
1262 | 1262 | let stepsDone = getIntegerValue("rebalance_stepsDone") | |
1263 | 1263 | let nextStepHeight = (lastStepHeight + stepInterval) | |
1264 | 1264 | if ((nextStepHeight > height)) | |
1265 | 1265 | then throw("can't be done yet") | |
1266 | 1266 | else { | |
1267 | 1267 | let assetDeltas = split(getStringValue("rebalance_assetDeltas"), ",") | |
1268 | 1268 | let newAssetIdsStr = getStringValue("tmp_rebalanceAssetIds") | |
1269 | 1269 | let newAssetIds = split(newAssetIdsStr, ",") | |
1270 | 1270 | func f (accum,assetIdStr) = (accum ++ [toString(fraction(((valueOrElse(getInteger(("rebalance_startWeight_" + assetIdStr)), 0) * 10000) + (parseIntValue(assetDeltas[value(indexOf(newAssetIds, assetIdStr))]) * (stepsDone + 1))), 1, 10000, HALFUP))]) | |
1271 | 1271 | ||
1272 | 1272 | let newShares = makeString({ | |
1273 | 1273 | let $l = newAssetIds | |
1274 | 1274 | let $s = size($l) | |
1275 | 1275 | let $acc0 = nil | |
1276 | 1276 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
1277 | 1277 | then $a | |
1278 | 1278 | else f($a, $l[$i]) | |
1279 | 1279 | ||
1280 | 1280 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
1281 | 1281 | then $a | |
1282 | 1282 | else throw("List size exceeds 10") | |
1283 | 1283 | ||
1284 | 1284 | $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) | |
1285 | 1285 | }, ",") | |
1286 | 1286 | let newTokensAdded = getBooleanValue("rebalance_newTokensAdded") | |
1287 | 1287 | let inv = if (if (newTokensAdded) | |
1288 | 1288 | then (stepsDone == 0) | |
1289 | 1289 | else false) | |
1290 | 1290 | then invoke(this, "doRebalancingWithNewTokens", [newAssetIdsStr, newShares, getStringValue("rebalance_newBaseTokenId")], nil) | |
1291 | 1291 | else invoke(this, "doRebalancing", [newShares], nil) | |
1292 | 1292 | if ((inv == inv)) | |
1293 | 1293 | then { | |
1294 | 1294 | let notifyInvoke = invoke(poolsHubAddress, "notifyPoolChange", nil, nil) | |
1295 | 1295 | if ((notifyInvoke == notifyInvoke)) | |
1296 | 1296 | then { | |
1297 | 1297 | let isFinished = ((stepsDone + 1) >= getIntegerValue("rebalance_stepsAmount")) | |
1298 | 1298 | let actions = [BooleanEntry("rebalance_inProgress", !(isFinished)), IntegerEntry("rebalance_stepsDone", (stepsDone + 1)), IntegerEntry("rebalance_lastStepHeight", height)] | |
1299 | 1299 | if ((stepsDone == 0)) | |
1300 | 1300 | then (actions ++ [StringEntry("static_tokenIds", newAssetIdsStr)]) | |
1301 | 1301 | else if (isFinished) | |
1302 | 1302 | then { | |
1303 | 1303 | let removedAssetsLi = split(tryGetString("rebalance_removedAssets"), ",") | |
1304 | 1304 | func rmData (accum,assetId) = (accum ++ [DeleteEntry((("static_" + assetId) + "_scale")), DeleteEntry((("static_" + assetId) + "_decimals")), DeleteEntry((("static_" + assetId) + "_weight")), DeleteEntry((("global_" + assetId) + "_balance")), DeleteEntry(("rebalance_attachedPayment_" + assetId))]) | |
1305 | 1305 | ||
1306 | 1306 | let rm = { | |
1307 | 1307 | let $l = removedAssetsLi | |
1308 | 1308 | let $s = size($l) | |
1309 | 1309 | let $acc0 = nil | |
1310 | 1310 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
1311 | 1311 | then $a | |
1312 | 1312 | else rmData($a, $l[$i]) | |
1313 | 1313 | ||
1314 | 1314 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
1315 | 1315 | then $a | |
1316 | 1316 | else throw("List size exceeds 10") | |
1317 | 1317 | ||
1318 | 1318 | $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) | |
1319 | 1319 | } | |
1320 | 1320 | let addedAssetsLi = split(tryGetString("rebalance_addedAssets"), ",") | |
1321 | 1321 | func addRemovePayments (accum,assetId) = (accum ++ [DeleteEntry(("rebalance_attachedPayment_" + assetId))]) | |
1322 | 1322 | ||
1323 | 1323 | let rmPayments = { | |
1324 | 1324 | let $l = addedAssetsLi | |
1325 | 1325 | let $s = size($l) | |
1326 | 1326 | let $acc0 = nil | |
1327 | 1327 | func $f6_1 ($a,$i) = if (($i >= $s)) | |
1328 | 1328 | then $a | |
1329 | 1329 | else addRemovePayments($a, $l[$i]) | |
1330 | 1330 | ||
1331 | 1331 | func $f6_2 ($a,$i) = if (($i >= $s)) | |
1332 | 1332 | then $a | |
1333 | 1333 | else throw("List size exceeds 10") | |
1334 | 1334 | ||
1335 | 1335 | $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) | |
1336 | 1336 | } | |
1337 | 1337 | let finalAssetsIdsStr = tryGetString("rebalance_assetIds") | |
1338 | 1338 | let AssetsWeightsStr = { | |
1339 | 1339 | let $l = split(finalAssetsIdsStr, ",") | |
1340 | 1340 | let $s = size($l) | |
1341 | 1341 | let $acc0 = nil | |
1342 | 1342 | func $f7_1 ($a,$i) = if (($i >= $s)) | |
1343 | 1343 | then $a | |
1344 | 1344 | else addAssetWeightToStrList($a, $l[$i]) | |
1345 | 1345 | ||
1346 | 1346 | func $f7_2 ($a,$i) = if (($i >= $s)) | |
1347 | 1347 | then $a | |
1348 | 1348 | else throw("List size exceeds 10") | |
1349 | 1349 | ||
1350 | 1350 | $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) | |
1351 | 1351 | } | |
1352 | 1352 | let notify = invoke(govAddress, "notifyRebalancingDone", [rebId], nil) | |
1353 | 1353 | if ((notify == notify)) | |
1354 | 1354 | then (((actions ++ rm) ++ rmPayments) ++ [StringEntry("static_tokenIds", finalAssetsIdsStr), StringEntry("static_tokenWeights", makeString(AssetsWeightsStr, ",")), IntegerEntry("static_tokensAmount", size(split(finalAssetsIdsStr, ",")))]) | |
1355 | 1355 | else throw("Strict value is not equal to itself.") | |
1356 | 1356 | } | |
1357 | 1357 | else { | |
1358 | 1358 | let finalAssetsIdsStr = tryGetString("rebalance_assetIds") | |
1359 | 1359 | let AssetsWeightsStr = { | |
1360 | 1360 | let $l = split(finalAssetsIdsStr, ",") | |
1361 | 1361 | let $s = size($l) | |
1362 | 1362 | let $acc0 = nil | |
1363 | 1363 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
1364 | 1364 | then $a | |
1365 | 1365 | else addAssetWeightToStrList($a, $l[$i]) | |
1366 | 1366 | ||
1367 | 1367 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
1368 | 1368 | then $a | |
1369 | 1369 | else throw("List size exceeds 10") | |
1370 | 1370 | ||
1371 | 1371 | $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) | |
1372 | 1372 | } | |
1373 | 1373 | (actions ++ [StringEntry("static_tokenWeights", makeString(AssetsWeightsStr, ","))]) | |
1374 | 1374 | } | |
1375 | 1375 | } | |
1376 | 1376 | else throw("Strict value is not equal to itself.") | |
1377 | 1377 | } | |
1378 | 1378 | else throw("Strict value is not equal to itself.") | |
1379 | 1379 | } | |
1380 | 1380 | } | |
1381 | 1381 | } | |
1382 | 1382 | ||
1383 | 1383 | ||
1384 | 1384 | ||
1385 | 1385 | @Callable(i) | |
1386 | 1386 | func doRebalancing (assetWeightsStr) = { | |
1387 | 1387 | let assetWeightsStrLi = split(assetWeightsStr, ",") | |
1388 | 1388 | let assetWeightsSum = { | |
1389 | 1389 | let $l = assetWeightsStrLi | |
1390 | 1390 | let $s = size($l) | |
1391 | 1391 | let $acc0 = 0 | |
1392 | 1392 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
1393 | 1393 | then $a | |
1394 | 1394 | else sum($a, $l[$i]) | |
1395 | 1395 | ||
1396 | 1396 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
1397 | 1397 | then $a | |
1398 | 1398 | else throw("List size exceeds 10") | |
1399 | 1399 | ||
1400 | 1400 | $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) | |
1401 | 1401 | } | |
1402 | 1402 | let assetIdsStrLi = split(tryGetString("static_tokenIds"), ",") | |
1403 | 1403 | if ((i.caller != this)) | |
1404 | 1404 | then throw("this call available only for admin") | |
1405 | 1405 | else { | |
1406 | 1406 | let oldKMult = getKMult() | |
1407 | 1407 | func handler (pars,assetId) = { | |
1408 | 1408 | let accum = pars._1 | |
1409 | 1409 | let assetIdStr = getAssetString(assetId) | |
1410 | 1410 | func handler2 (accum,n) = if ((n == assetId)) | |
1411 | 1411 | then value(indexOf(assetIds, n)) | |
1412 | 1412 | else accum | |
1413 | 1413 | ||
1414 | 1414 | let Token = { | |
1415 | 1415 | let $l = assetIds | |
1416 | 1416 | let $s = size($l) | |
1417 | 1417 | let $acc0 = 1 | |
1418 | 1418 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
1419 | 1419 | then $a | |
1420 | 1420 | else handler2($a, $l[$i]) | |
1421 | 1421 | ||
1422 | 1422 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
1423 | 1423 | then $a | |
1424 | 1424 | else throw("List size exceeds 10") | |
1425 | 1425 | ||
1426 | 1426 | $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) | |
1427 | 1427 | } | |
1428 | 1428 | let balance = tryGetInteger((("global_" + assetIdStr) + "_balance")) | |
1429 | 1429 | let weight = if ((pars._2 == "new")) | |
1430 | 1430 | then parseIntValue(assetWeightsStrLi[Token]) | |
1431 | 1431 | else tryGetInteger((("static_" + assetIdStr) + "_weight")) | |
1432 | 1432 | $Tuple2(fraction(accum, pow(balance, Decimals[Token], weight, AssetsWeightsDecimals, 8, FLOOR), Scale8), pars._2) | |
1433 | 1433 | } | |
1434 | 1434 | ||
1435 | 1435 | let newK = ( let $l = assetIds | |
1436 | 1436 | let $s = size($l) | |
1437 | 1437 | let $acc0 = $Tuple2(PoolTokenScale, "new") | |
1438 | 1438 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
1439 | 1439 | then $a | |
1440 | 1440 | else handler($a, $l[$i]) | |
1441 | 1441 | ||
1442 | 1442 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
1443 | 1443 | then $a | |
1444 | 1444 | else throw("List size exceeds 10") | |
1445 | 1445 | ||
1446 | 1446 | $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))._1 | |
1447 | 1447 | let oldK = ( let $l = assetIds | |
1448 | 1448 | let $s = size($l) | |
1449 | 1449 | let $acc0 = $Tuple2(PoolTokenScale, "old") | |
1450 | 1450 | func $f6_1 ($a,$i) = if (($i >= $s)) | |
1451 | 1451 | then $a | |
1452 | 1452 | else handler($a, $l[$i]) | |
1453 | 1453 | ||
1454 | 1454 | func $f6_2 ($a,$i) = if (($i >= $s)) | |
1455 | 1455 | then $a | |
1456 | 1456 | else throw("List size exceeds 10") | |
1457 | 1457 | ||
1458 | 1458 | $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))._1 | |
1459 | 1459 | let newKMult = fraction(oldKMult, newK, oldK) | |
1460 | 1460 | func addTokenDataEntries (accum,assetNum) = if ((assetNum >= size(assetWeightsStrLi))) | |
1461 | 1461 | then accum | |
1462 | 1462 | else (accum ++ [IntegerEntry((("static_" + assetIdsStrLi[assetNum]) + "_weight"), value(parseInt(assetWeightsStrLi[assetNum])))]) | |
1463 | 1463 | ||
1464 | 1464 | ({ | |
1465 | 1465 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
1466 | 1466 | let $s = size($l) | |
1467 | 1467 | let $acc0 = nil | |
1468 | 1468 | func $f7_1 ($a,$i) = if (($i >= $s)) | |
1469 | 1469 | then $a | |
1470 | 1470 | else addTokenDataEntries($a, $l[$i]) | |
1471 | 1471 | ||
1472 | 1472 | func $f7_2 ($a,$i) = if (($i >= $s)) | |
1473 | 1473 | then $a | |
1474 | 1474 | else throw("List size exceeds 10") | |
1475 | 1475 | ||
1476 | 1476 | $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) | |
1477 | 1477 | } ++ [IntegerEntry("static_KMult", newKMult)]) | |
1478 | 1478 | } | |
1479 | 1479 | } | |
1480 | 1480 | ||
1481 | 1481 | ||
1482 | 1482 | ||
1483 | 1483 | @Callable(i) | |
1484 | 1484 | func doRebalancingWithNewTokens (assetIdsStr,assetWeightsStr,baseTokenIdStr) = { | |
1485 | 1485 | let newAssetWeightsStrLi = split(assetWeightsStr, ",") | |
1486 | 1486 | let prevAssetIdsStrLi = split(tryGetString("static_tokenIds"), ",") | |
1487 | 1487 | let newAssetIdsStrLi = split(assetIdsStr, ",") | |
1488 | 1488 | let newAssetIds = { | |
1489 | 1489 | let $l = newAssetIdsStrLi | |
1490 | 1490 | let $s = size($l) | |
1491 | 1491 | let $acc0 = nil | |
1492 | 1492 | func $f4_1 ($a,$i) = if (($i >= $s)) | |
1493 | 1493 | then $a | |
1494 | 1494 | else addAssetBytesToList($a, $l[$i]) | |
1495 | 1495 | ||
1496 | 1496 | func $f4_2 ($a,$i) = if (($i >= $s)) | |
1497 | 1497 | then $a | |
1498 | 1498 | else throw("List size exceeds 10") | |
1499 | 1499 | ||
1500 | 1500 | $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) | |
1501 | 1501 | } | |
1502 | 1502 | let feeAssetStr = { | |
1503 | 1503 | let $l = newAssetIdsStrLi | |
1504 | 1504 | let $s = size($l) | |
1505 | 1505 | let $acc0 = "" | |
1506 | 1506 | func $f5_1 ($a,$i) = if (($i >= $s)) | |
1507 | 1507 | then $a | |
1508 | 1508 | else checkFeeAsset($a, $l[$i]) | |
1509 | 1509 | ||
1510 | 1510 | func $f5_2 ($a,$i) = if (($i >= $s)) | |
1511 | 1511 | then $a | |
1512 | 1512 | else throw("List size exceeds 10") | |
1513 | 1513 | ||
1514 | 1514 | $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) | |
1515 | 1515 | } | |
1516 | 1516 | let addedAssets = split(tryGetString("rebalance_addedAssets"), ",") | |
1517 | 1517 | func findAssetPayment (assetId) = valueOrElse(getInteger(("rebalance_attachedPayment_" + getAssetString(assetId))), 0) | |
1518 | 1518 | ||
1519 | 1519 | func addAssetBalanceToLi (li,assetId) = (li ++ [findAssetPayment(assetId)]) | |
1520 | 1520 | ||
1521 | 1521 | let attachedBalances = { | |
1522 | 1522 | let $l = newAssetIds | |
1523 | 1523 | let $s = size($l) | |
1524 | 1524 | let $acc0 = nil | |
1525 | 1525 | func $f6_1 ($a,$i) = if (($i >= $s)) | |
1526 | 1526 | then $a | |
1527 | 1527 | else addAssetBalanceToLi($a, $l[$i]) | |
1528 | 1528 | ||
1529 | 1529 | func $f6_2 ($a,$i) = if (($i >= $s)) | |
1530 | 1530 | then $a | |
1531 | 1531 | else throw("List size exceeds 10") | |
1532 | 1532 | ||
1533 | 1533 | $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) | |
1534 | 1534 | } | |
1535 | 1535 | if ((i.caller != this)) | |
1536 | 1536 | then throw(("this call available only for admin, " + toString(i.caller))) | |
1537 | 1537 | else { | |
1538 | 1538 | let oldKMult = getKMult() | |
1539 | 1539 | let oldK = getVirtualPoolTokenAmount() | |
1540 | 1540 | func myltiplyAssetsForK (pars,assetId) = { | |
1541 | 1541 | func findAssetNum (accum,n) = if ((n == assetId)) | |
1542 | 1542 | then value(indexOf(newAssetIds, n)) | |
1543 | 1543 | else accum | |
1544 | 1544 | ||
1545 | 1545 | let currentK = pars | |
1546 | 1546 | let assetIdStr = getAssetString(assetId) | |
1547 | 1547 | let TokenNum = { | |
1548 | 1548 | let $l = newAssetIds | |
1549 | 1549 | let $s = size($l) | |
1550 | 1550 | let $acc0 = 1 | |
1551 | 1551 | func $f7_1 ($a,$i) = if (($i >= $s)) | |
1552 | 1552 | then $a | |
1553 | 1553 | else findAssetNum($a, $l[$i]) | |
1554 | 1554 | ||
1555 | 1555 | func $f7_2 ($a,$i) = if (($i >= $s)) | |
1556 | 1556 | then $a | |
1557 | 1557 | else throw("List size exceeds 10") | |
1558 | 1558 | ||
1559 | 1559 | $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) | |
1560 | 1560 | } | |
1561 | 1561 | let weight = parseIntValue(newAssetWeightsStrLi[TokenNum]) | |
1562 | 1562 | let balanceInState = tryGetInteger((("global_" + assetIdStr) + "_balance")) | |
1563 | 1563 | let balanceInPayment = attachedBalances[TokenNum] | |
1564 | 1564 | let balance = (balanceInState + balanceInPayment) | |
1565 | 1565 | let assetDecimals = if ((assetId == unit)) | |
1566 | 1566 | then 8 | |
1567 | 1567 | else value(assetInfo(value(assetId))).decimals | |
1568 | 1568 | if ((0 >= balance)) | |
1569 | 1569 | then throw(("you need to attach all new assets in payment. this asset is missed: " + assetIdStr)) | |
1570 | 1570 | else fraction(currentK, pow(balance, assetDecimals, weight, AssetsWeightsDecimals, 8, FLOOR), Scale8) | |
1571 | 1571 | } | |
1572 | 1572 | ||
1573 | 1573 | let newK = { | |
1574 | 1574 | let $l = newAssetIds | |
1575 | 1575 | let $s = size($l) | |
1576 | 1576 | let $acc0 = PoolTokenScale | |
1577 | 1577 | func $f7_1 ($a,$i) = if (($i >= $s)) | |
1578 | 1578 | then $a | |
1579 | 1579 | else myltiplyAssetsForK($a, $l[$i]) | |
1580 | 1580 | ||
1581 | 1581 | func $f7_2 ($a,$i) = if (($i >= $s)) | |
1582 | 1582 | then $a | |
1583 | 1583 | else throw("List size exceeds 10") | |
1584 | 1584 | ||
1585 | 1585 | $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) | |
1586 | 1586 | } | |
1587 | 1587 | let newKMult = fraction(oldKMult, newK, oldK) | |
1588 | 1588 | func addTokenDataEntries (accum,assetNum) = { | |
1589 | 1589 | let assetIdStr = newAssetIdsStrLi[assetNum] | |
1590 | 1590 | let assetId = newAssetIds[assetNum] | |
1591 | 1591 | let assetDecimals = if ((assetId == unit)) | |
1592 | 1592 | then 8 | |
1593 | 1593 | else value(assetInfo(value(assetId))).decimals | |
1594 | 1594 | let newAssetData = if ((indexOf(addedAssets, assetIdStr) != unit)) | |
1595 | 1595 | then [IntegerEntry((("global_" + assetIdStr) + "_balance"), attachedBalances[assetNum]), IntegerEntry((("static_" + assetIdStr) + "_scale"), pow(10, 0, assetDecimals, 0, 0, DOWN)), IntegerEntry((("static_" + assetIdStr) + "_decimals"), assetDecimals)] | |
1596 | 1596 | else nil | |
1597 | 1597 | if ((assetNum >= size(newAssetWeightsStrLi))) | |
1598 | 1598 | then accum | |
1599 | 1599 | else ((accum ++ [IntegerEntry((("static_" + assetIdStr) + "_weight"), value(parseInt(newAssetWeightsStrLi[assetNum])))]) ++ newAssetData) | |
1600 | 1600 | } | |
1601 | 1601 | ||
1602 | 1602 | ({ | |
1603 | 1603 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
1604 | 1604 | let $s = size($l) | |
1605 | 1605 | let $acc0 = nil | |
1606 | 1606 | func $f8_1 ($a,$i) = if (($i >= $s)) | |
1607 | 1607 | then $a | |
1608 | 1608 | else addTokenDataEntries($a, $l[$i]) | |
1609 | 1609 | ||
1610 | 1610 | func $f8_2 ($a,$i) = if (($i >= $s)) | |
1611 | 1611 | then $a | |
1612 | 1612 | else throw("List size exceeds 10") | |
1613 | 1613 | ||
1614 | 1614 | $f8_2($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($f8_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1615 | 1615 | } ++ [StringEntry("static_tokenIds", assetIdsStr), StringEntry("static_feeToken", feeAssetStr), StringEntry("static_tokenWeights", assetWeightsStr), IntegerEntry("static_tokensAmount", size(newAssetIds)), IntegerEntry("static_KMult", newKMult)]) | |
1616 | 1616 | } | |
1617 | 1617 | } | |
1618 | 1618 | ||
1619 | 1619 | ||
1620 | 1620 | @Verifier(tx) | |
1621 | 1621 | func verify () = if (if ((valueOrElse(getInteger("global_wasPreInited"), 0) == 0)) | |
1622 | 1622 | then if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
1623 | 1623 | then true | |
1624 | 1624 | else sigVerify(tx.bodyBytes, tx.proofs[0], masterPubKey) | |
1625 | 1625 | else false) | |
1626 | 1626 | then true | |
1627 | 1627 | else match tx { | |
1628 | 1628 | case tx: SetScriptTransaction => | |
1629 | 1629 | let scriptFull = value(tx.script) | |
1630 | 1630 | let hash = toBase58String(sha256(scriptFull)) | |
1631 | 1631 | if (sigVerify(tx.bodyBytes, tx.proofs[0], masterPubKey)) | |
1632 | 1632 | then (valueOrElse(getInteger(coldMasterAddress, ("approvedScript_" + hash)), 0) > height) | |
1633 | 1633 | else false | |
1634 | 1634 | case _ => | |
1635 | 1635 | if (sigVerify(tx.bodyBytes, tx.proofs[0], masterPubKey)) | |
1636 | 1636 | then (valueOrElse(getInteger(coldMasterAddress, ("approvedTx_" + toBase58String(tx.id))), 0) > 0) | |
1637 | 1637 | else false | |
1638 | 1638 | } | |
1639 | 1639 |
github/deemru/w8io/026f985 168.32 ms ◑