tx · GEaeM9fCm1rGRt7K8hVLSwgYbyDeW8CePU4TeMpfMnsh

3N1b5y6ncRc2X5Mq5ogeT2FpBYANX2ShrjD:  -0.05000000 Waves

2022.08.30 13:28 [2207062] smart account 3N1b5y6ncRc2X5Mq5ogeT2FpBYANX2ShrjD > SELF 0.00000000 Waves

{ "type": 13, "id": "GEaeM9fCm1rGRt7K8hVLSwgYbyDeW8CePU4TeMpfMnsh", "fee": 5000000, "feeAssetId": null, "timestamp": 1661855294110, "version": 2, "chainId": 84, "sender": "3N1b5y6ncRc2X5Mq5ogeT2FpBYANX2ShrjD", "senderPublicKey": "DYg41vAWoC1qYkgSYQAH1gjWznvc2vreaYUfoHmjcQVt", "proofs": [ "58ptarXdF2ZCGgua7cVD1VSzVXaj9GBYZ6M9ZDgaaYehXVJBcfdmSUmMRxaT6hwv7cSuyCZQ5NCiMydgZzKEfy2v", "4pMFzhkzRw1g6eQs6JRyZ1qdJCtqGRP5RCBVjWYR2bYu7fSK1JTQEEyALYDEMeBUp5ZAmc3DW9GfaEspsg5CpJ2T" ], "script": "base64:BgJXCAISBAoCEQESBQoDCAEEEgQKAgEEEgMKAQESBgoECAgBCBIECgIIARIECgIRARIFCgMBCAgSBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIDCgEBXAAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTIuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rU2hhcmVBc3NldElkAg5zaGFyZV9hc3NldF9pZAARa1NoYXJlQXNzZXRTdXBwbHkCEnNoYXJlX2Fzc2V0X3N1cHBseQAEa0ZlZQIKY29tbWlzc2lvb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m9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUMYWRtaW5QdWJLZXkzAAEAAAkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACBAckbWF0Y2gwBQJ0eAMJAAECBQckbWF0Y2gwAhdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQDaW52BQckbWF0Y2gwBBNjYWxsVGFrZUludG9BY2NvdW50AwkAAAIIBQNpbnYEZEFwcAUEdGhpcwkAAAIIBQNpbnYIZnVuY3Rpb24CGXRha2VJbnRvQWNjb3VudEV4dHJhRnVuZHMHBA1zaWduZWRCeUFkbWluAwMDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTEGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTIGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTMGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABRFhZG1pblB1YktleUludm9rZQMDBRNjYWxsVGFrZUludG9BY2NvdW50BQ1zaWduZWRCeUFkbWluBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnMF5F9j", "height": 2207062, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3TKVtwjQqAUdiMcEdopszTpRJfT4huFU7sycchqExLZa Next: none Diff:
OldNewDifferences
88 let MAX_A_CHANGE = 10
99
1010 let MIN_RAMP_TIME = (86400 / 60)
11+
12+let version = "2.0.0"
13+
14+let kVersion = "version"
1115
1216 let kAssets = "asset_ids"
1317
2226 let kShareAssetSupply = "share_asset_supply"
2327
2428 let kFee = "commission"
29+
30+let kDAppThresholdCoef = "dAppThresholdCoef"
2531
2632 let kUSDNAddress = "staking_usdnnsbt_address"
2733
8793
8894 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
8995
90-let capMoneyBoxAddress = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
91-
9296 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
9397
9498 let stakingAssets = [toBase58String(USDN)]
121125
122126 let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0)
123127
128+let iter14 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
129+
130+let iter15 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
131+
124132 let assetIds = split(getStringValue(this, kAssets), ",")
125133
126134 let nCoins = size(assetIds)
139147 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
140148 then unit
141149 else throw("Only admin can call this function")
150+
151+
152+func isSelfCall (i) = if ((this == i.caller))
153+ then unit
154+ else throw("Only contract itself can call this function")
142155
143156
144157 let big2 = toBigInt(2)
253266 else D_P
254267
255268 let D_P = {
256- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
269+ let $l = iter14
257270 let $s = size($l)
258271 let $acc0 = Dprev
259272 func $f1_1 ($a,$i) = if (($i >= $s))
276289 else $Tuple2(D, false)
277290 }
278291
279- let $t064426554 = {
280- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
292+ let $t066456711 = {
293+ let $l = iter14
281294 let $s = size($l)
282295 let $acc0 = $Tuple2(toBigInt(S), false)
283296 func $f1_1 ($a,$i) = if (($i >= $s))
290303
291304 $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)
292305 }
293- let D = $t064426554._1
294- let finished = $t064426554._2
306+ let D = $t066456711._1
307+ let finished = $t066456711._2
295308 if ((finished == false))
296309 then throw(("get_D() not finished with " + toString(D)))
297310 else toInt(D)
317330 let D = get_D(xp_, amp)
318331 let Ann = (amp * nCoins)
319332 func S_c (acc,i) = {
320- let $t071257142 = acc
321- let S_ = $t071257142._1
322- let c = $t071257142._2
333+ let $t072827299 = acc
334+ let S_ = $t072827299._1
335+ let c = $t072827299._2
323336 let x_ = if ((in == i))
324337 then x
325338 else xp_[i]
330343 else $Tuple2(S_, c)
331344 }
332345
333- let $t073507451 = {
334- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
346+ let $t075077562 = {
347+ let $l = iter14
335348 let $s = size($l)
336349 let $acc0 = $Tuple2(0, toBigInt(D))
337350 func $f0_1 ($a,$i) = if (($i >= $s))
344357
345358 $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)
346359 }
347- let S_ = $t073507451._1
348- let c_ = $t073507451._2
360+ let S_ = $t075077562._1
361+ let c_ = $t075077562._2
349362 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
350363 let bD = toBigInt(((S_ + (D / Ann)) - D))
351364 func y_proc (acc,_i) = if ((acc._2 == true))
362375 else $Tuple2(y, false)
363376 }
364377
365- let $t079338050 = {
366- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
378+ let $t080448111 = {
379+ let $l = iter15
367380 let $s = size($l)
368381 let $acc0 = $Tuple2(toBigInt(D), false)
369382 func $f1_1 ($a,$i) = if (($i >= $s))
376389
377390 $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)
378391 }
379- let y = $t079338050._1
380- let finished = $t079338050._2
392+ let y = $t080448111._1
393+ let finished = $t080448111._2
381394 if ((finished == false))
382395 then throw(("getY() not finished with " + toString(y)))
383396 else toInt(y)
391404 else {
392405 let Ann = (A_ * nCoins)
393406 func S_c (acc,i) = {
394- let $t084298446 = acc
395- let S_ = $t084298446._1
396- let c = $t084298446._2
407+ let $t084908507 = acc
408+ let S_ = $t084908507._1
409+ let c = $t084908507._2
397410 let x_ = if (if ((in != i))
398411 then (nCoins > i)
399412 else false)
406419 else $Tuple2(S_, c)
407420 }
408421
409- let $t086668767 = {
410- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
422+ let $t087278782 = {
423+ let $l = iter14
411424 let $s = size($l)
412425 let $acc0 = $Tuple2(0, toBigInt(D))
413426 func $f0_1 ($a,$i) = if (($i >= $s))
420433
421434 $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)
422435 }
423- let S_ = $t086668767._1
424- let c_ = $t086668767._2
436+ let S_ = $t087278782._1
437+ let c_ = $t087278782._2
425438 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
426439 let bD = toBigInt(((S_ + (D / Ann)) - D))
427440 func y_D_proc (acc,i) = if ((acc._2 == true))
438451 else $Tuple2(y, false)
439452 }
440453
441- let $t092509369 = {
442- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
454+ let $t092659334 = {
455+ let $l = iter15
443456 let $s = size($l)
444457 let $acc0 = $Tuple2(toBigInt(D), false)
445458 func $f1_1 ($a,$i) = if (($i >= $s))
452465
453466 $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)
454467 }
455- let y = $t092509369._1
456- let finished = $t092509369._2
468+ let y = $t092659334._1
469+ let finished = $t092659334._2
457470 if ((finished == false))
458471 then throw(("get_y_D() not finished with " + toString(y)))
459472 else toInt(y)
470483 let new_y = get_y_D(amp, i, xp, D1)
471484 let dy_0 = (xp[i] - new_y)
472485 func xp_reduced_proc (acc,xp_j) = {
473- let $t01001010039 = acc
474- let xp_reduced = $t01001010039._1
475- let index = $t01001010039._2
486+ let $t0997510004 = acc
487+ let xp_reduced = $t0997510004._1
488+ let index = $t0997510004._2
476489 let dx_expected = if ((index == i))
477490 then (fraction(xp_j, D1, D0) - new_y)
478491 else (xp_j - fraction(xp_j, D1, D0))
479492 $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1))
480493 }
481494
482- let $t01030110365 = {
495+ let $t01026610330 = {
483496 let $l = xp
484497 let $s = size($l)
485498 let $acc0 = $Tuple2(nil, 0)
493506
494507 $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)
495508 }
496- let xp_reduced = $t01030110365._1
497- let index = $t01030110365._2
509+ let xp_reduced = $t01026610330._1
510+ let index = $t01026610330._2
498511 let xp_reduced_i = xp_reduced[i]
499512 let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1)
500513 $Tuple2(dy, (dy_0 - dy))
518531
519532 func calcStakingParams (stake,amount,assetId) = if (stake)
520533 then {
521- let $t01092910995 = calcStakingFuncAndAddres(stake, assetId)
522- let call = $t01092910995._1
523- let stakingAddr = $t01092910995._2
534+ let $t01089410960 = calcStakingFuncAndAddres(stake, assetId)
535+ let call = $t01089410960._1
536+ let stakingAddr = $t01089410960._2
524537 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
525538 }
526539 else {
527- let $t01108111147 = calcStakingFuncAndAddres(stake, assetId)
528- let call = $t01108111147._1
529- let stakingAddr = $t01108111147._2
540+ let $t01104611112 = calcStakingFuncAndAddres(stake, assetId)
541+ let call = $t01104611112._1
542+ let stakingAddr = $t01104611112._2
530543 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
531544 }
532545
533546
534547 func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
535548 then {
536- let $t01133411436 = calcStakingParams(true, amount, fromBase58String(assetIdString))
537- let call = $t01133411436._1
538- let addr = $t01133411436._2
539- let params = $t01133411436._3
540- let payments = $t01133411436._4
549+ let $t01129911401 = calcStakingParams(true, amount, fromBase58String(assetIdString))
550+ let call = $t01129911401._1
551+ let addr = $t01129911401._2
552+ let params = $t01129911401._3
553+ let payments = $t01129911401._4
541554 invoke(addr, call, params, payments)
542555 }
543556 else 0
545558
546559 func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
547560 then {
548- let $t01162111724 = calcStakingParams(false, amount, fromBase58String(assetIdString))
549- let call = $t01162111724._1
550- let addr = $t01162111724._2
551- let params = $t01162111724._3
552- let payments = $t01162111724._4
561+ let $t01158611689 = calcStakingParams(false, amount, fromBase58String(assetIdString))
562+ let call = $t01158611689._1
563+ let addr = $t01158611689._2
564+ let params = $t01158611689._3
565+ let payments = $t01158611689._4
553566 invoke(addr, call, params, payments)
554567 }
555568 else 0
578591 func checkSuspicious () = {
579592 let contractBalances = _xp()
580593 func checkBalance (acc,assetId) = {
581- let $t01233512360 = acc
582- let suspicious = $t01233512360._1
583- let i = $t01233512360._2
594+ let $t01230012325 = acc
595+ let suspicious = $t01230012325._1
596+ let i = $t01230012325._2
584597 if (suspicious)
585598 then $Tuple2(suspicious, i)
586599 else {
627640 }
628641
629642
643+func checkDAppThreshold (newBalances) = {
644+ let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key")
645+ let thresholdScale = 10000
646+ func iterAllBalances (acc,tokenBalance) = {
647+ let $t01330413345 = acc
648+ let thresholdError = $t01330413345._1
649+ let cutedBalances = $t01330413345._2
650+ func iterCutedBalances (checkRatio,checkedBalance) = {
651+ let ratio = fraction(tokenBalance, thresholdScale, checkedBalance)
652+ if (if ((ratio > (dAppThresholdCoef * thresholdScale)))
653+ then true
654+ else (fraction(1, thresholdScale, dAppThresholdCoef) > ratio))
655+ then throw("New balance in assets of the DApp is less than threshold")
656+ else false
657+ }
658+
659+ $Tuple2({
660+ let $l = cutedBalances
661+ let $s = size($l)
662+ let $acc0 = thresholdError
663+ func $f0_1 ($a,$i) = if (($i >= $s))
664+ then $a
665+ else iterCutedBalances($a, $l[$i])
666+
667+ func $f0_2 ($a,$i) = if (($i >= $s))
668+ then $a
669+ else throw("List size exceeds 15")
670+
671+ $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)
672+ }, removeByIndex(cutedBalances, 0))
673+ }
674+
675+ let $t01386713970 = {
676+ let $l = newBalances
677+ let $s = size($l)
678+ let $acc0 = $Tuple2(false, removeByIndex(newBalances, 0))
679+ func $f0_1 ($a,$i) = if (($i >= $s))
680+ then $a
681+ else iterAllBalances($a, $l[$i])
682+
683+ func $f0_2 ($a,$i) = if (($i >= $s))
684+ then $a
685+ else throw("List size exceeds 15")
686+
687+ $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)
688+ }
689+ let thresholdError = $t01386713970._1
690+ let b = $t01386713970._2
691+ thresholdError
692+ }
693+
694+
630695 @Callable(msg)
631696 func D (xp,amp) = {
632697 let D = get_D_internal(xp, amp)
643708 let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
644709 let issueToken = Issue(shareName, shareDescription, 0, 6, true)
645710 let tokenId = calculateAssetId(issueToken)
646- let baseEntry = [StringEntry(kAssets, coins), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), BooleanEntry(kActive, true), issueToken]
711+ let baseEntry = [StringEntry(kVersion, version), StringEntry(kAssets, coins), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), BooleanEntry(kActive, true), IntegerEntry(kDAppThresholdCoef, 15), issueToken]
647712 if (firstHarvest)
648713 then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
649714 else baseEntry
696761 else {
697762 let paymentsSize = size(payments)
698763 func parsePayments (acc,assetId) = {
699- let $t01539715426 = acc
700- let newBalances = $t01539715426._1
701- let i = $t01539715426._2
702- let j = $t01539715426._3
764+ let $t01641516444 = acc
765+ let newBalances = $t01641516444._1
766+ let i = $t01641516444._2
767+ let j = $t01641516444._3
703768 if (if ((paymentsSize > j))
704769 then (getStrAssetId(payments[j].assetId) == assetId)
705770 else false)
712777 else $Tuple3((newBalances :+ xp[i]), (i + 1), j)
713778 }
714779
715- let $t01573215818 = {
780+ let $t01675016836 = {
716781 let $l = assetIds
717782 let $s = size($l)
718783 let $acc0 = $Tuple3(nil, 0, 0)
726791
727792 $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)
728793 }
729- let newBalances = $t01573215818._1
730- let k = $t01573215818._2
731- let parsedPayments = $t01573215818._3
794+ let newBalances = $t01675016836._1
795+ let k = $t01675016836._2
796+ let parsedPayments = $t01675016836._3
732797 if (((paymentsSize - 1) > parsedPayments))
733798 then throw("Incorect payments order")
734- else {
735- let D1 = getDMem(newBalances, amp)
736- if (assert((D1 > D0)))
737- then throw("D1 > D0")
738- else {
739- let feeDiscount = calculateFeeDiscount(msg.caller)
740- func calcScriptActions (acc,newBalance) = {
741- let $t01616516206 = acc
742- let invBalances = $t01616516206._1
743- let scriptActions = $t01616516206._2
744- let i = $t01616516206._3
745- if ((shareSupply > 0))
746- then {
747- let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
748- let fees = {
749- let idealBalance = fraction(D1, xp[i], D0)
750- let difference = if ((idealBalance > newBalance))
751- then (idealBalance - newBalance)
752- else (newBalance - idealBalance)
753- fraction(_fee, difference, feeScale6)
799+ else if (checkDAppThreshold(newBalances))
800+ then throw()
801+ else {
802+ let D1 = getDMem(newBalances, amp)
803+ if (assert((D1 > D0)))
804+ then throw("D1 > D0")
805+ else {
806+ let feeDiscount = calculateFeeDiscount(msg.caller)
807+ func calcScriptActions (acc,newBalance) = {
808+ let $t01724117282 = acc
809+ let invBalances = $t01724117282._1
810+ let scriptActions = $t01724117282._2
811+ let i = $t01724117282._3
812+ if ((shareSupply > 0))
813+ then {
814+ let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
815+ let fees = {
816+ let idealBalance = fraction(D1, xp[i], D0)
817+ let difference = if ((idealBalance > newBalance))
818+ then (idealBalance - newBalance)
819+ else (newBalance - idealBalance)
820+ fraction(_fee, difference, feeScale6)
821+ }
822+ let governanceFees = fraction(fees, feeGovernance, feeScale6)
823+ let finalBalance = (newBalance - governanceFees)
824+ let invariantBalance = (newBalance - fees)
825+ let us = unstake(governanceFees, assetIds[i])
826+ if ((us == us))
827+ then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1))
828+ else throw("Strict value is not equal to itself.")
754829 }
755- let governanceFees = fraction(fees, feeGovernance, feeScale6)
756- let finalBalance = (newBalance - governanceFees)
757- let invariantBalance = (newBalance - fees)
758- let us = unstake(fees, assetIds[i])
759- if ((us == us))
760- 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))
761- else throw("Strict value is not equal to itself.")
762- }
763- else $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
830+ else $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
831+ }
832+
833+ let $t01850618594 = {
834+ let $l = newBalances
835+ let $s = size($l)
836+ let $acc0 = $Tuple3(nil, nil, 0)
837+ func $f1_1 ($a,$i) = if (($i >= $s))
838+ then $a
839+ else calcScriptActions($a, $l[$i])
840+
841+ func $f1_2 ($a,$i) = if (($i >= $s))
842+ then $a
843+ else throw("List size exceeds 15")
844+
845+ $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)
846+ }
847+ let invBalances = $t01850618594._1
848+ let scriptActions = $t01850618594._2
849+ let D2 = getDMem(invBalances, amp)
850+ let mint_amount = if ((shareSupply == 0))
851+ then D1
852+ else fraction(shareSupply, (D2 - D0), D0)
853+ if (assert((mint_amount >= minMintAmount)))
854+ then throw("Slippage screwed you")
855+ else if (stakeFarming)
856+ then {
857+ let re = invoke(this, "reissueShare", [mint_amount], nil)
858+ if ((re == re))
859+ then {
860+ let s = invoke(farmingAddress, "lockShareTokens", [toString(this)], [AttachedPayment(shareAssetId, mint_amount)])
861+ if ((s == s))
862+ then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount)))
863+ else throw("Strict value is not equal to itself.")
864+ }
865+ else throw("Strict value is not equal to itself.")
866+ }
867+ else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))])
764868 }
765-
766- let $t01754317631 = {
767- let $l = newBalances
768- let $s = size($l)
769- let $acc0 = $Tuple3(nil, nil, 0)
770- func $f1_1 ($a,$i) = if (($i >= $s))
771- then $a
772- else calcScriptActions($a, $l[$i])
773-
774- func $f1_2 ($a,$i) = if (($i >= $s))
775- then $a
776- else throw("List size exceeds 15")
777-
778- $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)
779- }
780- let invBalances = $t01754317631._1
781- let scriptActions = $t01754317631._2
782- let D2 = getDMem(invBalances, amp)
783- let mint_amount = if ((shareSupply == 0))
784- then D1
785- else fraction(shareSupply, (D2 - D0), D0)
786- if (assert((mint_amount >= minMintAmount)))
787- then throw("Slippage screwed you")
788- else if (stakeFarming)
789- then {
790- let re = Reissue(shareAssetId, mint_amount, true)
791- if ((re == re))
792- then {
793- let s = invoke(farmingAddress, "lockShareTokens", [toString(msg.caller)], [AttachedPayment(shareAssetId, mint_amount)])
794- if ((s == s))
795- then scriptActions
796- else throw("Strict value is not equal to itself.")
797- }
798- else throw("Strict value is not equal to itself.")
799- }
800- else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))])
801- }
802- }
869+ }
803870 }
804871 }
805872 })
873+
874+
875+
876+@Callable(msg)
877+func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)])
806878
807879
808880
842914 let feeDiscount = calculateFeeDiscount(msg.caller)
843915 let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6)
844916 let dy = (_dy - _fee)
917+ let governanceFees = fraction(_fee, feeGovernance, feeScale6)
845918 if (assert((dy >= min_dy)))
846919 then throw("Exchange resulted in fewer coins than expected")
847920 else {
848- let governanceFees = fraction(_fee, feeGovernance, feeScale6)
849- let s = stake(payment.amount, getStrAssetId(payment.assetId))
850- if ((s == s))
851- then {
852- let us = unstake((dy + _fee), tokenOut)
853- if ((us == us))
854- then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), ((xp[toIndex] - dy) - governanceFees)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(moneyBoxAddress, (_fee - governanceFees), tokenOutB58)], $Tuple2(dy, tokenOutB58))
921+ func makeNewBalances (acc,tokenBalance) = {
922+ let $t02129321319 = acc
923+ let newBalances = $t02129321319._1
924+ let i = $t02129321319._2
925+ if ((i == fromIndex))
926+ then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
927+ else if ((i == toIndex))
928+ then $Tuple2((newBalances :+ (tokenBalance + dy)), (i + 1))
929+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
930+ }
931+
932+ let $t02157021631 = {
933+ let $l = xp
934+ let $s = size($l)
935+ let $acc0 = $Tuple2(nil, 0)
936+ func $f0_1 ($a,$i) = if (($i >= $s))
937+ then $a
938+ else makeNewBalances($a, $l[$i])
939+
940+ func $f0_2 ($a,$i) = if (($i >= $s))
941+ then $a
942+ else throw("List size exceeds 15")
943+
944+ $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)
945+ }
946+ let newBalances = $t02157021631._1
947+ let i = $t02157021631._2
948+ if (checkDAppThreshold(newBalances))
949+ then throw()
950+ else {
951+ let s = stake(payment.amount, getStrAssetId(payment.assetId))
952+ if ((s == s))
953+ then {
954+ let us = unstake((dy + governanceFees), tokenOut)
955+ if ((us == us))
956+ then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), ((xp[toIndex] - dy) - governanceFees)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], $Tuple2(dy, tokenOutB58))
957+ else throw("Strict value is not equal to itself.")
958+ }
855959 else throw("Strict value is not equal to itself.")
856960 }
857- else throw("Strict value is not equal to itself.")
858961 }
859962 }
860963 })
877980 let _amount = payment.amount
878981 let total_supply = shareSupply
879982 let unlock = if ((unlockAmount > 0))
880- then invoke(farmingAddress, "withdrawShareTokens", [toString(msg.caller), unlockAmount], nil)
983+ then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
881984 else 0
882985 if ((unlock == unlock))
883986 then {
884987 let withdrawAmount = (_amount + unlockAmount)
885988 func calcScriptActions (acc,balance) = {
886- let $t02141521443 = acc
887- let scriptActions = $t02141521443._1
888- let i = $t02141521443._2
989+ let $t02296522993 = acc
990+ let scriptActions = $t02296522993._1
991+ let i = $t02296522993._2
889992 let wAmount = fraction(balance, withdrawAmount, total_supply)
890993 if (assert((wAmount >= minAmounts[i])))
891994 then throw("Withdrawal resulted in fewer coins than expected")
8971000 }
8981001 }
8991002
900- let $t02193322001 = {
1003+ let $t02348323551 = {
9011004 let $l = _xp()
9021005 let $s = size($l)
9031006 let $acc0 = $Tuple2(nil, 0)
9111014
9121015 $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)
9131016 }
914- let scriptActions = $t02193322001._1
915- let i = $t02193322001._2
1017+ let scriptActions = $t02348323551._1
1018+ let i = $t02348323551._2
9161019 (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))])
9171020 }
9181021 else throw("Strict value is not equal to itself.")
9231026
9241027
9251028 @Callable(msg)
926-func calcWithdrawOneCoin (_tokenAmount,i) = $Tuple2(nil, _calcWithdrawOneCoin(_xp(), _tokenAmount, i, msg.caller)._1)
1029+func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = {
1030+ let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1031+ $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1)
1032+ }
9271033
9281034
9291035
9401046 if ((tokenIn != shareAssetId))
9411047 then throw("unknown token")
9421048 else {
943- let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1049+ let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
9441050 let _tokenAmount = payment.amount
9451051 let unlock = if ((unlockAmount > 0))
946- then invoke(farmingAddress, "withdrawShareTokens", [toString(msg.caller), unlockAmount], nil)
1052+ then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
9471053 else 0
9481054 if ((unlock == unlock))
9491055 then {
9501056 let withdrawAmount = (_tokenAmount + unlockAmount)
9511057 let xp = _xp()
952- let $t02310823182 = _calcWithdrawOneCoin(xp, withdrawAmount, i, msg.caller)
953- let dy = $t02310823182._1
954- let dy_fee = $t02310823182._2
1058+ let $t02478224863 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.caller)
1059+ let dy = $t02478224863._1
1060+ let dy_fee = $t02478224863._2
9551061 if (assert((dy >= minAmount)))
9561062 then throw("Not enough coins removed")
9571063 else {
9581064 let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
959- let dy_and_fee = (dy + dy_fee)
960- let us = unstake(dy_and_fee, tokenOut)
961- if ((us == us))
962- 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))]
963- else throw("Strict value is not equal to itself.")
1065+ let dy_and_fee = (dy + governanceFees)
1066+ func makeNewBalances (acc,tokenBalance) = {
1067+ let $t02512925155 = acc
1068+ let newBalances = $t02512925155._1
1069+ let i = $t02512925155._2
1070+ if ((i == outIndex))
1071+ then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1072+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1073+ }
1074+
1075+ let $t02532225383 = {
1076+ let $l = xp
1077+ let $s = size($l)
1078+ let $acc0 = $Tuple2(nil, 0)
1079+ func $f0_1 ($a,$i) = if (($i >= $s))
1080+ then $a
1081+ else makeNewBalances($a, $l[$i])
1082+
1083+ func $f0_2 ($a,$i) = if (($i >= $s))
1084+ then $a
1085+ else throw("List size exceeds 15")
1086+
1087+ $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)
1088+ }
1089+ let newBalances = $t02532225383._1
1090+ let i = $t02532225383._2
1091+ if (checkDAppThreshold(newBalances))
1092+ then throw()
1093+ else {
1094+ let us = unstake(dy_and_fee, tokenOut)
1095+ if ((us == us))
1096+ then [ScriptTransfer(msg.caller, dy, fromBase58String(tokenOut)), IntegerEntry((assetIds[i] + kAssetBalance), (xp[i] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(tokenOut)), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]
1097+ else throw("Strict value is not equal to itself.")
1098+ }
9641099 }
9651100 }
9661101 else throw("Strict value is not equal to itself.")
9891124 let balances = _xp()
9901125 let D0 = getDMem(balances, amp)
9911126 func calcNewBalances (acc,balance) = {
992- let $t02426124287 = acc
993- let newBalances = $t02426124287._1
994- let i = $t02426124287._2
1127+ let $t02624626272 = acc
1128+ let newBalances = $t02624626272._1
1129+ let i = $t02624626272._2
9951130 let newBalance = (balance + (if (deposit)
9961131 then amounts[i]
9971132 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 MIN_RAMP_TIME = (86400 / 60)
11+
12+let version = "2.0.0"
13+
14+let kVersion = "version"
1115
1216 let kAssets = "asset_ids"
1317
1418 let kAssetBalance = "_balance"
1519
1620 let kActive = "active"
1721
1822 let kCause = "shutdown_cause"
1923
2024 let kShareAssetId = "share_asset_id"
2125
2226 let kShareAssetSupply = "share_asset_supply"
2327
2428 let kFee = "commission"
29+
30+let kDAppThresholdCoef = "dAppThresholdCoef"
2531
2632 let kUSDNAddress = "staking_usdnnsbt_address"
2733
2834 let kDiscounts = "discounts"
2935
3036 let kDiscountValues = "discount_values"
3137
3238 let kUserSwopInGov = "_SWOP_amount"
3339
3440 let kFirstHarvest = "first_harvest"
3541
3642 let kFirstHarvestHeight = "first_harvest_height"
3743
3844 let kShareLimit = "share_limit_on_first_harvest"
3945
4046 let kBasePeriod = "base_period"
4147
4248 let kPeriodLength = "period_length"
4349
4450 let kStartHeight = "start_height"
4551
4652 let kAdminPubKey1 = "admin_pub_1"
4753
4854 let kAdminPubKey2 = "admin_pub_2"
4955
5056 let kAdminPubKey3 = "admin_pub_3"
5157
5258 let kAdminInvokePubKey = "admin_invoke_pub"
5359
5460 let kMoneyBoxAddress = "money_box_address"
5561
5662 let kGovAddress = "governance_address"
5763
5864 let kVotingAddress = "voting_address"
5965
6066 let kFarmingAddress = "farming_address"
6167
6268 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
6369
6470 func getBase58FromOracle (key) = match getString(oracle, key) {
6571 case string: String =>
6672 fromBase58String(string)
6773 case nothing =>
6874 throw((key + "is empty"))
6975 }
7076
7177
7278 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
7379
7480 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
7581
7682 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
7783
7884 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
7985
8086 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
8187
8288 let govAddress = Address(getBase58FromOracle(kGovAddress))
8389
8490 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
8591
8692 let votingAddress = Address(getBase58FromOracle(kVotingAddress))
8793
8894 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
8995
90-let capMoneyBoxAddress = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
91-
9296 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
9397
9498 let stakingAssets = [toBase58String(USDN)]
9599
96100 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
97101
98102 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
99103
100104 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
101105
102106 let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
103107
104108 let active = getBooleanValue(this, kActive)
105109
106110 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
107111
108112 let shareSupply = getIntegerValue(this, kShareAssetSupply)
109113
110114 let feeScale6 = 1000000
111115
112116 let fee = getIntegerValue(this, kFee)
113117
114118 let feeGovernance = fraction(40, feeScale6, 100)
115119
116120 let initial_A = getIntegerValue(this, "initial_A")
117121
118122 let future_A = getIntegerValue(this, "future_A")
119123
120124 let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0)
121125
122126 let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0)
123127
128+let iter14 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
129+
130+let iter15 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
131+
124132 let assetIds = split(getStringValue(this, kAssets), ",")
125133
126134 let nCoins = size(assetIds)
127135
128136 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
129137
130138
131139 func throwIsActive () = throw("DApp is already active")
132140
133141
134142 func isActive () = if (active)
135143 then unit
136144 else throw("DApp is inactive at this moment")
137145
138146
139147 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
140148 then unit
141149 else throw("Only admin can call this function")
150+
151+
152+func isSelfCall (i) = if ((this == i.caller))
153+ then unit
154+ else throw("Only contract itself can call this function")
142155
143156
144157 let big2 = toBigInt(2)
145158
146159 let blockTimestamp = height
147160
148161 func assert (a) = if (a)
149162 then false
150163 else true
151164
152165
153166 func calculateFeeDiscount (userAddr) = {
154167 let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
155168 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
156169 let discounts = split(getStringValue(oracle, kDiscounts), ",")
157170 if (if ((swopAmount >= parseIntValue(discountValues[0])))
158171 then (parseIntValue(discountValues[1]) > swopAmount)
159172 else false)
160173 then (feeScale6 - parseIntValue(discounts[0]))
161174 else if (if ((swopAmount >= parseIntValue(discountValues[1])))
162175 then (parseIntValue(discountValues[2]) > swopAmount)
163176 else false)
164177 then (feeScale6 - parseIntValue(discounts[1]))
165178 else if (if ((swopAmount >= parseIntValue(discountValues[2])))
166179 then (parseIntValue(discountValues[3]) > swopAmount)
167180 else false)
168181 then (feeScale6 - parseIntValue(discounts[2]))
169182 else if (if ((swopAmount >= parseIntValue(discountValues[3])))
170183 then (parseIntValue(discountValues[4]) > swopAmount)
171184 else false)
172185 then (feeScale6 - parseIntValue(discounts[3]))
173186 else if ((swopAmount >= parseIntValue(discountValues[4])))
174187 then (feeScale6 - parseIntValue(discounts[4]))
175188 else feeScale6
176189 }
177190
178191
179192 func _A () = {
180193 let t1 = future_A_time
181194 let A1 = future_A
182195 if ((t1 > blockTimestamp))
183196 then {
184197 let A0 = initial_A
185198 let t0 = initial_A_time
186199 if ((A1 > A0))
187200 then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0)))
188201 else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0)))
189202 }
190203 else A1
191204 }
192205
193206
194207 func _xp () = {
195208 func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0))
196209
197210 let $l = assetIds
198211 let $s = size($l)
199212 let $acc0 = nil
200213 func $f0_1 ($a,$i) = if (($i >= $s))
201214 then $a
202215 else assetBalances($a, $l[$i])
203216
204217 func $f0_2 ($a,$i) = if (($i >= $s))
205218 then $a
206219 else throw("List size exceeds 15")
207220
208221 $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)
209222 }
210223
211224
212225 func _xp_mem (xp) = xp
213226
214227
215228 func sumList (acc,element) = (acc + element)
216229
217230
218231 func get_D (xp,amp) = {
219232 let @ = invoke(this, "D", [xp, amp], nil)
220233 if ($isInstanceOf(@, "Int"))
221234 then @
222235 else throw(($getType(invoke(this, "D", [xp, amp], nil)) + " couldn't be cast to Int"))
223236 }
224237
225238
226239 func get_D_internal (xp,amp) = {
227240 let S = {
228241 let $l = xp
229242 let $s = size($l)
230243 let $acc0 = 0
231244 func $f0_1 ($a,$i) = if (($i >= $s))
232245 then $a
233246 else sumList($a, $l[$i])
234247
235248 func $f0_2 ($a,$i) = if (($i >= $s))
236249 then $a
237250 else throw("List size exceeds 15")
238251
239252 $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)
240253 }
241254 if ((S == 0))
242255 then 0
243256 else {
244257 let Ann = (amp * nCoins)
245258 let AnnS = (toBigInt(Ann) * toBigInt(S))
246259 let Ann1 = toBigInt((Ann - 1))
247260 func Dproc (acc,i) = if ((acc._2 == true))
248261 then acc
249262 else {
250263 let Dprev = acc._1
251264 func D_PProc (D_P,i) = if ((nCoins > i))
252265 then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins)))
253266 else D_P
254267
255268 let D_P = {
256- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
269+ let $l = iter14
257270 let $s = size($l)
258271 let $acc0 = Dprev
259272 func $f1_1 ($a,$i) = if (($i >= $s))
260273 then $a
261274 else D_PProc($a, $l[$i])
262275
263276 func $f1_2 ($a,$i) = if (($i >= $s))
264277 then $a
265278 else throw("List size exceeds 15")
266279
267280 $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)
268281 }
269282 let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P)))
270283 if ((D > Dprev))
271284 then if ((1 >= toInt((D - Dprev))))
272285 then $Tuple2(D, true)
273286 else $Tuple2(D, false)
274287 else if ((1 >= toInt((Dprev - D))))
275288 then $Tuple2(D, true)
276289 else $Tuple2(D, false)
277290 }
278291
279- let $t064426554 = {
280- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
292+ let $t066456711 = {
293+ let $l = iter14
281294 let $s = size($l)
282295 let $acc0 = $Tuple2(toBigInt(S), false)
283296 func $f1_1 ($a,$i) = if (($i >= $s))
284297 then $a
285298 else Dproc($a, $l[$i])
286299
287300 func $f1_2 ($a,$i) = if (($i >= $s))
288301 then $a
289302 else throw("List size exceeds 15")
290303
291304 $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)
292305 }
293- let D = $t064426554._1
294- let finished = $t064426554._2
306+ let D = $t066456711._1
307+ let finished = $t066456711._2
295308 if ((finished == false))
296309 then throw(("get_D() not finished with " + toString(D)))
297310 else toInt(D)
298311 }
299312 }
300313
301314
302315 func getDMem (xp,amp) = get_D(_xp_mem(xp), amp)
303316
304317
305318 func getY (in,out,x,xp_) = if (assert((in != out)))
306319 then throw("same coin")
307320 else if (assert(if ((out >= 0))
308321 then (in >= 0)
309322 else false))
310323 then throw("below zero")
311324 else if (assert(if ((nCoins > out))
312325 then (nCoins > in)
313326 else false))
314327 then throw("above N_COINS")
315328 else {
316329 let amp = _A()
317330 let D = get_D(xp_, amp)
318331 let Ann = (amp * nCoins)
319332 func S_c (acc,i) = {
320- let $t071257142 = acc
321- let S_ = $t071257142._1
322- let c = $t071257142._2
333+ let $t072827299 = acc
334+ let S_ = $t072827299._1
335+ let c = $t072827299._2
323336 let x_ = if ((in == i))
324337 then x
325338 else xp_[i]
326339 if (if ((i != out))
327340 then (nCoins > i)
328341 else false)
329342 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
330343 else $Tuple2(S_, c)
331344 }
332345
333- let $t073507451 = {
334- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
346+ let $t075077562 = {
347+ let $l = iter14
335348 let $s = size($l)
336349 let $acc0 = $Tuple2(0, toBigInt(D))
337350 func $f0_1 ($a,$i) = if (($i >= $s))
338351 then $a
339352 else S_c($a, $l[$i])
340353
341354 func $f0_2 ($a,$i) = if (($i >= $s))
342355 then $a
343356 else throw("List size exceeds 15")
344357
345358 $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)
346359 }
347- let S_ = $t073507451._1
348- let c_ = $t073507451._2
360+ let S_ = $t075077562._1
361+ let c_ = $t075077562._2
349362 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
350363 let bD = toBigInt(((S_ + (D / Ann)) - D))
351364 func y_proc (acc,_i) = if ((acc._2 == true))
352365 then acc
353366 else {
354367 let y_prev = acc._1
355368 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
356369 if ((y > y_prev))
357370 then if ((1 >= toInt((y - y_prev))))
358371 then $Tuple2(y, true)
359372 else $Tuple2(y, false)
360373 else if ((1 >= toInt((y_prev - y))))
361374 then $Tuple2(y, true)
362375 else $Tuple2(y, false)
363376 }
364377
365- let $t079338050 = {
366- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
378+ let $t080448111 = {
379+ let $l = iter15
367380 let $s = size($l)
368381 let $acc0 = $Tuple2(toBigInt(D), false)
369382 func $f1_1 ($a,$i) = if (($i >= $s))
370383 then $a
371384 else y_proc($a, $l[$i])
372385
373386 func $f1_2 ($a,$i) = if (($i >= $s))
374387 then $a
375388 else throw("List size exceeds 16")
376389
377390 $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)
378391 }
379- let y = $t079338050._1
380- let finished = $t079338050._2
392+ let y = $t080448111._1
393+ let finished = $t080448111._2
381394 if ((finished == false))
382395 then throw(("getY() not finished with " + toString(y)))
383396 else toInt(y)
384397 }
385398
386399
387400 func get_y_D (A_,in,xp,D) = if (assert((in >= 0)))
388401 then throw("i below zero")
389402 else if (assert((nCoins > in)))
390403 then throw("i above N_COINS")
391404 else {
392405 let Ann = (A_ * nCoins)
393406 func S_c (acc,i) = {
394- let $t084298446 = acc
395- let S_ = $t084298446._1
396- let c = $t084298446._2
407+ let $t084908507 = acc
408+ let S_ = $t084908507._1
409+ let c = $t084908507._2
397410 let x_ = if (if ((in != i))
398411 then (nCoins > i)
399412 else false)
400413 then xp[i]
401414 else 0
402415 if (if ((nCoins > i))
403416 then (in != i)
404417 else false)
405418 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
406419 else $Tuple2(S_, c)
407420 }
408421
409- let $t086668767 = {
410- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
422+ let $t087278782 = {
423+ let $l = iter14
411424 let $s = size($l)
412425 let $acc0 = $Tuple2(0, toBigInt(D))
413426 func $f0_1 ($a,$i) = if (($i >= $s))
414427 then $a
415428 else S_c($a, $l[$i])
416429
417430 func $f0_2 ($a,$i) = if (($i >= $s))
418431 then $a
419432 else throw("List size exceeds 15")
420433
421434 $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)
422435 }
423- let S_ = $t086668767._1
424- let c_ = $t086668767._2
436+ let S_ = $t087278782._1
437+ let c_ = $t087278782._2
425438 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
426439 let bD = toBigInt(((S_ + (D / Ann)) - D))
427440 func y_D_proc (acc,i) = if ((acc._2 == true))
428441 then acc
429442 else {
430443 let y_prev = acc._1
431444 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
432445 if ((y > y_prev))
433446 then if ((1 >= toInt((y - y_prev))))
434447 then $Tuple2(y, true)
435448 else $Tuple2(y, false)
436449 else if ((1 >= toInt((y_prev - y))))
437450 then $Tuple2(y, true)
438451 else $Tuple2(y, false)
439452 }
440453
441- let $t092509369 = {
442- let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
454+ let $t092659334 = {
455+ let $l = iter15
443456 let $s = size($l)
444457 let $acc0 = $Tuple2(toBigInt(D), false)
445458 func $f1_1 ($a,$i) = if (($i >= $s))
446459 then $a
447460 else y_D_proc($a, $l[$i])
448461
449462 func $f1_2 ($a,$i) = if (($i >= $s))
450463 then $a
451464 else throw("List size exceeds 16")
452465
453466 $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)
454467 }
455- let y = $t092509369._1
456- let finished = $t092509369._2
468+ let y = $t092659334._1
469+ let finished = $t092659334._2
457470 if ((finished == false))
458471 then throw(("get_y_D() not finished with " + toString(y)))
459472 else toInt(y)
460473 }
461474
462475
463476 func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = {
464477 let feeDiscount = calculateFeeDiscount(caller)
465478 let amp = _A()
466479 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
467480 let total_supply = shareSupply
468481 let D0 = get_D(xp, amp)
469482 let D1 = (D0 - fraction(_token_amount, D0, total_supply))
470483 let new_y = get_y_D(amp, i, xp, D1)
471484 let dy_0 = (xp[i] - new_y)
472485 func xp_reduced_proc (acc,xp_j) = {
473- let $t01001010039 = acc
474- let xp_reduced = $t01001010039._1
475- let index = $t01001010039._2
486+ let $t0997510004 = acc
487+ let xp_reduced = $t0997510004._1
488+ let index = $t0997510004._2
476489 let dx_expected = if ((index == i))
477490 then (fraction(xp_j, D1, D0) - new_y)
478491 else (xp_j - fraction(xp_j, D1, D0))
479492 $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1))
480493 }
481494
482- let $t01030110365 = {
495+ let $t01026610330 = {
483496 let $l = xp
484497 let $s = size($l)
485498 let $acc0 = $Tuple2(nil, 0)
486499 func $f0_1 ($a,$i) = if (($i >= $s))
487500 then $a
488501 else xp_reduced_proc($a, $l[$i])
489502
490503 func $f0_2 ($a,$i) = if (($i >= $s))
491504 then $a
492505 else throw("List size exceeds 15")
493506
494507 $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)
495508 }
496- let xp_reduced = $t01030110365._1
497- let index = $t01030110365._2
509+ let xp_reduced = $t01026610330._1
510+ let index = $t01026610330._2
498511 let xp_reduced_i = xp_reduced[i]
499512 let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1)
500513 $Tuple2(dy, (dy_0 - dy))
501514 }
502515
503516
504517 func getStrAssetId (assetId) = match assetId {
505518 case id: ByteVector =>
506519 toBase58String(id)
507520 case waves: Unit =>
508521 "WAVES"
509522 case _ =>
510523 throw("Match error")
511524 }
512525
513526
514527 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
515528 then $Tuple2("lockNeutrino", stakingUSDNAddress)
516529 else $Tuple2("unlockNeutrino", stakingUSDNAddress)
517530
518531
519532 func calcStakingParams (stake,amount,assetId) = if (stake)
520533 then {
521- let $t01092910995 = calcStakingFuncAndAddres(stake, assetId)
522- let call = $t01092910995._1
523- let stakingAddr = $t01092910995._2
534+ let $t01089410960 = calcStakingFuncAndAddres(stake, assetId)
535+ let call = $t01089410960._1
536+ let stakingAddr = $t01089410960._2
524537 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
525538 }
526539 else {
527- let $t01108111147 = calcStakingFuncAndAddres(stake, assetId)
528- let call = $t01108111147._1
529- let stakingAddr = $t01108111147._2
540+ let $t01104611112 = calcStakingFuncAndAddres(stake, assetId)
541+ let call = $t01104611112._1
542+ let stakingAddr = $t01104611112._2
530543 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
531544 }
532545
533546
534547 func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
535548 then {
536- let $t01133411436 = calcStakingParams(true, amount, fromBase58String(assetIdString))
537- let call = $t01133411436._1
538- let addr = $t01133411436._2
539- let params = $t01133411436._3
540- let payments = $t01133411436._4
549+ let $t01129911401 = calcStakingParams(true, amount, fromBase58String(assetIdString))
550+ let call = $t01129911401._1
551+ let addr = $t01129911401._2
552+ let params = $t01129911401._3
553+ let payments = $t01129911401._4
541554 invoke(addr, call, params, payments)
542555 }
543556 else 0
544557
545558
546559 func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
547560 then {
548- let $t01162111724 = calcStakingParams(false, amount, fromBase58String(assetIdString))
549- let call = $t01162111724._1
550- let addr = $t01162111724._2
551- let params = $t01162111724._3
552- let payments = $t01162111724._4
561+ let $t01158611689 = calcStakingParams(false, amount, fromBase58String(assetIdString))
562+ let call = $t01158611689._1
563+ let addr = $t01158611689._2
564+ let params = $t01158611689._3
565+ let payments = $t01158611689._4
553566 invoke(addr, call, params, payments)
554567 }
555568 else 0
556569
557570
558571 func stakedAmount (assetId) = {
559572 let stakedAmountCalculated = match assetId {
560573 case aId: ByteVector =>
561574 if ((aId == USDN))
562575 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
563576 else 0
564577 case _: Unit =>
565578 0
566579 case _ =>
567580 throw("Match error")
568581 }
569582 match stakedAmountCalculated {
570583 case i: Int =>
571584 i
572585 case _ =>
573586 0
574587 }
575588 }
576589
577590
578591 func checkSuspicious () = {
579592 let contractBalances = _xp()
580593 func checkBalance (acc,assetId) = {
581- let $t01233512360 = acc
582- let suspicious = $t01233512360._1
583- let i = $t01233512360._2
594+ let $t01230012325 = acc
595+ let suspicious = $t01230012325._1
596+ let i = $t01230012325._2
584597 if (suspicious)
585598 then $Tuple2(suspicious, i)
586599 else {
587600 let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId)))
588601 if ((contractBalances[i] > aBalance))
589602 then $Tuple2(true, i)
590603 else $Tuple2(false, (i + 1))
591604 }
592605 }
593606
594607 let $l = assetIds
595608 let $s = size($l)
596609 let $acc0 = $Tuple2(false, 0)
597610 func $f0_1 ($a,$i) = if (($i >= $s))
598611 then $a
599612 else checkBalance($a, $l[$i])
600613
601614 func $f0_2 ($a,$i) = if (($i >= $s))
602615 then $a
603616 else throw("List size exceeds 15")
604617
605618 $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)
606619 }
607620
608621
609622 func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i]))
610623
611624
612625 func returnPayments (caller,payments) = {
613626 func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId))
614627
615628 let $l = payments
616629 let $s = size($l)
617630 let $acc0 = nil
618631 func $f0_1 ($a,$i) = if (($i >= $s))
619632 then $a
620633 else parsePayments($a, $l[$i])
621634
622635 func $f0_2 ($a,$i) = if (($i >= $s))
623636 then $a
624637 else throw("List size exceeds 15")
625638
626639 $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)
627640 }
628641
629642
643+func checkDAppThreshold (newBalances) = {
644+ let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key")
645+ let thresholdScale = 10000
646+ func iterAllBalances (acc,tokenBalance) = {
647+ let $t01330413345 = acc
648+ let thresholdError = $t01330413345._1
649+ let cutedBalances = $t01330413345._2
650+ func iterCutedBalances (checkRatio,checkedBalance) = {
651+ let ratio = fraction(tokenBalance, thresholdScale, checkedBalance)
652+ if (if ((ratio > (dAppThresholdCoef * thresholdScale)))
653+ then true
654+ else (fraction(1, thresholdScale, dAppThresholdCoef) > ratio))
655+ then throw("New balance in assets of the DApp is less than threshold")
656+ else false
657+ }
658+
659+ $Tuple2({
660+ let $l = cutedBalances
661+ let $s = size($l)
662+ let $acc0 = thresholdError
663+ func $f0_1 ($a,$i) = if (($i >= $s))
664+ then $a
665+ else iterCutedBalances($a, $l[$i])
666+
667+ func $f0_2 ($a,$i) = if (($i >= $s))
668+ then $a
669+ else throw("List size exceeds 15")
670+
671+ $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)
672+ }, removeByIndex(cutedBalances, 0))
673+ }
674+
675+ let $t01386713970 = {
676+ let $l = newBalances
677+ let $s = size($l)
678+ let $acc0 = $Tuple2(false, removeByIndex(newBalances, 0))
679+ func $f0_1 ($a,$i) = if (($i >= $s))
680+ then $a
681+ else iterAllBalances($a, $l[$i])
682+
683+ func $f0_2 ($a,$i) = if (($i >= $s))
684+ then $a
685+ else throw("List size exceeds 15")
686+
687+ $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)
688+ }
689+ let thresholdError = $t01386713970._1
690+ let b = $t01386713970._2
691+ thresholdError
692+ }
693+
694+
630695 @Callable(msg)
631696 func D (xp,amp) = {
632697 let D = get_D_internal(xp, amp)
633698 $Tuple2([IntegerEntry("D", D)], D)
634699 }
635700
636701
637702
638703 @Callable(msg)
639704 func init (coins,_A,firstHarvest) = if (!(isDataStorageUntouched(this)))
640705 then throw("Already initialized")
641706 else {
642707 let shareName = "s_Multi_USD"
643708 let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
644709 let issueToken = Issue(shareName, shareDescription, 0, 6, true)
645710 let tokenId = calculateAssetId(issueToken)
646- let baseEntry = [StringEntry(kAssets, coins), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), BooleanEntry(kActive, true), issueToken]
711+ let baseEntry = [StringEntry(kVersion, version), StringEntry(kAssets, coins), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), BooleanEntry(kActive, true), IntegerEntry(kDAppThresholdCoef, 15), issueToken]
647712 if (firstHarvest)
648713 then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
649714 else baseEntry
650715 }
651716
652717
653718
654719 @Callable(msg)
655720 func addLiquidity (minMintAmount,stakeFarming) = valueOrElse(isActive(), {
656721 let amp = _A()
657722 let xp = _xp()
658723 let D0 = if ((shareSupply == 0))
659724 then 0
660725 else getDMem(xp, amp)
661726 let payments = msg.payments
662727 let n = size(payments)
663728 func validPayments (n) = if ((n > nCoins))
664729 then throw(("payments size > " + toString(nCoins)))
665730 else if ((1 > n))
666731 then throw("payments size < 1")
667732 else if (if ((shareSupply == 0))
668733 then (nCoins != n)
669734 else false)
670735 then throw("initial deposit requires all coins")
671736 else {
672737 func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId)))
673738 then true
674739 else throw("Invalid asset in payment")
675740
676741 let $l = payments
677742 let $s = size($l)
678743 let $acc0 = false
679744 func $f0_1 ($a,$i) = if (($i >= $s))
680745 then $a
681746 else paymantValid($a, $l[$i])
682747
683748 func $f0_2 ($a,$i) = if (($i >= $s))
684749 then $a
685750 else throw("List size exceeds 15")
686751
687752 $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)
688753 }
689754
690755 if (!(validPayments(n)))
691756 then throw()
692757 else {
693758 let suspicious = checkSuspicious()
694759 if (suspicious._1)
695760 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments))
696761 else {
697762 let paymentsSize = size(payments)
698763 func parsePayments (acc,assetId) = {
699- let $t01539715426 = acc
700- let newBalances = $t01539715426._1
701- let i = $t01539715426._2
702- let j = $t01539715426._3
764+ let $t01641516444 = acc
765+ let newBalances = $t01641516444._1
766+ let i = $t01641516444._2
767+ let j = $t01641516444._3
703768 if (if ((paymentsSize > j))
704769 then (getStrAssetId(payments[j].assetId) == assetId)
705770 else false)
706771 then {
707772 let s = stake(payments[j].amount, getStrAssetId(payments[j].assetId))
708773 if ((s == s))
709774 then $Tuple3((newBalances :+ (xp[i] + payments[j].amount)), (i + 1), (j + 1))
710775 else throw("Strict value is not equal to itself.")
711776 }
712777 else $Tuple3((newBalances :+ xp[i]), (i + 1), j)
713778 }
714779
715- let $t01573215818 = {
780+ let $t01675016836 = {
716781 let $l = assetIds
717782 let $s = size($l)
718783 let $acc0 = $Tuple3(nil, 0, 0)
719784 func $f0_1 ($a,$i) = if (($i >= $s))
720785 then $a
721786 else parsePayments($a, $l[$i])
722787
723788 func $f0_2 ($a,$i) = if (($i >= $s))
724789 then $a
725790 else throw("List size exceeds 15")
726791
727792 $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)
728793 }
729- let newBalances = $t01573215818._1
730- let k = $t01573215818._2
731- let parsedPayments = $t01573215818._3
794+ let newBalances = $t01675016836._1
795+ let k = $t01675016836._2
796+ let parsedPayments = $t01675016836._3
732797 if (((paymentsSize - 1) > parsedPayments))
733798 then throw("Incorect payments order")
734- else {
735- let D1 = getDMem(newBalances, amp)
736- if (assert((D1 > D0)))
737- then throw("D1 > D0")
738- else {
739- let feeDiscount = calculateFeeDiscount(msg.caller)
740- func calcScriptActions (acc,newBalance) = {
741- let $t01616516206 = acc
742- let invBalances = $t01616516206._1
743- let scriptActions = $t01616516206._2
744- let i = $t01616516206._3
745- if ((shareSupply > 0))
746- then {
747- let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
748- let fees = {
749- let idealBalance = fraction(D1, xp[i], D0)
750- let difference = if ((idealBalance > newBalance))
751- then (idealBalance - newBalance)
752- else (newBalance - idealBalance)
753- fraction(_fee, difference, feeScale6)
799+ else if (checkDAppThreshold(newBalances))
800+ then throw()
801+ else {
802+ let D1 = getDMem(newBalances, amp)
803+ if (assert((D1 > D0)))
804+ then throw("D1 > D0")
805+ else {
806+ let feeDiscount = calculateFeeDiscount(msg.caller)
807+ func calcScriptActions (acc,newBalance) = {
808+ let $t01724117282 = acc
809+ let invBalances = $t01724117282._1
810+ let scriptActions = $t01724117282._2
811+ let i = $t01724117282._3
812+ if ((shareSupply > 0))
813+ then {
814+ let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
815+ let fees = {
816+ let idealBalance = fraction(D1, xp[i], D0)
817+ let difference = if ((idealBalance > newBalance))
818+ then (idealBalance - newBalance)
819+ else (newBalance - idealBalance)
820+ fraction(_fee, difference, feeScale6)
821+ }
822+ let governanceFees = fraction(fees, feeGovernance, feeScale6)
823+ let finalBalance = (newBalance - governanceFees)
824+ let invariantBalance = (newBalance - fees)
825+ let us = unstake(governanceFees, assetIds[i])
826+ if ((us == us))
827+ then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1))
828+ else throw("Strict value is not equal to itself.")
754829 }
755- let governanceFees = fraction(fees, feeGovernance, feeScale6)
756- let finalBalance = (newBalance - governanceFees)
757- let invariantBalance = (newBalance - fees)
758- let us = unstake(fees, assetIds[i])
759- if ((us == us))
760- 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))
761- else throw("Strict value is not equal to itself.")
762- }
763- else $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
830+ else $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
831+ }
832+
833+ let $t01850618594 = {
834+ let $l = newBalances
835+ let $s = size($l)
836+ let $acc0 = $Tuple3(nil, nil, 0)
837+ func $f1_1 ($a,$i) = if (($i >= $s))
838+ then $a
839+ else calcScriptActions($a, $l[$i])
840+
841+ func $f1_2 ($a,$i) = if (($i >= $s))
842+ then $a
843+ else throw("List size exceeds 15")
844+
845+ $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)
846+ }
847+ let invBalances = $t01850618594._1
848+ let scriptActions = $t01850618594._2
849+ let D2 = getDMem(invBalances, amp)
850+ let mint_amount = if ((shareSupply == 0))
851+ then D1
852+ else fraction(shareSupply, (D2 - D0), D0)
853+ if (assert((mint_amount >= minMintAmount)))
854+ then throw("Slippage screwed you")
855+ else if (stakeFarming)
856+ then {
857+ let re = invoke(this, "reissueShare", [mint_amount], nil)
858+ if ((re == re))
859+ then {
860+ let s = invoke(farmingAddress, "lockShareTokens", [toString(this)], [AttachedPayment(shareAssetId, mint_amount)])
861+ if ((s == s))
862+ then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount)))
863+ else throw("Strict value is not equal to itself.")
864+ }
865+ else throw("Strict value is not equal to itself.")
866+ }
867+ else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))])
764868 }
765-
766- let $t01754317631 = {
767- let $l = newBalances
768- let $s = size($l)
769- let $acc0 = $Tuple3(nil, nil, 0)
770- func $f1_1 ($a,$i) = if (($i >= $s))
771- then $a
772- else calcScriptActions($a, $l[$i])
773-
774- func $f1_2 ($a,$i) = if (($i >= $s))
775- then $a
776- else throw("List size exceeds 15")
777-
778- $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)
779- }
780- let invBalances = $t01754317631._1
781- let scriptActions = $t01754317631._2
782- let D2 = getDMem(invBalances, amp)
783- let mint_amount = if ((shareSupply == 0))
784- then D1
785- else fraction(shareSupply, (D2 - D0), D0)
786- if (assert((mint_amount >= minMintAmount)))
787- then throw("Slippage screwed you")
788- else if (stakeFarming)
789- then {
790- let re = Reissue(shareAssetId, mint_amount, true)
791- if ((re == re))
792- then {
793- let s = invoke(farmingAddress, "lockShareTokens", [toString(msg.caller)], [AttachedPayment(shareAssetId, mint_amount)])
794- if ((s == s))
795- then scriptActions
796- else throw("Strict value is not equal to itself.")
797- }
798- else throw("Strict value is not equal to itself.")
799- }
800- else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))])
801- }
802- }
869+ }
803870 }
804871 }
805872 })
873+
874+
875+
876+@Callable(msg)
877+func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)])
806878
807879
808880
809881 @Callable(msg)
810882 func getDy (assetFrom,assetTo,dx,userAddress) = {
811883 let xp = _xp()
812884 let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in")
813885 let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out")
814886 let x = (xp[fromIndex] + dx)
815887 let y = getY(fromIndex, toIndex, x, xp)
816888 let dy = ((xp[toIndex] - y) - 1)
817889 let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress)))
818890 let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6)
819891 $Tuple2(nil, (dy - _fee))
820892 }
821893
822894
823895
824896 @Callable(msg)
825897 func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
826898 then throw("size(payments) != 1")
827899 else {
828900 let suspicious = checkSuspicious()
829901 if (suspicious._1)
830902 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
831903 else {
832904 let payment = msg.payments[0]
833905 let tokenIn = getStrAssetId(payment.assetId)
834906 let tokenOutB58 = fromBase58String(tokenOut)
835907 let dx = payment.amount
836908 let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in")
837909 let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
838910 let xp = _xp()
839911 let x = (xp[fromIndex] + dx)
840912 let y = getY(fromIndex, toIndex, x, xp)
841913 let _dy = ((xp[toIndex] - y) - 1)
842914 let feeDiscount = calculateFeeDiscount(msg.caller)
843915 let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6)
844916 let dy = (_dy - _fee)
917+ let governanceFees = fraction(_fee, feeGovernance, feeScale6)
845918 if (assert((dy >= min_dy)))
846919 then throw("Exchange resulted in fewer coins than expected")
847920 else {
848- let governanceFees = fraction(_fee, feeGovernance, feeScale6)
849- let s = stake(payment.amount, getStrAssetId(payment.assetId))
850- if ((s == s))
851- then {
852- let us = unstake((dy + _fee), tokenOut)
853- if ((us == us))
854- then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), ((xp[toIndex] - dy) - governanceFees)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), ScriptTransfer(moneyBoxAddress, (_fee - governanceFees), tokenOutB58)], $Tuple2(dy, tokenOutB58))
921+ func makeNewBalances (acc,tokenBalance) = {
922+ let $t02129321319 = acc
923+ let newBalances = $t02129321319._1
924+ let i = $t02129321319._2
925+ if ((i == fromIndex))
926+ then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
927+ else if ((i == toIndex))
928+ then $Tuple2((newBalances :+ (tokenBalance + dy)), (i + 1))
929+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
930+ }
931+
932+ let $t02157021631 = {
933+ let $l = xp
934+ let $s = size($l)
935+ let $acc0 = $Tuple2(nil, 0)
936+ func $f0_1 ($a,$i) = if (($i >= $s))
937+ then $a
938+ else makeNewBalances($a, $l[$i])
939+
940+ func $f0_2 ($a,$i) = if (($i >= $s))
941+ then $a
942+ else throw("List size exceeds 15")
943+
944+ $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)
945+ }
946+ let newBalances = $t02157021631._1
947+ let i = $t02157021631._2
948+ if (checkDAppThreshold(newBalances))
949+ then throw()
950+ else {
951+ let s = stake(payment.amount, getStrAssetId(payment.assetId))
952+ if ((s == s))
953+ then {
954+ let us = unstake((dy + governanceFees), tokenOut)
955+ if ((us == us))
956+ then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), ((xp[toIndex] - dy) - governanceFees)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], $Tuple2(dy, tokenOutB58))
957+ else throw("Strict value is not equal to itself.")
958+ }
855959 else throw("Strict value is not equal to itself.")
856960 }
857- else throw("Strict value is not equal to itself.")
858961 }
859962 }
860963 })
861964
862965
863966
864967 @Callable(msg)
865968 func withdraw (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
866969 then throw("size(payments) != 1")
867970 else {
868971 let suspicious = checkSuspicious()
869972 if (suspicious._1)
870973 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
871974 else {
872975 let payment = msg.payments[0]
873976 let tokenIn = payment.assetId
874977 if ((tokenIn != shareAssetId))
875978 then throw("unknown token")
876979 else {
877980 let _amount = payment.amount
878981 let total_supply = shareSupply
879982 let unlock = if ((unlockAmount > 0))
880- then invoke(farmingAddress, "withdrawShareTokens", [toString(msg.caller), unlockAmount], nil)
983+ then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
881984 else 0
882985 if ((unlock == unlock))
883986 then {
884987 let withdrawAmount = (_amount + unlockAmount)
885988 func calcScriptActions (acc,balance) = {
886- let $t02141521443 = acc
887- let scriptActions = $t02141521443._1
888- let i = $t02141521443._2
989+ let $t02296522993 = acc
990+ let scriptActions = $t02296522993._1
991+ let i = $t02296522993._2
889992 let wAmount = fraction(balance, withdrawAmount, total_supply)
890993 if (assert((wAmount >= minAmounts[i])))
891994 then throw("Withdrawal resulted in fewer coins than expected")
892995 else {
893996 let us = unstake(wAmount, assetIds[i])
894997 if ((us == us))
895998 then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.caller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
896999 else throw("Strict value is not equal to itself.")
8971000 }
8981001 }
8991002
900- let $t02193322001 = {
1003+ let $t02348323551 = {
9011004 let $l = _xp()
9021005 let $s = size($l)
9031006 let $acc0 = $Tuple2(nil, 0)
9041007 func $f0_1 ($a,$i) = if (($i >= $s))
9051008 then $a
9061009 else calcScriptActions($a, $l[$i])
9071010
9081011 func $f0_2 ($a,$i) = if (($i >= $s))
9091012 then $a
9101013 else throw("List size exceeds 15")
9111014
9121015 $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)
9131016 }
914- let scriptActions = $t02193322001._1
915- let i = $t02193322001._2
1017+ let scriptActions = $t02348323551._1
1018+ let i = $t02348323551._2
9161019 (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))])
9171020 }
9181021 else throw("Strict value is not equal to itself.")
9191022 }
9201023 }
9211024 })
9221025
9231026
9241027
9251028 @Callable(msg)
926-func calcWithdrawOneCoin (_tokenAmount,i) = $Tuple2(nil, _calcWithdrawOneCoin(_xp(), _tokenAmount, i, msg.caller)._1)
1029+func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = {
1030+ let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1031+ $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1)
1032+ }
9271033
9281034
9291035
9301036 @Callable(msg)
9311037 func withdrawOneCoin (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
9321038 then throw("size(payments) != 1")
9331039 else {
9341040 let suspicious = checkSuspicious()
9351041 if (suspicious._1)
9361042 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
9371043 else {
9381044 let payment = msg.payments[0]
9391045 let tokenIn = payment.assetId
9401046 if ((tokenIn != shareAssetId))
9411047 then throw("unknown token")
9421048 else {
943- let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1049+ let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
9441050 let _tokenAmount = payment.amount
9451051 let unlock = if ((unlockAmount > 0))
946- then invoke(farmingAddress, "withdrawShareTokens", [toString(msg.caller), unlockAmount], nil)
1052+ then invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil)
9471053 else 0
9481054 if ((unlock == unlock))
9491055 then {
9501056 let withdrawAmount = (_tokenAmount + unlockAmount)
9511057 let xp = _xp()
952- let $t02310823182 = _calcWithdrawOneCoin(xp, withdrawAmount, i, msg.caller)
953- let dy = $t02310823182._1
954- let dy_fee = $t02310823182._2
1058+ let $t02478224863 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.caller)
1059+ let dy = $t02478224863._1
1060+ let dy_fee = $t02478224863._2
9551061 if (assert((dy >= minAmount)))
9561062 then throw("Not enough coins removed")
9571063 else {
9581064 let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
959- let dy_and_fee = (dy + dy_fee)
960- let us = unstake(dy_and_fee, tokenOut)
961- if ((us == us))
962- 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))]
963- else throw("Strict value is not equal to itself.")
1065+ let dy_and_fee = (dy + governanceFees)
1066+ func makeNewBalances (acc,tokenBalance) = {
1067+ let $t02512925155 = acc
1068+ let newBalances = $t02512925155._1
1069+ let i = $t02512925155._2
1070+ if ((i == outIndex))
1071+ then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1072+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1073+ }
1074+
1075+ let $t02532225383 = {
1076+ let $l = xp
1077+ let $s = size($l)
1078+ let $acc0 = $Tuple2(nil, 0)
1079+ func $f0_1 ($a,$i) = if (($i >= $s))
1080+ then $a
1081+ else makeNewBalances($a, $l[$i])
1082+
1083+ func $f0_2 ($a,$i) = if (($i >= $s))
1084+ then $a
1085+ else throw("List size exceeds 15")
1086+
1087+ $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)
1088+ }
1089+ let newBalances = $t02532225383._1
1090+ let i = $t02532225383._2
1091+ if (checkDAppThreshold(newBalances))
1092+ then throw()
1093+ else {
1094+ let us = unstake(dy_and_fee, tokenOut)
1095+ if ((us == us))
1096+ then [ScriptTransfer(msg.caller, dy, fromBase58String(tokenOut)), IntegerEntry((assetIds[i] + kAssetBalance), (xp[i] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(tokenOut)), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]
1097+ else throw("Strict value is not equal to itself.")
1098+ }
9641099 }
9651100 }
9661101 else throw("Strict value is not equal to itself.")
9671102 }
9681103 }
9691104 })
9701105
9711106
9721107
9731108 @Callable(msg)
9741109 func A () = $Tuple2(nil, _A())
9751110
9761111
9771112
9781113 @Callable(msg)
9791114 func getVirtualPrice () = {
9801115 let D = get_D(_xp(), _A())
9811116 $Tuple2(nil, fraction(D, PRECISION, shareSupply))
9821117 }
9831118
9841119
9851120
9861121 @Callable(msg)
9871122 func calcTokenAmount (amounts,deposit) = {
9881123 let amp = _A()
9891124 let balances = _xp()
9901125 let D0 = getDMem(balances, amp)
9911126 func calcNewBalances (acc,balance) = {
992- let $t02426124287 = acc
993- let newBalances = $t02426124287._1
994- let i = $t02426124287._2
1127+ let $t02624626272 = acc
1128+ let newBalances = $t02624626272._1
1129+ let i = $t02624626272._2
9951130 let newBalance = (balance + (if (deposit)
9961131 then amounts[i]
9971132 else -(amounts[i])))
9981133 $Tuple2((newBalances :+ newBalance), (i + 1))
9991134 }
10001135
10011136 let newBalances = ( let $l = balances
10021137 let $s = size($l)
10031138 let $acc0 = $Tuple2(nil, 0)
10041139 func $f0_1 ($a,$i) = if (($i >= $s))
10051140 then $a
10061141 else calcNewBalances($a, $l[$i])
10071142
10081143 func $f0_2 ($a,$i) = if (($i >= $s))
10091144 then $a
10101145 else throw("List size exceeds 15")
10111146
10121147 $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
10131148 let D1 = getDMem(newBalances, amp)
10141149 let diff = if (deposit)
10151150 then (D1 - D0)
10161151 else (D0 - D1)
10171152 $Tuple2(nil, fraction(diff, shareSupply, D0))
10181153 }
10191154
10201155
10211156
10221157 @Callable(msg)
10231158 func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME))))
10241159 then throw("too often")
10251160 else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME))))
10261161 then throw("insufficient time")
10271162 else {
10281163 let _initial_A = _A()
10291164 if (assert(if ((_futureA > 0))
10301165 then (MAX_A > _futureA)
10311166 else false))
10321167 then throw("out of base range")
10331168 else if (assert(if (if ((_futureA >= _initial_A))
10341169 then ((_initial_A * MAX_A_CHANGE) >= _futureA)
10351170 else false)
10361171 then true
10371172 else if ((_initial_A > _futureA))
10381173 then ((_futureA * MAX_A_CHANGE) >= _initial_A)
10391174 else false))
10401175 then throw("out of range")
10411176 else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)]
10421177 }))
10431178
10441179
10451180
10461181 @Callable(msg)
10471182 func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), {
10481183 let currentA = _A()
10491184 [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)]
10501185 }))
10511186
10521187
10531188
10541189 @Callable(msg)
10551190 func shutdown () = valueOrElse(isAdminCall(msg), if (!(active))
10561191 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
10571192 else suspend("Paused by admin"))
10581193
10591194
10601195
10611196 @Callable(msg)
10621197 func activate () = valueOrElse(isAdminCall(msg), if (active)
10631198 then throwIsActive()
10641199 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
10651200
10661201
10671202
10681203 @Callable(msg)
10691204 func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), [IntegerEntry(kShareLimit, shareLimit)]))
10701205
10711206
10721207 @Verifier(tx)
10731208 func verify () = {
10741209 let multiSignedByAdmins = {
10751210 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
10761211 then 1
10771212 else 0
10781213 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
10791214 then 1
10801215 else 0
10811216 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
10821217 then 1
10831218 else 0
10841219 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
10851220 }
10861221 match tx {
10871222 case inv: InvokeScriptTransaction =>
10881223 let callTakeIntoAccount = if ((inv.dApp == this))
10891224 then (inv.function == "takeIntoAccountExtraFunds")
10901225 else false
10911226 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
10921227 then true
10931228 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
10941229 then true
10951230 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
10961231 then true
10971232 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
10981233 if (if (callTakeIntoAccount)
10991234 then signedByAdmin
11001235 else false)
11011236 then true
11021237 else multiSignedByAdmins
11031238 case _ =>
11041239 multiSignedByAdmins
11051240 }
11061241 }
11071242

github/deemru/w8io/026f985 
158.84 ms