tx · wQqeHB3jR8k1L9HLbaQWGpm6CkrrV4fJb6SUmmx3Qco

3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a:  -0.02900000 Waves

2022.10.31 13:15 [2296459] smart account 3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a > SELF 0.00000000 Waves

{ "type": 13, "id": "wQqeHB3jR8k1L9HLbaQWGpm6CkrrV4fJb6SUmmx3Qco", "fee": 2900000, "feeAssetId": null, "timestamp": 1667211145745, "version": 1, "sender": "3N8p4dscxCN8XkfWopQP55a2AyvFD9cJx8a", "senderPublicKey": "3JAonT9h65iAMaQegaHVE8pCbEPHPXoARiimB7edrrTb", "proofs": [ "2MDkp3fmSVvymSvi5RZkNffou8gUDkHQorjxYnKKi9NcXBc8GmVBZKZUtV21iQCtsgEkmCFJiRELm2vip5quj9K8" ], "script": "base64:BgJvCAISCAoGCAgIAQEBEgMKAQESBQoDAQEBEgQKAgEBEgMKAQgSBAoCAQESBAoCAQESABIAEgMKAQgSBAoCAQESABIECgIBARIAEgASAwoBCBIAEgASAwoBARIAEgASAwoBBBIAEgASAwoBCBIDCgEIRQAHTl9DT0lOUwkBEUBleHRyTmF0aXZlKDEwNTApAgUEdGhpcwIHTl9DT0lOUwALTl9DT0lOU19iaWcJALYCAQUHTl9DT0lOUwALTl9DT0lOU19NQVgACgAOVE9LRU5fREVDSU1BTFMABgAKVE9LRU5fUkFURQDAhD0AD0ZFRV9ERU5PTUlOQVRPUgCAyK+gJQAJUFJFQ0lTSU9OAMCEPQAIREVDSU1BTFMABgANTUFYX0FETUlOX0ZFRQCAyK+gJQAHTUFYX0ZFRQCA5JfQEgAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgATQURNSU5fQUNUSU9OU19ERUxBWQkAaQIJAGgCAAMAgKMFADwADU1JTl9SQU1QX1RJTUUJAGkCAICjBQA8AA1WUF9MT0dfUEVSSU9EAIC4mSkADFZQX1BSRUNJU0lPTgCAoJSljR0ABWNvaW5zCQC1CQI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MCAIAGQkAzAgCABoJAMwIAgAbCQDMCAIAHAkAzAgCAB0FA25pbAQHbGlzdDMwbQkAzAgCAP///////////wEJAMwIAgD+//////////8BCQDMCAIA/f//////////AQkAzAgCAPz//////////wEJAMwIAgD7//////////8BCQDMCAIA+v//////////AQkAzAgCAPn//////////wEJAMwIAgD4//////////8BCQDMCAIA9///////////AQkAzAgCAPb//////////wEJAMwIAgD1//////////8BCQDMCAIA9P//////////AQkAzAgCAPP//////////wEJAMwIAgDy//////////8BCQDMCAIA8f//////////AQkAzAgCAPD//////////wEJAMwIAgDv//////////8BCQDMCAIA7v//////////AQkAzAgCAO3//////////wEJAMwIAgDs//////////8BCQDMCAIA6///////////AQkAzAgCAOr//////////wEJAMwIAgDp//////////8BCQDMCAIA6P//////////AQkAzAgCAOf//////////wEJAMwIAgDm//////////8BCQDMCAIA5f//////////AQkAzAgCAOT//////////wEJAMwIAgDj//////////8BCQDMCAIA4v//////////AQUDbmlsBAh2YWx1ZTMwcAoAAiRsBQdsaXN0MzBwCgACJHMJAJADAQUCJGwKAAUkYWNjMAIACgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQRmb2xkAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAzMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSR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0aGlzAgh2ZXJpZmllcgMJAAECBQckbWF0Y2gwAgZTdHJpbmcECHZlcmlmaWVyBQckbWF0Y2gwCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCHZlcmlmaWVyCQCsAgIJAKwCAgkArAICAgdzdGF0dXNfCQClCAEFBHRoaXMCAV8JANgEAQgFAnR4AmlkBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWNwgbA=", "chainId": 84, "height": 2296459, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AmkwiMwGk537QJXeqwLRYHMS59Y6nM6nsfnoYV8Zxcou Next: none Diff:
OldNewDifferences
203203 }
204204
205205
206-func _A () = {
206+let amp = {
207207 let t1 = future_A_time
208208 let A1 = future_A
209209 if ((t1 > block_timestamp))
216216 }
217217 else A1
218218 }
219-
220219
221220 func list_sum (list) = {
222221 func fold (acc,val) = (acc + val)
299298 else $Tuple2(D, false)
300299 }
301300
302- let $t060446106 = {
301+ let $t060426104 = {
303302 let $l = list16
304303 let $s = size($l)
305304 let $acc0 = $Tuple2(S, false)
313312
314313 $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)
315314 }
316- let D = $t060446106._1
317- let finished = $t060446106._2
315+ let D = $t060426104._1
316+ let finished = $t060426104._2
318317 if ((finished == false))
319318 then throw(("D_proc() not finished with " + toString(D)))
320319 else toInt(D)
333332 else false))
334333 then throw("above N_COINS")
335334 else {
336- let amp = _A()
337335 let D = get_D(xp, amp)
338336 let D_big = toBigInt(D)
339337 let Ann_big = toBigInt((amp * N_COINS))
340338 func S_c (acc,index) = {
341- let $t067186737 = acc
342- let S_ = $t067186737._1
343- let c = $t067186737._2
339+ let $t066976716 = acc
340+ let S_ = $t066976716._1
341+ let c = $t066976716._2
344342 let x_ = if ((index == i))
345343 then toBigInt(fraction(x, TOKEN_RATE, rates[index]))
346344 else xp[index]
349347 else $Tuple2(S_, c)
350348 }
351349
352- let $t070137077 = {
350+ let $t069927056 = {
353351 let $l = index_N_COINS
354352 let $s = size($l)
355353 let $acc0 = $Tuple2(big0, D_big)
363361
364362 $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)
365363 }
366- let S_ = $t070137077._1
367- let c_ = $t070137077._2
364+ let S_ = $t069927056._1
365+ let c_ = $t069927056._2
368366 let c = fraction(c_, D_big, fraction(Ann_big, N_COINS_big, big1))
369367 let bD = ((S_ + fraction(D_big, big1, Ann_big)) - D_big)
370368 func y_proc (acc,unused) = if ((acc._2 == true))
381379 else $Tuple2(y, false)
382380 }
383381
384- let $t076577723 = {
382+ let $t076367702 = {
385383 let $l = list16
386384 let $s = size($l)
387385 let $acc0 = $Tuple2(D_big, false)
395393
396394 $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)
397395 }
398- let y = $t076577723._1
399- let finished = $t076577723._2
396+ let y = $t076367702._1
397+ let finished = $t076367702._2
400398 if ((finished == false))
401399 then throw(("y_proc() not finished with " + toString(y)))
402400 else $Tuple2(fraction(toInt(y), rates[j], TOKEN_RATE), D)
411409 let D_big = toBigInt(D)
412410 let Ann_big = toBigInt((amp * N_COINS))
413411 func S_c (acc,index) = {
414- let $t082288247 = acc
415- let S_ = $t082288247._1
416- let c = $t082288247._2
412+ let $t082078226 = acc
413+ let S_ = $t082078226._1
414+ let c = $t082078226._2
417415 let x_ = if ((index == i))
418416 then big0
419417 else xp[index]
422420 else $Tuple2(S_, c)
423421 }
424422
425- let $t084778541 = {
423+ let $t084568520 = {
426424 let $l = index_N_COINS
427425 let $s = size($l)
428426 let $acc0 = $Tuple2(big0, D_big)
436434
437435 $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)
438436 }
439- let S_ = $t084778541._1
440- let c_ = $t084778541._2
437+ let S_ = $t084568520._1
438+ let c_ = $t084568520._2
441439 let c = fraction(c_, D_big, fraction(Ann_big, N_COINS_big, big1))
442440 let bD = ((S_ + fraction(D_big, big1, Ann_big)) - D_big)
443441 func y_proc (acc,unused) = if ((acc._2 == true))
454452 else $Tuple2(y, false)
455453 }
456454
457- let $t091219187 = {
455+ let $t091009166 = {
458456 let $l = list16
459457 let $s = size($l)
460458 let $acc0 = $Tuple2(D_big, false)
468466
469467 $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)
470468 }
471- let y = $t091219187._1
472- let finished = $t091219187._2
469+ let y = $t091009166._1
470+ let finished = $t091009166._2
473471 if ((finished == false))
474472 then throw(("y_proc() not finished with " + toString(y)))
475473 else fraction(toInt(y), rates[i], TOKEN_RATE)
477475
478476
479477 func _calc_withdraw_one_coin (_token_amount,i) = {
480- let amp = _A()
481478 let _fee = ((fee * N_COINS) / (4 * (N_COINS - 1)))
482479 let xp = big_list(balances)
483480 let D0 = get_D(xp, amp)
572569
573570
574571 func get_virtual_price_diff (_t0) = {
575- let vp1 = virtual_price(get_D(big_list(balances), _A()))
572+ let vp1 = virtual_price(get_D(big_list(balances), amp))
576573 let vp1_timestamp = lastBlock.timestamp
577574 let t0 = if ((0 >= _t0))
578575 then (vp1_timestamp + _t0)
605602 let vol0 = parseBigIntValue(log_list[1])
606603 let vol0_timestamp = parseIntValue(log_list[2])
607604 $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)
608667 }
609668 }
610669
648707
649708 func fold (acc,coin) = $Tuple3((acc._1 + 1), (acc._2 :+ 0), (acc._3 :+ pow(10, 0, decimals(coin), 0, 0, DOWN)))
650709
651- let $t01376213857 = {
710+ let $t01615616251 = {
652711 let $l = coins_list
653712 let $s = size($l)
654713 let $acc0 = $Tuple3(0, nil, nil)
662721
663722 $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)
664723 }
665- let _N_COINS = $t01376213857._1
666- let zeros = $t01376213857._2
667- let _rates = $t01376213857._3
724+ let _N_COINS = $t01615616251._1
725+ let zeros = $t01615616251._2
726+ let _rates = $t01615616251._3
668727 let issueToken = Issue(_pool_token, ("LP token for " + _coins), 0, TOKEN_DECIMALS, true)
669728 let tokenId = toBase58String(calculateAssetId(issueToken))
670729 [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]
678737 func add_liquidity (min_mint_amount) = if (assert(!(is_killed)))
679738 then throw("is killed")
680739 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)
686740 func update_1_balance (base,target,amount) = {
687741 func fold (acc,index) = (acc :+ (base[index] + (if ((index == target))
688742 then amount
727781 }
728782
729783 let new_balances = up_balances(balances, msg.payments)
730- if (if ((token_supply == 0))
784+ if (if ((token_quantity == 0))
731785 then (min(new_balances) == 0)
732786 else false)
733787 then throw("initial deposit requires all coins")
734788 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- }
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)
792796 }
793797 }
794798
799803 let xp_i = balances[i]
800804 let xp_j = balances[j]
801805 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
806+ let $t01867818731 = get_y(i, j, x, big_list(balances))
807+ let y = $t01867818731._1
808+ let D = $t01867818731._2
805809 let _dy = ((xp_j - y) - 1)
806810 let dy_fee = fraction(_dy, fee, FEE_DENOMINATOR)
807811 let dy = (_dy - dy_fee)
822826 let xp_i = balances[i]
823827 let xp_j = balances[j]
824828 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
829+ let $t01923719290 = get_y(i, j, x, big_list(balances))
830+ let y = $t01923719290._1
831+ let D = $t01923719290._2
828832 let _dy = ((xp_j - y) - 1)
829833 let dy_fee = fraction(_dy, fee, FEE_DENOMINATOR)
830834 let dy = (_dy - dy_fee)
891895 else $Tuple2((acc._1 :+ ScriptTransfer(caller, amount_out, fromBase58String(coins[index]))), (acc._2 :+ (balance - amount_out)))
892896 }
893897
894- let $t02133121410 = {
898+ let $t02140621485 = {
895899 let $l = index_N_COINS
896900 let $s = size($l)
897901 let $acc0 = $Tuple2(nil, nil)
905909
906910 $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)
907911 }
908- let transfers = $t02133121410._1
909- let final_balances = $t02133121410._2
912+ let transfers = $t02140621485._1
913+ let final_balances = $t02140621485._2
910914 (transfers ++ [StringEntry("balances", makeString(list_itos(final_balances), ",")), Burn(token, amount)])
911915 }
912916 }
930934 then throw("unknown token")
931935 else {
932936 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+ 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
937941 if (assert((dy >= min_amount)))
938942 then throw("not enough coins removed")
939943 else {
970974
971975
972976 @Callable(msg)
973-func A () = $Tuple2(nil, _A())
977+func A () = $Tuple2(nil, amp)
974978
975979
976980
977981 @Callable(msg)
978982 func get_virtual_price () = {
979- let D = get_D(big_list(balances), _A())
983+ let D = get_D(big_list(balances), amp)
980984 $Tuple2(nil, virtual_price(D))
981985 }
982986
983987
984988
985989 @Callable(msg)
986-func calc_token_amount (_amounts,deposit) = {
990+func calc_token_amount (_amounts) = {
987991 let amounts = list_stoi(split(_amounts, ","))
988992 if ((size(amounts) != N_COINS))
989993 then throw("not enought amounts")
990994 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]))))
995+ func fold (acc,index) = (acc :+ (balances[index] + amounts[index]))
996996
997997 let new_balances = {
998998 let $l = index_N_COINS
10081008
10091009 $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)
10101010 }
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))
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)
10171016 }
10181017 }
10191018
10271026 else if (assert((_future_time >= (block_timestamp + MIN_RAMP_TIME))))
10281027 then throw("insufficient time")
10291028 else {
1030- let _initial_A = _A()
1029+ let _initial_A = amp
10311030 if (assert(if ((_future_A > 0))
10321031 then (MAX_A > _future_A)
10331032 else false))
10491048 func stop_ramp_A () = if (assert((msg.caller == owner)))
10501049 then throw("only owner")
10511050 else {
1052- let current_A = _A()
1051+ let current_A = amp
10531052 [IntegerEntry("initial_A", current_A), IntegerEntry("future_A", current_A), IntegerEntry("initial_A_time", block_timestamp), IntegerEntry("future_A_time", block_timestamp)]
10541053 }
10551054
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let N_COINS = getIntegerValue(this, "N_COINS")
55
66 let N_COINS_big = toBigInt(N_COINS)
77
88 let N_COINS_MAX = 10
99
1010 let TOKEN_DECIMALS = 6
1111
1212 let TOKEN_RATE = 1000000
1313
1414 let FEE_DENOMINATOR = 10000000000
1515
1616 let PRECISION = 1000000
1717
1818 let DECIMALS = 6
1919
2020 let MAX_ADMIN_FEE = 10000000000
2121
2222 let MAX_FEE = 5000000000
2323
2424 let MAX_A = 1000000
2525
2626 let MAX_A_CHANGE = 10
2727
2828 let ADMIN_ACTIONS_DELAY = ((3 * 86400) / 60)
2929
3030 let MIN_RAMP_TIME = (86400 / 60)
3131
3232 let VP_LOG_PERIOD = 86400000
3333
3434 let VP_PRECISION = 1000000000000
3535
3636 let coins = split(getStringValue(this, "coins"), ",")
3737
3838 let fee = getIntegerValue(this, "fee")
3939
4040 let admin_fee = getIntegerValue(this, "admin_fee")
4141
4242 let is_auto_fees = getBooleanValue(this, "is_auto_fees")
4343
4444 let owner = addressFromStringValue(getStringValue(this, "owner"))
4545
4646 let token = fromBase58String(getStringValue(this, "token"))
4747
4848 let token_quantity = value(assetInfo(token)).quantity
4949
5050 let initial_A = getIntegerValue(this, "initial_A")
5151
5252 let future_A = getIntegerValue(this, "future_A")
5353
5454 let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0)
5555
5656 let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0)
5757
5858 let admin_actions_deadline = valueOrElse(getInteger(this, "admin_actions_deadline"), 0)
5959
6060 let transfer_ownership_deadline = valueOrElse(getInteger(this, "transfer_ownership_deadline"), 0)
6161
6262 let future_fee = getIntegerValue(this, "future_fee")
6363
6464 let future_admin_fee = getIntegerValue(this, "future_admin_fee")
6565
6666 let future_owner = getStringValue(this, "future_owner")
6767
6868 let is_killed = getBooleanValue(this, "is_killed")
6969
7070 let kill_deadline = getIntegerValue(this, "kill_deadline")
7171
7272 let KILL_DEADLINE_DT = (((2 * 30) * 86400) / 60)
7373
7474 let big0 = toBigInt(0)
7575
7676 let big1 = toBigInt(1)
7777
7878 let big2 = toBigInt(2)
7979
8080 let heightAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, "heightAddress"), "no settings defined")), "bad settings address")
8181
8282 let HEIGHT = height
8383
8484 let block_timestamp = HEIGHT
8585
8686 func assert (a) = if (a)
8787 then false
8888 else true
8989
9090
9191 func list_itos (list) = if ((size(list) > N_COINS_MAX))
9292 then throw("list_itos: list.size() > N_COINS_MAX")
9393 else {
9494 func fold (acc,val) = (acc :+ toString(val))
9595
9696 let $l = list
9797 let $s = size($l)
9898 let $acc0 = nil
9999 func $f0_1 ($a,$i) = if (($i >= $s))
100100 then $a
101101 else fold($a, $l[$i])
102102
103103 func $f0_2 ($a,$i) = if (($i >= $s))
104104 then $a
105105 else throw("List size exceeds 10")
106106
107107 $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)
108108 }
109109
110110
111111 func list_stoi (list) = if ((size(list) > N_COINS_MAX))
112112 then throw("list_stoi: list.size() > N_COINS_MAX")
113113 else {
114114 func fold (acc,val) = (acc :+ parseIntValue(val))
115115
116116 let $l = list
117117 let $s = size($l)
118118 let $acc0 = nil
119119 func $f0_1 ($a,$i) = if (($i >= $s))
120120 then $a
121121 else fold($a, $l[$i])
122122
123123 func $f0_2 ($a,$i) = if (($i >= $s))
124124 then $a
125125 else throw("List size exceeds 10")
126126
127127 $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)
128128 }
129129
130130
131131 let balances = list_stoi(split(getStringValue(this, "balances"), ","))
132132
133133 let rates = list_stoi(split(getStringValue(this, "rates"), ","))
134134
135135 let rates_size = size(rates)
136136
137137 let index_N_COINS_MAX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
138138
139139 func index_n (n) = if ((n > N_COINS_MAX))
140140 then throw("index_n: n > N_COINS_MAX")
141141 else {
142142 func fold (acc,index) = if ((n > index))
143143 then (acc :+ index)
144144 else acc
145145
146146 let $l = index_N_COINS_MAX
147147 let $s = size($l)
148148 let $acc0 = nil
149149 func $f0_1 ($a,$i) = if (($i >= $s))
150150 then $a
151151 else fold($a, $l[$i])
152152
153153 func $f0_2 ($a,$i) = if (($i >= $s))
154154 then $a
155155 else throw("List size exceeds 10")
156156
157157 $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)
158158 }
159159
160160
161161 let index_N_COINS = index_n(N_COINS)
162162
163163 let index_N_COINS_1 = (index_N_COINS :+ N_COINS)
164164
165165 func big_list (list) = if ((size(list) != N_COINS))
166166 then throw("big_list: list.size() != N_COINS")
167167 else {
168168 func fold (acc,index) = (acc :+ toBigInt(fraction(list[index], TOKEN_RATE, rates[index])))
169169
170170 let $l = index_N_COINS
171171 let $s = size($l)
172172 let $acc0 = nil
173173 func $f0_1 ($a,$i) = if (($i >= $s))
174174 then $a
175175 else fold($a, $l[$i])
176176
177177 func $f0_2 ($a,$i) = if (($i >= $s))
178178 then $a
179179 else throw("List size exceeds 10")
180180
181181 $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)
182182 }
183183
184184
185185 func coin_index (payment) = match payment.assetId {
186186 case assetId: ByteVector =>
187187 valueOrErrorMessage(indexOf(coins, toBase58String(assetId)), (toBase58String(assetId) + " out of pool"))
188188 case _ =>
189189 throw("unsupported assetId")
190190 }
191191
192192
193193 func admin_balance (i) = if (if ((0 > i))
194194 then true
195195 else (i > N_COINS))
196196 then throw("i out of index")
197197 else (assetBalance(this, fromBase58String(coins[i])) - balances[i])
198198
199199
200200 func checkAddress (a58) = {
201201 let a = addressFromStringValue(a58)
202202 toString(a)
203203 }
204204
205205
206-func _A () = {
206+let amp = {
207207 let t1 = future_A_time
208208 let A1 = future_A
209209 if ((t1 > block_timestamp))
210210 then {
211211 let A0 = initial_A
212212 let t0 = initial_A_time
213213 if ((A1 > A0))
214214 then (A0 + (((A1 - A0) * (block_timestamp - t0)) / (t1 - t0)))
215215 else (A0 - (((A0 - A1) * (block_timestamp - t0)) / (t1 - t0)))
216216 }
217217 else A1
218218 }
219-
220219
221220 func list_sum (list) = {
222221 func fold (acc,val) = (acc + val)
223222
224223 let $l = list
225224 let $s = size($l)
226225 let $acc0 = big0
227226 func $f0_1 ($a,$i) = if (($i >= $s))
228227 then $a
229228 else fold($a, $l[$i])
230229
231230 func $f0_2 ($a,$i) = if (($i >= $s))
232231 then $a
233232 else throw("List size exceeds 10")
234233
235234 $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)
236235 }
237236
238237
239238 func list_mult (list) = {
240239 func fold (acc,val) = fraction(fraction(acc, val, big1), N_COINS_big, big1)
241240
242241 let $l = list
243242 let $s = size($l)
244243 let $acc0 = big1
245244 func $f0_1 ($a,$i) = if (($i >= $s))
246245 then $a
247246 else fold($a, $l[$i])
248247
249248 func $f0_2 ($a,$i) = if (($i >= $s))
250249 then $a
251250 else throw("List size exceeds 10")
252251
253252 $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)
254253 }
255254
256255
257256 let list16 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
258257
259258 func get_D (xp,amp) = {
260259 let S = list_sum(xp)
261260 if ((toInt(S) == 0))
262261 then 0
263262 else {
264263 let Ann = (amp * N_COINS)
265264 let AnnS = fraction(toBigInt(Ann), S, big1)
266265 let Ann1 = toBigInt((Ann - 1))
267266 let xd = list_mult(xp)
268267 let N_COINS_1 = (N_COINS + 1)
269268 let N_COINS_1_big = toBigInt(N_COINS_1)
270269 func D_mult (val) = {
271270 func fold (acc,index) = fraction(acc, val, big1)
272271
273272 let $l = index_N_COINS_1
274273 let $s = size($l)
275274 let $acc0 = big1
276275 func $f0_1 ($a,$i) = if (($i >= $s))
277276 then $a
278277 else fold($a, $l[$i])
279278
280279 func $f0_2 ($a,$i) = if (($i >= $s))
281280 then $a
282281 else throw("List size exceeds 10")
283282
284283 $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)
285284 }
286285
287286 func D_proc (acc,unused) = if ((acc._2 == true))
288287 then acc
289288 else {
290289 let Dprev = acc._1
291290 let D_P = fraction(D_mult(Dprev), big1, xd)
292291 let D = fraction((AnnS + fraction(N_COINS_big, D_P, big1)), Dprev, (fraction(Ann1, Dprev, big1) + fraction(N_COINS_1_big, D_P, big1)))
293292 if ((D > Dprev))
294293 then if ((1 >= toInt((D - Dprev))))
295294 then $Tuple2(D, true)
296295 else $Tuple2(D, false)
297296 else if ((1 >= toInt((Dprev - D))))
298297 then $Tuple2(D, true)
299298 else $Tuple2(D, false)
300299 }
301300
302- let $t060446106 = {
301+ let $t060426104 = {
303302 let $l = list16
304303 let $s = size($l)
305304 let $acc0 = $Tuple2(S, false)
306305 func $f0_1 ($a,$i) = if (($i >= $s))
307306 then $a
308307 else D_proc($a, $l[$i])
309308
310309 func $f0_2 ($a,$i) = if (($i >= $s))
311310 then $a
312311 else throw("List size exceeds 16")
313312
314313 $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)
315314 }
316- let D = $t060446106._1
317- let finished = $t060446106._2
315+ let D = $t060426104._1
316+ let finished = $t060426104._2
318317 if ((finished == false))
319318 then throw(("D_proc() not finished with " + toString(D)))
320319 else toInt(D)
321320 }
322321 }
323322
324323
325324 func get_y (i,j,x,xp) = if (assert((i != j)))
326325 then throw("same coin")
327326 else if (assert(if ((j >= 0))
328327 then (i >= 0)
329328 else false))
330329 then throw("below zero")
331330 else if (assert(if ((N_COINS > j))
332331 then (N_COINS > i)
333332 else false))
334333 then throw("above N_COINS")
335334 else {
336- let amp = _A()
337335 let D = get_D(xp, amp)
338336 let D_big = toBigInt(D)
339337 let Ann_big = toBigInt((amp * N_COINS))
340338 func S_c (acc,index) = {
341- let $t067186737 = acc
342- let S_ = $t067186737._1
343- let c = $t067186737._2
339+ let $t066976716 = acc
340+ let S_ = $t066976716._1
341+ let c = $t066976716._2
344342 let x_ = if ((index == i))
345343 then toBigInt(fraction(x, TOKEN_RATE, rates[index]))
346344 else xp[index]
347345 if ((index != j))
348346 then $Tuple2((S_ + x_), fraction(c, D_big, fraction(x_, N_COINS_big, big1)))
349347 else $Tuple2(S_, c)
350348 }
351349
352- let $t070137077 = {
350+ let $t069927056 = {
353351 let $l = index_N_COINS
354352 let $s = size($l)
355353 let $acc0 = $Tuple2(big0, D_big)
356354 func $f0_1 ($a,$i) = if (($i >= $s))
357355 then $a
358356 else S_c($a, $l[$i])
359357
360358 func $f0_2 ($a,$i) = if (($i >= $s))
361359 then $a
362360 else throw("List size exceeds 10")
363361
364362 $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)
365363 }
366- let S_ = $t070137077._1
367- let c_ = $t070137077._2
364+ let S_ = $t069927056._1
365+ let c_ = $t069927056._2
368366 let c = fraction(c_, D_big, fraction(Ann_big, N_COINS_big, big1))
369367 let bD = ((S_ + fraction(D_big, big1, Ann_big)) - D_big)
370368 func y_proc (acc,unused) = if ((acc._2 == true))
371369 then acc
372370 else {
373371 let y_prev = acc._1
374372 let y = fraction((fraction(y_prev, y_prev, big1) + c), big1, (fraction(big2, y_prev, big1) + bD))
375373 if ((y > y_prev))
376374 then if ((1 >= toInt((y - y_prev))))
377375 then $Tuple2(y, true)
378376 else $Tuple2(y, false)
379377 else if ((1 >= toInt((y_prev - y))))
380378 then $Tuple2(y, true)
381379 else $Tuple2(y, false)
382380 }
383381
384- let $t076577723 = {
382+ let $t076367702 = {
385383 let $l = list16
386384 let $s = size($l)
387385 let $acc0 = $Tuple2(D_big, false)
388386 func $f1_1 ($a,$i) = if (($i >= $s))
389387 then $a
390388 else y_proc($a, $l[$i])
391389
392390 func $f1_2 ($a,$i) = if (($i >= $s))
393391 then $a
394392 else throw("List size exceeds 16")
395393
396394 $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)
397395 }
398- let y = $t076577723._1
399- let finished = $t076577723._2
396+ let y = $t076367702._1
397+ let finished = $t076367702._2
400398 if ((finished == false))
401399 then throw(("y_proc() not finished with " + toString(y)))
402400 else $Tuple2(fraction(toInt(y), rates[j], TOKEN_RATE), D)
403401 }
404402
405403
406404 func get_y_D (amp,i,xp,D) = if (assert((i >= 0)))
407405 then throw("i below zero")
408406 else if (assert((N_COINS > i)))
409407 then throw("i above N_COINS")
410408 else {
411409 let D_big = toBigInt(D)
412410 let Ann_big = toBigInt((amp * N_COINS))
413411 func S_c (acc,index) = {
414- let $t082288247 = acc
415- let S_ = $t082288247._1
416- let c = $t082288247._2
412+ let $t082078226 = acc
413+ let S_ = $t082078226._1
414+ let c = $t082078226._2
417415 let x_ = if ((index == i))
418416 then big0
419417 else xp[index]
420418 if ((index != i))
421419 then $Tuple2((S_ + x_), fraction(c, D_big, fraction(x_, N_COINS_big, big1)))
422420 else $Tuple2(S_, c)
423421 }
424422
425- let $t084778541 = {
423+ let $t084568520 = {
426424 let $l = index_N_COINS
427425 let $s = size($l)
428426 let $acc0 = $Tuple2(big0, D_big)
429427 func $f0_1 ($a,$i) = if (($i >= $s))
430428 then $a
431429 else S_c($a, $l[$i])
432430
433431 func $f0_2 ($a,$i) = if (($i >= $s))
434432 then $a
435433 else throw("List size exceeds 10")
436434
437435 $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)
438436 }
439- let S_ = $t084778541._1
440- let c_ = $t084778541._2
437+ let S_ = $t084568520._1
438+ let c_ = $t084568520._2
441439 let c = fraction(c_, D_big, fraction(Ann_big, N_COINS_big, big1))
442440 let bD = ((S_ + fraction(D_big, big1, Ann_big)) - D_big)
443441 func y_proc (acc,unused) = if ((acc._2 == true))
444442 then acc
445443 else {
446444 let y_prev = acc._1
447445 let y = fraction((fraction(y_prev, y_prev, big1) + c), big1, (fraction(big2, y_prev, big1) + bD))
448446 if ((y > y_prev))
449447 then if ((1 >= toInt((y - y_prev))))
450448 then $Tuple2(y, true)
451449 else $Tuple2(y, false)
452450 else if ((1 >= toInt((y_prev - y))))
453451 then $Tuple2(y, true)
454452 else $Tuple2(y, false)
455453 }
456454
457- let $t091219187 = {
455+ let $t091009166 = {
458456 let $l = list16
459457 let $s = size($l)
460458 let $acc0 = $Tuple2(D_big, false)
461459 func $f1_1 ($a,$i) = if (($i >= $s))
462460 then $a
463461 else y_proc($a, $l[$i])
464462
465463 func $f1_2 ($a,$i) = if (($i >= $s))
466464 then $a
467465 else throw("List size exceeds 16")
468466
469467 $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)
470468 }
471- let y = $t091219187._1
472- let finished = $t091219187._2
469+ let y = $t091009166._1
470+ let finished = $t091009166._2
473471 if ((finished == false))
474472 then throw(("y_proc() not finished with " + toString(y)))
475473 else fraction(toInt(y), rates[i], TOKEN_RATE)
476474 }
477475
478476
479477 func _calc_withdraw_one_coin (_token_amount,i) = {
480- let amp = _A()
481478 let _fee = ((fee * N_COINS) / (4 * (N_COINS - 1)))
482479 let xp = big_list(balances)
483480 let D0 = get_D(xp, amp)
484481 let D1 = (D0 - fraction(_token_amount, D0, token_quantity))
485482 let new_y = get_y_D(amp, i, xp, D1)
486483 let dy_0 = (balances[i] - new_y)
487484 func fold (acc,index) = {
488485 let xp_j = balances[index]
489486 let dx_expected = if ((index == i))
490487 then (fraction(xp_j, D1, D0) - new_y)
491488 else (xp_j - fraction(xp_j, D1, D0))
492489 (acc :+ (xp_j - fraction(_fee, dx_expected, FEE_DENOMINATOR)))
493490 }
494491
495492 let xp_reduced = {
496493 let $l = index_N_COINS
497494 let $s = size($l)
498495 let $acc0 = nil
499496 func $f0_1 ($a,$i) = if (($i >= $s))
500497 then $a
501498 else fold($a, $l[$i])
502499
503500 func $f0_2 ($a,$i) = if (($i >= $s))
504501 then $a
505502 else throw("List size exceeds 10")
506503
507504 $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)
508505 }
509506 let xp_reduced_i = xp_reduced[i]
510507 let dy = ((xp_reduced_i - get_y_D(amp, i, big_list(xp_reduced), D1)) - 1)
511508 $Tuple3(dy, (dy_0 - dy), D0)
512509 }
513510
514511
515512 func virtual_price (D) = fraction(D, VP_PRECISION, token_quantity)
516513
517514
518515 func log_data (D,add) = {
519516 let total_vol = (parseBigIntValue(valueOrElse(getString("vol"), "0")) + toBigInt(add))
520517 let total_vol_string = toString(total_vol)
521518 ([StringEntry("vol", total_vol_string)] ++ {
522519 let log_period = toString((lastBlock.timestamp / VP_LOG_PERIOD))
523520 let log_key = ("log_" + log_period)
524521 if (isDefined(getString(log_key)))
525522 then nil
526523 else [StringEntry(log_key, ((((toString(virtual_price(D)) + "_") + total_vol_string) + "_") + toString(lastBlock.timestamp)))]
527524 })
528525 }
529526
530527
531528 func get_nearest_log (period) = {
532529 func fold (log_value,step) = if ((log_value != ""))
533530 then log_value
534531 else {
535532 let log_key = ("log_" + toString((period - step)))
536533 valueOrElse(getString(log_key), "")
537534 }
538535
539536 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]
540537 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]
541538 let value30p = {
542539 let $l = list30p
543540 let $s = size($l)
544541 let $acc0 = ""
545542 func $f0_1 ($a,$i) = if (($i >= $s))
546543 then $a
547544 else fold($a, $l[$i])
548545
549546 func $f0_2 ($a,$i) = if (($i >= $s))
550547 then $a
551548 else throw("List size exceeds 30")
552549
553550 $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)
554551 }
555552 if ((value30p != ""))
556553 then value30p
557554 else {
558555 let $l = list30m
559556 let $s = size($l)
560557 let $acc0 = ""
561558 func $f1_1 ($a,$i) = if (($i >= $s))
562559 then $a
563560 else fold($a, $l[$i])
564561
565562 func $f1_2 ($a,$i) = if (($i >= $s))
566563 then $a
567564 else throw("List size exceeds 30")
568565
569566 $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)
570567 }
571568 }
572569
573570
574571 func get_virtual_price_diff (_t0) = {
575- let vp1 = virtual_price(get_D(big_list(balances), _A()))
572+ let vp1 = virtual_price(get_D(big_list(balances), amp))
576573 let vp1_timestamp = lastBlock.timestamp
577574 let t0 = if ((0 >= _t0))
578575 then (vp1_timestamp + _t0)
579576 else _t0
580577 let t0_period = (t0 / VP_LOG_PERIOD)
581578 let log_value = get_nearest_log(t0_period)
582579 if ((log_value == ""))
583580 then $Tuple3(vp1, vp1, 0)
584581 else {
585582 let log_list = split(log_value, "_")
586583 let vp0 = parseIntValue(log_list[0])
587584 let vp0_timestamp = parseIntValue(log_list[2])
588585 $Tuple3(vp1, vp0, (vp1_timestamp - vp0_timestamp))
589586 }
590587 }
591588
592589
593590 func get_volume_diff (_t0) = {
594591 let vol1 = parseBigIntValue(valueOrElse(getString("vol"), "0"))
595592 let vol1_timestamp = lastBlock.timestamp
596593 let t0 = if ((0 >= _t0))
597594 then (vol1_timestamp + _t0)
598595 else _t0
599596 let t0_period = (t0 / VP_LOG_PERIOD)
600597 let log_value = get_nearest_log(t0_period)
601598 if ((log_value == ""))
602599 then $Tuple3(vol1, vol1, 0)
603600 else {
604601 let log_list = split(log_value, "_")
605602 let vol0 = parseBigIntValue(log_list[1])
606603 let vol0_timestamp = parseIntValue(log_list[2])
607604 $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)
608667 }
609668 }
610669
611670
612671 @Callable(msg)
613672 func init (_owner,_coins,_pool_token,_A,_fee,_admin_fee) = if (!(isDataStorageUntouched(this)))
614673 then throw("already initialized")
615674 else if ((msg.caller != this))
616675 then throw("self initialization only")
617676 else {
618677 let coins_list = split(_coins, ",")
619678 let n = size(coins_list)
620679 if ((2 > n))
621680 then throw("too small coins")
622681 else if ((n > N_COINS_MAX))
623682 then throw("too many coins")
624683 else {
625684 func duplicates (acc,index) = if (if ((index >= n))
626685 then true
627686 else (acc == false))
628687 then acc
629688 else (indexOf(coins_list, coins_list[index]) == index)
630689
631690 if ((false == {
632691 let $l = index_N_COINS_MAX
633692 let $s = size($l)
634693 let $acc0 = true
635694 func $f0_1 ($a,$i) = if (($i >= $s))
636695 then $a
637696 else duplicates($a, $l[$i])
638697
639698 func $f0_2 ($a,$i) = if (($i >= $s))
640699 then $a
641700 else throw("List size exceeds 10")
642701
643702 $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)
644703 }))
645704 then throw("duplicate coin detected")
646705 else {
647706 func decimals (coin) = valueOrErrorMessage(assetInfo(valueOrErrorMessage(fromBase58String(coin), ("fromBase58String: " + coin))), ("assetInfo: " + coin)).decimals
648707
649708 func fold (acc,coin) = $Tuple3((acc._1 + 1), (acc._2 :+ 0), (acc._3 :+ pow(10, 0, decimals(coin), 0, 0, DOWN)))
650709
651- let $t01376213857 = {
710+ let $t01615616251 = {
652711 let $l = coins_list
653712 let $s = size($l)
654713 let $acc0 = $Tuple3(0, nil, nil)
655714 func $f0_1 ($a,$i) = if (($i >= $s))
656715 then $a
657716 else fold($a, $l[$i])
658717
659718 func $f0_2 ($a,$i) = if (($i >= $s))
660719 then $a
661720 else throw("List size exceeds 10")
662721
663722 $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)
664723 }
665- let _N_COINS = $t01376213857._1
666- let zeros = $t01376213857._2
667- let _rates = $t01376213857._3
724+ let _N_COINS = $t01615616251._1
725+ let zeros = $t01615616251._2
726+ let _rates = $t01615616251._3
668727 let issueToken = Issue(_pool_token, ("LP token for " + _coins), 0, TOKEN_DECIMALS, true)
669728 let tokenId = toBase58String(calculateAssetId(issueToken))
670729 [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]
671730 }
672731 }
673732 }
674733
675734
676735
677736 @Callable(msg)
678737 func add_liquidity (min_mint_amount) = if (assert(!(is_killed)))
679738 then throw("is killed")
680739 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)
686740 func update_1_balance (base,target,amount) = {
687741 func fold (acc,index) = (acc :+ (base[index] + (if ((index == target))
688742 then amount
689743 else 0)))
690744
691745 let $l = index_N_COINS
692746 let $s = size($l)
693747 let $acc0 = nil
694748 func $f0_1 ($a,$i) = if (($i >= $s))
695749 then $a
696750 else fold($a, $l[$i])
697751
698752 func $f0_2 ($a,$i) = if (($i >= $s))
699753 then $a
700754 else throw("List size exceeds 10")
701755
702756 $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)
703757 }
704758
705759 func up_balances (base,payments) = {
706760 let n = size(payments)
707761 if ((1 > n))
708762 then throw("payments size < 1")
709763 else if ((n > N_COINS_MAX))
710764 then throw("payments size > N_COINS_MAX")
711765 else {
712766 func fold (acc,payment) = update_1_balance(acc, coin_index(payment), payment.amount)
713767
714768 let $l = payments
715769 let $s = size($l)
716770 let $acc0 = base
717771 func $f0_1 ($a,$i) = if (($i >= $s))
718772 then $a
719773 else fold($a, $l[$i])
720774
721775 func $f0_2 ($a,$i) = if (($i >= $s))
722776 then $a
723777 else throw("List size exceeds 10")
724778
725779 $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)
726780 }
727781 }
728782
729783 let new_balances = up_balances(balances, msg.payments)
730- if (if ((token_supply == 0))
784+ if (if ((token_quantity == 0))
731785 then (min(new_balances) == 0)
732786 else false)
733787 then throw("initial deposit requires all coins")
734788 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- }
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)
792796 }
793797 }
794798
795799
796800
797801 @Callable(msg)
798802 func get_dy (i,j,dx) = {
799803 let xp_i = balances[i]
800804 let xp_j = balances[j]
801805 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
806+ let $t01867818731 = get_y(i, j, x, big_list(balances))
807+ let y = $t01867818731._1
808+ let D = $t01867818731._2
805809 let _dy = ((xp_j - y) - 1)
806810 let dy_fee = fraction(_dy, fee, FEE_DENOMINATOR)
807811 let dy = (_dy - dy_fee)
808812 $Tuple2(nil, dy)
809813 }
810814
811815
812816
813817 @Callable(msg)
814818 func exchange (j,min_dy) = if (assert(!(is_killed)))
815819 then throw("is killed")
816820 else if ((size(msg.payments) != 1))
817821 then throw("size( payments ) != 1")
818822 else {
819823 let payment = msg.payments[0]
820824 let dx = payment.amount
821825 let i = coin_index(payment)
822826 let xp_i = balances[i]
823827 let xp_j = balances[j]
824828 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
829+ let $t01923719290 = get_y(i, j, x, big_list(balances))
830+ let y = $t01923719290._1
831+ let D = $t01923719290._2
828832 let _dy = ((xp_j - y) - 1)
829833 let dy_fee = fraction(_dy, fee, FEE_DENOMINATOR)
830834 let dy = (_dy - dy_fee)
831835 if (assert((dy >= min_dy)))
832836 then throw("exchange resulted in fewer coins than expected")
833837 else {
834838 let dy_admin_fee = fraction(dy_fee, admin_fee, FEE_DENOMINATOR)
835839 func fold (acc,index) = (acc :+ (if ((index == i))
836840 then (balances[index] + dx)
837841 else if ((index == j))
838842 then ((balances[index] - dy) - dy_admin_fee)
839843 else balances[index]))
840844
841845 let final_balances = {
842846 let $l = index_N_COINS
843847 let $s = size($l)
844848 let $acc0 = nil
845849 func $f0_1 ($a,$i) = if (($i >= $s))
846850 then $a
847851 else fold($a, $l[$i])
848852
849853 func $f0_2 ($a,$i) = if (($i >= $s))
850854 then $a
851855 else throw("List size exceeds 10")
852856
853857 $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)
854858 }
855859 let tokenOut = fromBase58String(coins[j])
856860 $Tuple2((([StringEntry("balances", makeString(list_itos(final_balances), ",")), ScriptTransfer(msg.caller, dy, tokenOut)] ++ (if (if (is_auto_fees)
857861 then (dy_admin_fee > 0)
858862 else false)
859863 then [ScriptTransfer(owner, dy_admin_fee, tokenOut)]
860864 else nil)) ++ log_data(D, fraction(dx, TOKEN_RATE, rates[i]))), dy)
861865 }
862866 }
863867
864868
865869
866870 @Callable(msg)
867871 func remove_liquidity (_min_amounts) = if ((size(msg.payments) != 1))
868872 then throw("size( payments ) != 1")
869873 else {
870874 let payment = msg.payments[0]
871875 if ((payment.assetId != token))
872876 then throw("unknown token")
873877 else {
874878 let min_amounts = if ((_min_amounts == "0"))
875879 then nil
876880 else list_stoi(split(_min_amounts, ","))
877881 if (if ((_min_amounts != "0"))
878882 then (size(min_amounts) != N_COINS)
879883 else false)
880884 then throw("min_amounts.size() != N_COINS")
881885 else {
882886 let amount = payment.amount
883887 let caller = msg.caller
884888 func fold (acc,index) = {
885889 let balance = balances[index]
886890 let amount_out = fraction(balance, amount, token_quantity)
887891 if (if ((_min_amounts != "0"))
888892 then (min_amounts[index] > amount_out)
889893 else false)
890894 then throw("withdrawal resulted in fewer coins than expected")
891895 else $Tuple2((acc._1 :+ ScriptTransfer(caller, amount_out, fromBase58String(coins[index]))), (acc._2 :+ (balance - amount_out)))
892896 }
893897
894- let $t02133121410 = {
898+ let $t02140621485 = {
895899 let $l = index_N_COINS
896900 let $s = size($l)
897901 let $acc0 = $Tuple2(nil, nil)
898902 func $f0_1 ($a,$i) = if (($i >= $s))
899903 then $a
900904 else fold($a, $l[$i])
901905
902906 func $f0_2 ($a,$i) = if (($i >= $s))
903907 then $a
904908 else throw("List size exceeds 10")
905909
906910 $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)
907911 }
908- let transfers = $t02133121410._1
909- let final_balances = $t02133121410._2
912+ let transfers = $t02140621485._1
913+ let final_balances = $t02140621485._2
910914 (transfers ++ [StringEntry("balances", makeString(list_itos(final_balances), ",")), Burn(token, amount)])
911915 }
912916 }
913917 }
914918
915919
916920
917921 @Callable(msg)
918922 func calc_withdraw_one_coin (_token_amount,i) = $Tuple2(nil, _calc_withdraw_one_coin(_token_amount, i)._1)
919923
920924
921925
922926 @Callable(msg)
923927 func remove_liquidity_one_coin (i,min_amount) = if (assert(!(is_killed)))
924928 then throw("is killed")
925929 else if ((size(msg.payments) != 1))
926930 then throw("size( payments ) != 1")
927931 else {
928932 let payment = msg.payments[0]
929933 if ((payment.assetId != token))
930934 then throw("unknown token")
931935 else {
932936 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+ 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
937941 if (assert((dy >= min_amount)))
938942 then throw("not enough coins removed")
939943 else {
940944 let dy_admin_fee = fraction(dy_fee, admin_fee, FEE_DENOMINATOR)
941945 let dy_and_fee = (dy + dy_admin_fee)
942946 func fold (acc,index) = (acc :+ (balances[index] - (if ((index == i))
943947 then dy_and_fee
944948 else 0)))
945949
946950 let final_balances = {
947951 let $l = index_N_COINS
948952 let $s = size($l)
949953 let $acc0 = nil
950954 func $f0_1 ($a,$i) = if (($i >= $s))
951955 then $a
952956 else fold($a, $l[$i])
953957
954958 func $f0_2 ($a,$i) = if (($i >= $s))
955959 then $a
956960 else throw("List size exceeds 10")
957961
958962 $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)
959963 }
960964 let tokenOut = fromBase58String(coins[i])
961965 $Tuple2((([StringEntry("balances", makeString(list_itos(final_balances), ",")), ScriptTransfer(msg.caller, dy, tokenOut), Burn(token, _token_amount)] ++ (if (if (is_auto_fees)
962966 then (dy_admin_fee > 0)
963967 else false)
964968 then [ScriptTransfer(owner, dy_admin_fee, tokenOut)]
965969 else nil)) ++ log_data(D, fraction(fraction(dy_fee, TOKEN_RATE, rates[i]), FEE_DENOMINATOR, fee))), dy)
966970 }
967971 }
968972 }
969973
970974
971975
972976 @Callable(msg)
973-func A () = $Tuple2(nil, _A())
977+func A () = $Tuple2(nil, amp)
974978
975979
976980
977981 @Callable(msg)
978982 func get_virtual_price () = {
979- let D = get_D(big_list(balances), _A())
983+ let D = get_D(big_list(balances), amp)
980984 $Tuple2(nil, virtual_price(D))
981985 }
982986
983987
984988
985989 @Callable(msg)
986-func calc_token_amount (_amounts,deposit) = {
990+func calc_token_amount (_amounts) = {
987991 let amounts = list_stoi(split(_amounts, ","))
988992 if ((size(amounts) != N_COINS))
989993 then throw("not enought amounts")
990994 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]))))
995+ func fold (acc,index) = (acc :+ (balances[index] + amounts[index]))
996996
997997 let new_balances = {
998998 let $l = index_N_COINS
999999 let $s = size($l)
10001000 let $acc0 = nil
10011001 func $f0_1 ($a,$i) = if (($i >= $s))
10021002 then $a
10031003 else fold($a, $l[$i])
10041004
10051005 func $f0_2 ($a,$i) = if (($i >= $s))
10061006 then $a
10071007 else throw("List size exceeds 10")
10081008
10091009 $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)
10101010 }
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))
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)
10171016 }
10181017 }
10191018
10201019
10211020
10221021 @Callable(msg)
10231022 func ramp_A (_future_A,_future_time) = if (assert((msg.caller == owner)))
10241023 then throw("only owner")
10251024 else if (assert((block_timestamp >= (initial_A_time + MIN_RAMP_TIME))))
10261025 then throw("too often")
10271026 else if (assert((_future_time >= (block_timestamp + MIN_RAMP_TIME))))
10281027 then throw("insufficient time")
10291028 else {
1030- let _initial_A = _A()
1029+ let _initial_A = amp
10311030 if (assert(if ((_future_A > 0))
10321031 then (MAX_A > _future_A)
10331032 else false))
10341033 then throw("out of base range")
10351034 else if (assert(if (if ((_future_A >= _initial_A))
10361035 then ((_initial_A * MAX_A_CHANGE) >= _future_A)
10371036 else false)
10381037 then true
10391038 else if ((_initial_A > _future_A))
10401039 then ((_future_A * MAX_A_CHANGE) >= _initial_A)
10411040 else false))
10421041 then throw("out of range")
10431042 else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _future_A), IntegerEntry("initial_A_time", block_timestamp), IntegerEntry("future_A_time", _future_time)]
10441043 }
10451044
10461045
10471046
10481047 @Callable(msg)
10491048 func stop_ramp_A () = if (assert((msg.caller == owner)))
10501049 then throw("only owner")
10511050 else {
1052- let current_A = _A()
1051+ let current_A = amp
10531052 [IntegerEntry("initial_A", current_A), IntegerEntry("future_A", current_A), IntegerEntry("initial_A_time", block_timestamp), IntegerEntry("future_A_time", block_timestamp)]
10541053 }
10551054
10561055
10571056
10581057 @Callable(msg)
10591058 func commit_new_fee (new_fee,new_admin_fee) = if (assert((msg.caller == owner)))
10601059 then throw("only owner")
10611060 else if (assert((admin_actions_deadline == 0)))
10621061 then throw("active action")
10631062 else if (assert((MAX_FEE >= new_fee)))
10641063 then throw("fee exceeds maximum")
10651064 else if (assert((MAX_ADMIN_FEE >= new_admin_fee)))
10661065 then throw("admin fee exceeds maximum")
10671066 else {
10681067 let _deadline = (block_timestamp + ADMIN_ACTIONS_DELAY)
10691068 [IntegerEntry("admin_actions_deadline", _deadline), IntegerEntry("future_fee", new_fee), IntegerEntry("future_admin_fee", new_admin_fee)]
10701069 }
10711070
10721071
10731072
10741073 @Callable(msg)
10751074 func apply_new_fee () = if (assert((msg.caller == owner)))
10761075 then throw("only owner")
10771076 else if (assert((block_timestamp >= admin_actions_deadline)))
10781077 then throw("insufficient time")
10791078 else if (assert((admin_actions_deadline != 0)))
10801079 then throw("no active action")
10811080 else [IntegerEntry("admin_actions_deadline", 0), IntegerEntry("fee", future_fee), IntegerEntry("admin_fee", future_admin_fee)]
10821081
10831082
10841083
10851084 @Callable(msg)
10861085 func revert_new_parameters () = if (assert((msg.caller == owner)))
10871086 then throw("only owner")
10881087 else [IntegerEntry("admin_actions_deadline", 0)]
10891088
10901089
10911090
10921091 @Callable(msg)
10931092 func commit_transfer_ownership (_owner) = if (assert((msg.caller == owner)))
10941093 then throw("only owner")
10951094 else if (assert((transfer_ownership_deadline == 0)))
10961095 then throw("active transfer")
10971096 else {
10981097 let _deadline = (block_timestamp + ADMIN_ACTIONS_DELAY)
10991098 [IntegerEntry("transfer_ownership_deadline", _deadline), StringEntry("future_owner", checkAddress(_owner))]
11001099 }
11011100
11021101
11031102
11041103 @Callable(msg)
11051104 func apply_transfer_ownership () = if (assert((msg.caller == owner)))
11061105 then throw("only owner")
11071106 else if (assert((block_timestamp >= transfer_ownership_deadline)))
11081107 then throw("insufficient time")
11091108 else if (assert((transfer_ownership_deadline != 0)))
11101109 then throw("no active transfer")
11111110 else [IntegerEntry("transfer_ownership_deadline", 0), StringEntry("owner", future_owner)]
11121111
11131112
11141113
11151114 @Callable(msg)
11161115 func revert_transfer_ownership () = if (assert((msg.caller == owner)))
11171116 then throw("only owner")
11181117 else [IntegerEntry("transfer_ownership_deadline", 0)]
11191118
11201119
11211120
11221121 @Callable(msg)
11231122 func admin_balances (i) = $Tuple2(nil, admin_balance(i))
11241123
11251124
11261125
11271126 @Callable(msg)
11281127 func withdraw_admin_fees () = if (assert((msg.caller == owner)))
11291128 then throw("only owner")
11301129 else {
11311130 func fold (acc,index) = (acc :+ ScriptTransfer(owner, admin_balance(index), fromBase58String(coins[index])))
11321131
11331132 let $l = index_N_COINS
11341133 let $s = size($l)
11351134 let $acc0 = nil
11361135 func $f0_1 ($a,$i) = if (($i >= $s))
11371136 then $a
11381137 else fold($a, $l[$i])
11391138
11401139 func $f0_2 ($a,$i) = if (($i >= $s))
11411140 then $a
11421141 else throw("List size exceeds 10")
11431142
11441143 $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)
11451144 }
11461145
11471146
11481147
11491148 @Callable(msg)
11501149 func donate_admin_fees () = if (assert((msg.caller == owner)))
11511150 then throw("only owner")
11521151 else {
11531152 func fold (acc,index) = (acc :+ (balances[index] + admin_balance(index)))
11541153
11551154 let new_balances = {
11561155 let $l = index_N_COINS
11571156 let $s = size($l)
11581157 let $acc0 = nil
11591158 func $f0_1 ($a,$i) = if (($i >= $s))
11601159 then $a
11611160 else fold($a, $l[$i])
11621161
11631162 func $f0_2 ($a,$i) = if (($i >= $s))
11641163 then $a
11651164 else throw("List size exceeds 10")
11661165
11671166 $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)
11681167 }
11691168 [StringEntry("balances", makeString(list_itos(new_balances), ","))]
11701169 }
11711170
11721171
11731172
11741173 @Callable(msg)
11751174 func set_auto_fees (_is_auto_fees) = if (assert((msg.caller == owner)))
11761175 then throw("only owner")
11771176 else [BooleanEntry("is_auto_fees", _is_auto_fees)]
11781177
11791178
11801179
11811180 @Callable(msg)
11821181 func kill_me () = if (assert((msg.caller == owner)))
11831182 then throw("only owner")
11841183 else if (assert((kill_deadline > block_timestamp)))
11851184 then throw("deadline has passed")
11861185 else [BooleanEntry("is_killed", true)]
11871186
11881187
11891188
11901189 @Callable(msg)
11911190 func unkill_me () = if (assert((msg.caller == owner)))
11921191 then throw("only owner")
11931192 else [BooleanEntry("is_killed", false)]
11941193
11951194
11961195
11971196 @Callable(msg)
11981197 func set_height_address (_heightAddress) = if ((msg.caller != owner))
11991198 then throw("only owner")
12001199 else [StringEntry("heightAddress", checkAddress(_heightAddress))]
12011200
12021201
12031202
12041203 @Callable(i)
12051204 func set_verifier (verifier) = if ((i.caller != this))
12061205 then throw("self call only")
12071206 else {
12081207 let addressOK = match addressFromString(verifier) {
12091208 case a: Address =>
12101209 true
12111210 case _ =>
12121211 false
12131212 }
12141213 if (!(addressOK))
12151214 then throw(("verifier wrong address " + verifier))
12161215 else if (isDefined(getString(this, "verifier")))
12171216 then throw("verifier already defined")
12181217 else [StringEntry("verifier", verifier)]
12191218 }
12201219
12211220
12221221 @Verifier(tx)
12231222 func verify () = match getString(this, "verifier") {
12241223 case verifier: String =>
12251224 valueOrElse(getBoolean(addressFromStringValue(verifier), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
12261225 case _ =>
12271226 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
12281227 }
12291228

github/deemru/w8io/169f3d6 
147.89 ms