tx · AmkwiMwGk537QJXeqwLRYHMS59Y6nM6nsfnoYV8Zxcou 3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a: -0.10000000 Waves 2022.10.30 15:43 [2295152] smart account 3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a > SELF 0.00000000 Waves
{ "type": 13, "id": "AmkwiMwGk537QJXeqwLRYHMS59Y6nM6nsfnoYV8Zxcou", "fee": 10000000, "feeAssetId": null, "timestamp": 1667133807004, "version": 1, "sender": "3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a", "senderPublicKey": "3JAonT9h65iAMaQegaHVE8pCbEPHPXoARiimB7edrrTb", "proofs": [ "4Fd5xvioDCbJSVVJLfMbogtYQU69xWRtuFSp1KLTCedfn6uWDBGG8DqzCeCX1w4Yo4XoMFXgnxatFafMsZV9wYCx" ], "script": "base64:BgJwCAISCAoGCAgIAQEBEgMKAQESBQoDAQEBEgQKAgEBEgMKAQgSBAoCAQESBAoCAQESABIAEgQKAggEEgQKAgEBEgASBAoCAQESABIAEgMKAQgSABIAEgMKAQESABIAEgMKAQQSABIAEgMKAQgSAwoBCEQAB05fQ09JTlMJARFAZXh0ck5hdGl2ZSgxMDUwKQIFBHRoaXMCB05fQ09JTlMAC05fQ09JTlNfYmlnCQC2AgEFB05fQ09JTlMAC05fQ09JTlNfTUFYAAoADlRPS0VOX0RFQ0lNQUxTAAYAClRPS0VOX1JBVEUAwIQ9AA9GRUVfREVOT01JTkFUT1IAgMivoCUACVBSRUNJU0lPTgDAhD0ACERFQ0lNQUxTAAYADU1BWF9BRE1JTl9GRUUAgMivoCUAB01BWF9GRUUAgOSX0BIABU1BWF9BAMCEPQAMTUFYX0FfQ0hBTkdFAAoAE0FETUlOX0FDVElPTlNfREVMQVkJAGkCCQBoAgADAICjBQA8AA1NSU5fUkFNUF9USU1FCQBpAgCAowUAPAANVlBfTE9HX1BFUklPRACAuJkpAAxWUF9QUkVDSVNJT04AgKCUpY0dAAVjb2lucwkAtQkCCQ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gAWCQDMCAIAFwkAzAgCABgJAMwIAgAZCQDMCAIAGgkAzAgCABsJAMwIAgAcCQDMCAIAHQUDbmlsBAdsaXN0MzBtCQDMCAIA////////////AQkAzAgCAP7//////////wEJAMwIAgD9//////////8BCQDMCAIA/P//////////AQkAzAgCAPv//////////wEJAMwIAgD6//////////8BCQDMCAIA+f//////////AQkAzAgCAPj//////////wEJAMwIAgD3//////////8BCQDMCAIA9v//////////AQkAzAgCAPX//////////wEJAMwIAgD0//////////8BCQDMCAIA8///////////AQkAzAgCAPL//////////wEJAMwIAgDx//////////8BCQDMCAIA8P//////////AQkAzAgCAO///////////wEJAMwIAgDu//////////8BCQDMCAIA7f//////////AQkAzAgCAOz//////////wEJAMwIAgDr//////////8BCQDMCAIA6v//////////AQkAzAgCAOn//////////wEJAMwIAgDo//////////8BCQDMCAIA5///////////AQkAzAgCAOb//////////wEJAMwIAgDl//////////8BCQDMCAIA5P//////////AQkAzAgCAOP//////////wEJAMwIAgDi//////////8BBQNuaWwECHZhbHVlMzBwCgACJGwFB2xpc3QzMHAKAAIkcwkAkAMBBQIkbAoABSRhY2MwAgAKAQUkZjBfMQICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkBBGZvbGQCBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECFExpc3Qgc2l6ZSBleGNlZWRzIDMwCQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECC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GVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWg0zEM=", "chainId": 84, "height": 2295152, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: wQqeHB3jR8k1L9HLbaQWGpm6CkrrV4fJb6SUmmx3Qco Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let N_COINS = getIntegerValue(this, "N_COINS") | |
5 | + | ||
6 | + | let N_COINS_big = toBigInt(N_COINS) | |
7 | + | ||
8 | + | let N_COINS_MAX = 10 | |
9 | + | ||
10 | + | let TOKEN_DECIMALS = 6 | |
11 | + | ||
12 | + | let TOKEN_RATE = 1000000 | |
13 | + | ||
14 | + | let FEE_DENOMINATOR = 10000000000 | |
15 | + | ||
16 | + | let PRECISION = 1000000 | |
17 | + | ||
18 | + | let DECIMALS = 6 | |
19 | + | ||
20 | + | let MAX_ADMIN_FEE = 10000000000 | |
21 | + | ||
22 | + | let MAX_FEE = 5000000000 | |
23 | + | ||
24 | + | let MAX_A = 1000000 | |
25 | + | ||
26 | + | let MAX_A_CHANGE = 10 | |
27 | + | ||
28 | + | let ADMIN_ACTIONS_DELAY = ((3 * 86400) / 60) | |
29 | + | ||
30 | + | let MIN_RAMP_TIME = (86400 / 60) | |
31 | + | ||
32 | + | let VP_LOG_PERIOD = 86400000 | |
33 | + | ||
34 | + | let VP_PRECISION = 1000000000000 | |
35 | + | ||
36 | + | let coins = split(getStringValue(this, "coins"), ",") | |
37 | + | ||
38 | + | let fee = getIntegerValue(this, "fee") | |
39 | + | ||
40 | + | let admin_fee = getIntegerValue(this, "admin_fee") | |
41 | + | ||
42 | + | let is_auto_fees = getBooleanValue(this, "is_auto_fees") | |
43 | + | ||
44 | + | let owner = addressFromStringValue(getStringValue(this, "owner")) | |
45 | + | ||
46 | + | let token = fromBase58String(getStringValue(this, "token")) | |
47 | + | ||
48 | + | let token_quantity = value(assetInfo(token)).quantity | |
49 | + | ||
50 | + | let initial_A = getIntegerValue(this, "initial_A") | |
51 | + | ||
52 | + | let future_A = getIntegerValue(this, "future_A") | |
53 | + | ||
54 | + | let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
55 | + | ||
56 | + | let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0) | |
57 | + | ||
58 | + | let admin_actions_deadline = valueOrElse(getInteger(this, "admin_actions_deadline"), 0) | |
59 | + | ||
60 | + | let transfer_ownership_deadline = valueOrElse(getInteger(this, "transfer_ownership_deadline"), 0) | |
61 | + | ||
62 | + | let future_fee = getIntegerValue(this, "future_fee") | |
63 | + | ||
64 | + | let future_admin_fee = getIntegerValue(this, "future_admin_fee") | |
65 | + | ||
66 | + | let future_owner = getStringValue(this, "future_owner") | |
67 | + | ||
68 | + | let is_killed = getBooleanValue(this, "is_killed") | |
69 | + | ||
70 | + | let kill_deadline = getIntegerValue(this, "kill_deadline") | |
71 | + | ||
72 | + | let KILL_DEADLINE_DT = (((2 * 30) * 86400) / 60) | |
73 | + | ||
74 | + | let big0 = toBigInt(0) | |
75 | + | ||
76 | + | let big1 = toBigInt(1) | |
77 | + | ||
78 | + | let big2 = toBigInt(2) | |
79 | + | ||
80 | + | let heightAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, "heightAddress"), "no settings defined")), "bad settings address") | |
81 | + | ||
82 | + | let HEIGHT = height | |
83 | + | ||
84 | + | let block_timestamp = HEIGHT | |
85 | + | ||
86 | + | func assert (a) = if (a) | |
87 | + | then false | |
88 | + | else true | |
89 | + | ||
90 | + | ||
91 | + | func list_itos (list) = if ((size(list) > N_COINS_MAX)) | |
92 | + | then throw("list_itos: list.size() > N_COINS_MAX") | |
93 | + | else { | |
94 | + | func fold (acc,val) = (acc :+ toString(val)) | |
95 | + | ||
96 | + | let $l = list | |
97 | + | let $s = size($l) | |
98 | + | let $acc0 = nil | |
99 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
100 | + | then $a | |
101 | + | else fold($a, $l[$i]) | |
102 | + | ||
103 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
104 | + | then $a | |
105 | + | else throw("List size exceeds 10") | |
106 | + | ||
107 | + | $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) | |
108 | + | } | |
109 | + | ||
110 | + | ||
111 | + | func list_stoi (list) = if ((size(list) > N_COINS_MAX)) | |
112 | + | then throw("list_stoi: list.size() > N_COINS_MAX") | |
113 | + | else { | |
114 | + | func fold (acc,val) = (acc :+ parseIntValue(val)) | |
115 | + | ||
116 | + | let $l = list | |
117 | + | let $s = size($l) | |
118 | + | let $acc0 = nil | |
119 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
120 | + | then $a | |
121 | + | else fold($a, $l[$i]) | |
122 | + | ||
123 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
124 | + | then $a | |
125 | + | else throw("List size exceeds 10") | |
126 | + | ||
127 | + | $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) | |
128 | + | } | |
129 | + | ||
130 | + | ||
131 | + | let balances = list_stoi(split(getStringValue(this, "balances"), ",")) | |
132 | + | ||
133 | + | let rates = list_stoi(split(getStringValue(this, "rates"), ",")) | |
134 | + | ||
135 | + | let rates_size = size(rates) | |
136 | + | ||
137 | + | let index_N_COINS_MAX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
138 | + | ||
139 | + | func index_n (n) = if ((n > N_COINS_MAX)) | |
140 | + | then throw("index_n: n > N_COINS_MAX") | |
141 | + | else { | |
142 | + | func fold (acc,index) = if ((n > index)) | |
143 | + | then (acc :+ index) | |
144 | + | else acc | |
145 | + | ||
146 | + | let $l = index_N_COINS_MAX | |
147 | + | let $s = size($l) | |
148 | + | let $acc0 = nil | |
149 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
150 | + | then $a | |
151 | + | else fold($a, $l[$i]) | |
152 | + | ||
153 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
154 | + | then $a | |
155 | + | else throw("List size exceeds 10") | |
156 | + | ||
157 | + | $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) | |
158 | + | } | |
159 | + | ||
160 | + | ||
161 | + | let index_N_COINS = index_n(N_COINS) | |
162 | + | ||
163 | + | let index_N_COINS_1 = (index_N_COINS :+ N_COINS) | |
164 | + | ||
165 | + | func big_list (list) = if ((size(list) != N_COINS)) | |
166 | + | then throw("big_list: list.size() != N_COINS") | |
167 | + | else { | |
168 | + | func fold (acc,index) = (acc :+ toBigInt(fraction(list[index], TOKEN_RATE, rates[index]))) | |
169 | + | ||
170 | + | let $l = index_N_COINS | |
171 | + | let $s = size($l) | |
172 | + | let $acc0 = nil | |
173 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
174 | + | then $a | |
175 | + | else fold($a, $l[$i]) | |
176 | + | ||
177 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
178 | + | then $a | |
179 | + | else throw("List size exceeds 10") | |
180 | + | ||
181 | + | $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) | |
182 | + | } | |
183 | + | ||
184 | + | ||
185 | + | func coin_index (payment) = match payment.assetId { | |
186 | + | case assetId: ByteVector => | |
187 | + | valueOrErrorMessage(indexOf(coins, toBase58String(assetId)), (toBase58String(assetId) + " out of pool")) | |
188 | + | case _ => | |
189 | + | throw("unsupported assetId") | |
190 | + | } | |
191 | + | ||
192 | + | ||
193 | + | func admin_balance (i) = if (if ((0 > i)) | |
194 | + | then true | |
195 | + | else (i > N_COINS)) | |
196 | + | then throw("i out of index") | |
197 | + | else (assetBalance(this, fromBase58String(coins[i])) - balances[i]) | |
198 | + | ||
199 | + | ||
200 | + | func checkAddress (a58) = { | |
201 | + | let a = addressFromStringValue(a58) | |
202 | + | toString(a) | |
203 | + | } | |
204 | + | ||
205 | + | ||
206 | + | func _A () = { | |
207 | + | let t1 = future_A_time | |
208 | + | let A1 = future_A | |
209 | + | if ((t1 > block_timestamp)) | |
210 | + | then { | |
211 | + | let A0 = initial_A | |
212 | + | let t0 = initial_A_time | |
213 | + | if ((A1 > A0)) | |
214 | + | then (A0 + (((A1 - A0) * (block_timestamp - t0)) / (t1 - t0))) | |
215 | + | else (A0 - (((A0 - A1) * (block_timestamp - t0)) / (t1 - t0))) | |
216 | + | } | |
217 | + | else A1 | |
218 | + | } | |
219 | + | ||
220 | + | ||
221 | + | func list_sum (list) = { | |
222 | + | func fold (acc,val) = (acc + val) | |
223 | + | ||
224 | + | let $l = list | |
225 | + | let $s = size($l) | |
226 | + | let $acc0 = big0 | |
227 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
228 | + | then $a | |
229 | + | else fold($a, $l[$i]) | |
230 | + | ||
231 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
232 | + | then $a | |
233 | + | else throw("List size exceeds 10") | |
234 | + | ||
235 | + | $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) | |
236 | + | } | |
237 | + | ||
238 | + | ||
239 | + | func list_mult (list) = { | |
240 | + | func fold (acc,val) = fraction(fraction(acc, val, big1), N_COINS_big, big1) | |
241 | + | ||
242 | + | let $l = list | |
243 | + | let $s = size($l) | |
244 | + | let $acc0 = big1 | |
245 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
246 | + | then $a | |
247 | + | else fold($a, $l[$i]) | |
248 | + | ||
249 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
250 | + | then $a | |
251 | + | else throw("List size exceeds 10") | |
252 | + | ||
253 | + | $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) | |
254 | + | } | |
255 | + | ||
256 | + | ||
257 | + | let list16 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
258 | + | ||
259 | + | func get_D (xp,amp) = { | |
260 | + | let S = list_sum(xp) | |
261 | + | if ((toInt(S) == 0)) | |
262 | + | then 0 | |
263 | + | else { | |
264 | + | let Ann = (amp * N_COINS) | |
265 | + | let AnnS = fraction(toBigInt(Ann), S, big1) | |
266 | + | let Ann1 = toBigInt((Ann - 1)) | |
267 | + | let xd = list_mult(xp) | |
268 | + | let N_COINS_1 = (N_COINS + 1) | |
269 | + | let N_COINS_1_big = toBigInt(N_COINS_1) | |
270 | + | func D_mult (val) = { | |
271 | + | func fold (acc,index) = fraction(acc, val, big1) | |
272 | + | ||
273 | + | let $l = index_N_COINS_1 | |
274 | + | let $s = size($l) | |
275 | + | let $acc0 = big1 | |
276 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
277 | + | then $a | |
278 | + | else fold($a, $l[$i]) | |
279 | + | ||
280 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
281 | + | then $a | |
282 | + | else throw("List size exceeds 10") | |
283 | + | ||
284 | + | $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) | |
285 | + | } | |
286 | + | ||
287 | + | func D_proc (acc,unused) = if ((acc._2 == true)) | |
288 | + | then acc | |
289 | + | else { | |
290 | + | let Dprev = acc._1 | |
291 | + | let D_P = fraction(D_mult(Dprev), big1, xd) | |
292 | + | let D = fraction((AnnS + fraction(N_COINS_big, D_P, big1)), Dprev, (fraction(Ann1, Dprev, big1) + fraction(N_COINS_1_big, D_P, big1))) | |
293 | + | if ((D > Dprev)) | |
294 | + | then if ((1 >= toInt((D - Dprev)))) | |
295 | + | then $Tuple2(D, true) | |
296 | + | else $Tuple2(D, false) | |
297 | + | else if ((1 >= toInt((Dprev - D)))) | |
298 | + | then $Tuple2(D, true) | |
299 | + | else $Tuple2(D, false) | |
300 | + | } | |
301 | + | ||
302 | + | let $t060446106 = { | |
303 | + | let $l = list16 | |
304 | + | let $s = size($l) | |
305 | + | let $acc0 = $Tuple2(S, false) | |
306 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
307 | + | then $a | |
308 | + | else D_proc($a, $l[$i]) | |
309 | + | ||
310 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
311 | + | then $a | |
312 | + | else throw("List size exceeds 16") | |
313 | + | ||
314 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16) | |
315 | + | } | |
316 | + | let D = $t060446106._1 | |
317 | + | let finished = $t060446106._2 | |
318 | + | if ((finished == false)) | |
319 | + | then throw(("D_proc() not finished with " + toString(D))) | |
320 | + | else toInt(D) | |
321 | + | } | |
322 | + | } | |
323 | + | ||
324 | + | ||
325 | + | func get_y (i,j,x,xp) = if (assert((i != j))) | |
326 | + | then throw("same coin") | |
327 | + | else if (assert(if ((j >= 0)) | |
328 | + | then (i >= 0) | |
329 | + | else false)) | |
330 | + | then throw("below zero") | |
331 | + | else if (assert(if ((N_COINS > j)) | |
332 | + | then (N_COINS > i) | |
333 | + | else false)) | |
334 | + | then throw("above N_COINS") | |
335 | + | else { | |
336 | + | let amp = _A() | |
337 | + | let D = get_D(xp, amp) | |
338 | + | let D_big = toBigInt(D) | |
339 | + | let Ann_big = toBigInt((amp * N_COINS)) | |
340 | + | func S_c (acc,index) = { | |
341 | + | let $t067186737 = acc | |
342 | + | let S_ = $t067186737._1 | |
343 | + | let c = $t067186737._2 | |
344 | + | let x_ = if ((index == i)) | |
345 | + | then toBigInt(fraction(x, TOKEN_RATE, rates[index])) | |
346 | + | else xp[index] | |
347 | + | if ((index != j)) | |
348 | + | then $Tuple2((S_ + x_), fraction(c, D_big, fraction(x_, N_COINS_big, big1))) | |
349 | + | else $Tuple2(S_, c) | |
350 | + | } | |
351 | + | ||
352 | + | let $t070137077 = { | |
353 | + | let $l = index_N_COINS | |
354 | + | let $s = size($l) | |
355 | + | let $acc0 = $Tuple2(big0, D_big) | |
356 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
357 | + | then $a | |
358 | + | else S_c($a, $l[$i]) | |
359 | + | ||
360 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
361 | + | then $a | |
362 | + | else throw("List size exceeds 10") | |
363 | + | ||
364 | + | $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) | |
365 | + | } | |
366 | + | let S_ = $t070137077._1 | |
367 | + | let c_ = $t070137077._2 | |
368 | + | let c = fraction(c_, D_big, fraction(Ann_big, N_COINS_big, big1)) | |
369 | + | let bD = ((S_ + fraction(D_big, big1, Ann_big)) - D_big) | |
370 | + | func y_proc (acc,unused) = if ((acc._2 == true)) | |
371 | + | then acc | |
372 | + | else { | |
373 | + | let y_prev = acc._1 | |
374 | + | let y = fraction((fraction(y_prev, y_prev, big1) + c), big1, (fraction(big2, y_prev, big1) + bD)) | |
375 | + | if ((y > y_prev)) | |
376 | + | then if ((1 >= toInt((y - y_prev)))) | |
377 | + | then $Tuple2(y, true) | |
378 | + | else $Tuple2(y, false) | |
379 | + | else if ((1 >= toInt((y_prev - y)))) | |
380 | + | then $Tuple2(y, true) | |
381 | + | else $Tuple2(y, false) | |
382 | + | } | |
383 | + | ||
384 | + | let $t076577723 = { | |
385 | + | let $l = list16 | |
386 | + | let $s = size($l) | |
387 | + | let $acc0 = $Tuple2(D_big, false) | |
388 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
389 | + | then $a | |
390 | + | else y_proc($a, $l[$i]) | |
391 | + | ||
392 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
393 | + | then $a | |
394 | + | else throw("List size exceeds 16") | |
395 | + | ||
396 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($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), 11), 12), 13), 14), 15), 16) | |
397 | + | } | |
398 | + | let y = $t076577723._1 | |
399 | + | let finished = $t076577723._2 | |
400 | + | if ((finished == false)) | |
401 | + | then throw(("y_proc() not finished with " + toString(y))) | |
402 | + | else $Tuple2(fraction(toInt(y), rates[j], TOKEN_RATE), D) | |
403 | + | } | |
404 | + | ||
405 | + | ||
406 | + | func get_y_D (amp,i,xp,D) = if (assert((i >= 0))) | |
407 | + | then throw("i below zero") | |
408 | + | else if (assert((N_COINS > i))) | |
409 | + | then throw("i above N_COINS") | |
410 | + | else { | |
411 | + | let D_big = toBigInt(D) | |
412 | + | let Ann_big = toBigInt((amp * N_COINS)) | |
413 | + | func S_c (acc,index) = { | |
414 | + | let $t082288247 = acc | |
415 | + | let S_ = $t082288247._1 | |
416 | + | let c = $t082288247._2 | |
417 | + | let x_ = if ((index == i)) | |
418 | + | then big0 | |
419 | + | else xp[index] | |
420 | + | if ((index != i)) | |
421 | + | then $Tuple2((S_ + x_), fraction(c, D_big, fraction(x_, N_COINS_big, big1))) | |
422 | + | else $Tuple2(S_, c) | |
423 | + | } | |
424 | + | ||
425 | + | let $t084778541 = { | |
426 | + | let $l = index_N_COINS | |
427 | + | let $s = size($l) | |
428 | + | let $acc0 = $Tuple2(big0, D_big) | |
429 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
430 | + | then $a | |
431 | + | else S_c($a, $l[$i]) | |
432 | + | ||
433 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
434 | + | then $a | |
435 | + | else throw("List size exceeds 10") | |
436 | + | ||
437 | + | $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) | |
438 | + | } | |
439 | + | let S_ = $t084778541._1 | |
440 | + | let c_ = $t084778541._2 | |
441 | + | let c = fraction(c_, D_big, fraction(Ann_big, N_COINS_big, big1)) | |
442 | + | let bD = ((S_ + fraction(D_big, big1, Ann_big)) - D_big) | |
443 | + | func y_proc (acc,unused) = if ((acc._2 == true)) | |
444 | + | then acc | |
445 | + | else { | |
446 | + | let y_prev = acc._1 | |
447 | + | let y = fraction((fraction(y_prev, y_prev, big1) + c), big1, (fraction(big2, y_prev, big1) + bD)) | |
448 | + | if ((y > y_prev)) | |
449 | + | then if ((1 >= toInt((y - y_prev)))) | |
450 | + | then $Tuple2(y, true) | |
451 | + | else $Tuple2(y, false) | |
452 | + | else if ((1 >= toInt((y_prev - y)))) | |
453 | + | then $Tuple2(y, true) | |
454 | + | else $Tuple2(y, false) | |
455 | + | } | |
456 | + | ||
457 | + | let $t091219187 = { | |
458 | + | let $l = list16 | |
459 | + | let $s = size($l) | |
460 | + | let $acc0 = $Tuple2(D_big, false) | |
461 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
462 | + | then $a | |
463 | + | else y_proc($a, $l[$i]) | |
464 | + | ||
465 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
466 | + | then $a | |
467 | + | else throw("List size exceeds 16") | |
468 | + | ||
469 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($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), 11), 12), 13), 14), 15), 16) | |
470 | + | } | |
471 | + | let y = $t091219187._1 | |
472 | + | let finished = $t091219187._2 | |
473 | + | if ((finished == false)) | |
474 | + | then throw(("y_proc() not finished with " + toString(y))) | |
475 | + | else fraction(toInt(y), rates[i], TOKEN_RATE) | |
476 | + | } | |
477 | + | ||
478 | + | ||
479 | + | func _calc_withdraw_one_coin (_token_amount,i) = { | |
480 | + | let amp = _A() | |
481 | + | let _fee = ((fee * N_COINS) / (4 * (N_COINS - 1))) | |
482 | + | let xp = big_list(balances) | |
483 | + | let D0 = get_D(xp, amp) | |
484 | + | let D1 = (D0 - fraction(_token_amount, D0, token_quantity)) | |
485 | + | let new_y = get_y_D(amp, i, xp, D1) | |
486 | + | let dy_0 = (balances[i] - new_y) | |
487 | + | func fold (acc,index) = { | |
488 | + | let xp_j = balances[index] | |
489 | + | let dx_expected = if ((index == i)) | |
490 | + | then (fraction(xp_j, D1, D0) - new_y) | |
491 | + | else (xp_j - fraction(xp_j, D1, D0)) | |
492 | + | (acc :+ (xp_j - fraction(_fee, dx_expected, FEE_DENOMINATOR))) | |
493 | + | } | |
494 | + | ||
495 | + | let xp_reduced = { | |
496 | + | let $l = index_N_COINS | |
497 | + | let $s = size($l) | |
498 | + | let $acc0 = nil | |
499 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
500 | + | then $a | |
501 | + | else fold($a, $l[$i]) | |
502 | + | ||
503 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
504 | + | then $a | |
505 | + | else throw("List size exceeds 10") | |
506 | + | ||
507 | + | $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) | |
508 | + | } | |
509 | + | let xp_reduced_i = xp_reduced[i] | |
510 | + | let dy = ((xp_reduced_i - get_y_D(amp, i, big_list(xp_reduced), D1)) - 1) | |
511 | + | $Tuple3(dy, (dy_0 - dy), D0) | |
512 | + | } | |
513 | + | ||
514 | + | ||
515 | + | func virtual_price (D) = fraction(D, VP_PRECISION, token_quantity) | |
516 | + | ||
517 | + | ||
518 | + | func log_data (D,add) = { | |
519 | + | let total_vol = (parseBigIntValue(valueOrElse(getString("vol"), "0")) + toBigInt(add)) | |
520 | + | let total_vol_string = toString(total_vol) | |
521 | + | ([StringEntry("vol", total_vol_string)] ++ { | |
522 | + | let log_period = toString((lastBlock.timestamp / VP_LOG_PERIOD)) | |
523 | + | let log_key = ("log_" + log_period) | |
524 | + | if (isDefined(getString(log_key))) | |
525 | + | then nil | |
526 | + | else [StringEntry(log_key, ((((toString(virtual_price(D)) + "_") + total_vol_string) + "_") + toString(lastBlock.timestamp)))] | |
527 | + | }) | |
528 | + | } | |
529 | + | ||
530 | + | ||
531 | + | func get_nearest_log (period) = { | |
532 | + | func fold (log_value,step) = if ((log_value != "")) | |
533 | + | then log_value | |
534 | + | else { | |
535 | + | let log_key = ("log_" + toString((period - step))) | |
536 | + | valueOrElse(getString(log_key), "") | |
537 | + | } | |
538 | + | ||
539 | + | let list30p = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] | |
540 | + | let list30m = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30] | |
541 | + | let value30p = { | |
542 | + | let $l = list30p | |
543 | + | let $s = size($l) | |
544 | + | let $acc0 = "" | |
545 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
546 | + | then $a | |
547 | + | else fold($a, $l[$i]) | |
548 | + | ||
549 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
550 | + | then $a | |
551 | + | else throw("List size exceeds 30") | |
552 | + | ||
553 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
554 | + | } | |
555 | + | if ((value30p != "")) | |
556 | + | then value30p | |
557 | + | else { | |
558 | + | let $l = list30m | |
559 | + | let $s = size($l) | |
560 | + | let $acc0 = "" | |
561 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
562 | + | then $a | |
563 | + | else fold($a, $l[$i]) | |
564 | + | ||
565 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
566 | + | then $a | |
567 | + | else throw("List size exceeds 30") | |
568 | + | ||
569 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30) | |
570 | + | } | |
571 | + | } | |
572 | + | ||
573 | + | ||
574 | + | func get_virtual_price_diff (_t0) = { | |
575 | + | let vp1 = virtual_price(get_D(big_list(balances), _A())) | |
576 | + | let vp1_timestamp = lastBlock.timestamp | |
577 | + | let t0 = if ((0 >= _t0)) | |
578 | + | then (vp1_timestamp + _t0) | |
579 | + | else _t0 | |
580 | + | let t0_period = (t0 / VP_LOG_PERIOD) | |
581 | + | let log_value = get_nearest_log(t0_period) | |
582 | + | if ((log_value == "")) | |
583 | + | then $Tuple3(vp1, vp1, 0) | |
584 | + | else { | |
585 | + | let log_list = split(log_value, "_") | |
586 | + | let vp0 = parseIntValue(log_list[0]) | |
587 | + | let vp0_timestamp = parseIntValue(log_list[2]) | |
588 | + | $Tuple3(vp1, vp0, (vp1_timestamp - vp0_timestamp)) | |
589 | + | } | |
590 | + | } | |
591 | + | ||
592 | + | ||
593 | + | func get_volume_diff (_t0) = { | |
594 | + | let vol1 = parseBigIntValue(valueOrElse(getString("vol"), "0")) | |
595 | + | let vol1_timestamp = lastBlock.timestamp | |
596 | + | let t0 = if ((0 >= _t0)) | |
597 | + | then (vol1_timestamp + _t0) | |
598 | + | else _t0 | |
599 | + | let t0_period = (t0 / VP_LOG_PERIOD) | |
600 | + | let log_value = get_nearest_log(t0_period) | |
601 | + | if ((log_value == "")) | |
602 | + | then $Tuple3(vol1, vol1, 0) | |
603 | + | else { | |
604 | + | let log_list = split(log_value, "_") | |
605 | + | let vol0 = parseBigIntValue(log_list[1]) | |
606 | + | let vol0_timestamp = parseIntValue(log_list[2]) | |
607 | + | $Tuple3(vol1, vol0, (vol1_timestamp - vol0_timestamp)) | |
608 | + | } | |
609 | + | } | |
610 | + | ||
611 | + | ||
612 | + | @Callable(msg) | |
613 | + | func init (_owner,_coins,_pool_token,_A,_fee,_admin_fee) = if (!(isDataStorageUntouched(this))) | |
614 | + | then throw("already initialized") | |
615 | + | else if ((msg.caller != this)) | |
616 | + | then throw("self initialization only") | |
617 | + | else { | |
618 | + | let coins_list = split(_coins, ",") | |
619 | + | let n = size(coins_list) | |
620 | + | if ((2 > n)) | |
621 | + | then throw("too small coins") | |
622 | + | else if ((n > N_COINS_MAX)) | |
623 | + | then throw("too many coins") | |
624 | + | else { | |
625 | + | func duplicates (acc,index) = if (if ((index >= n)) | |
626 | + | then true | |
627 | + | else (acc == false)) | |
628 | + | then acc | |
629 | + | else (indexOf(coins_list, coins_list[index]) == index) | |
630 | + | ||
631 | + | if ((false == { | |
632 | + | let $l = index_N_COINS_MAX | |
633 | + | let $s = size($l) | |
634 | + | let $acc0 = true | |
635 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
636 | + | then $a | |
637 | + | else duplicates($a, $l[$i]) | |
638 | + | ||
639 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
640 | + | then $a | |
641 | + | else throw("List size exceeds 10") | |
642 | + | ||
643 | + | $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) | |
644 | + | })) | |
645 | + | then throw("duplicate coin detected") | |
646 | + | else { | |
647 | + | func decimals (coin) = valueOrErrorMessage(assetInfo(valueOrErrorMessage(fromBase58String(coin), ("fromBase58String: " + coin))), ("assetInfo: " + coin)).decimals | |
648 | + | ||
649 | + | func fold (acc,coin) = $Tuple3((acc._1 + 1), (acc._2 :+ 0), (acc._3 :+ pow(10, 0, decimals(coin), 0, 0, DOWN))) | |
650 | + | ||
651 | + | let $t01376213857 = { | |
652 | + | let $l = coins_list | |
653 | + | let $s = size($l) | |
654 | + | let $acc0 = $Tuple3(0, nil, nil) | |
655 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
656 | + | then $a | |
657 | + | else fold($a, $l[$i]) | |
658 | + | ||
659 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
660 | + | then $a | |
661 | + | else throw("List size exceeds 10") | |
662 | + | ||
663 | + | $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) | |
664 | + | } | |
665 | + | let _N_COINS = $t01376213857._1 | |
666 | + | let zeros = $t01376213857._2 | |
667 | + | let _rates = $t01376213857._3 | |
668 | + | let issueToken = Issue(_pool_token, ("LP token for " + _coins), 0, TOKEN_DECIMALS, true) | |
669 | + | let tokenId = toBase58String(calculateAssetId(issueToken)) | |
670 | + | [StringEntry("coins", _coins), StringEntry("rates", makeString(list_itos(_rates), ",")), StringEntry("balances", makeString(list_itos(zeros), ",")), IntegerEntry("N_COINS", _N_COINS), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry("fee", _fee), IntegerEntry("admin_fee", _admin_fee), StringEntry("owner", checkAddress(_owner)), IntegerEntry("kill_deadline", (height + KILL_DEADLINE_DT)), StringEntry("token", tokenId), BooleanEntry("is_killed", false), BooleanEntry("is_auto_fees", true), issueToken] | |
671 | + | } | |
672 | + | } | |
673 | + | } | |
674 | + | ||
675 | + | ||
676 | + | ||
677 | + | @Callable(msg) | |
678 | + | func add_liquidity (min_mint_amount) = if (assert(!(is_killed))) | |
679 | + | then throw("is killed") | |
680 | + | else { | |
681 | + | let amp = _A() | |
682 | + | let token_supply = token_quantity | |
683 | + | let D0 = if ((token_supply == 0)) | |
684 | + | then 0 | |
685 | + | else get_D(big_list(balances), amp) | |
686 | + | func update_1_balance (base,target,amount) = { | |
687 | + | func fold (acc,index) = (acc :+ (base[index] + (if ((index == target)) | |
688 | + | then amount | |
689 | + | else 0))) | |
690 | + | ||
691 | + | let $l = index_N_COINS | |
692 | + | let $s = size($l) | |
693 | + | let $acc0 = nil | |
694 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
695 | + | then $a | |
696 | + | else fold($a, $l[$i]) | |
697 | + | ||
698 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
699 | + | then $a | |
700 | + | else throw("List size exceeds 10") | |
701 | + | ||
702 | + | $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) | |
703 | + | } | |
704 | + | ||
705 | + | func up_balances (base,payments) = { | |
706 | + | let n = size(payments) | |
707 | + | if ((1 > n)) | |
708 | + | then throw("payments size < 1") | |
709 | + | else if ((n > N_COINS_MAX)) | |
710 | + | then throw("payments size > N_COINS_MAX") | |
711 | + | else { | |
712 | + | func fold (acc,payment) = update_1_balance(acc, coin_index(payment), payment.amount) | |
713 | + | ||
714 | + | let $l = payments | |
715 | + | let $s = size($l) | |
716 | + | let $acc0 = base | |
717 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
718 | + | then $a | |
719 | + | else fold($a, $l[$i]) | |
720 | + | ||
721 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
722 | + | then $a | |
723 | + | else throw("List size exceeds 10") | |
724 | + | ||
725 | + | $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) | |
726 | + | } | |
727 | + | } | |
728 | + | ||
729 | + | let new_balances = up_balances(balances, msg.payments) | |
730 | + | if (if ((token_supply == 0)) | |
731 | + | then (min(new_balances) == 0) | |
732 | + | else false) | |
733 | + | then throw("initial deposit requires all coins") | |
734 | + | else { | |
735 | + | let D1 = get_D(big_list(new_balances), amp) | |
736 | + | if (assert((D1 > D0))) | |
737 | + | then throw("D1 > D0") | |
738 | + | else { | |
739 | + | let $t01600918010 = if ((token_supply > 0)) | |
740 | + | then { | |
741 | + | func fee_balances (old,new) = { | |
742 | + | let _fee = ((fee * N_COINS) / (4 * (N_COINS - 1))) | |
743 | + | let n = size(old) | |
744 | + | func fold (acc,index) = { | |
745 | + | let old_balance = old[index] | |
746 | + | let new_balance = new[index] | |
747 | + | let ideal_balance = fraction(D1, old_balance, D0) | |
748 | + | let difference = if ((ideal_balance > new_balance)) | |
749 | + | then (ideal_balance - new_balance) | |
750 | + | else (new_balance - ideal_balance) | |
751 | + | let amount_fee = fraction(_fee, difference, FEE_DENOMINATOR) | |
752 | + | let amount_admin_fee = fraction(amount_fee, admin_fee, FEE_DENOMINATOR) | |
753 | + | $Tuple4((acc._1 :+ (new_balance - amount_admin_fee)), (acc._2 :+ (new_balance - amount_fee)), if (if (is_auto_fees) | |
754 | + | then (amount_admin_fee > 0) | |
755 | + | else false) | |
756 | + | then (acc._3 :+ ScriptTransfer(owner, amount_admin_fee, fromBase58String(coins[index]))) | |
757 | + | else acc._3, (acc._4 + fraction(amount_fee, TOKEN_RATE, rates[index]))) | |
758 | + | } | |
759 | + | ||
760 | + | let $l = index_N_COINS | |
761 | + | let $s = size($l) | |
762 | + | let $acc0 = $Tuple4(nil, nil, nil, 0) | |
763 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
764 | + | then $a | |
765 | + | else fold($a, $l[$i]) | |
766 | + | ||
767 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
768 | + | then $a | |
769 | + | else throw("List size exceeds 10") | |
770 | + | ||
771 | + | $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) | |
772 | + | } | |
773 | + | ||
774 | + | let $t01758117663 = fee_balances(balances, new_balances) | |
775 | + | let finals = $t01758117663._1 | |
776 | + | let no_fees = $t01758117663._2 | |
777 | + | let actions = $t01758117663._3 | |
778 | + | let fee_sum = $t01758117663._4 | |
779 | + | $Tuple3(finals, get_D(big_list(no_fees), amp), (actions ++ log_data(D0, fraction(fee_sum, FEE_DENOMINATOR, fee)))) | |
780 | + | } | |
781 | + | else $Tuple3(new_balances, D1, nil) | |
782 | + | let final_balances = $t01600918010._1 | |
783 | + | let D2 = $t01600918010._2 | |
784 | + | let fees_actions = $t01600918010._3 | |
785 | + | let mint_amount = if ((token_supply == 0)) | |
786 | + | then D1 | |
787 | + | else fraction(token_supply, (D2 - D0), D0) | |
788 | + | if (assert((mint_amount >= min_mint_amount))) | |
789 | + | then throw("slippage screwed you") | |
790 | + | else ([StringEntry("balances", makeString(list_itos(final_balances), ",")), Reissue(token, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, token)] ++ fees_actions) | |
791 | + | } | |
792 | + | } | |
793 | + | } | |
794 | + | ||
795 | + | ||
796 | + | ||
797 | + | @Callable(msg) | |
798 | + | func get_dy (i,j,dx) = { | |
799 | + | let xp_i = balances[i] | |
800 | + | let xp_j = balances[j] | |
801 | + | let x = (xp_i + dx) | |
802 | + | let $t01860318656 = get_y(i, j, x, big_list(balances)) | |
803 | + | let y = $t01860318656._1 | |
804 | + | let D = $t01860318656._2 | |
805 | + | let _dy = ((xp_j - y) - 1) | |
806 | + | let dy_fee = fraction(_dy, fee, FEE_DENOMINATOR) | |
807 | + | let dy = (_dy - dy_fee) | |
808 | + | $Tuple2(nil, dy) | |
809 | + | } | |
810 | + | ||
811 | + | ||
812 | + | ||
813 | + | @Callable(msg) | |
814 | + | func exchange (j,min_dy) = if (assert(!(is_killed))) | |
815 | + | then throw("is killed") | |
816 | + | else if ((size(msg.payments) != 1)) | |
817 | + | then throw("size( payments ) != 1") | |
818 | + | else { | |
819 | + | let payment = msg.payments[0] | |
820 | + | let dx = payment.amount | |
821 | + | let i = coin_index(payment) | |
822 | + | let xp_i = balances[i] | |
823 | + | let xp_j = balances[j] | |
824 | + | let x = (xp_i + dx) | |
825 | + | let $t01916219215 = get_y(i, j, x, big_list(balances)) | |
826 | + | let y = $t01916219215._1 | |
827 | + | let D = $t01916219215._2 | |
828 | + | let _dy = ((xp_j - y) - 1) | |
829 | + | let dy_fee = fraction(_dy, fee, FEE_DENOMINATOR) | |
830 | + | let dy = (_dy - dy_fee) | |
831 | + | if (assert((dy >= min_dy))) | |
832 | + | then throw("exchange resulted in fewer coins than expected") | |
833 | + | else { | |
834 | + | let dy_admin_fee = fraction(dy_fee, admin_fee, FEE_DENOMINATOR) | |
835 | + | func fold (acc,index) = (acc :+ (if ((index == i)) | |
836 | + | then (balances[index] + dx) | |
837 | + | else if ((index == j)) | |
838 | + | then ((balances[index] - dy) - dy_admin_fee) | |
839 | + | else balances[index])) | |
840 | + | ||
841 | + | let final_balances = { | |
842 | + | let $l = index_N_COINS | |
843 | + | let $s = size($l) | |
844 | + | let $acc0 = nil | |
845 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
846 | + | then $a | |
847 | + | else fold($a, $l[$i]) | |
848 | + | ||
849 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
850 | + | then $a | |
851 | + | else throw("List size exceeds 10") | |
852 | + | ||
853 | + | $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) | |
854 | + | } | |
855 | + | let tokenOut = fromBase58String(coins[j]) | |
856 | + | $Tuple2((([StringEntry("balances", makeString(list_itos(final_balances), ",")), ScriptTransfer(msg.caller, dy, tokenOut)] ++ (if (if (is_auto_fees) | |
857 | + | then (dy_admin_fee > 0) | |
858 | + | else false) | |
859 | + | then [ScriptTransfer(owner, dy_admin_fee, tokenOut)] | |
860 | + | else nil)) ++ log_data(D, fraction(dx, TOKEN_RATE, rates[i]))), dy) | |
861 | + | } | |
862 | + | } | |
863 | + | ||
864 | + | ||
865 | + | ||
866 | + | @Callable(msg) | |
867 | + | func remove_liquidity (_min_amounts) = if ((size(msg.payments) != 1)) | |
868 | + | then throw("size( payments ) != 1") | |
869 | + | else { | |
870 | + | let payment = msg.payments[0] | |
871 | + | if ((payment.assetId != token)) | |
872 | + | then throw("unknown token") | |
873 | + | else { | |
874 | + | let min_amounts = if ((_min_amounts == "0")) | |
875 | + | then nil | |
876 | + | else list_stoi(split(_min_amounts, ",")) | |
877 | + | if (if ((_min_amounts != "0")) | |
878 | + | then (size(min_amounts) != N_COINS) | |
879 | + | else false) | |
880 | + | then throw("min_amounts.size() != N_COINS") | |
881 | + | else { | |
882 | + | let amount = payment.amount | |
883 | + | let caller = msg.caller | |
884 | + | func fold (acc,index) = { | |
885 | + | let balance = balances[index] | |
886 | + | let amount_out = fraction(balance, amount, token_quantity) | |
887 | + | if (if ((_min_amounts != "0")) | |
888 | + | then (min_amounts[index] > amount_out) | |
889 | + | else false) | |
890 | + | then throw("withdrawal resulted in fewer coins than expected") | |
891 | + | else $Tuple2((acc._1 :+ ScriptTransfer(caller, amount_out, fromBase58String(coins[index]))), (acc._2 :+ (balance - amount_out))) | |
892 | + | } | |
893 | + | ||
894 | + | let $t02133121410 = { | |
895 | + | let $l = index_N_COINS | |
896 | + | let $s = size($l) | |
897 | + | let $acc0 = $Tuple2(nil, nil) | |
898 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
899 | + | then $a | |
900 | + | else fold($a, $l[$i]) | |
901 | + | ||
902 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
903 | + | then $a | |
904 | + | else throw("List size exceeds 10") | |
905 | + | ||
906 | + | $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) | |
907 | + | } | |
908 | + | let transfers = $t02133121410._1 | |
909 | + | let final_balances = $t02133121410._2 | |
910 | + | (transfers ++ [StringEntry("balances", makeString(list_itos(final_balances), ",")), Burn(token, amount)]) | |
911 | + | } | |
912 | + | } | |
913 | + | } | |
914 | + | ||
915 | + | ||
916 | + | ||
917 | + | @Callable(msg) | |
918 | + | func calc_withdraw_one_coin (_token_amount,i) = $Tuple2(nil, _calc_withdraw_one_coin(_token_amount, i)._1) | |
919 | + | ||
920 | + | ||
921 | + | ||
922 | + | @Callable(msg) | |
923 | + | func remove_liquidity_one_coin (i,min_amount) = if (assert(!(is_killed))) | |
924 | + | then throw("is killed") | |
925 | + | else if ((size(msg.payments) != 1)) | |
926 | + | then throw("size( payments ) != 1") | |
927 | + | else { | |
928 | + | let payment = msg.payments[0] | |
929 | + | if ((payment.assetId != token)) | |
930 | + | then throw("unknown token") | |
931 | + | else { | |
932 | + | let _token_amount = payment.amount | |
933 | + | let $t02207122138 = _calc_withdraw_one_coin(_token_amount, i) | |
934 | + | let dy = $t02207122138._1 | |
935 | + | let dy_fee = $t02207122138._2 | |
936 | + | let D = $t02207122138._3 | |
937 | + | if (assert((dy >= min_amount))) | |
938 | + | then throw("not enough coins removed") | |
939 | + | else { | |
940 | + | let dy_admin_fee = fraction(dy_fee, admin_fee, FEE_DENOMINATOR) | |
941 | + | let dy_and_fee = (dy + dy_admin_fee) | |
942 | + | func fold (acc,index) = (acc :+ (balances[index] - (if ((index == i)) | |
943 | + | then dy_and_fee | |
944 | + | else 0))) | |
945 | + | ||
946 | + | let final_balances = { | |
947 | + | let $l = index_N_COINS | |
948 | + | let $s = size($l) | |
949 | + | let $acc0 = nil | |
950 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
951 | + | then $a | |
952 | + | else fold($a, $l[$i]) | |
953 | + | ||
954 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
955 | + | then $a | |
956 | + | else throw("List size exceeds 10") | |
957 | + | ||
958 | + | $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) | |
959 | + | } | |
960 | + | let tokenOut = fromBase58String(coins[i]) | |
961 | + | $Tuple2((([StringEntry("balances", makeString(list_itos(final_balances), ",")), ScriptTransfer(msg.caller, dy, tokenOut), Burn(token, _token_amount)] ++ (if (if (is_auto_fees) | |
962 | + | then (dy_admin_fee > 0) | |
963 | + | else false) | |
964 | + | then [ScriptTransfer(owner, dy_admin_fee, tokenOut)] | |
965 | + | else nil)) ++ log_data(D, fraction(fraction(dy_fee, TOKEN_RATE, rates[i]), FEE_DENOMINATOR, fee))), dy) | |
966 | + | } | |
967 | + | } | |
968 | + | } | |
969 | + | ||
970 | + | ||
971 | + | ||
972 | + | @Callable(msg) | |
973 | + | func A () = $Tuple2(nil, _A()) | |
974 | + | ||
975 | + | ||
976 | + | ||
977 | + | @Callable(msg) | |
978 | + | func get_virtual_price () = { | |
979 | + | let D = get_D(big_list(balances), _A()) | |
980 | + | $Tuple2(nil, virtual_price(D)) | |
981 | + | } | |
982 | + | ||
983 | + | ||
984 | + | ||
985 | + | @Callable(msg) | |
986 | + | func calc_token_amount (_amounts,deposit) = { | |
987 | + | let amounts = list_stoi(split(_amounts, ",")) | |
988 | + | if ((size(amounts) != N_COINS)) | |
989 | + | then throw("not enought amounts") | |
990 | + | else { | |
991 | + | let amp = _A() | |
992 | + | let D0 = get_D(big_list(amounts), amp) | |
993 | + | func fold (acc,index) = (acc :+ (balances[index] + (if (deposit) | |
994 | + | then amounts[index] | |
995 | + | else -(amounts[index])))) | |
996 | + | ||
997 | + | let new_balances = { | |
998 | + | let $l = index_N_COINS | |
999 | + | let $s = size($l) | |
1000 | + | let $acc0 = nil | |
1001 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1002 | + | then $a | |
1003 | + | else fold($a, $l[$i]) | |
1004 | + | ||
1005 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1006 | + | then $a | |
1007 | + | else throw("List size exceeds 10") | |
1008 | + | ||
1009 | + | $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) | |
1010 | + | } | |
1011 | + | let D1 = get_D(big_list(new_balances), amp) | |
1012 | + | let token_amount = token_quantity | |
1013 | + | let diff = if (deposit) | |
1014 | + | then (D1 - D0) | |
1015 | + | else (D0 - D1) | |
1016 | + | $Tuple2(nil, fraction(diff, token_amount, D0)) | |
1017 | + | } | |
1018 | + | } | |
1019 | + | ||
1020 | + | ||
1021 | + | ||
1022 | + | @Callable(msg) | |
1023 | + | func ramp_A (_future_A,_future_time) = if (assert((msg.caller == owner))) | |
1024 | + | then throw("only owner") | |
1025 | + | else if (assert((block_timestamp >= (initial_A_time + MIN_RAMP_TIME)))) | |
1026 | + | then throw("too often") | |
1027 | + | else if (assert((_future_time >= (block_timestamp + MIN_RAMP_TIME)))) | |
1028 | + | then throw("insufficient time") | |
1029 | + | else { | |
1030 | + | let _initial_A = _A() | |
1031 | + | if (assert(if ((_future_A > 0)) | |
1032 | + | then (MAX_A > _future_A) | |
1033 | + | else false)) | |
1034 | + | then throw("out of base range") | |
1035 | + | else if (assert(if (if ((_future_A >= _initial_A)) | |
1036 | + | then ((_initial_A * MAX_A_CHANGE) >= _future_A) | |
1037 | + | else false) | |
1038 | + | then true | |
1039 | + | else if ((_initial_A > _future_A)) | |
1040 | + | then ((_future_A * MAX_A_CHANGE) >= _initial_A) | |
1041 | + | else false)) | |
1042 | + | then throw("out of range") | |
1043 | + | else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _future_A), IntegerEntry("initial_A_time", block_timestamp), IntegerEntry("future_A_time", _future_time)] | |
1044 | + | } | |
1045 | + | ||
1046 | + | ||
1047 | + | ||
1048 | + | @Callable(msg) | |
1049 | + | func stop_ramp_A () = if (assert((msg.caller == owner))) | |
1050 | + | then throw("only owner") | |
1051 | + | else { | |
1052 | + | let current_A = _A() | |
1053 | + | [IntegerEntry("initial_A", current_A), IntegerEntry("future_A", current_A), IntegerEntry("initial_A_time", block_timestamp), IntegerEntry("future_A_time", block_timestamp)] | |
1054 | + | } | |
1055 | + | ||
1056 | + | ||
1057 | + | ||
1058 | + | @Callable(msg) | |
1059 | + | func commit_new_fee (new_fee,new_admin_fee) = if (assert((msg.caller == owner))) | |
1060 | + | then throw("only owner") | |
1061 | + | else if (assert((admin_actions_deadline == 0))) | |
1062 | + | then throw("active action") | |
1063 | + | else if (assert((MAX_FEE >= new_fee))) | |
1064 | + | then throw("fee exceeds maximum") | |
1065 | + | else if (assert((MAX_ADMIN_FEE >= new_admin_fee))) | |
1066 | + | then throw("admin fee exceeds maximum") | |
1067 | + | else { | |
1068 | + | let _deadline = (block_timestamp + ADMIN_ACTIONS_DELAY) | |
1069 | + | [IntegerEntry("admin_actions_deadline", _deadline), IntegerEntry("future_fee", new_fee), IntegerEntry("future_admin_fee", new_admin_fee)] | |
1070 | + | } | |
1071 | + | ||
1072 | + | ||
1073 | + | ||
1074 | + | @Callable(msg) | |
1075 | + | func apply_new_fee () = if (assert((msg.caller == owner))) | |
1076 | + | then throw("only owner") | |
1077 | + | else if (assert((block_timestamp >= admin_actions_deadline))) | |
1078 | + | then throw("insufficient time") | |
1079 | + | else if (assert((admin_actions_deadline != 0))) | |
1080 | + | then throw("no active action") | |
1081 | + | else [IntegerEntry("admin_actions_deadline", 0), IntegerEntry("fee", future_fee), IntegerEntry("admin_fee", future_admin_fee)] | |
1082 | + | ||
1083 | + | ||
1084 | + | ||
1085 | + | @Callable(msg) | |
1086 | + | func revert_new_parameters () = if (assert((msg.caller == owner))) | |
1087 | + | then throw("only owner") | |
1088 | + | else [IntegerEntry("admin_actions_deadline", 0)] | |
1089 | + | ||
1090 | + | ||
1091 | + | ||
1092 | + | @Callable(msg) | |
1093 | + | func commit_transfer_ownership (_owner) = if (assert((msg.caller == owner))) | |
1094 | + | then throw("only owner") | |
1095 | + | else if (assert((transfer_ownership_deadline == 0))) | |
1096 | + | then throw("active transfer") | |
1097 | + | else { | |
1098 | + | let _deadline = (block_timestamp + ADMIN_ACTIONS_DELAY) | |
1099 | + | [IntegerEntry("transfer_ownership_deadline", _deadline), StringEntry("future_owner", checkAddress(_owner))] | |
1100 | + | } | |
1101 | + | ||
1102 | + | ||
1103 | + | ||
1104 | + | @Callable(msg) | |
1105 | + | func apply_transfer_ownership () = if (assert((msg.caller == owner))) | |
1106 | + | then throw("only owner") | |
1107 | + | else if (assert((block_timestamp >= transfer_ownership_deadline))) | |
1108 | + | then throw("insufficient time") | |
1109 | + | else if (assert((transfer_ownership_deadline != 0))) | |
1110 | + | then throw("no active transfer") | |
1111 | + | else [IntegerEntry("transfer_ownership_deadline", 0), StringEntry("owner", future_owner)] | |
1112 | + | ||
1113 | + | ||
1114 | + | ||
1115 | + | @Callable(msg) | |
1116 | + | func revert_transfer_ownership () = if (assert((msg.caller == owner))) | |
1117 | + | then throw("only owner") | |
1118 | + | else [IntegerEntry("transfer_ownership_deadline", 0)] | |
1119 | + | ||
1120 | + | ||
1121 | + | ||
1122 | + | @Callable(msg) | |
1123 | + | func admin_balances (i) = $Tuple2(nil, admin_balance(i)) | |
1124 | + | ||
1125 | + | ||
1126 | + | ||
1127 | + | @Callable(msg) | |
1128 | + | func withdraw_admin_fees () = if (assert((msg.caller == owner))) | |
1129 | + | then throw("only owner") | |
1130 | + | else { | |
1131 | + | func fold (acc,index) = (acc :+ ScriptTransfer(owner, admin_balance(index), fromBase58String(coins[index]))) | |
1132 | + | ||
1133 | + | let $l = index_N_COINS | |
1134 | + | let $s = size($l) | |
1135 | + | let $acc0 = nil | |
1136 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1137 | + | then $a | |
1138 | + | else fold($a, $l[$i]) | |
1139 | + | ||
1140 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1141 | + | then $a | |
1142 | + | else throw("List size exceeds 10") | |
1143 | + | ||
1144 | + | $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) | |
1145 | + | } | |
1146 | + | ||
1147 | + | ||
1148 | + | ||
1149 | + | @Callable(msg) | |
1150 | + | func donate_admin_fees () = if (assert((msg.caller == owner))) | |
1151 | + | then throw("only owner") | |
1152 | + | else { | |
1153 | + | func fold (acc,index) = (acc :+ (balances[index] + admin_balance(index))) | |
1154 | + | ||
1155 | + | let new_balances = { | |
1156 | + | let $l = index_N_COINS | |
1157 | + | let $s = size($l) | |
1158 | + | let $acc0 = nil | |
1159 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1160 | + | then $a | |
1161 | + | else fold($a, $l[$i]) | |
1162 | + | ||
1163 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1164 | + | then $a | |
1165 | + | else throw("List size exceeds 10") | |
1166 | + | ||
1167 | + | $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) | |
1168 | + | } | |
1169 | + | [StringEntry("balances", makeString(list_itos(new_balances), ","))] | |
1170 | + | } | |
1171 | + | ||
1172 | + | ||
1173 | + | ||
1174 | + | @Callable(msg) | |
1175 | + | func set_auto_fees (_is_auto_fees) = if (assert((msg.caller == owner))) | |
1176 | + | then throw("only owner") | |
1177 | + | else [BooleanEntry("is_auto_fees", _is_auto_fees)] | |
1178 | + | ||
1179 | + | ||
1180 | + | ||
1181 | + | @Callable(msg) | |
1182 | + | func kill_me () = if (assert((msg.caller == owner))) | |
1183 | + | then throw("only owner") | |
1184 | + | else if (assert((kill_deadline > block_timestamp))) | |
1185 | + | then throw("deadline has passed") | |
1186 | + | else [BooleanEntry("is_killed", true)] | |
1187 | + | ||
1188 | + | ||
1189 | + | ||
1190 | + | @Callable(msg) | |
1191 | + | func unkill_me () = if (assert((msg.caller == owner))) | |
1192 | + | then throw("only owner") | |
1193 | + | else [BooleanEntry("is_killed", false)] | |
1194 | + | ||
1195 | + | ||
1196 | + | ||
1197 | + | @Callable(msg) | |
1198 | + | func set_height_address (_heightAddress) = if ((msg.caller != owner)) | |
1199 | + | then throw("only owner") | |
1200 | + | else [StringEntry("heightAddress", checkAddress(_heightAddress))] | |
1201 | + | ||
1202 | + | ||
1203 | + | ||
1204 | + | @Callable(i) | |
1205 | + | func set_verifier (verifier) = if ((i.caller != this)) | |
1206 | + | then throw("self call only") | |
1207 | + | else { | |
1208 | + | let addressOK = match addressFromString(verifier) { | |
1209 | + | case a: Address => | |
1210 | + | true | |
1211 | + | case _ => | |
1212 | + | false | |
1213 | + | } | |
1214 | + | if (!(addressOK)) | |
1215 | + | then throw(("verifier wrong address " + verifier)) | |
1216 | + | else if (isDefined(getString(this, "verifier"))) | |
1217 | + | then throw("verifier already defined") | |
1218 | + | else [StringEntry("verifier", verifier)] | |
1219 | + | } | |
1220 | + | ||
1221 | + | ||
1222 | + | @Verifier(tx) | |
1223 | + | func verify () = match getString(this, "verifier") { | |
1224 | + | case verifier: String => | |
1225 | + | valueOrElse(getBoolean(addressFromStringValue(verifier), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false) | |
1226 | + | case _ => | |
1227 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1228 | + | } | |
1229 | + |
github/deemru/w8io/169f3d6 89.99 ms ◑