tx · EJ3eZimZTcoh46BuCER4W8oFq92pkCzDVXAi8U8uF7Pi

3MqQg3GcBjjk5727HxPKgQfqGQwWm6QA2yL:  -0.03800000 Waves

2022.09.14 15:48 [2228790] smart account 3MqQg3GcBjjk5727HxPKgQfqGQwWm6QA2yL > SELF 0.00000000 Waves

{ "type": 13, "id": "EJ3eZimZTcoh46BuCER4W8oFq92pkCzDVXAi8U8uF7Pi", "fee": 3800000, "feeAssetId": null, "timestamp": 1663159628619, "version": 2, "chainId": 84, "sender": "3MqQg3GcBjjk5727HxPKgQfqGQwWm6QA2yL", "senderPublicKey": "4AhS4PdxdW6j71mgHB4Xq7Eewk1rPdm57kDHAwQTTweK", "proofs": [ "3aR2espC4wneMzrYQVHw4a282PbC9CsSAMDnEbNTgLZi8U3gJ2RjEcwVDgRkkyG2bXBxSQorwEFKmexXtMngCQj8", "4GGguNy9NvJkUmcbuxycHVBAPdxVftC6qjUNqwzWyJ8ZZ7erpzTgLajExrqZViWTJfAf3tGubukwtzEAkokwBywP" ], "script": "base64:BgJpCAISBAoCEQESBgoECAEBBBIECgIBBBIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIDCgEBXgAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rU2hhcmVBc3NldElkAg5zaGFyZV9hc3NldF9pZAARa1NoYXJlQXNzZXRTdXBwbHkCEnNoYXJlX2Fzc2V0X3N1cHBseQAEa0ZlZQ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J0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkzBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAURYWRtaW5QdWJLZXlJbnZva2UDAwUTY2FsbFRha2VJbnRvQWNjb3VudAUNc2lnbmVkQnlBZG1pbgcGBRNtdWx0aVNpZ25lZEJ5QWRtaW5zBRNtdWx0aVNpZ25lZEJ5QWRtaW5z7UbC3A==", "height": 2228790, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DxiDNY1rfY5kn5G6HYToZZmKdEjaS2UDcFJBLY72JnH6 Next: 6jWLsSCEiqv863AGbEtUcMNChrGXDasyZyWVvYS9mYbp Diff:
OldNewDifferences
6767
6868 let kFarmingAddress = "farming_address"
6969
70+let kLPFarmingAddress = "lp_farming"
71+
7072 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
7173
7274 func getBase58FromOracle (key) = match getString(oracle, key) {
9597
9698 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
9799
98-let capMoneyBoxAddress = Address(base58'3MxXHaGvmKQHH3kNrPBunhve1sDXf7M5RZt')
100+let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress))
99101
100102 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
101103
164166
165167
166168 func calculateFeeDiscount (userAddr) = {
167- let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
169+ let user = match userAddr {
170+ case u: Address =>
171+ toString(u)
172+ case u: String =>
173+ u
174+ case _ =>
175+ throw("Unknow type of user Addr")
176+ }
177+ let swopAmount = valueOrElse(getInteger(govAddress, (user + kUserSwopInGov)), 0)
168178 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
169179 let discounts = split(getStringValue(oracle, kDiscounts), ",")
170180 if (if ((swopAmount >= parseIntValue(discountValues[0])))
289299 else $Tuple2(D, false)
290300 }
291301
292- let $t066756787 = {
302+ let $t068406952 = {
293303 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
294304 let $s = size($l)
295305 let $acc0 = $Tuple2(toBigInt(S), false)
303313
304314 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
305315 }
306- let D = $t066756787._1
307- let finished = $t066756787._2
316+ let D = $t068406952._1
317+ let finished = $t068406952._2
308318 if ((finished == false))
309319 then throw(("get_D() not finished with " + toString(D)))
310320 else toInt(D)
330340 let D = get_D(xp_, amp)
331341 let Ann = (amp * nCoins)
332342 func S_c (acc,i) = {
333- let $t073587375 = acc
334- let S_ = $t073587375._1
335- let c = $t073587375._2
343+ let $t075237540 = acc
344+ let S_ = $t075237540._1
345+ let c = $t075237540._2
336346 let x_ = if ((in == i))
337347 then x
338348 else xp_[i]
343353 else $Tuple2(S_, c)
344354 }
345355
346- let $t075837684 = {
356+ let $t077487849 = {
347357 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
348358 let $s = size($l)
349359 let $acc0 = $Tuple2(0, toBigInt(D))
357367
358368 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
359369 }
360- let S_ = $t075837684._1
361- let c_ = $t075837684._2
370+ let S_ = $t077487849._1
371+ let c_ = $t077487849._2
362372 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
363373 let bD = toBigInt(((S_ + (D / Ann)) - D))
364374 func y_proc (acc,_i) = if ((acc._2 == true))
375385 else $Tuple2(y, false)
376386 }
377387
378- let $t081668283 = {
388+ let $t083318448 = {
379389 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
380390 let $s = size($l)
381391 let $acc0 = $Tuple2(toBigInt(D), false)
389399
390400 $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)
391401 }
392- let y = $t081668283._1
393- let finished = $t081668283._2
402+ let y = $t083318448._1
403+ let finished = $t083318448._2
394404 if ((finished == false))
395405 then throw(("getY() not finished with " + toString(y)))
396406 else toInt(y)
404414 else {
405415 let Ann = (A_ * nCoins)
406416 func S_c (acc,i) = {
407- let $t086628679 = acc
408- let S_ = $t086628679._1
409- let c = $t086628679._2
417+ let $t088278844 = acc
418+ let S_ = $t088278844._1
419+ let c = $t088278844._2
410420 let x_ = if (if ((in != i))
411421 then (nCoins > i)
412422 else false)
419429 else $Tuple2(S_, c)
420430 }
421431
422- let $t088999000 = {
432+ let $t090649165 = {
423433 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
424434 let $s = size($l)
425435 let $acc0 = $Tuple2(0, toBigInt(D))
433443
434444 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
435445 }
436- let S_ = $t088999000._1
437- let c_ = $t088999000._2
446+ let S_ = $t090649165._1
447+ let c_ = $t090649165._2
438448 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
439449 let bD = toBigInt(((S_ + (D / Ann)) - D))
440450 func y_D_proc (acc,i) = if ((acc._2 == true))
451461 else $Tuple2(y, false)
452462 }
453463
454- let $t094839602 = {
464+ let $t096489767 = {
455465 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
456466 let $s = size($l)
457467 let $acc0 = $Tuple2(toBigInt(D), false)
465475
466476 $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)
467477 }
468- let y = $t094839602._1
469- let finished = $t094839602._2
478+ let y = $t096489767._1
479+ let finished = $t096489767._2
470480 if ((finished == false))
471481 then throw(("get_y_D() not finished with " + toString(y)))
472482 else toInt(y)
483493 let new_y = get_y_D(amp, i, xp, D1)
484494 let dy_0 = (xp[i] - new_y)
485495 func xp_reduced_proc (acc,xp_j) = {
486- let $t01024310272 = acc
487- let xp_reduced = $t01024310272._1
488- let index = $t01024310272._2
496+ let $t01040810437 = acc
497+ let xp_reduced = $t01040810437._1
498+ let index = $t01040810437._2
489499 let dx_expected = if ((index == i))
490500 then (fraction(xp_j, D1, D0) - new_y)
491501 else (xp_j - fraction(xp_j, D1, D0))
492502 $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1))
493503 }
494504
495- let $t01053410598 = {
505+ let $t01069910763 = {
496506 let $l = xp
497507 let $s = size($l)
498508 let $acc0 = $Tuple2(nil, 0)
506516
507517 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
508518 }
509- let xp_reduced = $t01053410598._1
510- let index = $t01053410598._2
519+ let xp_reduced = $t01069910763._1
520+ let index = $t01069910763._2
511521 let xp_reduced_i = xp_reduced[i]
512522 let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1)
513523 $Tuple2(dy, (dy_0 - dy))
531541
532542 func calcStakingParams (stake,amount,assetId) = if (stake)
533543 then {
534- let $t01116211228 = calcStakingFuncAndAddres(stake, assetId)
535- let call = $t01116211228._1
536- let stakingAddr = $t01116211228._2
544+ let $t01132711393 = calcStakingFuncAndAddres(stake, assetId)
545+ let call = $t01132711393._1
546+ let stakingAddr = $t01132711393._2
537547 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
538548 }
539549 else {
540- let $t01131411380 = calcStakingFuncAndAddres(stake, assetId)
541- let call = $t01131411380._1
542- let stakingAddr = $t01131411380._2
550+ let $t01147911545 = calcStakingFuncAndAddres(stake, assetId)
551+ let call = $t01147911545._1
552+ let stakingAddr = $t01147911545._2
543553 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
544554 }
545555
546556
547557 func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
548558 then {
549- let $t01156711669 = calcStakingParams(true, amount, fromBase58String(assetIdString))
550- let call = $t01156711669._1
551- let addr = $t01156711669._2
552- let params = $t01156711669._3
553- let payments = $t01156711669._4
559+ let $t01173211834 = calcStakingParams(true, amount, fromBase58String(assetIdString))
560+ let call = $t01173211834._1
561+ let addr = $t01173211834._2
562+ let params = $t01173211834._3
563+ let payments = $t01173211834._4
554564 invoke(addr, call, params, payments)
555565 }
556566 else 0
558568
559569 func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
560570 then {
561- let $t01185411957 = calcStakingParams(false, amount, fromBase58String(assetIdString))
562- let call = $t01185411957._1
563- let addr = $t01185411957._2
564- let params = $t01185411957._3
565- let payments = $t01185411957._4
571+ let $t01201912122 = calcStakingParams(false, amount, fromBase58String(assetIdString))
572+ let call = $t01201912122._1
573+ let addr = $t01201912122._2
574+ let params = $t01201912122._3
575+ let payments = $t01201912122._4
566576 invoke(addr, call, params, payments)
567577 }
568578 else 0
591601 func checkSuspicious () = {
592602 let contractBalances = _xp()
593603 func checkBalance (acc,assetId) = {
594- let $t01256812593 = acc
595- let suspicious = $t01256812593._1
596- let i = $t01256812593._2
604+ let $t01273312758 = acc
605+ let suspicious = $t01273312758._1
606+ let i = $t01273312758._2
597607 if (suspicious)
598608 then $Tuple2(suspicious, i)
599609 else {
753763 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments))
754764 else {
755765 func parsePayments (acc,assetId) = {
756- let $t01690116930 = acc
757- let newBalances = $t01690116930._1
758- let i = $t01690116930._2
759- let j = $t01690116930._3
766+ let $t01706617095 = acc
767+ let newBalances = $t01706617095._1
768+ let i = $t01706617095._2
769+ let j = $t01706617095._3
760770 if (if ((paymentsSize > j))
761771 then (getStrAssetId(payments[j].assetId) == assetId)
762772 else false)
764774 else $Tuple3((newBalances :+ xp[i]), (i + 1), j)
765775 }
766776
767- let $t01715017236 = {
777+ let $t01731517401 = {
768778 let $l = assetIds
769779 let $s = size($l)
770780 let $acc0 = $Tuple3(nil, 0, 0)
778788
779789 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
780790 }
781- let newBalances = $t01715017236._1
782- let k = $t01715017236._2
783- let parsedPayments = $t01715017236._3
791+ let newBalances = $t01731517401._1
792+ let k = $t01731517401._2
793+ let parsedPayments = $t01731517401._3
784794 if ((paymentsSize > parsedPayments))
785795 then throw("Incorect payments order")
786796 else if (checkDAppThreshold(newBalances))
792802 else {
793803 let feeDiscount = calculateFeeDiscount(msg.caller)
794804 func calcScriptActions (acc,newBalance) = {
795- let $t01763717678 = acc
796- let invBalances = $t01763717678._1
797- let scriptActions = $t01763717678._2
798- let i = $t01763717678._3
805+ let $t01780217843 = acc
806+ let invBalances = $t01780217843._1
807+ let scriptActions = $t01780217843._2
808+ let i = $t01780217843._3
799809 if ((shareSupply > 0))
800810 then {
801811 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
810820 let finalBalance = (newBalance - fees)
811821 let invariantBalance = (newBalance - fees)
812822 let pmt = (newBalance - xp[i])
823+ let lpFees = (fees - governanceFees)
813824 let inv = if ((pmt > 0))
814825 then stake((pmt - fees), assetIds[i])
815826 else unstake(fees, assetIds[i])
816827 if ((inv == inv))
817- then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(capMoneyBoxAddress, (fees - governanceFees), fromBase58String(assetIds[i])), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1))
828+ then {
829+ let airdrop = if ((lpFees > 0))
830+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)])
831+ else 0
832+ if ((airdrop == airdrop))
833+ then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1))
834+ else throw("Strict value is not equal to itself.")
835+ }
818836 else throw("Strict value is not equal to itself.")
819837 }
820838 else {
825843 }
826844 }
827845
828- let $t01922619314 = {
846+ let $t01954819636 = {
829847 let $l = newBalances
830848 let $s = size($l)
831849 let $acc0 = $Tuple3(nil, nil, 0)
839857
840858 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
841859 }
842- let invBalances = $t01922619314._1
843- let scriptActions = $t01922619314._2
860+ let invBalances = $t01954819636._1
861+ let scriptActions = $t01954819636._2
844862 let D2 = getDMem(invBalances, amp)
845863 let mint_amount = if ((shareSupply == 0))
846864 then D1
865883 }
866884 }
867885 })
886+
887+
888+
889+@Callable(msg)
890+func calcMintAmount (newBalances,user) = {
891+ let amp = _A()
892+ let xp = _xp()
893+ let D1 = getDMem(newBalances, amp)
894+ if ((shareSupply == 0))
895+ then $Tuple2(nil, D1)
896+ else {
897+ let D0 = getDMem(xp, amp)
898+ let feeDiscount = calculateFeeDiscount(user)
899+ func calcInvBalances (acc,newBalance) = {
900+ let $t02082520851 = acc
901+ let invBalances = $t02082520851._1
902+ let i = $t02082520851._2
903+ let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
904+ let fees = {
905+ let idealBalance = fraction(D1, xp[i], D0)
906+ let difference = if ((idealBalance > newBalance))
907+ then (idealBalance - newBalance)
908+ else (newBalance - idealBalance)
909+ fraction(_fee, difference, feeScale6)
910+ }
911+ let invariantBalance = (newBalance - fees)
912+ $Tuple2((invBalances :+ invariantBalance), (i + 1))
913+ }
914+
915+ let $t02145321523 = {
916+ let $l = newBalances
917+ let $s = size($l)
918+ let $acc0 = $Tuple2(nil, 0)
919+ func $f0_1 ($a,$i) = if (($i >= $s))
920+ then $a
921+ else calcInvBalances($a, $l[$i])
922+
923+ func $f0_2 ($a,$i) = if (($i >= $s))
924+ then $a
925+ else throw("List size exceeds 15")
926+
927+ $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
928+ }
929+ let invBalances = $t02145321523._1
930+ let k = $t02145321523._2
931+ let D2 = getDMem(invBalances, amp)
932+ let mintAmount = fraction(shareSupply, (D2 - D0), D0)
933+ $Tuple2(nil, mintAmount)
934+ }
935+ }
868936
869937
870938
914982 then throw("Exchange resulted in fewer coins than expected")
915983 else {
916984 func makeNewBalances (acc,tokenBalance) = {
917- let $t02202622052 = acc
918- let newBalances = $t02202622052._1
919- let i = $t02202622052._2
985+ let $t02355823584 = acc
986+ let newBalances = $t02355823584._1
987+ let i = $t02355823584._2
920988 if ((i == fromIndex))
921989 then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
922990 else if ((i == toIndex))
924992 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
925993 }
926994
927- let $t02230322364 = {
995+ let $t02383523896 = {
928996 let $l = xp
929997 let $s = size($l)
930998 let $acc0 = $Tuple2(nil, 0)
9381006
9391007 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
9401008 }
941- let newBalances = $t02230322364._1
942- let i = $t02230322364._2
1009+ let newBalances = $t02383523896._1
1010+ let i = $t02383523896._2
9431011 if (checkDAppThreshold(newBalances))
9441012 then throw()
9451013 else {
9481016 then {
9491017 let us = unstake(_dy, tokenOut)
9501018 if ((us == us))
951- then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(capMoneyBoxAddress, (_fee - governanceFees), tokenOutB58)], [dy, tokenOutB58])
1019+ then {
1020+ let lpFees = (_fee - governanceFees)
1021+ let airdrop = if ((lpFees > 0))
1022+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
1023+ else 0
1024+ if ((airdrop == airdrop))
1025+ then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58])
1026+ else throw("Strict value is not equal to itself.")
1027+ }
9521028 else throw("Strict value is not equal to itself.")
9531029 }
9541030 else throw("Strict value is not equal to itself.")
9731049 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
9741050 else {
9751051 func calcScriptActions (acc,balance) = {
976- let $t02350523533 = acc
977- let scriptActions = $t02350523533._1
978- let i = $t02350523533._2
1052+ let $t02518725215 = acc
1053+ let scriptActions = $t02518725215._1
1054+ let i = $t02518725215._2
9791055 let wAmount = fraction(balance, pmtAmount, shareSupply)
9801056 if (assert((wAmount >= minAmounts[i])))
9811057 then throw("Withdrawal resulted in fewer coins than expected")
9871063 }
9881064 }
9891065
990- let $t02402324091 = {
1066+ let $t02570525773 = {
9911067 let $l = _xp()
9921068 let $s = size($l)
9931069 let $acc0 = $Tuple2(nil, 0)
10011077
10021078 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
10031079 }
1004- let scriptActions = $t02402324091._1
1005- let i = $t02402324091._2
1080+ let scriptActions = $t02570525773._1
1081+ let i = $t02570525773._2
10061082 (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))])
10071083 }
10081084 }
10651141 then throw("unknown token")
10661142 else {
10671143 let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1144+ let tokenOutB58 = fromBase58String(tokenOut)
10681145 let xp = _xp()
1069- let $t02600526087 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1070- let dy = $t02600526087._1
1071- let dy_fee = $t02600526087._2
1146+ let $t02773727819 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1147+ let dy = $t02773727819._1
1148+ let dy_fee = $t02773727819._2
10721149 if (assert((dy >= minAmount)))
10731150 then throw("Not enough coins removed")
10741151 else {
10751152 let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
10761153 let dy_and_fee = (dy + dy_fee)
10771154 func makeNewBalances (acc,tokenBalance) = {
1078- let $t02634526371 = acc
1079- let newBalances = $t02634526371._1
1080- let i = $t02634526371._2
1155+ let $t02807728103 = acc
1156+ let newBalances = $t02807728103._1
1157+ let i = $t02807728103._2
10811158 if ((i == outIndex))
10821159 then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
10831160 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
10841161 }
10851162
1086- let $t02653826599 = {
1163+ let $t02827028331 = {
10871164 let $l = xp
10881165 let $s = size($l)
10891166 let $acc0 = $Tuple2(nil, 0)
10971174
10981175 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
10991176 }
1100- let newBalances = $t02653826599._1
1101- let v = $t02653826599._2
1177+ let newBalances = $t02827028331._1
1178+ let v = $t02827028331._2
11021179 if (checkDAppThreshold(newBalances))
11031180 then throw()
11041181 else {
11051182 let us = unstake(dy_and_fee, tokenOut)
11061183 if ((us == us))
1107- then [ScriptTransfer(msg.originCaller, dy, fromBase58String(tokenOut)), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(tokenOut)), ScriptTransfer(capMoneyBoxAddress, (dy_fee - governanceFees), fromBase58String(tokenOut)), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]
1184+ then {
1185+ let lpFees = (dy_fee - governanceFees)
1186+ let airdrop = if ((lpFees > 0))
1187+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
1188+ else 0
1189+ if ((airdrop == airdrop))
1190+ then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]
1191+ else throw("Strict value is not equal to itself.")
1192+ }
11081193 else throw("Strict value is not equal to itself.")
11091194 }
11101195 }
11661251 let balances = _xp()
11671252 let D0 = getDMem(balances, amp)
11681253 func calcNewBalances (acc,balance) = {
1169- let $t02852328549 = acc
1170- let newBalances = $t02852328549._1
1171- let i = $t02852328549._2
1254+ let $t03034830374 = acc
1255+ let newBalances = $t03034830374._1
1256+ let i = $t03034830374._2
11721257 let newBalance = (balance + (if (deposit)
11731258 then amounts[i]
11741259 else -(amounts[i])))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PRECISION = 1000000
55
66 let MAX_A = 1000000
77
88 let MAX_A_CHANGE = 10
99
1010 let DECIMALS = 6
1111
1212 let MIN_RAMP_TIME = (86400 / 60)
1313
1414 let version = "3.0.0"
1515
1616 let kVersion = "version"
1717
1818 let kAssets = "asset_ids"
1919
2020 let kAssetBalance = "_balance"
2121
2222 let kActive = "active"
2323
2424 let kCause = "shutdown_cause"
2525
2626 let kShareAssetId = "share_asset_id"
2727
2828 let kShareAssetSupply = "share_asset_supply"
2929
3030 let kFee = "commission"
3131
3232 let kDAppThresholdCoef = "dAppThresholdCoef"
3333
3434 let kUSDNAddress = "staking_usdnnsbt_address"
3535
3636 let kDiscounts = "discounts"
3737
3838 let kDiscountValues = "discount_values"
3939
4040 let kUserSwopInGov = "_SWOP_amount"
4141
4242 let kFirstHarvest = "first_harvest"
4343
4444 let kFirstHarvestHeight = "first_harvest_height"
4545
4646 let kShareLimit = "share_limit_on_first_harvest"
4747
4848 let kBasePeriod = "base_period"
4949
5050 let kPeriodLength = "period_length"
5151
5252 let kStartHeight = "start_height"
5353
5454 let kAdminPubKey1 = "admin_pub_1"
5555
5656 let kAdminPubKey2 = "admin_pub_2"
5757
5858 let kAdminPubKey3 = "admin_pub_3"
5959
6060 let kAdminInvokePubKey = "admin_invoke_pub"
6161
6262 let kMoneyBoxAddress = "money_box_address"
6363
6464 let kGovAddress = "governance_address"
6565
6666 let kVotingAddress = "voting_address"
6767
6868 let kFarmingAddress = "farming_address"
6969
70+let kLPFarmingAddress = "lp_farming"
71+
7072 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
7173
7274 func getBase58FromOracle (key) = match getString(oracle, key) {
7375 case string: String =>
7476 fromBase58String(string)
7577 case nothing =>
7678 throw((key + "is empty"))
7779 }
7880
7981
8082 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
8183
8284 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
8385
8486 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
8587
8688 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
8789
8890 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
8991
9092 let govAddress = Address(getBase58FromOracle(kGovAddress))
9193
9294 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
9395
9496 let votingAddress = Address(getBase58FromOracle(kVotingAddress))
9597
9698 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
9799
98-let capMoneyBoxAddress = Address(base58'3MxXHaGvmKQHH3kNrPBunhve1sDXf7M5RZt')
100+let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress))
99101
100102 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
101103
102104 let stakingAssets = [toBase58String(USDN)]
103105
104106 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
105107
106108 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
107109
108110 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
109111
110112 let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
111113
112114 let active = getBooleanValue(this, kActive)
113115
114116 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
115117
116118 let shareSupply = getIntegerValue(this, kShareAssetSupply)
117119
118120 let feeScale6 = 1000000
119121
120122 let fee = getIntegerValue(this, kFee)
121123
122124 let feeGovernance = fraction(40, feeScale6, 100)
123125
124126 let initial_A = getIntegerValue(this, "initial_A")
125127
126128 let future_A = getIntegerValue(this, "future_A")
127129
128130 let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0)
129131
130132 let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0)
131133
132134 let assetIds = split(getStringValue(this, kAssets), ",")
133135
134136 let nCoins = size(assetIds)
135137
136138 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
137139
138140
139141 func throwIsActive () = throw("DApp is already active")
140142
141143
142144 func isActive () = if (active)
143145 then unit
144146 else throw("DApp is inactive at this moment")
145147
146148
147149 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
148150 then unit
149151 else throw("Only admin can call this function")
150152
151153
152154 func isSelfCall (i) = if ((this == i.caller))
153155 then unit
154156 else throw("Only contract itself can call this function")
155157
156158
157159 let big2 = toBigInt(2)
158160
159161 let blockTimestamp = height
160162
161163 func assert (a) = if (a)
162164 then false
163165 else true
164166
165167
166168 func calculateFeeDiscount (userAddr) = {
167- let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
169+ let user = match userAddr {
170+ case u: Address =>
171+ toString(u)
172+ case u: String =>
173+ u
174+ case _ =>
175+ throw("Unknow type of user Addr")
176+ }
177+ let swopAmount = valueOrElse(getInteger(govAddress, (user + kUserSwopInGov)), 0)
168178 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
169179 let discounts = split(getStringValue(oracle, kDiscounts), ",")
170180 if (if ((swopAmount >= parseIntValue(discountValues[0])))
171181 then (parseIntValue(discountValues[1]) > swopAmount)
172182 else false)
173183 then (feeScale6 - parseIntValue(discounts[0]))
174184 else if (if ((swopAmount >= parseIntValue(discountValues[1])))
175185 then (parseIntValue(discountValues[2]) > swopAmount)
176186 else false)
177187 then (feeScale6 - parseIntValue(discounts[1]))
178188 else if (if ((swopAmount >= parseIntValue(discountValues[2])))
179189 then (parseIntValue(discountValues[3]) > swopAmount)
180190 else false)
181191 then (feeScale6 - parseIntValue(discounts[2]))
182192 else if (if ((swopAmount >= parseIntValue(discountValues[3])))
183193 then (parseIntValue(discountValues[4]) > swopAmount)
184194 else false)
185195 then (feeScale6 - parseIntValue(discounts[3]))
186196 else if ((swopAmount >= parseIntValue(discountValues[4])))
187197 then (feeScale6 - parseIntValue(discounts[4]))
188198 else feeScale6
189199 }
190200
191201
192202 func _A () = {
193203 let t1 = future_A_time
194204 let A1 = future_A
195205 if ((t1 > blockTimestamp))
196206 then {
197207 let A0 = initial_A
198208 let t0 = initial_A_time
199209 if ((A1 > A0))
200210 then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0)))
201211 else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0)))
202212 }
203213 else A1
204214 }
205215
206216
207217 func _xp () = {
208218 func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0))
209219
210220 let $l = assetIds
211221 let $s = size($l)
212222 let $acc0 = nil
213223 func $f0_1 ($a,$i) = if (($i >= $s))
214224 then $a
215225 else assetBalances($a, $l[$i])
216226
217227 func $f0_2 ($a,$i) = if (($i >= $s))
218228 then $a
219229 else throw("List size exceeds 15")
220230
221231 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
222232 }
223233
224234
225235 func _xp_mem (xp) = xp
226236
227237
228238 func sumList (acc,element) = (acc + element)
229239
230240
231241 func get_D (xp,amp) = {
232242 let @ = invoke(this, "D", [xp, amp], nil)
233243 if ($isInstanceOf(@, "Int"))
234244 then @
235245 else throw(($getType(invoke(this, "D", [xp, amp], nil)) + " couldn't be cast to Int"))
236246 }
237247
238248
239249 func get_D_internal (xp,amp) = {
240250 let S = {
241251 let $l = xp
242252 let $s = size($l)
243253 let $acc0 = 0
244254 func $f0_1 ($a,$i) = if (($i >= $s))
245255 then $a
246256 else sumList($a, $l[$i])
247257
248258 func $f0_2 ($a,$i) = if (($i >= $s))
249259 then $a
250260 else throw("List size exceeds 15")
251261
252262 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
253263 }
254264 if ((S == 0))
255265 then 0
256266 else {
257267 let Ann = (amp * nCoins)
258268 let AnnS = (toBigInt(Ann) * toBigInt(S))
259269 let Ann1 = toBigInt((Ann - 1))
260270 func Dproc (acc,i) = if ((acc._2 == true))
261271 then acc
262272 else {
263273 let Dprev = acc._1
264274 func D_PProc (D_P,i) = if ((nCoins > i))
265275 then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins)))
266276 else D_P
267277
268278 let D_P = {
269279 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
270280 let $s = size($l)
271281 let $acc0 = Dprev
272282 func $f1_1 ($a,$i) = if (($i >= $s))
273283 then $a
274284 else D_PProc($a, $l[$i])
275285
276286 func $f1_2 ($a,$i) = if (($i >= $s))
277287 then $a
278288 else throw("List size exceeds 15")
279289
280290 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
281291 }
282292 let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P)))
283293 if ((D > Dprev))
284294 then if ((1 >= toInt((D - Dprev))))
285295 then $Tuple2(D, true)
286296 else $Tuple2(D, false)
287297 else if ((1 >= toInt((Dprev - D))))
288298 then $Tuple2(D, true)
289299 else $Tuple2(D, false)
290300 }
291301
292- let $t066756787 = {
302+ let $t068406952 = {
293303 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
294304 let $s = size($l)
295305 let $acc0 = $Tuple2(toBigInt(S), false)
296306 func $f1_1 ($a,$i) = if (($i >= $s))
297307 then $a
298308 else Dproc($a, $l[$i])
299309
300310 func $f1_2 ($a,$i) = if (($i >= $s))
301311 then $a
302312 else throw("List size exceeds 15")
303313
304314 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
305315 }
306- let D = $t066756787._1
307- let finished = $t066756787._2
316+ let D = $t068406952._1
317+ let finished = $t068406952._2
308318 if ((finished == false))
309319 then throw(("get_D() not finished with " + toString(D)))
310320 else toInt(D)
311321 }
312322 }
313323
314324
315325 func getDMem (xp,amp) = get_D(_xp_mem(xp), amp)
316326
317327
318328 func getY (in,out,x,xp_) = if (assert((in != out)))
319329 then throw("same coin")
320330 else if (assert(if ((out >= 0))
321331 then (in >= 0)
322332 else false))
323333 then throw("below zero")
324334 else if (assert(if ((nCoins > out))
325335 then (nCoins > in)
326336 else false))
327337 then throw("above N_COINS")
328338 else {
329339 let amp = _A()
330340 let D = get_D(xp_, amp)
331341 let Ann = (amp * nCoins)
332342 func S_c (acc,i) = {
333- let $t073587375 = acc
334- let S_ = $t073587375._1
335- let c = $t073587375._2
343+ let $t075237540 = acc
344+ let S_ = $t075237540._1
345+ let c = $t075237540._2
336346 let x_ = if ((in == i))
337347 then x
338348 else xp_[i]
339349 if (if ((i != out))
340350 then (nCoins > i)
341351 else false)
342352 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
343353 else $Tuple2(S_, c)
344354 }
345355
346- let $t075837684 = {
356+ let $t077487849 = {
347357 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
348358 let $s = size($l)
349359 let $acc0 = $Tuple2(0, toBigInt(D))
350360 func $f0_1 ($a,$i) = if (($i >= $s))
351361 then $a
352362 else S_c($a, $l[$i])
353363
354364 func $f0_2 ($a,$i) = if (($i >= $s))
355365 then $a
356366 else throw("List size exceeds 15")
357367
358368 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
359369 }
360- let S_ = $t075837684._1
361- let c_ = $t075837684._2
370+ let S_ = $t077487849._1
371+ let c_ = $t077487849._2
362372 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
363373 let bD = toBigInt(((S_ + (D / Ann)) - D))
364374 func y_proc (acc,_i) = if ((acc._2 == true))
365375 then acc
366376 else {
367377 let y_prev = acc._1
368378 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
369379 if ((y > y_prev))
370380 then if ((1 >= toInt((y - y_prev))))
371381 then $Tuple2(y, true)
372382 else $Tuple2(y, false)
373383 else if ((1 >= toInt((y_prev - y))))
374384 then $Tuple2(y, true)
375385 else $Tuple2(y, false)
376386 }
377387
378- let $t081668283 = {
388+ let $t083318448 = {
379389 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
380390 let $s = size($l)
381391 let $acc0 = $Tuple2(toBigInt(D), false)
382392 func $f1_1 ($a,$i) = if (($i >= $s))
383393 then $a
384394 else y_proc($a, $l[$i])
385395
386396 func $f1_2 ($a,$i) = if (($i >= $s))
387397 then $a
388398 else throw("List size exceeds 16")
389399
390400 $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)
391401 }
392- let y = $t081668283._1
393- let finished = $t081668283._2
402+ let y = $t083318448._1
403+ let finished = $t083318448._2
394404 if ((finished == false))
395405 then throw(("getY() not finished with " + toString(y)))
396406 else toInt(y)
397407 }
398408
399409
400410 func get_y_D (A_,in,xp,D) = if (assert((in >= 0)))
401411 then throw("i below zero")
402412 else if (assert((nCoins > in)))
403413 then throw("i above N_COINS")
404414 else {
405415 let Ann = (A_ * nCoins)
406416 func S_c (acc,i) = {
407- let $t086628679 = acc
408- let S_ = $t086628679._1
409- let c = $t086628679._2
417+ let $t088278844 = acc
418+ let S_ = $t088278844._1
419+ let c = $t088278844._2
410420 let x_ = if (if ((in != i))
411421 then (nCoins > i)
412422 else false)
413423 then xp[i]
414424 else 0
415425 if (if ((nCoins > i))
416426 then (in != i)
417427 else false)
418428 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
419429 else $Tuple2(S_, c)
420430 }
421431
422- let $t088999000 = {
432+ let $t090649165 = {
423433 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
424434 let $s = size($l)
425435 let $acc0 = $Tuple2(0, toBigInt(D))
426436 func $f0_1 ($a,$i) = if (($i >= $s))
427437 then $a
428438 else S_c($a, $l[$i])
429439
430440 func $f0_2 ($a,$i) = if (($i >= $s))
431441 then $a
432442 else throw("List size exceeds 15")
433443
434444 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
435445 }
436- let S_ = $t088999000._1
437- let c_ = $t088999000._2
446+ let S_ = $t090649165._1
447+ let c_ = $t090649165._2
438448 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
439449 let bD = toBigInt(((S_ + (D / Ann)) - D))
440450 func y_D_proc (acc,i) = if ((acc._2 == true))
441451 then acc
442452 else {
443453 let y_prev = acc._1
444454 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
445455 if ((y > y_prev))
446456 then if ((1 >= toInt((y - y_prev))))
447457 then $Tuple2(y, true)
448458 else $Tuple2(y, false)
449459 else if ((1 >= toInt((y_prev - y))))
450460 then $Tuple2(y, true)
451461 else $Tuple2(y, false)
452462 }
453463
454- let $t094839602 = {
464+ let $t096489767 = {
455465 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
456466 let $s = size($l)
457467 let $acc0 = $Tuple2(toBigInt(D), false)
458468 func $f1_1 ($a,$i) = if (($i >= $s))
459469 then $a
460470 else y_D_proc($a, $l[$i])
461471
462472 func $f1_2 ($a,$i) = if (($i >= $s))
463473 then $a
464474 else throw("List size exceeds 16")
465475
466476 $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)
467477 }
468- let y = $t094839602._1
469- let finished = $t094839602._2
478+ let y = $t096489767._1
479+ let finished = $t096489767._2
470480 if ((finished == false))
471481 then throw(("get_y_D() not finished with " + toString(y)))
472482 else toInt(y)
473483 }
474484
475485
476486 func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = {
477487 let feeDiscount = calculateFeeDiscount(caller)
478488 let amp = _A()
479489 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
480490 let total_supply = shareSupply
481491 let D0 = get_D(xp, amp)
482492 let D1 = (D0 - fraction(_token_amount, D0, total_supply))
483493 let new_y = get_y_D(amp, i, xp, D1)
484494 let dy_0 = (xp[i] - new_y)
485495 func xp_reduced_proc (acc,xp_j) = {
486- let $t01024310272 = acc
487- let xp_reduced = $t01024310272._1
488- let index = $t01024310272._2
496+ let $t01040810437 = acc
497+ let xp_reduced = $t01040810437._1
498+ let index = $t01040810437._2
489499 let dx_expected = if ((index == i))
490500 then (fraction(xp_j, D1, D0) - new_y)
491501 else (xp_j - fraction(xp_j, D1, D0))
492502 $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1))
493503 }
494504
495- let $t01053410598 = {
505+ let $t01069910763 = {
496506 let $l = xp
497507 let $s = size($l)
498508 let $acc0 = $Tuple2(nil, 0)
499509 func $f0_1 ($a,$i) = if (($i >= $s))
500510 then $a
501511 else xp_reduced_proc($a, $l[$i])
502512
503513 func $f0_2 ($a,$i) = if (($i >= $s))
504514 then $a
505515 else throw("List size exceeds 15")
506516
507517 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
508518 }
509- let xp_reduced = $t01053410598._1
510- let index = $t01053410598._2
519+ let xp_reduced = $t01069910763._1
520+ let index = $t01069910763._2
511521 let xp_reduced_i = xp_reduced[i]
512522 let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1)
513523 $Tuple2(dy, (dy_0 - dy))
514524 }
515525
516526
517527 func getStrAssetId (assetId) = match assetId {
518528 case id: ByteVector =>
519529 toBase58String(id)
520530 case waves: Unit =>
521531 "WAVES"
522532 case _ =>
523533 throw("Match error")
524534 }
525535
526536
527537 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
528538 then $Tuple2("lockNeutrino", stakingUSDNAddress)
529539 else $Tuple2("unlockNeutrino", stakingUSDNAddress)
530540
531541
532542 func calcStakingParams (stake,amount,assetId) = if (stake)
533543 then {
534- let $t01116211228 = calcStakingFuncAndAddres(stake, assetId)
535- let call = $t01116211228._1
536- let stakingAddr = $t01116211228._2
544+ let $t01132711393 = calcStakingFuncAndAddres(stake, assetId)
545+ let call = $t01132711393._1
546+ let stakingAddr = $t01132711393._2
537547 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
538548 }
539549 else {
540- let $t01131411380 = calcStakingFuncAndAddres(stake, assetId)
541- let call = $t01131411380._1
542- let stakingAddr = $t01131411380._2
550+ let $t01147911545 = calcStakingFuncAndAddres(stake, assetId)
551+ let call = $t01147911545._1
552+ let stakingAddr = $t01147911545._2
543553 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
544554 }
545555
546556
547557 func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
548558 then {
549- let $t01156711669 = calcStakingParams(true, amount, fromBase58String(assetIdString))
550- let call = $t01156711669._1
551- let addr = $t01156711669._2
552- let params = $t01156711669._3
553- let payments = $t01156711669._4
559+ let $t01173211834 = calcStakingParams(true, amount, fromBase58String(assetIdString))
560+ let call = $t01173211834._1
561+ let addr = $t01173211834._2
562+ let params = $t01173211834._3
563+ let payments = $t01173211834._4
554564 invoke(addr, call, params, payments)
555565 }
556566 else 0
557567
558568
559569 func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
560570 then {
561- let $t01185411957 = calcStakingParams(false, amount, fromBase58String(assetIdString))
562- let call = $t01185411957._1
563- let addr = $t01185411957._2
564- let params = $t01185411957._3
565- let payments = $t01185411957._4
571+ let $t01201912122 = calcStakingParams(false, amount, fromBase58String(assetIdString))
572+ let call = $t01201912122._1
573+ let addr = $t01201912122._2
574+ let params = $t01201912122._3
575+ let payments = $t01201912122._4
566576 invoke(addr, call, params, payments)
567577 }
568578 else 0
569579
570580
571581 func stakedAmount (assetId) = {
572582 let stakedAmountCalculated = match assetId {
573583 case aId: ByteVector =>
574584 if ((aId == USDN))
575585 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
576586 else 0
577587 case _: Unit =>
578588 0
579589 case _ =>
580590 throw("Match error")
581591 }
582592 match stakedAmountCalculated {
583593 case i: Int =>
584594 i
585595 case _ =>
586596 0
587597 }
588598 }
589599
590600
591601 func checkSuspicious () = {
592602 let contractBalances = _xp()
593603 func checkBalance (acc,assetId) = {
594- let $t01256812593 = acc
595- let suspicious = $t01256812593._1
596- let i = $t01256812593._2
604+ let $t01273312758 = acc
605+ let suspicious = $t01273312758._1
606+ let i = $t01273312758._2
597607 if (suspicious)
598608 then $Tuple2(suspicious, i)
599609 else {
600610 let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId)))
601611 if ((contractBalances[i] > aBalance))
602612 then $Tuple2(true, i)
603613 else $Tuple2(false, (i + 1))
604614 }
605615 }
606616
607617 let $l = assetIds
608618 let $s = size($l)
609619 let $acc0 = $Tuple2(false, 0)
610620 func $f0_1 ($a,$i) = if (($i >= $s))
611621 then $a
612622 else checkBalance($a, $l[$i])
613623
614624 func $f0_2 ($a,$i) = if (($i >= $s))
615625 then $a
616626 else throw("List size exceeds 15")
617627
618628 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
619629 }
620630
621631
622632 func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i]))
623633
624634
625635 func returnPayments (caller,payments) = {
626636 func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId))
627637
628638 let $l = payments
629639 let $s = size($l)
630640 let $acc0 = nil
631641 func $f0_1 ($a,$i) = if (($i >= $s))
632642 then $a
633643 else parsePayments($a, $l[$i])
634644
635645 func $f0_2 ($a,$i) = if (($i >= $s))
636646 then $a
637647 else throw("List size exceeds 15")
638648
639649 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
640650 }
641651
642652
643653 func checkDAppThreshold (newBalances) = {
644654 let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key")
645655 let thresholdScale = 10000
646656 let maxBalance = max(newBalances)
647657 let minBalance = min(newBalances)
648658 let ratio = fraction(maxBalance, thresholdScale, minBalance)
649659 if ((ratio > (dAppThresholdCoef * thresholdScale)))
650660 then throw("New balance in assets of the DApp is less than threshold")
651661 else false
652662 }
653663
654664
655665 func checkCoins (assetIds) = {
656666 let coins = split(assetIds, ",")
657667 func checkCoin (error,assetId) = {
658668 let asset = valueOrErrorMessage(fromBase58String(assetId), ("fromBase58String: " + assetId))
659669 let decimals = valueOrErrorMessage(assetInfo(asset), ("assetInfo: " + assetId)).decimals
660670 if ((decimals != DECIMALS))
661671 then throw("wrong decimals")
662672 else false
663673 }
664674
665675 let $l = coins
666676 let $s = size($l)
667677 let $acc0 = false
668678 func $f0_1 ($a,$i) = if (($i >= $s))
669679 then $a
670680 else checkCoin($a, $l[$i])
671681
672682 func $f0_2 ($a,$i) = if (($i >= $s))
673683 then $a
674684 else throw("List size exceeds 15")
675685
676686 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
677687 }
678688
679689
680690 @Callable(msg)
681691 func D (xp,amp) = {
682692 let D = get_D_internal(xp, amp)
683693 $Tuple2([IntegerEntry("D", D)], D)
684694 }
685695
686696
687697
688698 @Callable(msg)
689699 func init (assetIds,_A,_dAppThresholdCoef,firstHarvest) = if (!(isDataStorageUntouched(this)))
690700 then throw("Already initialized")
691701 else if ((0 >= _A))
692702 then throw("Amp must be must > 0")
693703 else if ((0 >= _dAppThresholdCoef))
694704 then throw("dApp Threshold Coef must be > 0")
695705 else {
696706 let shareName = "s_Multi_USD"
697707 let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
698708 let issueToken = Issue(shareName, shareDescription, 0, 6, true)
699709 let tokenId = calculateAssetId(issueToken)
700710 if (checkCoins(assetIds))
701711 then throw()
702712 else {
703713 let baseEntry = [StringEntry(kVersion, version), StringEntry(kAssets, assetIds), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), IntegerEntry(kDAppThresholdCoef, _dAppThresholdCoef), BooleanEntry(kActive, true), issueToken]
704714 if (firstHarvest)
705715 then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
706716 else baseEntry
707717 }
708718 }
709719
710720
711721
712722 @Callable(msg)
713723 func addLiquidity (minMintAmount,stakeFarming) = valueOrElse(isActive(), {
714724 let amp = _A()
715725 let xp = _xp()
716726 let D0 = if ((shareSupply == 0))
717727 then 0
718728 else getDMem(xp, amp)
719729 let payments = msg.payments
720730 let paymentsSize = size(payments)
721731 func validPayments (n) = if ((paymentsSize > nCoins))
722732 then throw(("payments size > " + toString(nCoins)))
723733 else if ((1 > paymentsSize))
724734 then throw("payments size < 1")
725735 else if (if ((shareSupply == 0))
726736 then (nCoins != paymentsSize)
727737 else false)
728738 then throw("initial deposit requires all coins")
729739 else {
730740 func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId)))
731741 then true
732742 else throw("Invalid asset in payment")
733743
734744 let $l = payments
735745 let $s = size($l)
736746 let $acc0 = false
737747 func $f0_1 ($a,$i) = if (($i >= $s))
738748 then $a
739749 else paymantValid($a, $l[$i])
740750
741751 func $f0_2 ($a,$i) = if (($i >= $s))
742752 then $a
743753 else throw("List size exceeds 15")
744754
745755 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
746756 }
747757
748758 if (!(validPayments(paymentsSize)))
749759 then throw()
750760 else {
751761 let suspicious = checkSuspicious()
752762 if (suspicious._1)
753763 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments))
754764 else {
755765 func parsePayments (acc,assetId) = {
756- let $t01690116930 = acc
757- let newBalances = $t01690116930._1
758- let i = $t01690116930._2
759- let j = $t01690116930._3
766+ let $t01706617095 = acc
767+ let newBalances = $t01706617095._1
768+ let i = $t01706617095._2
769+ let j = $t01706617095._3
760770 if (if ((paymentsSize > j))
761771 then (getStrAssetId(payments[j].assetId) == assetId)
762772 else false)
763773 then $Tuple3((newBalances :+ (xp[i] + payments[j].amount)), (i + 1), (j + 1))
764774 else $Tuple3((newBalances :+ xp[i]), (i + 1), j)
765775 }
766776
767- let $t01715017236 = {
777+ let $t01731517401 = {
768778 let $l = assetIds
769779 let $s = size($l)
770780 let $acc0 = $Tuple3(nil, 0, 0)
771781 func $f0_1 ($a,$i) = if (($i >= $s))
772782 then $a
773783 else parsePayments($a, $l[$i])
774784
775785 func $f0_2 ($a,$i) = if (($i >= $s))
776786 then $a
777787 else throw("List size exceeds 15")
778788
779789 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
780790 }
781- let newBalances = $t01715017236._1
782- let k = $t01715017236._2
783- let parsedPayments = $t01715017236._3
791+ let newBalances = $t01731517401._1
792+ let k = $t01731517401._2
793+ let parsedPayments = $t01731517401._3
784794 if ((paymentsSize > parsedPayments))
785795 then throw("Incorect payments order")
786796 else if (checkDAppThreshold(newBalances))
787797 then throw()
788798 else {
789799 let D1 = getDMem(newBalances, amp)
790800 if (assert((D1 > D0)))
791801 then throw("D1 > D0")
792802 else {
793803 let feeDiscount = calculateFeeDiscount(msg.caller)
794804 func calcScriptActions (acc,newBalance) = {
795- let $t01763717678 = acc
796- let invBalances = $t01763717678._1
797- let scriptActions = $t01763717678._2
798- let i = $t01763717678._3
805+ let $t01780217843 = acc
806+ let invBalances = $t01780217843._1
807+ let scriptActions = $t01780217843._2
808+ let i = $t01780217843._3
799809 if ((shareSupply > 0))
800810 then {
801811 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
802812 let fees = {
803813 let idealBalance = fraction(D1, xp[i], D0)
804814 let difference = if ((idealBalance > newBalance))
805815 then (idealBalance - newBalance)
806816 else (newBalance - idealBalance)
807817 fraction(_fee, difference, feeScale6)
808818 }
809819 let governanceFees = fraction(fees, feeGovernance, feeScale6)
810820 let finalBalance = (newBalance - fees)
811821 let invariantBalance = (newBalance - fees)
812822 let pmt = (newBalance - xp[i])
823+ let lpFees = (fees - governanceFees)
813824 let inv = if ((pmt > 0))
814825 then stake((pmt - fees), assetIds[i])
815826 else unstake(fees, assetIds[i])
816827 if ((inv == inv))
817- then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(capMoneyBoxAddress, (fees - governanceFees), fromBase58String(assetIds[i])), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1))
828+ then {
829+ let airdrop = if ((lpFees > 0))
830+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)])
831+ else 0
832+ if ((airdrop == airdrop))
833+ then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1))
834+ else throw("Strict value is not equal to itself.")
835+ }
818836 else throw("Strict value is not equal to itself.")
819837 }
820838 else {
821839 let inv = stake(newBalance, assetIds[i])
822840 if ((inv == inv))
823841 then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
824842 else throw("Strict value is not equal to itself.")
825843 }
826844 }
827845
828- let $t01922619314 = {
846+ let $t01954819636 = {
829847 let $l = newBalances
830848 let $s = size($l)
831849 let $acc0 = $Tuple3(nil, nil, 0)
832850 func $f1_1 ($a,$i) = if (($i >= $s))
833851 then $a
834852 else calcScriptActions($a, $l[$i])
835853
836854 func $f1_2 ($a,$i) = if (($i >= $s))
837855 then $a
838856 else throw("List size exceeds 15")
839857
840858 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
841859 }
842- let invBalances = $t01922619314._1
843- let scriptActions = $t01922619314._2
860+ let invBalances = $t01954819636._1
861+ let scriptActions = $t01954819636._2
844862 let D2 = getDMem(invBalances, amp)
845863 let mint_amount = if ((shareSupply == 0))
846864 then D1
847865 else fraction(shareSupply, (D2 - D0), D0)
848866 if (assert((mint_amount >= minMintAmount)))
849867 then throw("Slippage screwed you")
850868 else if (stakeFarming)
851869 then {
852870 let re = invoke(this, "reissueShare", [mint_amount], nil)
853871 if ((re == re))
854872 then {
855873 let s = invoke(farmingAddress, "lockShareTokens", [toString(this)], [AttachedPayment(shareAssetId, mint_amount)])
856874 if ((s == s))
857875 then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount)))
858876 else throw("Strict value is not equal to itself.")
859877 }
860878 else throw("Strict value is not equal to itself.")
861879 }
862880 else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))])
863881 }
864882 }
865883 }
866884 }
867885 })
886+
887+
888+
889+@Callable(msg)
890+func calcMintAmount (newBalances,user) = {
891+ let amp = _A()
892+ let xp = _xp()
893+ let D1 = getDMem(newBalances, amp)
894+ if ((shareSupply == 0))
895+ then $Tuple2(nil, D1)
896+ else {
897+ let D0 = getDMem(xp, amp)
898+ let feeDiscount = calculateFeeDiscount(user)
899+ func calcInvBalances (acc,newBalance) = {
900+ let $t02082520851 = acc
901+ let invBalances = $t02082520851._1
902+ let i = $t02082520851._2
903+ let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
904+ let fees = {
905+ let idealBalance = fraction(D1, xp[i], D0)
906+ let difference = if ((idealBalance > newBalance))
907+ then (idealBalance - newBalance)
908+ else (newBalance - idealBalance)
909+ fraction(_fee, difference, feeScale6)
910+ }
911+ let invariantBalance = (newBalance - fees)
912+ $Tuple2((invBalances :+ invariantBalance), (i + 1))
913+ }
914+
915+ let $t02145321523 = {
916+ let $l = newBalances
917+ let $s = size($l)
918+ let $acc0 = $Tuple2(nil, 0)
919+ func $f0_1 ($a,$i) = if (($i >= $s))
920+ then $a
921+ else calcInvBalances($a, $l[$i])
922+
923+ func $f0_2 ($a,$i) = if (($i >= $s))
924+ then $a
925+ else throw("List size exceeds 15")
926+
927+ $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
928+ }
929+ let invBalances = $t02145321523._1
930+ let k = $t02145321523._2
931+ let D2 = getDMem(invBalances, amp)
932+ let mintAmount = fraction(shareSupply, (D2 - D0), D0)
933+ $Tuple2(nil, mintAmount)
934+ }
935+ }
868936
869937
870938
871939 @Callable(msg)
872940 func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)])
873941
874942
875943
876944 @Callable(msg)
877945 func getDy (assetFrom,assetTo,dx,userAddress) = {
878946 let xp = _xp()
879947 let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in")
880948 let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out")
881949 let x = (xp[fromIndex] + dx)
882950 let y = getY(fromIndex, toIndex, x, xp)
883951 let dy = ((xp[toIndex] - y) - 1)
884952 let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress)))
885953 let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6)
886954 $Tuple2(nil, $Tuple2((dy - _fee), _fee))
887955 }
888956
889957
890958
891959 @Callable(msg)
892960 func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
893961 then throw("size(payments) != 1")
894962 else {
895963 let suspicious = checkSuspicious()
896964 if (suspicious._1)
897965 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
898966 else {
899967 let payment = msg.payments[0]
900968 let tokenIn = getStrAssetId(payment.assetId)
901969 let tokenOutB58 = fromBase58String(tokenOut)
902970 let dx = payment.amount
903971 let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in")
904972 let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
905973 let xp = _xp()
906974 let x = (xp[fromIndex] + dx)
907975 let y = getY(fromIndex, toIndex, x, xp)
908976 let _dy = ((xp[toIndex] - y) - 1)
909977 let feeDiscount = calculateFeeDiscount(msg.caller)
910978 let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6)
911979 let dy = (_dy - _fee)
912980 let governanceFees = fraction(_fee, feeGovernance, feeScale6)
913981 if (assert((dy >= min_dy)))
914982 then throw("Exchange resulted in fewer coins than expected")
915983 else {
916984 func makeNewBalances (acc,tokenBalance) = {
917- let $t02202622052 = acc
918- let newBalances = $t02202622052._1
919- let i = $t02202622052._2
985+ let $t02355823584 = acc
986+ let newBalances = $t02355823584._1
987+ let i = $t02355823584._2
920988 if ((i == fromIndex))
921989 then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
922990 else if ((i == toIndex))
923991 then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1))
924992 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
925993 }
926994
927- let $t02230322364 = {
995+ let $t02383523896 = {
928996 let $l = xp
929997 let $s = size($l)
930998 let $acc0 = $Tuple2(nil, 0)
931999 func $f0_1 ($a,$i) = if (($i >= $s))
9321000 then $a
9331001 else makeNewBalances($a, $l[$i])
9341002
9351003 func $f0_2 ($a,$i) = if (($i >= $s))
9361004 then $a
9371005 else throw("List size exceeds 15")
9381006
9391007 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
9401008 }
941- let newBalances = $t02230322364._1
942- let i = $t02230322364._2
1009+ let newBalances = $t02383523896._1
1010+ let i = $t02383523896._2
9431011 if (checkDAppThreshold(newBalances))
9441012 then throw()
9451013 else {
9461014 let s = stake(payment.amount, getStrAssetId(payment.assetId))
9471015 if ((s == s))
9481016 then {
9491017 let us = unstake(_dy, tokenOut)
9501018 if ((us == us))
951- then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(capMoneyBoxAddress, (_fee - governanceFees), tokenOutB58)], [dy, tokenOutB58])
1019+ then {
1020+ let lpFees = (_fee - governanceFees)
1021+ let airdrop = if ((lpFees > 0))
1022+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
1023+ else 0
1024+ if ((airdrop == airdrop))
1025+ then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58])
1026+ else throw("Strict value is not equal to itself.")
1027+ }
9521028 else throw("Strict value is not equal to itself.")
9531029 }
9541030 else throw("Strict value is not equal to itself.")
9551031 }
9561032 }
9571033 }
9581034 })
9591035
9601036
9611037
9621038 @Callable(msg)
9631039 func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
9641040 then throw("size(payments) != 1")
9651041 else {
9661042 let pmtAmount = msg.payments[0].amount
9671043 let pmtAssetId = msg.payments[0].assetId
9681044 if ((shareAssetId != pmtAssetId))
9691045 then throw("unknown payment token")
9701046 else {
9711047 let suspicious = checkSuspicious()
9721048 if (suspicious._1)
9731049 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
9741050 else {
9751051 func calcScriptActions (acc,balance) = {
976- let $t02350523533 = acc
977- let scriptActions = $t02350523533._1
978- let i = $t02350523533._2
1052+ let $t02518725215 = acc
1053+ let scriptActions = $t02518725215._1
1054+ let i = $t02518725215._2
9791055 let wAmount = fraction(balance, pmtAmount, shareSupply)
9801056 if (assert((wAmount >= minAmounts[i])))
9811057 then throw("Withdrawal resulted in fewer coins than expected")
9821058 else {
9831059 let us = unstake(wAmount, assetIds[i])
9841060 if ((us == us))
9851061 then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
9861062 else throw("Strict value is not equal to itself.")
9871063 }
9881064 }
9891065
990- let $t02402324091 = {
1066+ let $t02570525773 = {
9911067 let $l = _xp()
9921068 let $s = size($l)
9931069 let $acc0 = $Tuple2(nil, 0)
9941070 func $f0_1 ($a,$i) = if (($i >= $s))
9951071 then $a
9961072 else calcScriptActions($a, $l[$i])
9971073
9981074 func $f0_2 ($a,$i) = if (($i >= $s))
9991075 then $a
10001076 else throw("List size exceeds 15")
10011077
10021078 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
10031079 }
1004- let scriptActions = $t02402324091._1
1005- let i = $t02402324091._2
1080+ let scriptActions = $t02570525773._1
1081+ let i = $t02570525773._2
10061082 (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))])
10071083 }
10081084 }
10091085 })
10101086
10111087
10121088
10131089 @Callable(msg)
10141090 func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
10151091 then throw("Unlock amount must be positive")
10161092 else {
10171093 let suspicious = checkSuspicious()
10181094 if (suspicious._1)
10191095 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
10201096 else {
10211097 let pmtAmount = if ((size(msg.payments) > 0))
10221098 then if ((size(msg.payments) != 1))
10231099 then throw("size(payments) != 1")
10241100 else {
10251101 let pmtAssetId = msg.payments[0].assetId
10261102 if ((shareAssetId != pmtAssetId))
10271103 then throw("unknown payment token")
10281104 else msg.payments[0].amount
10291105 }
10301106 else 0
10311107 let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
10321108 if ((unlock == unlock))
10331109 then {
10341110 let withdrawAmount = (pmtAmount + unlockAmount)
10351111 let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)])
10361112 if ((inv == inv))
10371113 then nil
10381114 else throw("Strict value is not equal to itself.")
10391115 }
10401116 else throw("Strict value is not equal to itself.")
10411117 }
10421118 })
10431119
10441120
10451121
10461122 @Callable(msg)
10471123 func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = {
10481124 let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
10491125 $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1)
10501126 }
10511127
10521128
10531129
10541130 @Callable(msg)
10551131 func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
10561132 then throw("size(payments) != 1")
10571133 else {
10581134 let suspicious = checkSuspicious()
10591135 if (suspicious._1)
10601136 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
10611137 else {
10621138 let pmtAmount = msg.payments[0].amount
10631139 let pmtAssetId = msg.payments[0].assetId
10641140 if ((pmtAssetId != shareAssetId))
10651141 then throw("unknown token")
10661142 else {
10671143 let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1144+ let tokenOutB58 = fromBase58String(tokenOut)
10681145 let xp = _xp()
1069- let $t02600526087 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1070- let dy = $t02600526087._1
1071- let dy_fee = $t02600526087._2
1146+ let $t02773727819 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1147+ let dy = $t02773727819._1
1148+ let dy_fee = $t02773727819._2
10721149 if (assert((dy >= minAmount)))
10731150 then throw("Not enough coins removed")
10741151 else {
10751152 let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
10761153 let dy_and_fee = (dy + dy_fee)
10771154 func makeNewBalances (acc,tokenBalance) = {
1078- let $t02634526371 = acc
1079- let newBalances = $t02634526371._1
1080- let i = $t02634526371._2
1155+ let $t02807728103 = acc
1156+ let newBalances = $t02807728103._1
1157+ let i = $t02807728103._2
10811158 if ((i == outIndex))
10821159 then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
10831160 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
10841161 }
10851162
1086- let $t02653826599 = {
1163+ let $t02827028331 = {
10871164 let $l = xp
10881165 let $s = size($l)
10891166 let $acc0 = $Tuple2(nil, 0)
10901167 func $f0_1 ($a,$i) = if (($i >= $s))
10911168 then $a
10921169 else makeNewBalances($a, $l[$i])
10931170
10941171 func $f0_2 ($a,$i) = if (($i >= $s))
10951172 then $a
10961173 else throw("List size exceeds 15")
10971174
10981175 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
10991176 }
1100- let newBalances = $t02653826599._1
1101- let v = $t02653826599._2
1177+ let newBalances = $t02827028331._1
1178+ let v = $t02827028331._2
11021179 if (checkDAppThreshold(newBalances))
11031180 then throw()
11041181 else {
11051182 let us = unstake(dy_and_fee, tokenOut)
11061183 if ((us == us))
1107- then [ScriptTransfer(msg.originCaller, dy, fromBase58String(tokenOut)), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(tokenOut)), ScriptTransfer(capMoneyBoxAddress, (dy_fee - governanceFees), fromBase58String(tokenOut)), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]
1184+ then {
1185+ let lpFees = (dy_fee - governanceFees)
1186+ let airdrop = if ((lpFees > 0))
1187+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
1188+ else 0
1189+ if ((airdrop == airdrop))
1190+ then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]
1191+ else throw("Strict value is not equal to itself.")
1192+ }
11081193 else throw("Strict value is not equal to itself.")
11091194 }
11101195 }
11111196 }
11121197 }
11131198 })
11141199
11151200
11161201
11171202 @Callable(msg)
11181203 func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
11191204 then throw("Unlock amount must be positive")
11201205 else {
11211206 let suspicious = checkSuspicious()
11221207 if (suspicious._1)
11231208 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
11241209 else {
11251210 let pmtAmount = if ((size(msg.payments) > 0))
11261211 then if ((size(msg.payments) != 1))
11271212 then throw("size(payments) != 1")
11281213 else {
11291214 let pmtAssetId = msg.payments[0].assetId
11301215 if ((shareAssetId != pmtAssetId))
11311216 then throw("unknown payment token")
11321217 else msg.payments[0].amount
11331218 }
11341219 else 0
11351220 let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
11361221 if ((unlock == unlock))
11371222 then {
11381223 let withdrawAmount = (pmtAmount + unlockAmount)
11391224 let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)])
11401225 if ((inv == inv))
11411226 then nil
11421227 else throw("Strict value is not equal to itself.")
11431228 }
11441229 else throw("Strict value is not equal to itself.")
11451230 }
11461231 })
11471232
11481233
11491234
11501235 @Callable(msg)
11511236 func A () = $Tuple2(nil, _A())
11521237
11531238
11541239
11551240 @Callable(msg)
11561241 func getVirtualPrice () = {
11571242 let D = get_D(_xp(), _A())
11581243 $Tuple2(nil, fraction(D, PRECISION, shareSupply))
11591244 }
11601245
11611246
11621247
11631248 @Callable(msg)
11641249 func calcTokenAmount (amounts,deposit) = {
11651250 let amp = _A()
11661251 let balances = _xp()
11671252 let D0 = getDMem(balances, amp)
11681253 func calcNewBalances (acc,balance) = {
1169- let $t02852328549 = acc
1170- let newBalances = $t02852328549._1
1171- let i = $t02852328549._2
1254+ let $t03034830374 = acc
1255+ let newBalances = $t03034830374._1
1256+ let i = $t03034830374._2
11721257 let newBalance = (balance + (if (deposit)
11731258 then amounts[i]
11741259 else -(amounts[i])))
11751260 $Tuple2((newBalances :+ newBalance), (i + 1))
11761261 }
11771262
11781263 let newBalances = ( let $l = balances
11791264 let $s = size($l)
11801265 let $acc0 = $Tuple2(nil, 0)
11811266 func $f0_1 ($a,$i) = if (($i >= $s))
11821267 then $a
11831268 else calcNewBalances($a, $l[$i])
11841269
11851270 func $f0_2 ($a,$i) = if (($i >= $s))
11861271 then $a
11871272 else throw("List size exceeds 15")
11881273
11891274 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15))._1
11901275 let D1 = getDMem(newBalances, amp)
11911276 let diff = if (deposit)
11921277 then (D1 - D0)
11931278 else (D0 - D1)
11941279 $Tuple2(nil, fraction(diff, shareSupply, D0))
11951280 }
11961281
11971282
11981283
11991284 @Callable(msg)
12001285 func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME))))
12011286 then throw("too often")
12021287 else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME))))
12031288 then throw("insufficient time")
12041289 else {
12051290 let _initial_A = _A()
12061291 if (assert(if ((_futureA > 0))
12071292 then (MAX_A > _futureA)
12081293 else false))
12091294 then throw("out of base range")
12101295 else if (assert(if (if ((_futureA >= _initial_A))
12111296 then ((_initial_A * MAX_A_CHANGE) >= _futureA)
12121297 else false)
12131298 then true
12141299 else if ((_initial_A > _futureA))
12151300 then ((_futureA * MAX_A_CHANGE) >= _initial_A)
12161301 else false))
12171302 then throw("out of range")
12181303 else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)]
12191304 }))
12201305
12211306
12221307
12231308 @Callable(msg)
12241309 func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), {
12251310 let currentA = _A()
12261311 [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)]
12271312 }))
12281313
12291314
12301315
12311316 @Callable(msg)
12321317 func shutdown () = valueOrElse(isAdminCall(msg), if (!(active))
12331318 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
12341319 else suspend("Paused by admin"))
12351320
12361321
12371322
12381323 @Callable(msg)
12391324 func activate () = valueOrElse(isAdminCall(msg), if (active)
12401325 then throwIsActive()
12411326 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
12421327
12431328
12441329
12451330 @Callable(msg)
12461331 func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), [IntegerEntry(kShareLimit, shareLimit)]))
12471332
12481333
12491334 @Verifier(tx)
12501335 func verify () = {
12511336 let multiSignedByAdmins = {
12521337 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
12531338 then 1
12541339 else 0
12551340 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
12561341 then 1
12571342 else 0
12581343 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
12591344 then 1
12601345 else 0
12611346 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
12621347 }
12631348 match tx {
12641349 case inv: InvokeScriptTransaction =>
12651350 let callTakeIntoAccount = if ((inv.dApp == this))
12661351 then (inv.function == "takeIntoAccountExtraFunds")
12671352 else false
12681353 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
12691354 then true
12701355 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
12711356 then true
12721357 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
12731358 then true
12741359 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
12751360 if (if (callTakeIntoAccount)
12761361 then signedByAdmin
12771362 else false)
12781363 then true
12791364 else multiSignedByAdmins
12801365 case _ =>
12811366 multiSignedByAdmins
12821367 }
12831368 }
12841369

github/deemru/w8io/026f985 
177.11 ms