tx · EGBLnMB1KVSq11AR38xr4j5WLjmgbqUdbv3iy4FYUxNb

3N8rRK2qY9gks7UiTZbno3oU9ZxHsjf6Nxg:  -0.03700000 Waves

2022.09.07 11:27 [2218451] smart account 3N8rRK2qY9gks7UiTZbno3oU9ZxHsjf6Nxg > SELF 0.00000000 Waves

{ "type": 13, "id": "EGBLnMB1KVSq11AR38xr4j5WLjmgbqUdbv3iy4FYUxNb", "fee": 3700000, "feeAssetId": null, "timestamp": 1662539241008, "version": 2, "chainId": 84, "sender": "3N8rRK2qY9gks7UiTZbno3oU9ZxHsjf6Nxg", "senderPublicKey": "BGaHqWWh2PA55UDpG3EMuoSRrrPo348kqpXax829kygz", "proofs": [ "4q3Pgr6iHPj5ndYABWUNWptEFtMeoGDKE2eJUn8cbj7nx6L5oVLoGd6vrmzHQJcnVydBuUZVHd2GKhjKagFwW7fs", "nt1WVLJCyHK17amPyX5BGTZFvgxB99XfvBBkKnuLwUsqSw637pUWkWHodp3ExhdX4qGqmQUHSG3Xjs2GXxQEv4K" ], "script": "base64:BgJjCAISBAoCEQESBgoECAEBBBIECgIBBBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIDCgEBXQAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rU2hhcmVBc3NldElkAg5zaGFyZV9hc3NldF9pZAARa1NoYXJlQXNzZXRTdXBwbHkCEnNoYXJlX2Fzc2V0X3N1cHBseQAEa0ZlZQ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spentComplexity": 0 } View: original | compacted Prev: 5YdwjdmbsLb2JEDf8wDCL6akoENR8wpxrPuiSRFpuTWC Next: 2de1y9tzD6ABXeXDSppAMtJnkocxi3rQoWAXaxcMzfem Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let version = "3.0.0"
5-
64 let PRECISION = 1000000
75
86 let MAX_A = 1000000
1210 let DECIMALS = 6
1311
1412 let MIN_RAMP_TIME = (86400 / 60)
13+
14+let version = "3.0.0"
15+
16+let kVersion = "version"
1517
1618 let kAssets = "asset_ids"
1719
9395
9496 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
9597
96-let capMoneyBoxAddress = Address(base58'3MxXHaGvmKQHH3kNrPBunhve1sDXf7M5RZt')
98+let capMoneyBoxAddress = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
9799
98100 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
99101
287289 else $Tuple2(D, false)
288290 }
289291
290- let $t066506762 = {
292+ let $t066756787 = {
291293 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
292294 let $s = size($l)
293295 let $acc0 = $Tuple2(toBigInt(S), false)
301303
302304 $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)
303305 }
304- let D = $t066506762._1
305- let finished = $t066506762._2
306+ let D = $t066756787._1
307+ let finished = $t066756787._2
306308 if ((finished == false))
307309 then throw(("get_D() not finished with " + toString(D)))
308310 else toInt(D)
328330 let D = get_D(xp_, amp)
329331 let Ann = (amp * nCoins)
330332 func S_c (acc,i) = {
331- let $t073337350 = acc
332- let S_ = $t073337350._1
333- let c = $t073337350._2
333+ let $t073587375 = acc
334+ let S_ = $t073587375._1
335+ let c = $t073587375._2
334336 let x_ = if ((in == i))
335337 then x
336338 else xp_[i]
341343 else $Tuple2(S_, c)
342344 }
343345
344- let $t075587659 = {
346+ let $t075837684 = {
345347 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
346348 let $s = size($l)
347349 let $acc0 = $Tuple2(0, toBigInt(D))
355357
356358 $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)
357359 }
358- let S_ = $t075587659._1
359- let c_ = $t075587659._2
360+ let S_ = $t075837684._1
361+ let c_ = $t075837684._2
360362 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
361363 let bD = toBigInt(((S_ + (D / Ann)) - D))
362364 func y_proc (acc,_i) = if ((acc._2 == true))
373375 else $Tuple2(y, false)
374376 }
375377
376- let $t081418258 = {
378+ let $t081668283 = {
377379 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
378380 let $s = size($l)
379381 let $acc0 = $Tuple2(toBigInt(D), false)
387389
388390 $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)
389391 }
390- let y = $t081418258._1
391- let finished = $t081418258._2
392+ let y = $t081668283._1
393+ let finished = $t081668283._2
392394 if ((finished == false))
393395 then throw(("getY() not finished with " + toString(y)))
394396 else toInt(y)
402404 else {
403405 let Ann = (A_ * nCoins)
404406 func S_c (acc,i) = {
405- let $t086378654 = acc
406- let S_ = $t086378654._1
407- let c = $t086378654._2
407+ let $t086628679 = acc
408+ let S_ = $t086628679._1
409+ let c = $t086628679._2
408410 let x_ = if (if ((in != i))
409411 then (nCoins > i)
410412 else false)
417419 else $Tuple2(S_, c)
418420 }
419421
420- let $t088748975 = {
422+ let $t088999000 = {
421423 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
422424 let $s = size($l)
423425 let $acc0 = $Tuple2(0, toBigInt(D))
431433
432434 $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)
433435 }
434- let S_ = $t088748975._1
435- let c_ = $t088748975._2
436+ let S_ = $t088999000._1
437+ let c_ = $t088999000._2
436438 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
437439 let bD = toBigInt(((S_ + (D / Ann)) - D))
438440 func y_D_proc (acc,i) = if ((acc._2 == true))
449451 else $Tuple2(y, false)
450452 }
451453
452- let $t094589577 = {
454+ let $t094839602 = {
453455 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
454456 let $s = size($l)
455457 let $acc0 = $Tuple2(toBigInt(D), false)
463465
464466 $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)
465467 }
466- let y = $t094589577._1
467- let finished = $t094589577._2
468+ let y = $t094839602._1
469+ let finished = $t094839602._2
468470 if ((finished == false))
469471 then throw(("get_y_D() not finished with " + toString(y)))
470472 else toInt(y)
481483 let new_y = get_y_D(amp, i, xp, D1)
482484 let dy_0 = (xp[i] - new_y)
483485 func xp_reduced_proc (acc,xp_j) = {
484- let $t01021810247 = acc
485- let xp_reduced = $t01021810247._1
486- let index = $t01021810247._2
486+ let $t01024310272 = acc
487+ let xp_reduced = $t01024310272._1
488+ let index = $t01024310272._2
487489 let dx_expected = if ((index == i))
488490 then (fraction(xp_j, D1, D0) - new_y)
489491 else (xp_j - fraction(xp_j, D1, D0))
490492 $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1))
491493 }
492494
493- let $t01050910573 = {
495+ let $t01053410598 = {
494496 let $l = xp
495497 let $s = size($l)
496498 let $acc0 = $Tuple2(nil, 0)
504506
505507 $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)
506508 }
507- let xp_reduced = $t01050910573._1
508- let index = $t01050910573._2
509+ let xp_reduced = $t01053410598._1
510+ let index = $t01053410598._2
509511 let xp_reduced_i = xp_reduced[i]
510512 let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1)
511513 $Tuple2(dy, (dy_0 - dy))
529531
530532 func calcStakingParams (stake,amount,assetId) = if (stake)
531533 then {
532- let $t01113711203 = calcStakingFuncAndAddres(stake, assetId)
533- let call = $t01113711203._1
534- let stakingAddr = $t01113711203._2
534+ let $t01116211228 = calcStakingFuncAndAddres(stake, assetId)
535+ let call = $t01116211228._1
536+ let stakingAddr = $t01116211228._2
535537 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
536538 }
537539 else {
538- let $t01128911355 = calcStakingFuncAndAddres(stake, assetId)
539- let call = $t01128911355._1
540- let stakingAddr = $t01128911355._2
540+ let $t01131411380 = calcStakingFuncAndAddres(stake, assetId)
541+ let call = $t01131411380._1
542+ let stakingAddr = $t01131411380._2
541543 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
542544 }
543545
544546
545547 func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
546548 then {
547- let $t01154211644 = calcStakingParams(true, amount, fromBase58String(assetIdString))
548- let call = $t01154211644._1
549- let addr = $t01154211644._2
550- let params = $t01154211644._3
551- let payments = $t01154211644._4
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
552554 invoke(addr, call, params, payments)
553555 }
554556 else 0
556558
557559 func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
558560 then {
559- let $t01182911932 = calcStakingParams(false, amount, fromBase58String(assetIdString))
560- let call = $t01182911932._1
561- let addr = $t01182911932._2
562- let params = $t01182911932._3
563- let payments = $t01182911932._4
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
564566 invoke(addr, call, params, payments)
565567 }
566568 else 0
589591 func checkSuspicious () = {
590592 let contractBalances = _xp()
591593 func checkBalance (acc,assetId) = {
592- let $t01254312568 = acc
593- let suspicious = $t01254312568._1
594- let i = $t01254312568._2
594+ let $t01256812593 = acc
595+ let suspicious = $t01256812593._1
596+ let i = $t01256812593._2
595597 if (suspicious)
596598 then $Tuple2(suspicious, i)
597599 else {
684686
685687
686688 @Callable(msg)
687-func init (assetIds,_A,firstHarvest) = if (!(isDataStorageUntouched(this)))
689+func init (assetIds,_A,_dAppThresholdCoef,firstHarvest) = if (!(isDataStorageUntouched(this)))
688690 then throw("Already initialized")
689- else {
690- let shareName = "s_Multi_USD"
691- let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
692- let issueToken = Issue(shareName, shareDescription, 0, 6, true)
693- let tokenId = calculateAssetId(issueToken)
694- if (checkCoins(assetIds))
695- then throw()
691+ else if ((0 >= _A))
692+ then throw("Amp must be must > 0")
693+ else if ((0 >= _dAppThresholdCoef))
694+ then throw("dApp Threshold Coef must be > 0")
696695 else {
697- let baseEntry = [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, 15), BooleanEntry(kActive, true), issueToken]
698- if (firstHarvest)
699- then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
700- else baseEntry
696+ let shareName = "s_Multi_USD"
697+ let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
698+ let issueToken = Issue(shareName, shareDescription, 0, 6, true)
699+ let tokenId = calculateAssetId(issueToken)
700+ if (checkCoins(assetIds))
701+ then throw()
702+ else {
703+ 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]
704+ if (firstHarvest)
705+ then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
706+ else baseEntry
707+ }
701708 }
702- }
703709
704710
705711
711717 then 0
712718 else getDMem(xp, amp)
713719 let payments = msg.payments
714- let n = size(payments)
715- func validPayments (n) = if ((n > nCoins))
720+ let paymentsSize = size(payments)
721+ func validPayments (n) = if ((paymentsSize > nCoins))
716722 then throw(("payments size > " + toString(nCoins)))
717- else if ((1 > n))
723+ else if ((1 > paymentsSize))
718724 then throw("payments size < 1")
719725 else if (if ((shareSupply == 0))
720- then (nCoins != n)
726+ then (nCoins != paymentsSize)
721727 else false)
722728 then throw("initial deposit requires all coins")
723729 else {
739745 $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)
740746 }
741747
742- if (!(validPayments(n)))
748+ if (!(validPayments(paymentsSize)))
743749 then throw()
744750 else {
745751 let suspicious = checkSuspicious()
746752 if (suspicious._1)
747753 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments))
748754 else {
749- let paymentsSize = size(payments)
750755 func parsePayments (acc,assetId) = {
751- let $t01664016669 = acc
752- let newBalances = $t01664016669._1
753- let i = $t01664016669._2
754- let j = $t01664016669._3
756+ let $t01690116930 = acc
757+ let newBalances = $t01690116930._1
758+ let i = $t01690116930._2
759+ let j = $t01690116930._3
755760 if (if ((paymentsSize > j))
756761 then (getStrAssetId(payments[j].assetId) == assetId)
757762 else false)
758- then {
759- let s = stake(payments[j].amount, getStrAssetId(payments[j].assetId))
760- if ((s == s))
761- then $Tuple3((newBalances :+ (xp[i] + payments[j].amount)), (i + 1), (j + 1))
762- else throw("Strict value is not equal to itself.")
763- }
763+ then $Tuple3((newBalances :+ (xp[i] + payments[j].amount)), (i + 1), (j + 1))
764764 else $Tuple3((newBalances :+ xp[i]), (i + 1), j)
765765 }
766766
767- let $t01697517061 = {
767+ let $t01715017236 = {
768768 let $l = assetIds
769769 let $s = size($l)
770770 let $acc0 = $Tuple3(nil, 0, 0)
778778
779779 $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)
780780 }
781- let newBalances = $t01697517061._1
782- let k = $t01697517061._2
783- let parsedPayments = $t01697517061._3
784- if (((paymentsSize - 1) > parsedPayments))
781+ let newBalances = $t01715017236._1
782+ let k = $t01715017236._2
783+ let parsedPayments = $t01715017236._3
784+ if ((paymentsSize > parsedPayments))
785785 then throw("Incorect payments order")
786786 else if (checkDAppThreshold(newBalances))
787787 then throw()
792792 else {
793793 let feeDiscount = calculateFeeDiscount(msg.caller)
794794 func calcScriptActions (acc,newBalance) = {
795- let $t01746617507 = acc
796- let invBalances = $t01746617507._1
797- let scriptActions = $t01746617507._2
798- let i = $t01746617507._3
795+ let $t01763717678 = acc
796+ let invBalances = $t01763717678._1
797+ let scriptActions = $t01763717678._2
798+ let i = $t01763717678._3
799799 if ((shareSupply > 0))
800800 then {
801801 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
807807 fraction(_fee, difference, feeScale6)
808808 }
809809 let governanceFees = fraction(fees, feeGovernance, feeScale6)
810- let finalBalance = (newBalance - governanceFees)
810+ let finalBalance = (newBalance - fees)
811811 let invariantBalance = (newBalance - fees)
812- let us = unstake(fees, assetIds[i])
813- if ((us == us))
812+ let pmt = (newBalance - xp[i])
813+ let inv = if ((pmt > 0))
814+ then stake((pmt - fees), assetIds[i])
815+ else unstake(fees, assetIds[i])
816+ if ((inv == inv))
814817 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))
815818 else throw("Strict value is not equal to itself.")
816819 }
817- else $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
820+ else {
821+ let inv = stake(newBalance, assetIds[i])
822+ if ((inv == inv))
823+ then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
824+ else throw("Strict value is not equal to itself.")
825+ }
818826 }
819827
820- let $t01884418932 = {
828+ let $t01922619314 = {
821829 let $l = newBalances
822830 let $s = size($l)
823831 let $acc0 = $Tuple3(nil, nil, 0)
831839
832840 $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)
833841 }
834- let invBalances = $t01884418932._1
835- let scriptActions = $t01884418932._2
842+ let invBalances = $t01922619314._1
843+ let scriptActions = $t01922619314._2
836844 let D2 = getDMem(invBalances, amp)
837845 let mint_amount = if ((shareSupply == 0))
838846 then D1
906914 then throw("Exchange resulted in fewer coins than expected")
907915 else {
908916 func makeNewBalances (acc,tokenBalance) = {
909- let $t02164421670 = acc
910- let newBalances = $t02164421670._1
911- let i = $t02164421670._2
917+ let $t02202622052 = acc
918+ let newBalances = $t02202622052._1
919+ let i = $t02202622052._2
912920 if ((i == fromIndex))
913921 then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
914922 else if ((i == toIndex))
916924 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
917925 }
918926
919- let $t02192121982 = {
927+ let $t02230322364 = {
920928 let $l = xp
921929 let $s = size($l)
922930 let $acc0 = $Tuple2(nil, 0)
930938
931939 $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)
932940 }
933- let newBalances = $t02192121982._1
934- let i = $t02192121982._2
941+ let newBalances = $t02230322364._1
942+ let i = $t02230322364._2
935943 if (checkDAppThreshold(newBalances))
936944 then throw()
937945 else {
940948 then {
941949 let us = unstake(_dy, tokenOut)
942950 if ((us == us))
943- 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)], $Tuple2(dy, tokenOutB58))
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])
944952 else throw("Strict value is not equal to itself.")
945953 }
946954 else throw("Strict value is not equal to itself.")
952960
953961
954962 @Callable(msg)
955-func withdraw (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
963+func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
956964 then throw("size(payments) != 1")
965+ else {
966+ let pmtAmount = msg.payments[0].amount
967+ let pmtAssetId = msg.payments[0].assetId
968+ if ((shareAssetId != pmtAssetId))
969+ then throw("unknown payment token")
970+ else {
971+ let suspicious = checkSuspicious()
972+ if (suspicious._1)
973+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
974+ else {
975+ func calcScriptActions (acc,balance) = {
976+ let $t02350523533 = acc
977+ let scriptActions = $t02350523533._1
978+ let i = $t02350523533._2
979+ let wAmount = fraction(balance, pmtAmount, shareSupply)
980+ if (assert((wAmount >= minAmounts[i])))
981+ then throw("Withdrawal resulted in fewer coins than expected")
982+ else {
983+ let us = unstake(wAmount, assetIds[i])
984+ if ((us == us))
985+ then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
986+ else throw("Strict value is not equal to itself.")
987+ }
988+ }
989+
990+ let $t02402324091 = {
991+ let $l = _xp()
992+ let $s = size($l)
993+ let $acc0 = $Tuple2(nil, 0)
994+ func $f0_1 ($a,$i) = if (($i >= $s))
995+ then $a
996+ else calcScriptActions($a, $l[$i])
997+
998+ func $f0_2 ($a,$i) = if (($i >= $s))
999+ then $a
1000+ else throw("List size exceeds 15")
1001+
1002+ $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)
1003+ }
1004+ let scriptActions = $t02402324091._1
1005+ let i = $t02402324091._2
1006+ (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))])
1007+ }
1008+ }
1009+ })
1010+
1011+
1012+
1013+@Callable(msg)
1014+func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
1015+ then throw("Unlock amount must be positive")
9571016 else {
9581017 let suspicious = checkSuspicious()
9591018 if (suspicious._1)
9601019 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
9611020 else {
962- let payment = msg.payments[0]
963- let tokenIn = payment.assetId
964- if ((tokenIn != shareAssetId))
965- then throw("unknown token")
966- else {
967- let _amount = payment.amount
968- let total_supply = shareSupply
969- let unlock = if ((unlockAmount > 0))
970- then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
971- else 0
972- if ((unlock == unlock))
973- then {
974- let withdrawAmount = (_amount + unlockAmount)
975- func calcScriptActions (acc,balance) = {
976- let $t02336823396 = acc
977- let scriptActions = $t02336823396._1
978- let i = $t02336823396._2
979- let wAmount = fraction(balance, withdrawAmount, total_supply)
980- if (assert((wAmount >= minAmounts[i])))
981- then throw("Withdrawal resulted in fewer coins than expected")
982- else {
983- let us = unstake(wAmount, assetIds[i])
984- if ((us == us))
985- then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.caller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
986- else throw("Strict value is not equal to itself.")
987- }
988- }
989-
990- let $t02388623954 = {
991- let $l = _xp()
992- let $s = size($l)
993- let $acc0 = $Tuple2(nil, 0)
994- func $f0_1 ($a,$i) = if (($i >= $s))
995- then $a
996- else calcScriptActions($a, $l[$i])
997-
998- func $f0_2 ($a,$i) = if (($i >= $s))
999- then $a
1000- else throw("List size exceeds 15")
1001-
1002- $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)
1003- }
1004- let scriptActions = $t02388623954._1
1005- let i = $t02388623954._2
1006- (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))])
1007- }
1021+ let pmtAmount = if ((size(msg.payments) > 0))
1022+ then if ((size(msg.payments) != 1))
1023+ then throw("size(payments) != 1")
1024+ else {
1025+ let pmtAssetId = msg.payments[0].assetId
1026+ if ((shareAssetId != pmtAssetId))
1027+ then throw("unknown payment token")
1028+ else msg.payments[0].amount
1029+ }
1030+ else 0
1031+ let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
1032+ if ((unlock == unlock))
1033+ then {
1034+ let withdrawAmount = (pmtAmount + unlockAmount)
1035+ let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)])
1036+ if ((inv == inv))
1037+ then nil
10081038 else throw("Strict value is not equal to itself.")
10091039 }
1040+ else throw("Strict value is not equal to itself.")
10101041 }
10111042 })
10121043
10211052
10221053
10231054 @Callable(msg)
1024-func withdrawOneCoin (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
1055+func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
10251056 then throw("size(payments) != 1")
1057+ else {
1058+ let suspicious = checkSuspicious()
1059+ if (suspicious._1)
1060+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
1061+ else {
1062+ let pmtAmount = msg.payments[0].amount
1063+ let pmtAssetId = msg.payments[0].assetId
1064+ if ((pmtAssetId != shareAssetId))
1065+ then throw("unknown token")
1066+ else {
1067+ let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1068+ let xp = _xp()
1069+ let $t02600526087 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1070+ let dy = $t02600526087._1
1071+ let dy_fee = $t02600526087._2
1072+ if (assert((dy >= minAmount)))
1073+ then throw("Not enough coins removed")
1074+ else {
1075+ let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
1076+ let dy_and_fee = (dy + dy_fee)
1077+ func makeNewBalances (acc,tokenBalance) = {
1078+ let $t02634526371 = acc
1079+ let newBalances = $t02634526371._1
1080+ let i = $t02634526371._2
1081+ if ((i == outIndex))
1082+ then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1083+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1084+ }
1085+
1086+ let $t02653826599 = {
1087+ let $l = xp
1088+ let $s = size($l)
1089+ let $acc0 = $Tuple2(nil, 0)
1090+ func $f0_1 ($a,$i) = if (($i >= $s))
1091+ then $a
1092+ else makeNewBalances($a, $l[$i])
1093+
1094+ func $f0_2 ($a,$i) = if (($i >= $s))
1095+ then $a
1096+ else throw("List size exceeds 15")
1097+
1098+ $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)
1099+ }
1100+ let newBalances = $t02653826599._1
1101+ let v = $t02653826599._2
1102+ if (checkDAppThreshold(newBalances))
1103+ then throw()
1104+ else {
1105+ let us = unstake(dy_and_fee, tokenOut)
1106+ 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))]
1108+ else throw("Strict value is not equal to itself.")
1109+ }
1110+ }
1111+ }
1112+ }
1113+ })
1114+
1115+
1116+
1117+@Callable(msg)
1118+func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
1119+ then throw("Unlock amount must be positive")
10261120 else {
10271121 let suspicious = checkSuspicious()
10281122 if (suspicious._1)
10291123 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
10301124 else {
1031- let payment = msg.payments[0]
1032- let tokenIn = payment.assetId
1033- if ((tokenIn != shareAssetId))
1034- then throw("unknown token")
1035- else {
1036- let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1037- let _tokenAmount = payment.amount
1038- let unlock = if ((unlockAmount > 0))
1039- then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
1040- else 0
1041- if ((unlock == unlock))
1042- then {
1043- let withdrawAmount = (_tokenAmount + unlockAmount)
1044- let xp = _xp()
1045- let $t02518525266 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.caller)
1046- let dy = $t02518525266._1
1047- let dy_fee = $t02518525266._2
1048- if (assert((dy >= minAmount)))
1049- then throw("Not enough coins removed")
1050- else {
1051- let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
1052- let dy_and_fee = (dy + dy_fee)
1053- func makeNewBalances (acc,tokenBalance) = {
1054- let $t02552425550 = acc
1055- let newBalances = $t02552425550._1
1056- let i = $t02552425550._2
1057- if ((i == outIndex))
1058- then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1059- else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1060- }
1061-
1062- let $t02571725778 = {
1063- let $l = xp
1064- let $s = size($l)
1065- let $acc0 = $Tuple2(nil, 0)
1066- func $f0_1 ($a,$i) = if (($i >= $s))
1067- then $a
1068- else makeNewBalances($a, $l[$i])
1069-
1070- func $f0_2 ($a,$i) = if (($i >= $s))
1071- then $a
1072- else throw("List size exceeds 15")
1073-
1074- $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)
1075- }
1076- let newBalances = $t02571725778._1
1077- let i = $t02571725778._2
1078- if (checkDAppThreshold(newBalances))
1079- then throw()
1080- else {
1081- let us = unstake(dy_and_fee, tokenOut)
1082- if ((us == us))
1083- then [ScriptTransfer(msg.caller, dy, fromBase58String(tokenOut)), IntegerEntry((assetIds[i] + kAssetBalance), (xp[i] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(tokenOut)), ScriptTransfer(capMoneyBoxAddress, (dy_fee - governanceFees), fromBase58String(tokenOut)), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]
1084- else throw("Strict value is not equal to itself.")
1085- }
1086- }
1087- }
1125+ let pmtAmount = if ((size(msg.payments) > 0))
1126+ then if ((size(msg.payments) != 1))
1127+ then throw("size(payments) != 1")
1128+ else {
1129+ let pmtAssetId = msg.payments[0].assetId
1130+ if ((shareAssetId != pmtAssetId))
1131+ then throw("unknown payment token")
1132+ else msg.payments[0].amount
1133+ }
1134+ else 0
1135+ let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
1136+ if ((unlock == unlock))
1137+ then {
1138+ let withdrawAmount = (pmtAmount + unlockAmount)
1139+ let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)])
1140+ if ((inv == inv))
1141+ then nil
10881142 else throw("Strict value is not equal to itself.")
10891143 }
1144+ else throw("Strict value is not equal to itself.")
10901145 }
10911146 })
10921147
11111166 let balances = _xp()
11121167 let D0 = getDMem(balances, amp)
11131168 func calcNewBalances (acc,balance) = {
1114- let $t02673926765 = acc
1115- let newBalances = $t02673926765._1
1116- let i = $t02673926765._2
1169+ let $t02852328549 = acc
1170+ let newBalances = $t02852328549._1
1171+ let i = $t02852328549._2
11171172 let newBalance = (balance + (if (deposit)
11181173 then amounts[i]
11191174 else -(amounts[i])))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let version = "3.0.0"
5-
64 let PRECISION = 1000000
75
86 let MAX_A = 1000000
97
108 let MAX_A_CHANGE = 10
119
1210 let DECIMALS = 6
1311
1412 let MIN_RAMP_TIME = (86400 / 60)
13+
14+let version = "3.0.0"
15+
16+let kVersion = "version"
1517
1618 let kAssets = "asset_ids"
1719
1820 let kAssetBalance = "_balance"
1921
2022 let kActive = "active"
2123
2224 let kCause = "shutdown_cause"
2325
2426 let kShareAssetId = "share_asset_id"
2527
2628 let kShareAssetSupply = "share_asset_supply"
2729
2830 let kFee = "commission"
2931
3032 let kDAppThresholdCoef = "dAppThresholdCoef"
3133
3234 let kUSDNAddress = "staking_usdnnsbt_address"
3335
3436 let kDiscounts = "discounts"
3537
3638 let kDiscountValues = "discount_values"
3739
3840 let kUserSwopInGov = "_SWOP_amount"
3941
4042 let kFirstHarvest = "first_harvest"
4143
4244 let kFirstHarvestHeight = "first_harvest_height"
4345
4446 let kShareLimit = "share_limit_on_first_harvest"
4547
4648 let kBasePeriod = "base_period"
4749
4850 let kPeriodLength = "period_length"
4951
5052 let kStartHeight = "start_height"
5153
5254 let kAdminPubKey1 = "admin_pub_1"
5355
5456 let kAdminPubKey2 = "admin_pub_2"
5557
5658 let kAdminPubKey3 = "admin_pub_3"
5759
5860 let kAdminInvokePubKey = "admin_invoke_pub"
5961
6062 let kMoneyBoxAddress = "money_box_address"
6163
6264 let kGovAddress = "governance_address"
6365
6466 let kVotingAddress = "voting_address"
6567
6668 let kFarmingAddress = "farming_address"
6769
6870 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
6971
7072 func getBase58FromOracle (key) = match getString(oracle, key) {
7173 case string: String =>
7274 fromBase58String(string)
7375 case nothing =>
7476 throw((key + "is empty"))
7577 }
7678
7779
7880 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
7981
8082 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
8183
8284 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
8385
8486 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
8587
8688 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
8789
8890 let govAddress = Address(getBase58FromOracle(kGovAddress))
8991
9092 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
9193
9294 let votingAddress = Address(getBase58FromOracle(kVotingAddress))
9395
9496 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
9597
96-let capMoneyBoxAddress = Address(base58'3MxXHaGvmKQHH3kNrPBunhve1sDXf7M5RZt')
98+let capMoneyBoxAddress = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
9799
98100 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
99101
100102 let stakingAssets = [toBase58String(USDN)]
101103
102104 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
103105
104106 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
105107
106108 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
107109
108110 let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
109111
110112 let active = getBooleanValue(this, kActive)
111113
112114 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
113115
114116 let shareSupply = getIntegerValue(this, kShareAssetSupply)
115117
116118 let feeScale6 = 1000000
117119
118120 let fee = getIntegerValue(this, kFee)
119121
120122 let feeGovernance = fraction(40, feeScale6, 100)
121123
122124 let initial_A = getIntegerValue(this, "initial_A")
123125
124126 let future_A = getIntegerValue(this, "future_A")
125127
126128 let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0)
127129
128130 let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0)
129131
130132 let assetIds = split(getStringValue(this, kAssets), ",")
131133
132134 let nCoins = size(assetIds)
133135
134136 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
135137
136138
137139 func throwIsActive () = throw("DApp is already active")
138140
139141
140142 func isActive () = if (active)
141143 then unit
142144 else throw("DApp is inactive at this moment")
143145
144146
145147 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
146148 then unit
147149 else throw("Only admin can call this function")
148150
149151
150152 func isSelfCall (i) = if ((this == i.caller))
151153 then unit
152154 else throw("Only contract itself can call this function")
153155
154156
155157 let big2 = toBigInt(2)
156158
157159 let blockTimestamp = height
158160
159161 func assert (a) = if (a)
160162 then false
161163 else true
162164
163165
164166 func calculateFeeDiscount (userAddr) = {
165167 let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
166168 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
167169 let discounts = split(getStringValue(oracle, kDiscounts), ",")
168170 if (if ((swopAmount >= parseIntValue(discountValues[0])))
169171 then (parseIntValue(discountValues[1]) > swopAmount)
170172 else false)
171173 then (feeScale6 - parseIntValue(discounts[0]))
172174 else if (if ((swopAmount >= parseIntValue(discountValues[1])))
173175 then (parseIntValue(discountValues[2]) > swopAmount)
174176 else false)
175177 then (feeScale6 - parseIntValue(discounts[1]))
176178 else if (if ((swopAmount >= parseIntValue(discountValues[2])))
177179 then (parseIntValue(discountValues[3]) > swopAmount)
178180 else false)
179181 then (feeScale6 - parseIntValue(discounts[2]))
180182 else if (if ((swopAmount >= parseIntValue(discountValues[3])))
181183 then (parseIntValue(discountValues[4]) > swopAmount)
182184 else false)
183185 then (feeScale6 - parseIntValue(discounts[3]))
184186 else if ((swopAmount >= parseIntValue(discountValues[4])))
185187 then (feeScale6 - parseIntValue(discounts[4]))
186188 else feeScale6
187189 }
188190
189191
190192 func _A () = {
191193 let t1 = future_A_time
192194 let A1 = future_A
193195 if ((t1 > blockTimestamp))
194196 then {
195197 let A0 = initial_A
196198 let t0 = initial_A_time
197199 if ((A1 > A0))
198200 then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0)))
199201 else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0)))
200202 }
201203 else A1
202204 }
203205
204206
205207 func _xp () = {
206208 func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0))
207209
208210 let $l = assetIds
209211 let $s = size($l)
210212 let $acc0 = nil
211213 func $f0_1 ($a,$i) = if (($i >= $s))
212214 then $a
213215 else assetBalances($a, $l[$i])
214216
215217 func $f0_2 ($a,$i) = if (($i >= $s))
216218 then $a
217219 else throw("List size exceeds 15")
218220
219221 $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)
220222 }
221223
222224
223225 func _xp_mem (xp) = xp
224226
225227
226228 func sumList (acc,element) = (acc + element)
227229
228230
229231 func get_D (xp,amp) = {
230232 let @ = invoke(this, "D", [xp, amp], nil)
231233 if ($isInstanceOf(@, "Int"))
232234 then @
233235 else throw(($getType(invoke(this, "D", [xp, amp], nil)) + " couldn't be cast to Int"))
234236 }
235237
236238
237239 func get_D_internal (xp,amp) = {
238240 let S = {
239241 let $l = xp
240242 let $s = size($l)
241243 let $acc0 = 0
242244 func $f0_1 ($a,$i) = if (($i >= $s))
243245 then $a
244246 else sumList($a, $l[$i])
245247
246248 func $f0_2 ($a,$i) = if (($i >= $s))
247249 then $a
248250 else throw("List size exceeds 15")
249251
250252 $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)
251253 }
252254 if ((S == 0))
253255 then 0
254256 else {
255257 let Ann = (amp * nCoins)
256258 let AnnS = (toBigInt(Ann) * toBigInt(S))
257259 let Ann1 = toBigInt((Ann - 1))
258260 func Dproc (acc,i) = if ((acc._2 == true))
259261 then acc
260262 else {
261263 let Dprev = acc._1
262264 func D_PProc (D_P,i) = if ((nCoins > i))
263265 then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins)))
264266 else D_P
265267
266268 let D_P = {
267269 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
268270 let $s = size($l)
269271 let $acc0 = Dprev
270272 func $f1_1 ($a,$i) = if (($i >= $s))
271273 then $a
272274 else D_PProc($a, $l[$i])
273275
274276 func $f1_2 ($a,$i) = if (($i >= $s))
275277 then $a
276278 else throw("List size exceeds 15")
277279
278280 $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)
279281 }
280282 let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P)))
281283 if ((D > Dprev))
282284 then if ((1 >= toInt((D - Dprev))))
283285 then $Tuple2(D, true)
284286 else $Tuple2(D, false)
285287 else if ((1 >= toInt((Dprev - D))))
286288 then $Tuple2(D, true)
287289 else $Tuple2(D, false)
288290 }
289291
290- let $t066506762 = {
292+ let $t066756787 = {
291293 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
292294 let $s = size($l)
293295 let $acc0 = $Tuple2(toBigInt(S), false)
294296 func $f1_1 ($a,$i) = if (($i >= $s))
295297 then $a
296298 else Dproc($a, $l[$i])
297299
298300 func $f1_2 ($a,$i) = if (($i >= $s))
299301 then $a
300302 else throw("List size exceeds 15")
301303
302304 $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)
303305 }
304- let D = $t066506762._1
305- let finished = $t066506762._2
306+ let D = $t066756787._1
307+ let finished = $t066756787._2
306308 if ((finished == false))
307309 then throw(("get_D() not finished with " + toString(D)))
308310 else toInt(D)
309311 }
310312 }
311313
312314
313315 func getDMem (xp,amp) = get_D(_xp_mem(xp), amp)
314316
315317
316318 func getY (in,out,x,xp_) = if (assert((in != out)))
317319 then throw("same coin")
318320 else if (assert(if ((out >= 0))
319321 then (in >= 0)
320322 else false))
321323 then throw("below zero")
322324 else if (assert(if ((nCoins > out))
323325 then (nCoins > in)
324326 else false))
325327 then throw("above N_COINS")
326328 else {
327329 let amp = _A()
328330 let D = get_D(xp_, amp)
329331 let Ann = (amp * nCoins)
330332 func S_c (acc,i) = {
331- let $t073337350 = acc
332- let S_ = $t073337350._1
333- let c = $t073337350._2
333+ let $t073587375 = acc
334+ let S_ = $t073587375._1
335+ let c = $t073587375._2
334336 let x_ = if ((in == i))
335337 then x
336338 else xp_[i]
337339 if (if ((i != out))
338340 then (nCoins > i)
339341 else false)
340342 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
341343 else $Tuple2(S_, c)
342344 }
343345
344- let $t075587659 = {
346+ let $t075837684 = {
345347 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
346348 let $s = size($l)
347349 let $acc0 = $Tuple2(0, toBigInt(D))
348350 func $f0_1 ($a,$i) = if (($i >= $s))
349351 then $a
350352 else S_c($a, $l[$i])
351353
352354 func $f0_2 ($a,$i) = if (($i >= $s))
353355 then $a
354356 else throw("List size exceeds 15")
355357
356358 $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)
357359 }
358- let S_ = $t075587659._1
359- let c_ = $t075587659._2
360+ let S_ = $t075837684._1
361+ let c_ = $t075837684._2
360362 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
361363 let bD = toBigInt(((S_ + (D / Ann)) - D))
362364 func y_proc (acc,_i) = if ((acc._2 == true))
363365 then acc
364366 else {
365367 let y_prev = acc._1
366368 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
367369 if ((y > y_prev))
368370 then if ((1 >= toInt((y - y_prev))))
369371 then $Tuple2(y, true)
370372 else $Tuple2(y, false)
371373 else if ((1 >= toInt((y_prev - y))))
372374 then $Tuple2(y, true)
373375 else $Tuple2(y, false)
374376 }
375377
376- let $t081418258 = {
378+ let $t081668283 = {
377379 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
378380 let $s = size($l)
379381 let $acc0 = $Tuple2(toBigInt(D), false)
380382 func $f1_1 ($a,$i) = if (($i >= $s))
381383 then $a
382384 else y_proc($a, $l[$i])
383385
384386 func $f1_2 ($a,$i) = if (($i >= $s))
385387 then $a
386388 else throw("List size exceeds 16")
387389
388390 $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)
389391 }
390- let y = $t081418258._1
391- let finished = $t081418258._2
392+ let y = $t081668283._1
393+ let finished = $t081668283._2
392394 if ((finished == false))
393395 then throw(("getY() not finished with " + toString(y)))
394396 else toInt(y)
395397 }
396398
397399
398400 func get_y_D (A_,in,xp,D) = if (assert((in >= 0)))
399401 then throw("i below zero")
400402 else if (assert((nCoins > in)))
401403 then throw("i above N_COINS")
402404 else {
403405 let Ann = (A_ * nCoins)
404406 func S_c (acc,i) = {
405- let $t086378654 = acc
406- let S_ = $t086378654._1
407- let c = $t086378654._2
407+ let $t086628679 = acc
408+ let S_ = $t086628679._1
409+ let c = $t086628679._2
408410 let x_ = if (if ((in != i))
409411 then (nCoins > i)
410412 else false)
411413 then xp[i]
412414 else 0
413415 if (if ((nCoins > i))
414416 then (in != i)
415417 else false)
416418 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
417419 else $Tuple2(S_, c)
418420 }
419421
420- let $t088748975 = {
422+ let $t088999000 = {
421423 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
422424 let $s = size($l)
423425 let $acc0 = $Tuple2(0, toBigInt(D))
424426 func $f0_1 ($a,$i) = if (($i >= $s))
425427 then $a
426428 else S_c($a, $l[$i])
427429
428430 func $f0_2 ($a,$i) = if (($i >= $s))
429431 then $a
430432 else throw("List size exceeds 15")
431433
432434 $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)
433435 }
434- let S_ = $t088748975._1
435- let c_ = $t088748975._2
436+ let S_ = $t088999000._1
437+ let c_ = $t088999000._2
436438 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
437439 let bD = toBigInt(((S_ + (D / Ann)) - D))
438440 func y_D_proc (acc,i) = if ((acc._2 == true))
439441 then acc
440442 else {
441443 let y_prev = acc._1
442444 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
443445 if ((y > y_prev))
444446 then if ((1 >= toInt((y - y_prev))))
445447 then $Tuple2(y, true)
446448 else $Tuple2(y, false)
447449 else if ((1 >= toInt((y_prev - y))))
448450 then $Tuple2(y, true)
449451 else $Tuple2(y, false)
450452 }
451453
452- let $t094589577 = {
454+ let $t094839602 = {
453455 let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
454456 let $s = size($l)
455457 let $acc0 = $Tuple2(toBigInt(D), false)
456458 func $f1_1 ($a,$i) = if (($i >= $s))
457459 then $a
458460 else y_D_proc($a, $l[$i])
459461
460462 func $f1_2 ($a,$i) = if (($i >= $s))
461463 then $a
462464 else throw("List size exceeds 16")
463465
464466 $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)
465467 }
466- let y = $t094589577._1
467- let finished = $t094589577._2
468+ let y = $t094839602._1
469+ let finished = $t094839602._2
468470 if ((finished == false))
469471 then throw(("get_y_D() not finished with " + toString(y)))
470472 else toInt(y)
471473 }
472474
473475
474476 func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = {
475477 let feeDiscount = calculateFeeDiscount(caller)
476478 let amp = _A()
477479 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
478480 let total_supply = shareSupply
479481 let D0 = get_D(xp, amp)
480482 let D1 = (D0 - fraction(_token_amount, D0, total_supply))
481483 let new_y = get_y_D(amp, i, xp, D1)
482484 let dy_0 = (xp[i] - new_y)
483485 func xp_reduced_proc (acc,xp_j) = {
484- let $t01021810247 = acc
485- let xp_reduced = $t01021810247._1
486- let index = $t01021810247._2
486+ let $t01024310272 = acc
487+ let xp_reduced = $t01024310272._1
488+ let index = $t01024310272._2
487489 let dx_expected = if ((index == i))
488490 then (fraction(xp_j, D1, D0) - new_y)
489491 else (xp_j - fraction(xp_j, D1, D0))
490492 $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1))
491493 }
492494
493- let $t01050910573 = {
495+ let $t01053410598 = {
494496 let $l = xp
495497 let $s = size($l)
496498 let $acc0 = $Tuple2(nil, 0)
497499 func $f0_1 ($a,$i) = if (($i >= $s))
498500 then $a
499501 else xp_reduced_proc($a, $l[$i])
500502
501503 func $f0_2 ($a,$i) = if (($i >= $s))
502504 then $a
503505 else throw("List size exceeds 15")
504506
505507 $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)
506508 }
507- let xp_reduced = $t01050910573._1
508- let index = $t01050910573._2
509+ let xp_reduced = $t01053410598._1
510+ let index = $t01053410598._2
509511 let xp_reduced_i = xp_reduced[i]
510512 let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1)
511513 $Tuple2(dy, (dy_0 - dy))
512514 }
513515
514516
515517 func getStrAssetId (assetId) = match assetId {
516518 case id: ByteVector =>
517519 toBase58String(id)
518520 case waves: Unit =>
519521 "WAVES"
520522 case _ =>
521523 throw("Match error")
522524 }
523525
524526
525527 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
526528 then $Tuple2("lockNeutrino", stakingUSDNAddress)
527529 else $Tuple2("unlockNeutrino", stakingUSDNAddress)
528530
529531
530532 func calcStakingParams (stake,amount,assetId) = if (stake)
531533 then {
532- let $t01113711203 = calcStakingFuncAndAddres(stake, assetId)
533- let call = $t01113711203._1
534- let stakingAddr = $t01113711203._2
534+ let $t01116211228 = calcStakingFuncAndAddres(stake, assetId)
535+ let call = $t01116211228._1
536+ let stakingAddr = $t01116211228._2
535537 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
536538 }
537539 else {
538- let $t01128911355 = calcStakingFuncAndAddres(stake, assetId)
539- let call = $t01128911355._1
540- let stakingAddr = $t01128911355._2
540+ let $t01131411380 = calcStakingFuncAndAddres(stake, assetId)
541+ let call = $t01131411380._1
542+ let stakingAddr = $t01131411380._2
541543 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
542544 }
543545
544546
545547 func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
546548 then {
547- let $t01154211644 = calcStakingParams(true, amount, fromBase58String(assetIdString))
548- let call = $t01154211644._1
549- let addr = $t01154211644._2
550- let params = $t01154211644._3
551- let payments = $t01154211644._4
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
552554 invoke(addr, call, params, payments)
553555 }
554556 else 0
555557
556558
557559 func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
558560 then {
559- let $t01182911932 = calcStakingParams(false, amount, fromBase58String(assetIdString))
560- let call = $t01182911932._1
561- let addr = $t01182911932._2
562- let params = $t01182911932._3
563- let payments = $t01182911932._4
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
564566 invoke(addr, call, params, payments)
565567 }
566568 else 0
567569
568570
569571 func stakedAmount (assetId) = {
570572 let stakedAmountCalculated = match assetId {
571573 case aId: ByteVector =>
572574 if ((aId == USDN))
573575 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
574576 else 0
575577 case _: Unit =>
576578 0
577579 case _ =>
578580 throw("Match error")
579581 }
580582 match stakedAmountCalculated {
581583 case i: Int =>
582584 i
583585 case _ =>
584586 0
585587 }
586588 }
587589
588590
589591 func checkSuspicious () = {
590592 let contractBalances = _xp()
591593 func checkBalance (acc,assetId) = {
592- let $t01254312568 = acc
593- let suspicious = $t01254312568._1
594- let i = $t01254312568._2
594+ let $t01256812593 = acc
595+ let suspicious = $t01256812593._1
596+ let i = $t01256812593._2
595597 if (suspicious)
596598 then $Tuple2(suspicious, i)
597599 else {
598600 let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId)))
599601 if ((contractBalances[i] > aBalance))
600602 then $Tuple2(true, i)
601603 else $Tuple2(false, (i + 1))
602604 }
603605 }
604606
605607 let $l = assetIds
606608 let $s = size($l)
607609 let $acc0 = $Tuple2(false, 0)
608610 func $f0_1 ($a,$i) = if (($i >= $s))
609611 then $a
610612 else checkBalance($a, $l[$i])
611613
612614 func $f0_2 ($a,$i) = if (($i >= $s))
613615 then $a
614616 else throw("List size exceeds 15")
615617
616618 $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)
617619 }
618620
619621
620622 func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i]))
621623
622624
623625 func returnPayments (caller,payments) = {
624626 func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId))
625627
626628 let $l = payments
627629 let $s = size($l)
628630 let $acc0 = nil
629631 func $f0_1 ($a,$i) = if (($i >= $s))
630632 then $a
631633 else parsePayments($a, $l[$i])
632634
633635 func $f0_2 ($a,$i) = if (($i >= $s))
634636 then $a
635637 else throw("List size exceeds 15")
636638
637639 $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)
638640 }
639641
640642
641643 func checkDAppThreshold (newBalances) = {
642644 let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key")
643645 let thresholdScale = 10000
644646 let maxBalance = max(newBalances)
645647 let minBalance = min(newBalances)
646648 let ratio = fraction(maxBalance, thresholdScale, minBalance)
647649 if ((ratio > (dAppThresholdCoef * thresholdScale)))
648650 then throw("New balance in assets of the DApp is less than threshold")
649651 else false
650652 }
651653
652654
653655 func checkCoins (assetIds) = {
654656 let coins = split(assetIds, ",")
655657 func checkCoin (error,assetId) = {
656658 let asset = valueOrErrorMessage(fromBase58String(assetId), ("fromBase58String: " + assetId))
657659 let decimals = valueOrErrorMessage(assetInfo(asset), ("assetInfo: " + assetId)).decimals
658660 if ((decimals != DECIMALS))
659661 then throw("wrong decimals")
660662 else false
661663 }
662664
663665 let $l = coins
664666 let $s = size($l)
665667 let $acc0 = false
666668 func $f0_1 ($a,$i) = if (($i >= $s))
667669 then $a
668670 else checkCoin($a, $l[$i])
669671
670672 func $f0_2 ($a,$i) = if (($i >= $s))
671673 then $a
672674 else throw("List size exceeds 15")
673675
674676 $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)
675677 }
676678
677679
678680 @Callable(msg)
679681 func D (xp,amp) = {
680682 let D = get_D_internal(xp, amp)
681683 $Tuple2([IntegerEntry("D", D)], D)
682684 }
683685
684686
685687
686688 @Callable(msg)
687-func init (assetIds,_A,firstHarvest) = if (!(isDataStorageUntouched(this)))
689+func init (assetIds,_A,_dAppThresholdCoef,firstHarvest) = if (!(isDataStorageUntouched(this)))
688690 then throw("Already initialized")
689- else {
690- let shareName = "s_Multi_USD"
691- let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
692- let issueToken = Issue(shareName, shareDescription, 0, 6, true)
693- let tokenId = calculateAssetId(issueToken)
694- if (checkCoins(assetIds))
695- then throw()
691+ else if ((0 >= _A))
692+ then throw("Amp must be must > 0")
693+ else if ((0 >= _dAppThresholdCoef))
694+ then throw("dApp Threshold Coef must be > 0")
696695 else {
697- let baseEntry = [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, 15), BooleanEntry(kActive, true), issueToken]
698- if (firstHarvest)
699- then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
700- else baseEntry
696+ let shareName = "s_Multi_USD"
697+ let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
698+ let issueToken = Issue(shareName, shareDescription, 0, 6, true)
699+ let tokenId = calculateAssetId(issueToken)
700+ if (checkCoins(assetIds))
701+ then throw()
702+ else {
703+ 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]
704+ if (firstHarvest)
705+ then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
706+ else baseEntry
707+ }
701708 }
702- }
703709
704710
705711
706712 @Callable(msg)
707713 func addLiquidity (minMintAmount,stakeFarming) = valueOrElse(isActive(), {
708714 let amp = _A()
709715 let xp = _xp()
710716 let D0 = if ((shareSupply == 0))
711717 then 0
712718 else getDMem(xp, amp)
713719 let payments = msg.payments
714- let n = size(payments)
715- func validPayments (n) = if ((n > nCoins))
720+ let paymentsSize = size(payments)
721+ func validPayments (n) = if ((paymentsSize > nCoins))
716722 then throw(("payments size > " + toString(nCoins)))
717- else if ((1 > n))
723+ else if ((1 > paymentsSize))
718724 then throw("payments size < 1")
719725 else if (if ((shareSupply == 0))
720- then (nCoins != n)
726+ then (nCoins != paymentsSize)
721727 else false)
722728 then throw("initial deposit requires all coins")
723729 else {
724730 func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId)))
725731 then true
726732 else throw("Invalid asset in payment")
727733
728734 let $l = payments
729735 let $s = size($l)
730736 let $acc0 = false
731737 func $f0_1 ($a,$i) = if (($i >= $s))
732738 then $a
733739 else paymantValid($a, $l[$i])
734740
735741 func $f0_2 ($a,$i) = if (($i >= $s))
736742 then $a
737743 else throw("List size exceeds 15")
738744
739745 $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)
740746 }
741747
742- if (!(validPayments(n)))
748+ if (!(validPayments(paymentsSize)))
743749 then throw()
744750 else {
745751 let suspicious = checkSuspicious()
746752 if (suspicious._1)
747753 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments))
748754 else {
749- let paymentsSize = size(payments)
750755 func parsePayments (acc,assetId) = {
751- let $t01664016669 = acc
752- let newBalances = $t01664016669._1
753- let i = $t01664016669._2
754- let j = $t01664016669._3
756+ let $t01690116930 = acc
757+ let newBalances = $t01690116930._1
758+ let i = $t01690116930._2
759+ let j = $t01690116930._3
755760 if (if ((paymentsSize > j))
756761 then (getStrAssetId(payments[j].assetId) == assetId)
757762 else false)
758- then {
759- let s = stake(payments[j].amount, getStrAssetId(payments[j].assetId))
760- if ((s == s))
761- then $Tuple3((newBalances :+ (xp[i] + payments[j].amount)), (i + 1), (j + 1))
762- else throw("Strict value is not equal to itself.")
763- }
763+ then $Tuple3((newBalances :+ (xp[i] + payments[j].amount)), (i + 1), (j + 1))
764764 else $Tuple3((newBalances :+ xp[i]), (i + 1), j)
765765 }
766766
767- let $t01697517061 = {
767+ let $t01715017236 = {
768768 let $l = assetIds
769769 let $s = size($l)
770770 let $acc0 = $Tuple3(nil, 0, 0)
771771 func $f0_1 ($a,$i) = if (($i >= $s))
772772 then $a
773773 else parsePayments($a, $l[$i])
774774
775775 func $f0_2 ($a,$i) = if (($i >= $s))
776776 then $a
777777 else throw("List size exceeds 15")
778778
779779 $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)
780780 }
781- let newBalances = $t01697517061._1
782- let k = $t01697517061._2
783- let parsedPayments = $t01697517061._3
784- if (((paymentsSize - 1) > parsedPayments))
781+ let newBalances = $t01715017236._1
782+ let k = $t01715017236._2
783+ let parsedPayments = $t01715017236._3
784+ if ((paymentsSize > parsedPayments))
785785 then throw("Incorect payments order")
786786 else if (checkDAppThreshold(newBalances))
787787 then throw()
788788 else {
789789 let D1 = getDMem(newBalances, amp)
790790 if (assert((D1 > D0)))
791791 then throw("D1 > D0")
792792 else {
793793 let feeDiscount = calculateFeeDiscount(msg.caller)
794794 func calcScriptActions (acc,newBalance) = {
795- let $t01746617507 = acc
796- let invBalances = $t01746617507._1
797- let scriptActions = $t01746617507._2
798- let i = $t01746617507._3
795+ let $t01763717678 = acc
796+ let invBalances = $t01763717678._1
797+ let scriptActions = $t01763717678._2
798+ let i = $t01763717678._3
799799 if ((shareSupply > 0))
800800 then {
801801 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
802802 let fees = {
803803 let idealBalance = fraction(D1, xp[i], D0)
804804 let difference = if ((idealBalance > newBalance))
805805 then (idealBalance - newBalance)
806806 else (newBalance - idealBalance)
807807 fraction(_fee, difference, feeScale6)
808808 }
809809 let governanceFees = fraction(fees, feeGovernance, feeScale6)
810- let finalBalance = (newBalance - governanceFees)
810+ let finalBalance = (newBalance - fees)
811811 let invariantBalance = (newBalance - fees)
812- let us = unstake(fees, assetIds[i])
813- if ((us == us))
812+ let pmt = (newBalance - xp[i])
813+ let inv = if ((pmt > 0))
814+ then stake((pmt - fees), assetIds[i])
815+ else unstake(fees, assetIds[i])
816+ if ((inv == inv))
814817 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))
815818 else throw("Strict value is not equal to itself.")
816819 }
817- else $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
820+ else {
821+ let inv = stake(newBalance, assetIds[i])
822+ if ((inv == inv))
823+ then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
824+ else throw("Strict value is not equal to itself.")
825+ }
818826 }
819827
820- let $t01884418932 = {
828+ let $t01922619314 = {
821829 let $l = newBalances
822830 let $s = size($l)
823831 let $acc0 = $Tuple3(nil, nil, 0)
824832 func $f1_1 ($a,$i) = if (($i >= $s))
825833 then $a
826834 else calcScriptActions($a, $l[$i])
827835
828836 func $f1_2 ($a,$i) = if (($i >= $s))
829837 then $a
830838 else throw("List size exceeds 15")
831839
832840 $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)
833841 }
834- let invBalances = $t01884418932._1
835- let scriptActions = $t01884418932._2
842+ let invBalances = $t01922619314._1
843+ let scriptActions = $t01922619314._2
836844 let D2 = getDMem(invBalances, amp)
837845 let mint_amount = if ((shareSupply == 0))
838846 then D1
839847 else fraction(shareSupply, (D2 - D0), D0)
840848 if (assert((mint_amount >= minMintAmount)))
841849 then throw("Slippage screwed you")
842850 else if (stakeFarming)
843851 then {
844852 let re = invoke(this, "reissueShare", [mint_amount], nil)
845853 if ((re == re))
846854 then {
847855 let s = invoke(farmingAddress, "lockShareTokens", [toString(this)], [AttachedPayment(shareAssetId, mint_amount)])
848856 if ((s == s))
849857 then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount)))
850858 else throw("Strict value is not equal to itself.")
851859 }
852860 else throw("Strict value is not equal to itself.")
853861 }
854862 else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))])
855863 }
856864 }
857865 }
858866 }
859867 })
860868
861869
862870
863871 @Callable(msg)
864872 func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)])
865873
866874
867875
868876 @Callable(msg)
869877 func getDy (assetFrom,assetTo,dx,userAddress) = {
870878 let xp = _xp()
871879 let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in")
872880 let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out")
873881 let x = (xp[fromIndex] + dx)
874882 let y = getY(fromIndex, toIndex, x, xp)
875883 let dy = ((xp[toIndex] - y) - 1)
876884 let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress)))
877885 let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6)
878886 $Tuple2(nil, $Tuple2((dy - _fee), _fee))
879887 }
880888
881889
882890
883891 @Callable(msg)
884892 func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
885893 then throw("size(payments) != 1")
886894 else {
887895 let suspicious = checkSuspicious()
888896 if (suspicious._1)
889897 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
890898 else {
891899 let payment = msg.payments[0]
892900 let tokenIn = getStrAssetId(payment.assetId)
893901 let tokenOutB58 = fromBase58String(tokenOut)
894902 let dx = payment.amount
895903 let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in")
896904 let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
897905 let xp = _xp()
898906 let x = (xp[fromIndex] + dx)
899907 let y = getY(fromIndex, toIndex, x, xp)
900908 let _dy = ((xp[toIndex] - y) - 1)
901909 let feeDiscount = calculateFeeDiscount(msg.caller)
902910 let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6)
903911 let dy = (_dy - _fee)
904912 let governanceFees = fraction(_fee, feeGovernance, feeScale6)
905913 if (assert((dy >= min_dy)))
906914 then throw("Exchange resulted in fewer coins than expected")
907915 else {
908916 func makeNewBalances (acc,tokenBalance) = {
909- let $t02164421670 = acc
910- let newBalances = $t02164421670._1
911- let i = $t02164421670._2
917+ let $t02202622052 = acc
918+ let newBalances = $t02202622052._1
919+ let i = $t02202622052._2
912920 if ((i == fromIndex))
913921 then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
914922 else if ((i == toIndex))
915923 then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1))
916924 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
917925 }
918926
919- let $t02192121982 = {
927+ let $t02230322364 = {
920928 let $l = xp
921929 let $s = size($l)
922930 let $acc0 = $Tuple2(nil, 0)
923931 func $f0_1 ($a,$i) = if (($i >= $s))
924932 then $a
925933 else makeNewBalances($a, $l[$i])
926934
927935 func $f0_2 ($a,$i) = if (($i >= $s))
928936 then $a
929937 else throw("List size exceeds 15")
930938
931939 $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)
932940 }
933- let newBalances = $t02192121982._1
934- let i = $t02192121982._2
941+ let newBalances = $t02230322364._1
942+ let i = $t02230322364._2
935943 if (checkDAppThreshold(newBalances))
936944 then throw()
937945 else {
938946 let s = stake(payment.amount, getStrAssetId(payment.assetId))
939947 if ((s == s))
940948 then {
941949 let us = unstake(_dy, tokenOut)
942950 if ((us == us))
943- 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)], $Tuple2(dy, tokenOutB58))
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])
944952 else throw("Strict value is not equal to itself.")
945953 }
946954 else throw("Strict value is not equal to itself.")
947955 }
948956 }
949957 }
950958 })
951959
952960
953961
954962 @Callable(msg)
955-func withdraw (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
963+func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
956964 then throw("size(payments) != 1")
965+ else {
966+ let pmtAmount = msg.payments[0].amount
967+ let pmtAssetId = msg.payments[0].assetId
968+ if ((shareAssetId != pmtAssetId))
969+ then throw("unknown payment token")
970+ else {
971+ let suspicious = checkSuspicious()
972+ if (suspicious._1)
973+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
974+ else {
975+ func calcScriptActions (acc,balance) = {
976+ let $t02350523533 = acc
977+ let scriptActions = $t02350523533._1
978+ let i = $t02350523533._2
979+ let wAmount = fraction(balance, pmtAmount, shareSupply)
980+ if (assert((wAmount >= minAmounts[i])))
981+ then throw("Withdrawal resulted in fewer coins than expected")
982+ else {
983+ let us = unstake(wAmount, assetIds[i])
984+ if ((us == us))
985+ then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
986+ else throw("Strict value is not equal to itself.")
987+ }
988+ }
989+
990+ let $t02402324091 = {
991+ let $l = _xp()
992+ let $s = size($l)
993+ let $acc0 = $Tuple2(nil, 0)
994+ func $f0_1 ($a,$i) = if (($i >= $s))
995+ then $a
996+ else calcScriptActions($a, $l[$i])
997+
998+ func $f0_2 ($a,$i) = if (($i >= $s))
999+ then $a
1000+ else throw("List size exceeds 15")
1001+
1002+ $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)
1003+ }
1004+ let scriptActions = $t02402324091._1
1005+ let i = $t02402324091._2
1006+ (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))])
1007+ }
1008+ }
1009+ })
1010+
1011+
1012+
1013+@Callable(msg)
1014+func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
1015+ then throw("Unlock amount must be positive")
9571016 else {
9581017 let suspicious = checkSuspicious()
9591018 if (suspicious._1)
9601019 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
9611020 else {
962- let payment = msg.payments[0]
963- let tokenIn = payment.assetId
964- if ((tokenIn != shareAssetId))
965- then throw("unknown token")
966- else {
967- let _amount = payment.amount
968- let total_supply = shareSupply
969- let unlock = if ((unlockAmount > 0))
970- then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
971- else 0
972- if ((unlock == unlock))
973- then {
974- let withdrawAmount = (_amount + unlockAmount)
975- func calcScriptActions (acc,balance) = {
976- let $t02336823396 = acc
977- let scriptActions = $t02336823396._1
978- let i = $t02336823396._2
979- let wAmount = fraction(balance, withdrawAmount, total_supply)
980- if (assert((wAmount >= minAmounts[i])))
981- then throw("Withdrawal resulted in fewer coins than expected")
982- else {
983- let us = unstake(wAmount, assetIds[i])
984- if ((us == us))
985- then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.caller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
986- else throw("Strict value is not equal to itself.")
987- }
988- }
989-
990- let $t02388623954 = {
991- let $l = _xp()
992- let $s = size($l)
993- let $acc0 = $Tuple2(nil, 0)
994- func $f0_1 ($a,$i) = if (($i >= $s))
995- then $a
996- else calcScriptActions($a, $l[$i])
997-
998- func $f0_2 ($a,$i) = if (($i >= $s))
999- then $a
1000- else throw("List size exceeds 15")
1001-
1002- $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)
1003- }
1004- let scriptActions = $t02388623954._1
1005- let i = $t02388623954._2
1006- (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))])
1007- }
1021+ let pmtAmount = if ((size(msg.payments) > 0))
1022+ then if ((size(msg.payments) != 1))
1023+ then throw("size(payments) != 1")
1024+ else {
1025+ let pmtAssetId = msg.payments[0].assetId
1026+ if ((shareAssetId != pmtAssetId))
1027+ then throw("unknown payment token")
1028+ else msg.payments[0].amount
1029+ }
1030+ else 0
1031+ let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
1032+ if ((unlock == unlock))
1033+ then {
1034+ let withdrawAmount = (pmtAmount + unlockAmount)
1035+ let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)])
1036+ if ((inv == inv))
1037+ then nil
10081038 else throw("Strict value is not equal to itself.")
10091039 }
1040+ else throw("Strict value is not equal to itself.")
10101041 }
10111042 })
10121043
10131044
10141045
10151046 @Callable(msg)
10161047 func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = {
10171048 let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
10181049 $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1)
10191050 }
10201051
10211052
10221053
10231054 @Callable(msg)
1024-func withdrawOneCoin (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
1055+func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
10251056 then throw("size(payments) != 1")
1057+ else {
1058+ let suspicious = checkSuspicious()
1059+ if (suspicious._1)
1060+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
1061+ else {
1062+ let pmtAmount = msg.payments[0].amount
1063+ let pmtAssetId = msg.payments[0].assetId
1064+ if ((pmtAssetId != shareAssetId))
1065+ then throw("unknown token")
1066+ else {
1067+ let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1068+ let xp = _xp()
1069+ let $t02600526087 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1070+ let dy = $t02600526087._1
1071+ let dy_fee = $t02600526087._2
1072+ if (assert((dy >= minAmount)))
1073+ then throw("Not enough coins removed")
1074+ else {
1075+ let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
1076+ let dy_and_fee = (dy + dy_fee)
1077+ func makeNewBalances (acc,tokenBalance) = {
1078+ let $t02634526371 = acc
1079+ let newBalances = $t02634526371._1
1080+ let i = $t02634526371._2
1081+ if ((i == outIndex))
1082+ then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1083+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1084+ }
1085+
1086+ let $t02653826599 = {
1087+ let $l = xp
1088+ let $s = size($l)
1089+ let $acc0 = $Tuple2(nil, 0)
1090+ func $f0_1 ($a,$i) = if (($i >= $s))
1091+ then $a
1092+ else makeNewBalances($a, $l[$i])
1093+
1094+ func $f0_2 ($a,$i) = if (($i >= $s))
1095+ then $a
1096+ else throw("List size exceeds 15")
1097+
1098+ $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)
1099+ }
1100+ let newBalances = $t02653826599._1
1101+ let v = $t02653826599._2
1102+ if (checkDAppThreshold(newBalances))
1103+ then throw()
1104+ else {
1105+ let us = unstake(dy_and_fee, tokenOut)
1106+ 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))]
1108+ else throw("Strict value is not equal to itself.")
1109+ }
1110+ }
1111+ }
1112+ }
1113+ })
1114+
1115+
1116+
1117+@Callable(msg)
1118+func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
1119+ then throw("Unlock amount must be positive")
10261120 else {
10271121 let suspicious = checkSuspicious()
10281122 if (suspicious._1)
10291123 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
10301124 else {
1031- let payment = msg.payments[0]
1032- let tokenIn = payment.assetId
1033- if ((tokenIn != shareAssetId))
1034- then throw("unknown token")
1035- else {
1036- let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1037- let _tokenAmount = payment.amount
1038- let unlock = if ((unlockAmount > 0))
1039- then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
1040- else 0
1041- if ((unlock == unlock))
1042- then {
1043- let withdrawAmount = (_tokenAmount + unlockAmount)
1044- let xp = _xp()
1045- let $t02518525266 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.caller)
1046- let dy = $t02518525266._1
1047- let dy_fee = $t02518525266._2
1048- if (assert((dy >= minAmount)))
1049- then throw("Not enough coins removed")
1050- else {
1051- let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
1052- let dy_and_fee = (dy + dy_fee)
1053- func makeNewBalances (acc,tokenBalance) = {
1054- let $t02552425550 = acc
1055- let newBalances = $t02552425550._1
1056- let i = $t02552425550._2
1057- if ((i == outIndex))
1058- then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1059- else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1060- }
1061-
1062- let $t02571725778 = {
1063- let $l = xp
1064- let $s = size($l)
1065- let $acc0 = $Tuple2(nil, 0)
1066- func $f0_1 ($a,$i) = if (($i >= $s))
1067- then $a
1068- else makeNewBalances($a, $l[$i])
1069-
1070- func $f0_2 ($a,$i) = if (($i >= $s))
1071- then $a
1072- else throw("List size exceeds 15")
1073-
1074- $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)
1075- }
1076- let newBalances = $t02571725778._1
1077- let i = $t02571725778._2
1078- if (checkDAppThreshold(newBalances))
1079- then throw()
1080- else {
1081- let us = unstake(dy_and_fee, tokenOut)
1082- if ((us == us))
1083- then [ScriptTransfer(msg.caller, dy, fromBase58String(tokenOut)), IntegerEntry((assetIds[i] + kAssetBalance), (xp[i] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(tokenOut)), ScriptTransfer(capMoneyBoxAddress, (dy_fee - governanceFees), fromBase58String(tokenOut)), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]
1084- else throw("Strict value is not equal to itself.")
1085- }
1086- }
1087- }
1125+ let pmtAmount = if ((size(msg.payments) > 0))
1126+ then if ((size(msg.payments) != 1))
1127+ then throw("size(payments) != 1")
1128+ else {
1129+ let pmtAssetId = msg.payments[0].assetId
1130+ if ((shareAssetId != pmtAssetId))
1131+ then throw("unknown payment token")
1132+ else msg.payments[0].amount
1133+ }
1134+ else 0
1135+ let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
1136+ if ((unlock == unlock))
1137+ then {
1138+ let withdrawAmount = (pmtAmount + unlockAmount)
1139+ let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)])
1140+ if ((inv == inv))
1141+ then nil
10881142 else throw("Strict value is not equal to itself.")
10891143 }
1144+ else throw("Strict value is not equal to itself.")
10901145 }
10911146 })
10921147
10931148
10941149
10951150 @Callable(msg)
10961151 func A () = $Tuple2(nil, _A())
10971152
10981153
10991154
11001155 @Callable(msg)
11011156 func getVirtualPrice () = {
11021157 let D = get_D(_xp(), _A())
11031158 $Tuple2(nil, fraction(D, PRECISION, shareSupply))
11041159 }
11051160
11061161
11071162
11081163 @Callable(msg)
11091164 func calcTokenAmount (amounts,deposit) = {
11101165 let amp = _A()
11111166 let balances = _xp()
11121167 let D0 = getDMem(balances, amp)
11131168 func calcNewBalances (acc,balance) = {
1114- let $t02673926765 = acc
1115- let newBalances = $t02673926765._1
1116- let i = $t02673926765._2
1169+ let $t02852328549 = acc
1170+ let newBalances = $t02852328549._1
1171+ let i = $t02852328549._2
11171172 let newBalance = (balance + (if (deposit)
11181173 then amounts[i]
11191174 else -(amounts[i])))
11201175 $Tuple2((newBalances :+ newBalance), (i + 1))
11211176 }
11221177
11231178 let newBalances = ( let $l = balances
11241179 let $s = size($l)
11251180 let $acc0 = $Tuple2(nil, 0)
11261181 func $f0_1 ($a,$i) = if (($i >= $s))
11271182 then $a
11281183 else calcNewBalances($a, $l[$i])
11291184
11301185 func $f0_2 ($a,$i) = if (($i >= $s))
11311186 then $a
11321187 else throw("List size exceeds 15")
11331188
11341189 $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
11351190 let D1 = getDMem(newBalances, amp)
11361191 let diff = if (deposit)
11371192 then (D1 - D0)
11381193 else (D0 - D1)
11391194 $Tuple2(nil, fraction(diff, shareSupply, D0))
11401195 }
11411196
11421197
11431198
11441199 @Callable(msg)
11451200 func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME))))
11461201 then throw("too often")
11471202 else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME))))
11481203 then throw("insufficient time")
11491204 else {
11501205 let _initial_A = _A()
11511206 if (assert(if ((_futureA > 0))
11521207 then (MAX_A > _futureA)
11531208 else false))
11541209 then throw("out of base range")
11551210 else if (assert(if (if ((_futureA >= _initial_A))
11561211 then ((_initial_A * MAX_A_CHANGE) >= _futureA)
11571212 else false)
11581213 then true
11591214 else if ((_initial_A > _futureA))
11601215 then ((_futureA * MAX_A_CHANGE) >= _initial_A)
11611216 else false))
11621217 then throw("out of range")
11631218 else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)]
11641219 }))
11651220
11661221
11671222
11681223 @Callable(msg)
11691224 func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), {
11701225 let currentA = _A()
11711226 [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)]
11721227 }))
11731228
11741229
11751230
11761231 @Callable(msg)
11771232 func shutdown () = valueOrElse(isAdminCall(msg), if (!(active))
11781233 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
11791234 else suspend("Paused by admin"))
11801235
11811236
11821237
11831238 @Callable(msg)
11841239 func activate () = valueOrElse(isAdminCall(msg), if (active)
11851240 then throwIsActive()
11861241 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
11871242
11881243
11891244
11901245 @Callable(msg)
11911246 func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), [IntegerEntry(kShareLimit, shareLimit)]))
11921247
11931248
11941249 @Verifier(tx)
11951250 func verify () = {
11961251 let multiSignedByAdmins = {
11971252 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
11981253 then 1
11991254 else 0
12001255 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
12011256 then 1
12021257 else 0
12031258 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
12041259 then 1
12051260 else 0
12061261 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
12071262 }
12081263 match tx {
12091264 case inv: InvokeScriptTransaction =>
12101265 let callTakeIntoAccount = if ((inv.dApp == this))
12111266 then (inv.function == "takeIntoAccountExtraFunds")
12121267 else false
12131268 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
12141269 then true
12151270 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
12161271 then true
12171272 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
12181273 then true
12191274 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
12201275 if (if (callTakeIntoAccount)
12211276 then signedByAdmin
12221277 else false)
12231278 then true
12241279 else multiSignedByAdmins
12251280 case _ =>
12261281 multiSignedByAdmins
12271282 }
12281283 }
12291284

github/deemru/w8io/026f985 
171.48 ms