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