tx · 45hJedv3552NyZDqW11cbB7HkKbTgt8t2wQFCcLsa2p6

3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS:  -0.34000000 Waves

2022.11.16 22:01 [2320071] smart account 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS > SELF 0.00000000 Waves

{ "type": 13, "id": "45hJedv3552NyZDqW11cbB7HkKbTgt8t2wQFCcLsa2p6", "fee": 34000000, "feeAssetId": null, "timestamp": 1668625268454, "version": 2, "chainId": 84, "sender": "3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS", "senderPublicKey": "C7xgcYqQ8qV8rmvzAjhQWq4cz82F6VJfXMNygvrTXsfW", "proofs": [ "32xCKJKEqi9mmSUpxybJTvZ5EcH6rJj2KD93XDctzHMqonsd9pSUUonMgDdcALBKXfkzm6Fhw5vrCkKMN8W4k2YG", "4VTHu7dDz3ZTj9YbhxW1BuQagke9jBNPeLdTW6A6URmoytsdFMPcTZaMtiA6zJxuNqSNEbKnGJVyczP8WC1Hrbnf" ], "script": "base64:BgJmCAISBAoCEQESBQoDCAEBEgUKAwEEARIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIAXAAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADWtTaGFyZUFzc2V0SWQCDnNoYXJlX2Fzc2V0X2lkABFrU2hhcmVBc3NldFN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hZG1pblB1YktleUludm9rZQMDBRNjYWxsVGFrZUludG9BY2NvdW50BQ1zaWduZWRCeUFkbWluBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnO40wRv", "height": 2320071, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FQJkm5Aogrt7psbfx8LYFeSGcqsZKB9cxWY9bE2JPVe8 Next: 9aXugkWGEkPRK6SpH4LTpcAECJJSqBsJv4o6724riXSt Diff:
OldNewDifferences
9191
9292 let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress))
9393
94-let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
94+let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
9595
9696 let stakingAssets = [toBase58String(USDN)]
9797
686686 }
687687
688688
689+func calcWithdraw (msg,minAmounts,unlockAmount) = {
690+ let suspicious = checkSuspicious()
691+ if (suspicious._1)
692+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
693+ else {
694+ let pmtAmount = if ((size(msg.payments) > 0))
695+ then if ((size(msg.payments) != 1))
696+ then throw("size(payments) != 1")
697+ else {
698+ let pmtAssetId = msg.payments[0].assetId
699+ if ((shareAssetId != pmtAssetId))
700+ then throw("unknown payment token")
701+ else msg.payments[0].amount
702+ }
703+ else 0
704+ let withdrawAmount = (pmtAmount + unlockAmount)
705+ func calcScriptActions (acc,balance) = {
706+ let $t01467814706 = acc
707+ let scriptActions = $t01467814706._1
708+ let i = $t01467814706._2
709+ let wAmount = fraction(balance, withdrawAmount, shareSupply)
710+ if (assert((wAmount >= minAmounts[i])))
711+ then throw("Withdrawal resulted in fewer coins than expected")
712+ else {
713+ let us = unstake(wAmount, assetIds[i])
714+ if ((us == us))
715+ then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.caller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
716+ else throw("Strict value is not equal to itself.")
717+ }
718+ }
719+
720+ let $t01519515263 = {
721+ let $l = _xp()
722+ let $s = size($l)
723+ let $acc0 = $Tuple2(nil, 0)
724+ func $f0_1 ($a,$i) = if (($i >= $s))
725+ then $a
726+ else calcScriptActions($a, $l[$i])
727+
728+ func $f0_2 ($a,$i) = if (($i >= $s))
729+ then $a
730+ else throw("List size exceeds 10")
731+
732+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
733+ }
734+ let scriptActions = $t01519515263._1
735+ let i = $t01519515263._2
736+ (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))])
737+ }
738+ }
739+
740+
741+func calcWithdrawOneCoinEntries (msg,tokenOut,minAmount,unlockAmount) = if ((size(msg.payments) != 1))
742+ then throw("size(payments) != 1")
743+ else {
744+ let suspicious = checkSuspicious()
745+ if (suspicious._1)
746+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
747+ else {
748+ let pmtAmount = if ((size(msg.payments) > 0))
749+ then if ((size(msg.payments) != 1))
750+ then throw("size(payments) != 1")
751+ else {
752+ let pmtAssetId = msg.payments[0].assetId
753+ if ((shareAssetId != pmtAssetId))
754+ then throw("unknown payment token")
755+ else msg.payments[0].amount
756+ }
757+ else 0
758+ let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
759+ let tokenOutB58 = fromBase58String(tokenOut)
760+ let withdrawAmount = (pmtAmount + unlockAmount)
761+ let xp = _xp()
762+ let $t01627116358 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.originCaller)
763+ let dy = $t01627116358._1
764+ let dy_fee = $t01627116358._2
765+ if (assert((dy >= minAmount)))
766+ then throw("Not enough coins removed")
767+ else {
768+ let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
769+ let dy_and_fee = (dy + dy_fee)
770+ func makeNewBalances (acc,tokenBalance) = {
771+ let $t01661616642 = acc
772+ let newBalances = $t01661616642._1
773+ let i = $t01661616642._2
774+ if ((i == outIndex))
775+ then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
776+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
777+ }
778+
779+ let $t01680916870 = {
780+ let $l = xp
781+ let $s = size($l)
782+ let $acc0 = $Tuple2(nil, 0)
783+ func $f0_1 ($a,$i) = if (($i >= $s))
784+ then $a
785+ else makeNewBalances($a, $l[$i])
786+
787+ func $f0_2 ($a,$i) = if (($i >= $s))
788+ then $a
789+ else throw("List size exceeds 10")
790+
791+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
792+ }
793+ let newBalances = $t01680916870._1
794+ let v = $t01680916870._2
795+ if (checkDAppThreshold(newBalances))
796+ then throw()
797+ else {
798+ let us = unstake(dy_and_fee, tokenOut)
799+ if ((us == us))
800+ then {
801+ let lpFees = (dy_fee - governanceFees)
802+ let airdrop = if ((lpFees > 0))
803+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
804+ else 0
805+ if ((airdrop == airdrop))
806+ then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]
807+ else throw("Strict value is not equal to itself.")
808+ }
809+ else throw("Strict value is not equal to itself.")
810+ }
811+ }
812+ }
813+ }
814+
815+
689816 @Callable(msg)
690817 func D (xp,amp) = {
691818 let D = get_D_internal(xp, amp)
720847 let D0 = if ((shareSupply == 0))
721848 then 0
722849 else getDMem(xp, amp)
723- let $t01547015724 = if (if ((lockType > 0))
850+ let $t01901019264 = if (if ((lockType > 0))
724851 then (msg.payments[(size(msg.payments) - 1)].assetId == unit)
725852 else false)
726853 then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]])
727854 else $Tuple2(msg.payments, nil)
728- let payments = $t01547015724._1
729- let lockFee = $t01547015724._2
855+ let payments = $t01901019264._1
856+ let lockFee = $t01901019264._2
730857 let paymentsSize = size(payments)
731858 func validPayments (n) = if ((paymentsSize > nCoins))
732859 then throw(("payments size > " + toString(nCoins)))
763890 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments))
764891 else {
765892 func parsePayments (acc,assetId) = {
766- let $t01659416620 = acc
767- let newBalances = $t01659416620._1
768- let i = $t01659416620._2
893+ let $t02013420160 = acc
894+ let newBalances = $t02013420160._1
895+ let i = $t02013420160._2
769896 func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId))
770897 then (newBalance + payment.amount)
771898 else newBalance
787914 $Tuple2((newBalances :+ newBalace), (i + 1))
788915 }
789916
790- let $t01697017037 = {
917+ let $t02051020577 = {
791918 let $l = assetIds
792919 let $s = size($l)
793920 let $acc0 = $Tuple2(nil, 0)
801928
802929 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
803930 }
804- let newBalances = $t01697017037._1
805- let k = $t01697017037._2
931+ let newBalances = $t02051020577._1
932+ let k = $t02051020577._2
806933 if (checkDAppThreshold(newBalances))
807934 then throw()
808935 else {
812939 else {
813940 let feeDiscount = calculateFeeDiscount(msg.caller)
814941 func calcScriptActions (acc,newBalance) = {
815- let $t01735717398 = acc
816- let invBalances = $t01735717398._1
817- let scriptActions = $t01735717398._2
818- let i = $t01735717398._3
942+ let $t02089720938 = acc
943+ let invBalances = $t02089720938._1
944+ let scriptActions = $t02089720938._2
945+ let i = $t02089720938._3
819946 if ((shareSupply > 0))
820947 then {
821948 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
853980 }
854981 }
855982
856- let $t01910319191 = {
983+ let $t02264322731 = {
857984 let $l = newBalances
858985 let $s = size($l)
859986 let $acc0 = $Tuple3(nil, nil, 0)
867994
868995 $f1_2($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)
869996 }
870- let invBalances = $t01910319191._1
871- let scriptActions = $t01910319191._2
997+ let invBalances = $t02264322731._1
998+ let scriptActions = $t02264322731._2
872999 let D2 = getDMem(invBalances, amp)
8731000 let mint_amount = if ((shareSupply == 0))
8741001 then D1
9071034 let D0 = getDMem(xp, amp)
9081035 let feeDiscount = calculateFeeDiscount(user)
9091036 func calcInvBalances (acc,newBalance) = {
910- let $t02046720493 = acc
911- let invBalances = $t02046720493._1
912- let i = $t02046720493._2
1037+ let $t02400724033 = acc
1038+ let invBalances = $t02400724033._1
1039+ let i = $t02400724033._2
9131040 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
9141041 let fees = {
9151042 let idealBalance = fraction(D1, xp[i], D0)
9221049 $Tuple2((invBalances :+ invariantBalance), (i + 1))
9231050 }
9241051
925- let $t02109521165 = {
1052+ let $t02463524705 = {
9261053 let $l = newBalances
9271054 let $s = size($l)
9281055 let $acc0 = $Tuple2(nil, 0)
9361063
9371064 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
9381065 }
939- let invBalances = $t02109521165._1
940- let k = $t02109521165._2
1066+ let invBalances = $t02463524705._1
1067+ let k = $t02463524705._2
9411068 let D2 = getDMem(invBalances, amp)
9421069 let mintAmount = fraction(shareSupply, (D2 - D0), D0)
9431070 $Tuple2(nil, mintAmount)
9921119 then throw("Exchange resulted in fewer coins than expected")
9931120 else {
9941121 func makeNewBalances (acc,tokenBalance) = {
995- let $t02320623232 = acc
996- let newBalances = $t02320623232._1
997- let i = $t02320623232._2
1122+ let $t02674626772 = acc
1123+ let newBalances = $t02674626772._1
1124+ let i = $t02674626772._2
9981125 if ((i == fromIndex))
9991126 then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
10001127 else if ((i == toIndex))
10021129 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
10031130 }
10041131
1005- let $t02348323544 = {
1132+ let $t02702327084 = {
10061133 let $l = xp
10071134 let $s = size($l)
10081135 let $acc0 = $Tuple2(nil, 0)
10161143
10171144 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
10181145 }
1019- let newBalances = $t02348323544._1
1020- let i = $t02348323544._2
1146+ let newBalances = $t02702327084._1
1147+ let i = $t02702327084._2
10211148 if (checkDAppThreshold(newBalances))
10221149 then throw()
10231150 else {
10461173
10471174
10481175 @Callable(msg)
1049-func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
1050- then throw("size(payments) != 1")
1051- else {
1052- let pmtAmount = msg.payments[0].amount
1053- let pmtAssetId = msg.payments[0].assetId
1054- if ((shareAssetId != pmtAssetId))
1055- then throw("unknown payment token")
1056- else {
1057- let suspicious = checkSuspicious()
1058- if (suspicious._1)
1059- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
1060- else {
1061- func calcScriptActions (acc,balance) = {
1062- let $t02483524863 = acc
1063- let scriptActions = $t02483524863._1
1064- let i = $t02483524863._2
1065- let wAmount = fraction(balance, pmtAmount, shareSupply)
1066- if (assert((wAmount >= minAmounts[i])))
1067- then throw("Withdrawal resulted in fewer coins than expected")
1068- else {
1069- let us = unstake(wAmount, assetIds[i])
1070- if ((us == us))
1071- then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
1072- else throw("Strict value is not equal to itself.")
1073- }
1074- }
1075-
1076- let $t02535325421 = {
1077- let $l = _xp()
1078- let $s = size($l)
1079- let $acc0 = $Tuple2(nil, 0)
1080- func $f0_1 ($a,$i) = if (($i >= $s))
1081- then $a
1082- else calcScriptActions($a, $l[$i])
1083-
1084- func $f0_2 ($a,$i) = if (($i >= $s))
1085- then $a
1086- else throw("List size exceeds 10")
1087-
1088- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
1089- }
1090- let scriptActions = $t02535325421._1
1091- let i = $t02535325421._2
1092- (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))])
1093- }
1094- }
1095- })
1176+func withdraw (minAmounts) = valueOrElse(isActive(), calcWithdraw(msg, minAmounts, 0))
10961177
10971178
10981179
11001181 func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
11011182 then throw("Unlock amount must be positive")
11021183 else {
1103- let suspicious = checkSuspicious()
1104- if (suspicious._1)
1105- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
1106- else {
1107- let pmtAmount = if ((size(msg.payments) > 0))
1108- then if ((size(msg.payments) != 1))
1109- then throw("size(payments) != 1")
1110- else {
1111- let pmtAssetId = msg.payments[0].assetId
1112- if ((shareAssetId != pmtAssetId))
1113- then throw("unknown payment token")
1114- else msg.payments[0].amount
1115- }
1116- else 0
1117- let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1118- if ((unlock == unlock))
1119- then {
1120- let withdrawAmount = (pmtAmount + unlockAmount)
1121- let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)])
1122- if ((inv == inv))
1123- then nil
1124- else throw("Strict value is not equal to itself.")
1125- }
1126- else throw("Strict value is not equal to itself.")
1127- }
1184+ let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1185+ if ((unlock == unlock))
1186+ then calcWithdraw(msg, minAmounts, unlockAmount)
1187+ else throw("Strict value is not equal to itself.")
11281188 })
11291189
11301190
11401200
11411201
11421202 @Callable(msg)
1143-func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
1144- then throw("size(payments) != 1")
1145- else {
1146- let suspicious = checkSuspicious()
1147- if (suspicious._1)
1148- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
1149- else {
1150- let pmtAmount = msg.payments[0].amount
1151- let pmtAssetId = msg.payments[0].assetId
1152- if ((pmtAssetId != shareAssetId))
1153- then throw("unknown token")
1154- else {
1155- let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1156- let tokenOutB58 = fromBase58String(tokenOut)
1157- let xp = _xp()
1158- let $t02747927561 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1159- let dy = $t02747927561._1
1160- let dy_fee = $t02747927561._2
1161- if (assert((dy >= minAmount)))
1162- then throw("Not enough coins removed")
1163- else {
1164- let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
1165- let dy_and_fee = (dy + dy_fee)
1166- func makeNewBalances (acc,tokenBalance) = {
1167- let $t02781927845 = acc
1168- let newBalances = $t02781927845._1
1169- let i = $t02781927845._2
1170- if ((i == outIndex))
1171- then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1172- else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1173- }
1174-
1175- let $t02801228073 = {
1176- let $l = xp
1177- let $s = size($l)
1178- let $acc0 = $Tuple2(nil, 0)
1179- func $f0_1 ($a,$i) = if (($i >= $s))
1180- then $a
1181- else makeNewBalances($a, $l[$i])
1182-
1183- func $f0_2 ($a,$i) = if (($i >= $s))
1184- then $a
1185- else throw("List size exceeds 10")
1186-
1187- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
1188- }
1189- let newBalances = $t02801228073._1
1190- let v = $t02801228073._2
1191- if (checkDAppThreshold(newBalances))
1192- then throw()
1193- else {
1194- let us = unstake(dy_and_fee, tokenOut)
1195- if ((us == us))
1196- then {
1197- let lpFees = (dy_fee - governanceFees)
1198- let airdrop = if ((lpFees > 0))
1199- then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
1200- else 0
1201- if ((airdrop == airdrop))
1202- then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]
1203- else throw("Strict value is not equal to itself.")
1204- }
1205- else throw("Strict value is not equal to itself.")
1206- }
1207- }
1208- }
1209- }
1210- })
1203+func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), calcWithdrawOneCoinEntries(msg, tokenOut, minAmount, 0))
12111204
12121205
12131206
12151208 func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
12161209 then throw("Unlock amount must be positive")
12171210 else {
1218- let suspicious = checkSuspicious()
1219- if (suspicious._1)
1220- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
1221- else {
1222- let pmtAmount = if ((size(msg.payments) > 0))
1223- then if ((size(msg.payments) != 1))
1224- then throw("size(payments) != 1")
1225- else {
1226- let pmtAssetId = msg.payments[0].assetId
1227- if ((shareAssetId != pmtAssetId))
1228- then throw("unknown payment token")
1229- else msg.payments[0].amount
1230- }
1231- else 0
1232- let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1233- if ((unlock == unlock))
1234- then {
1235- let withdrawAmount = (pmtAmount + unlockAmount)
1236- let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)])
1237- if ((inv == inv))
1238- then nil
1239- else throw("Strict value is not equal to itself.")
1240- }
1241- else throw("Strict value is not equal to itself.")
1242- }
1211+ let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1212+ if ((unlock == unlock))
1213+ then calcWithdrawOneCoinEntries(msg, tokenOut, minAmount, unlockAmount)
1214+ else throw("Strict value is not equal to itself.")
12431215 })
12441216
12451217
12631235 let balances = _xp()
12641236 let D0 = getDMem(balances, amp)
12651237 func calcNewBalances (acc,balance) = {
1266- let $t03011630142 = acc
1267- let newBalances = $t03011630142._1
1268- let i = $t03011630142._2
1238+ let $t02959129617 = acc
1239+ let newBalances = $t02959129617._1
1240+ let i = $t02959129617._2
12691241 let newBalance = (balance + (if (deposit)
12701242 then amounts[i]
12711243 else -(amounts[i])))
13451317 else {
13461318 let balances = _xp()
13471319 func takeExtraFunds (acc,assetId) = {
1348- let $t03248432502 = acc
1349- let sum = $t03248432502._1
1350- let i = $t03248432502._2
1320+ let $t03195931977 = acc
1321+ let sum = $t03195931977._1
1322+ let i = $t03195931977._2
13511323 let tokenB58 = fromBase58String(assetId)
13521324 let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58))
13531325 let enrollAmount = (rBalance - balances[i])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PRECISION = 1000000
55
66 let MAX_A = 1000000
77
88 let MAX_A_CHANGE = 10
99
1010 let DECIMALS = 6
1111
1212 let MIN_RAMP_TIME = (86400 / 60)
1313
1414 let version = "3.0.0"
1515
1616 let kVersion = "version"
1717
1818 let kAssets = "asset_ids"
1919
2020 let kAssetBalance = "_balance"
2121
2222 let kActive = "active"
2323
2424 let kActiveGlob = "active_all_contracts"
2525
2626 let kCause = "shutdown_cause"
2727
2828 let kShareAssetId = "share_asset_id"
2929
3030 let kShareAssetSupply = "share_asset_supply"
3131
3232 let kFee = "commission"
3333
3434 let kDAppThresholdCoef = "dAppThresholdCoef"
3535
3636 let kUSDNAddress = "staking_usdnnsbt_address"
3737
3838 let kDiscounts = "discounts"
3939
4040 let kDiscountValues = "discount_values"
4141
4242 let kUserSwopInGov = "_SWOP_amount"
4343
4444 let kUserGSwopInGov = "_GSwop_amount"
4545
4646 let kAdminPubKey1 = "admin_pub_1"
4747
4848 let kAdminPubKey2 = "admin_pub_2"
4949
5050 let kAdminPubKey3 = "admin_pub_3"
5151
5252 let kAdminInvokePubKey = "admin_invoke_pub"
5353
5454 let kMoneyBoxAddress = "money_box_address"
5555
5656 let kGovAddress = "governance_address"
5757
5858 let kVotingAddress = "voting_address"
5959
6060 let kFarmingAddress = "farming_address"
6161
6262 let kLPFarmingAddress = "lp_farming"
6363
6464 let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
6565
6666 func getBase58FromOracle (key) = match getString(oracle, key) {
6767 case string: String =>
6868 fromBase58String(string)
6969 case nothing =>
7070 throw((key + "is empty"))
7171 }
7272
7373
7474 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
7575
7676 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
7777
7878 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
7979
8080 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
8181
8282 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
8383
8484 let govAddress = Address(getBase58FromOracle(kGovAddress))
8585
8686 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
8787
8888 let votingAddress = Address(getBase58FromOracle(kVotingAddress))
8989
9090 let farmingAddress = Address(getBase58FromOracle(kFarmingAddress))
9191
9292 let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress))
9393
94-let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
94+let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
9595
9696 let stakingAssets = [toBase58String(USDN)]
9797
9898 let active = getBooleanValue(this, kActive)
9999
100100 let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
101101
102102 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
103103
104104 let shareSupply = getIntegerValue(this, kShareAssetSupply)
105105
106106 let feeScale6 = 1000000
107107
108108 let fee = getIntegerValue(this, kFee)
109109
110110 let feeGovernance = fraction(40, feeScale6, 100)
111111
112112 let initial_A = getIntegerValue(this, "initial_A")
113113
114114 let future_A = getIntegerValue(this, "future_A")
115115
116116 let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0)
117117
118118 let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0)
119119
120120 let assetIds = split(getStringValue(this, kAssets), ",")
121121
122122 let nCoins = size(assetIds)
123123
124124 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
125125
126126
127127 func throwIsActive () = throw("DApp is already active")
128128
129129
130130 func isActive () = if (if (active)
131131 then activeGlob
132132 else false)
133133 then unit
134134 else throw("DApp is inactive at this moment")
135135
136136
137137 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
138138 then unit
139139 else throw("Only admin can call this function")
140140
141141
142142 func isSelfCall (i) = if ((this == i.caller))
143143 then unit
144144 else throw("Only contract itself can call this function")
145145
146146
147147 let big2 = toBigInt(2)
148148
149149 let iter10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
150150
151151 let iter15 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
152152
153153 let iter16 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
154154
155155 let blockTimestamp = height
156156
157157 func assert (a) = if (a)
158158 then false
159159 else true
160160
161161
162162 func calculateFeeDiscount (userAddr) = {
163163 let user = match userAddr {
164164 case u: Address =>
165165 toString(u)
166166 case u: String =>
167167 u
168168 case _ =>
169169 throw("Unknow type of user Addr")
170170 }
171171 let swopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), 0)
172172 let gSwopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), swopAmount)
173173 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
174174 let discounts = split(getStringValue(oracle, kDiscounts), ",")
175175 if (if ((gSwopAmount >= parseIntValue(discountValues[0])))
176176 then (parseIntValue(discountValues[1]) > gSwopAmount)
177177 else false)
178178 then (feeScale6 - parseIntValue(discounts[0]))
179179 else if (if ((gSwopAmount >= parseIntValue(discountValues[1])))
180180 then (parseIntValue(discountValues[2]) > gSwopAmount)
181181 else false)
182182 then (feeScale6 - parseIntValue(discounts[1]))
183183 else if (if ((gSwopAmount >= parseIntValue(discountValues[2])))
184184 then (parseIntValue(discountValues[3]) > gSwopAmount)
185185 else false)
186186 then (feeScale6 - parseIntValue(discounts[2]))
187187 else if (if ((gSwopAmount >= parseIntValue(discountValues[3])))
188188 then (parseIntValue(discountValues[4]) > gSwopAmount)
189189 else false)
190190 then (feeScale6 - parseIntValue(discounts[3]))
191191 else if ((gSwopAmount >= parseIntValue(discountValues[4])))
192192 then (feeScale6 - parseIntValue(discounts[4]))
193193 else feeScale6
194194 }
195195
196196
197197 func _A () = {
198198 let t1 = future_A_time
199199 let A1 = future_A
200200 if ((t1 > blockTimestamp))
201201 then {
202202 let A0 = initial_A
203203 let t0 = initial_A_time
204204 if ((A1 > A0))
205205 then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0)))
206206 else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0)))
207207 }
208208 else A1
209209 }
210210
211211
212212 func _xp () = {
213213 func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0))
214214
215215 let $l = assetIds
216216 let $s = size($l)
217217 let $acc0 = nil
218218 func $f0_1 ($a,$i) = if (($i >= $s))
219219 then $a
220220 else assetBalances($a, $l[$i])
221221
222222 func $f0_2 ($a,$i) = if (($i >= $s))
223223 then $a
224224 else throw("List size exceeds 10")
225225
226226 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
227227 }
228228
229229
230230 func _xp_mem (xp) = xp
231231
232232
233233 func sumList (acc,element) = (acc + element)
234234
235235
236236 func get_D (xp,amp) = {
237237 let @ = invoke(this, "D", [xp, amp], nil)
238238 if ($isInstanceOf(@, "Int"))
239239 then @
240240 else throw(($getType(@) + " couldn't be cast to Int"))
241241 }
242242
243243
244244 func get_D_internal (xp,amp) = {
245245 let S = {
246246 let $l = xp
247247 let $s = size($l)
248248 let $acc0 = 0
249249 func $f0_1 ($a,$i) = if (($i >= $s))
250250 then $a
251251 else sumList($a, $l[$i])
252252
253253 func $f0_2 ($a,$i) = if (($i >= $s))
254254 then $a
255255 else throw("List size exceeds 10")
256256
257257 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
258258 }
259259 if ((S == 0))
260260 then 0
261261 else {
262262 let Ann = (amp * nCoins)
263263 let AnnS = (toBigInt(Ann) * toBigInt(S))
264264 let Ann1 = toBigInt((Ann - 1))
265265 func Dproc (acc,i) = if ((acc._2 == true))
266266 then acc
267267 else {
268268 let Dprev = acc._1
269269 func D_PProc (D_P,i) = if ((nCoins > i))
270270 then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins)))
271271 else D_P
272272
273273 let D_P = {
274274 let $l = iter10
275275 let $s = size($l)
276276 let $acc0 = Dprev
277277 func $f1_1 ($a,$i) = if (($i >= $s))
278278 then $a
279279 else D_PProc($a, $l[$i])
280280
281281 func $f1_2 ($a,$i) = if (($i >= $s))
282282 then $a
283283 else throw("List size exceeds 10")
284284
285285 $f1_2($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)
286286 }
287287 let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P)))
288288 if ((D > Dprev))
289289 then if ((1 >= toInt((D - Dprev))))
290290 then $Tuple2(D, true)
291291 else $Tuple2(D, false)
292292 else if ((1 >= toInt((Dprev - D))))
293293 then $Tuple2(D, true)
294294 else $Tuple2(D, false)
295295 }
296296
297297 let $t065826648 = {
298298 let $l = iter15
299299 let $s = size($l)
300300 let $acc0 = $Tuple2(toBigInt(S), false)
301301 func $f1_1 ($a,$i) = if (($i >= $s))
302302 then $a
303303 else Dproc($a, $l[$i])
304304
305305 func $f1_2 ($a,$i) = if (($i >= $s))
306306 then $a
307307 else throw("List size exceeds 15")
308308
309309 $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)
310310 }
311311 let D = $t065826648._1
312312 let finished = $t065826648._2
313313 if ((finished == false))
314314 then throw(("get_D() not finished with " + toString(D)))
315315 else toInt(D)
316316 }
317317 }
318318
319319
320320 func getDMem (xp,amp) = get_D(_xp_mem(xp), amp)
321321
322322
323323 func getY (in,out,x,xp_) = if (assert((in != out)))
324324 then throw("same coin")
325325 else if (assert(if ((out >= 0))
326326 then (in >= 0)
327327 else false))
328328 then throw("below zero")
329329 else if (assert(if ((nCoins > out))
330330 then (nCoins > in)
331331 else false))
332332 then throw("above N_COINS")
333333 else {
334334 let amp = _A()
335335 let D = get_D(xp_, amp)
336336 let Ann = (amp * nCoins)
337337 func S_c (acc,i) = {
338338 let $t072197236 = acc
339339 let S_ = $t072197236._1
340340 let c = $t072197236._2
341341 let x_ = if ((in == i))
342342 then x
343343 else xp_[i]
344344 if (if ((i != out))
345345 then (nCoins > i)
346346 else false)
347347 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
348348 else $Tuple2(S_, c)
349349 }
350350
351351 let $t074447499 = {
352352 let $l = iter10
353353 let $s = size($l)
354354 let $acc0 = $Tuple2(0, toBigInt(D))
355355 func $f0_1 ($a,$i) = if (($i >= $s))
356356 then $a
357357 else S_c($a, $l[$i])
358358
359359 func $f0_2 ($a,$i) = if (($i >= $s))
360360 then $a
361361 else throw("List size exceeds 10")
362362
363363 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
364364 }
365365 let S_ = $t074447499._1
366366 let c_ = $t074447499._2
367367 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
368368 let bD = toBigInt(((S_ + (D / Ann)) - D))
369369 func y_proc (acc,_i) = if ((acc._2 == true))
370370 then acc
371371 else {
372372 let y_prev = acc._1
373373 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
374374 if ((y > y_prev))
375375 then if ((1 >= toInt((y - y_prev))))
376376 then $Tuple2(y, true)
377377 else $Tuple2(y, false)
378378 else if ((1 >= toInt((y_prev - y))))
379379 then $Tuple2(y, true)
380380 else $Tuple2(y, false)
381381 }
382382
383383 let $t079818048 = {
384384 let $l = iter16
385385 let $s = size($l)
386386 let $acc0 = $Tuple2(toBigInt(D), false)
387387 func $f1_1 ($a,$i) = if (($i >= $s))
388388 then $a
389389 else y_proc($a, $l[$i])
390390
391391 func $f1_2 ($a,$i) = if (($i >= $s))
392392 then $a
393393 else throw("List size exceeds 16")
394394
395395 $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)
396396 }
397397 let y = $t079818048._1
398398 let finished = $t079818048._2
399399 if ((finished == false))
400400 then throw(("getY() not finished with " + toString(y)))
401401 else toInt(y)
402402 }
403403
404404
405405 func get_y_D (A_,in,xp,D) = if (assert((in >= 0)))
406406 then throw("i below zero")
407407 else if (assert((nCoins > in)))
408408 then throw("i above N_COINS")
409409 else {
410410 let Ann = (A_ * nCoins)
411411 func S_c (acc,i) = {
412412 let $t084278444 = acc
413413 let S_ = $t084278444._1
414414 let c = $t084278444._2
415415 let x_ = if (if ((in != i))
416416 then (nCoins > i)
417417 else false)
418418 then xp[i]
419419 else 0
420420 if (if ((nCoins > i))
421421 then (in != i)
422422 else false)
423423 then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins))))
424424 else $Tuple2(S_, c)
425425 }
426426
427427 let $t086648719 = {
428428 let $l = iter10
429429 let $s = size($l)
430430 let $acc0 = $Tuple2(0, toBigInt(D))
431431 func $f0_1 ($a,$i) = if (($i >= $s))
432432 then $a
433433 else S_c($a, $l[$i])
434434
435435 func $f0_2 ($a,$i) = if (($i >= $s))
436436 then $a
437437 else throw("List size exceeds 10")
438438
439439 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
440440 }
441441 let S_ = $t086648719._1
442442 let c_ = $t086648719._2
443443 let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins)))
444444 let bD = toBigInt(((S_ + (D / Ann)) - D))
445445 func y_D_proc (acc,i) = if ((acc._2 == true))
446446 then acc
447447 else {
448448 let y_prev = acc._1
449449 let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD))
450450 if ((y > y_prev))
451451 then if ((1 >= toInt((y - y_prev))))
452452 then $Tuple2(y, true)
453453 else $Tuple2(y, false)
454454 else if ((1 >= toInt((y_prev - y))))
455455 then $Tuple2(y, true)
456456 else $Tuple2(y, false)
457457 }
458458
459459 let $t092029271 = {
460460 let $l = iter16
461461 let $s = size($l)
462462 let $acc0 = $Tuple2(toBigInt(D), false)
463463 func $f1_1 ($a,$i) = if (($i >= $s))
464464 then $a
465465 else y_D_proc($a, $l[$i])
466466
467467 func $f1_2 ($a,$i) = if (($i >= $s))
468468 then $a
469469 else throw("List size exceeds 16")
470470
471471 $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)
472472 }
473473 let y = $t092029271._1
474474 let finished = $t092029271._2
475475 if ((finished == false))
476476 then throw(("get_y_D() not finished with " + toString(y)))
477477 else toInt(y)
478478 }
479479
480480
481481 func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = {
482482 let feeDiscount = calculateFeeDiscount(caller)
483483 let amp = _A()
484484 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
485485 let total_supply = shareSupply
486486 let D0 = get_D(xp, amp)
487487 let D1 = (D0 - fraction(_token_amount, D0, total_supply))
488488 let new_y = get_y_D(amp, i, xp, D1)
489489 let dy_0 = (xp[i] - new_y)
490490 func xp_reduced_proc (acc,xp_j) = {
491491 let $t099129941 = acc
492492 let xp_reduced = $t099129941._1
493493 let index = $t099129941._2
494494 let dx_expected = if ((index == i))
495495 then (fraction(xp_j, D1, D0) - new_y)
496496 else (xp_j - fraction(xp_j, D1, D0))
497497 $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1))
498498 }
499499
500500 let $t01020310267 = {
501501 let $l = xp
502502 let $s = size($l)
503503 let $acc0 = $Tuple2(nil, 0)
504504 func $f0_1 ($a,$i) = if (($i >= $s))
505505 then $a
506506 else xp_reduced_proc($a, $l[$i])
507507
508508 func $f0_2 ($a,$i) = if (($i >= $s))
509509 then $a
510510 else throw("List size exceeds 10")
511511
512512 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
513513 }
514514 let xp_reduced = $t01020310267._1
515515 let index = $t01020310267._2
516516 let xp_reduced_i = xp_reduced[i]
517517 let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1)
518518 $Tuple2(dy, (dy_0 - dy))
519519 }
520520
521521
522522 func getStrAssetId (assetId) = match assetId {
523523 case id: ByteVector =>
524524 toBase58String(id)
525525 case waves: Unit =>
526526 "WAVES"
527527 case _ =>
528528 throw("Match error")
529529 }
530530
531531
532532 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
533533 then $Tuple2("lockNeutrino", stakingUSDNAddress)
534534 else $Tuple2("unlockNeutrino", stakingUSDNAddress)
535535
536536
537537 func calcStakingParams (stake,amount,assetId) = if (stake)
538538 then {
539539 let $t01083110897 = calcStakingFuncAndAddres(stake, assetId)
540540 let call = $t01083110897._1
541541 let stakingAddr = $t01083110897._2
542542 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
543543 }
544544 else {
545545 let $t01098311049 = calcStakingFuncAndAddres(stake, assetId)
546546 let call = $t01098311049._1
547547 let stakingAddr = $t01098311049._2
548548 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
549549 }
550550
551551
552552 func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
553553 then {
554554 let $t01123611338 = calcStakingParams(true, amount, fromBase58String(assetIdString))
555555 let call = $t01123611338._1
556556 let addr = $t01123611338._2
557557 let params = $t01123611338._3
558558 let payments = $t01123611338._4
559559 invoke(addr, call, params, payments)
560560 }
561561 else 0
562562
563563
564564 func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString))
565565 then {
566566 let $t01152311626 = calcStakingParams(false, amount, fromBase58String(assetIdString))
567567 let call = $t01152311626._1
568568 let addr = $t01152311626._2
569569 let params = $t01152311626._3
570570 let payments = $t01152311626._4
571571 invoke(addr, call, params, payments)
572572 }
573573 else 0
574574
575575
576576 func stakedAmount (assetId) = {
577577 let stakedAmountCalculated = match assetId {
578578 case aId: ByteVector =>
579579 if ((aId == USDN))
580580 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
581581 else 0
582582 case _: Unit =>
583583 0
584584 case _ =>
585585 throw("Match error")
586586 }
587587 match stakedAmountCalculated {
588588 case i: Int =>
589589 i
590590 case _ =>
591591 0
592592 }
593593 }
594594
595595
596596 func checkSuspicious () = {
597597 let contractBalances = _xp()
598598 func checkBalance (acc,assetId) = {
599599 let $t01223712262 = acc
600600 let suspicious = $t01223712262._1
601601 let i = $t01223712262._2
602602 if (suspicious)
603603 then $Tuple2(suspicious, i)
604604 else {
605605 let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId)))
606606 if ((contractBalances[i] > aBalance))
607607 then $Tuple2(true, i)
608608 else $Tuple2(false, (i + 1))
609609 }
610610 }
611611
612612 let $l = assetIds
613613 let $s = size($l)
614614 let $acc0 = $Tuple2(false, 0)
615615 func $f0_1 ($a,$i) = if (($i >= $s))
616616 then $a
617617 else checkBalance($a, $l[$i])
618618
619619 func $f0_2 ($a,$i) = if (($i >= $s))
620620 then $a
621621 else throw("List size exceeds 10")
622622
623623 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
624624 }
625625
626626
627627 func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i]))
628628
629629
630630 func returnPayments (caller,payments) = {
631631 func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId))
632632
633633 let $l = payments
634634 let $s = size($l)
635635 let $acc0 = nil
636636 func $f0_1 ($a,$i) = if (($i >= $s))
637637 then $a
638638 else parsePayments($a, $l[$i])
639639
640640 func $f0_2 ($a,$i) = if (($i >= $s))
641641 then $a
642642 else throw("List size exceeds 10")
643643
644644 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
645645 }
646646
647647
648648 func checkDAppThreshold (newBalances) = {
649649 let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key")
650650 let thresholdScale = 10000
651651 let maxBalance = max(newBalances)
652652 let minBalance = min(newBalances)
653653 let ratio = fraction(maxBalance, thresholdScale, minBalance)
654654 if ((ratio > (dAppThresholdCoef * thresholdScale)))
655655 then throw("New balance in assets of the DApp is less than threshold")
656656 else false
657657 }
658658
659659
660660 func checkCoins (assetIds) = {
661661 let coins = split(assetIds, ",")
662662 if ((size(coins) > 10))
663663 then throw("To many coins, max coins size 10")
664664 else {
665665 func checkCoin (error,assetId) = {
666666 let asset = valueOrErrorMessage(fromBase58String(assetId), ("fromBase58String: " + assetId))
667667 let decimals = valueOrErrorMessage(assetInfo(asset), ("assetInfo: " + assetId)).decimals
668668 if ((decimals != DECIMALS))
669669 then throw("wrong decimals")
670670 else false
671671 }
672672
673673 let $l = coins
674674 let $s = size($l)
675675 let $acc0 = false
676676 func $f0_1 ($a,$i) = if (($i >= $s))
677677 then $a
678678 else checkCoin($a, $l[$i])
679679
680680 func $f0_2 ($a,$i) = if (($i >= $s))
681681 then $a
682682 else throw("List size exceeds 10")
683683
684684 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
685685 }
686686 }
687687
688688
689+func calcWithdraw (msg,minAmounts,unlockAmount) = {
690+ let suspicious = checkSuspicious()
691+ if (suspicious._1)
692+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
693+ else {
694+ let pmtAmount = if ((size(msg.payments) > 0))
695+ then if ((size(msg.payments) != 1))
696+ then throw("size(payments) != 1")
697+ else {
698+ let pmtAssetId = msg.payments[0].assetId
699+ if ((shareAssetId != pmtAssetId))
700+ then throw("unknown payment token")
701+ else msg.payments[0].amount
702+ }
703+ else 0
704+ let withdrawAmount = (pmtAmount + unlockAmount)
705+ func calcScriptActions (acc,balance) = {
706+ let $t01467814706 = acc
707+ let scriptActions = $t01467814706._1
708+ let i = $t01467814706._2
709+ let wAmount = fraction(balance, withdrawAmount, shareSupply)
710+ if (assert((wAmount >= minAmounts[i])))
711+ then throw("Withdrawal resulted in fewer coins than expected")
712+ else {
713+ let us = unstake(wAmount, assetIds[i])
714+ if ((us == us))
715+ then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.caller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
716+ else throw("Strict value is not equal to itself.")
717+ }
718+ }
719+
720+ let $t01519515263 = {
721+ let $l = _xp()
722+ let $s = size($l)
723+ let $acc0 = $Tuple2(nil, 0)
724+ func $f0_1 ($a,$i) = if (($i >= $s))
725+ then $a
726+ else calcScriptActions($a, $l[$i])
727+
728+ func $f0_2 ($a,$i) = if (($i >= $s))
729+ then $a
730+ else throw("List size exceeds 10")
731+
732+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
733+ }
734+ let scriptActions = $t01519515263._1
735+ let i = $t01519515263._2
736+ (scriptActions ++ [Burn(shareAssetId, withdrawAmount), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))])
737+ }
738+ }
739+
740+
741+func calcWithdrawOneCoinEntries (msg,tokenOut,minAmount,unlockAmount) = if ((size(msg.payments) != 1))
742+ then throw("size(payments) != 1")
743+ else {
744+ let suspicious = checkSuspicious()
745+ if (suspicious._1)
746+ then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
747+ else {
748+ let pmtAmount = if ((size(msg.payments) > 0))
749+ then if ((size(msg.payments) != 1))
750+ then throw("size(payments) != 1")
751+ else {
752+ let pmtAssetId = msg.payments[0].assetId
753+ if ((shareAssetId != pmtAssetId))
754+ then throw("unknown payment token")
755+ else msg.payments[0].amount
756+ }
757+ else 0
758+ let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
759+ let tokenOutB58 = fromBase58String(tokenOut)
760+ let withdrawAmount = (pmtAmount + unlockAmount)
761+ let xp = _xp()
762+ let $t01627116358 = _calcWithdrawOneCoin(xp, withdrawAmount, outIndex, msg.originCaller)
763+ let dy = $t01627116358._1
764+ let dy_fee = $t01627116358._2
765+ if (assert((dy >= minAmount)))
766+ then throw("Not enough coins removed")
767+ else {
768+ let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
769+ let dy_and_fee = (dy + dy_fee)
770+ func makeNewBalances (acc,tokenBalance) = {
771+ let $t01661616642 = acc
772+ let newBalances = $t01661616642._1
773+ let i = $t01661616642._2
774+ if ((i == outIndex))
775+ then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
776+ else $Tuple2((newBalances :+ tokenBalance), (i + 1))
777+ }
778+
779+ let $t01680916870 = {
780+ let $l = xp
781+ let $s = size($l)
782+ let $acc0 = $Tuple2(nil, 0)
783+ func $f0_1 ($a,$i) = if (($i >= $s))
784+ then $a
785+ else makeNewBalances($a, $l[$i])
786+
787+ func $f0_2 ($a,$i) = if (($i >= $s))
788+ then $a
789+ else throw("List size exceeds 10")
790+
791+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
792+ }
793+ let newBalances = $t01680916870._1
794+ let v = $t01680916870._2
795+ if (checkDAppThreshold(newBalances))
796+ then throw()
797+ else {
798+ let us = unstake(dy_and_fee, tokenOut)
799+ if ((us == us))
800+ then {
801+ let lpFees = (dy_fee - governanceFees)
802+ let airdrop = if ((lpFees > 0))
803+ then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
804+ else 0
805+ if ((airdrop == airdrop))
806+ then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, withdrawAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - withdrawAmount))]
807+ else throw("Strict value is not equal to itself.")
808+ }
809+ else throw("Strict value is not equal to itself.")
810+ }
811+ }
812+ }
813+ }
814+
815+
689816 @Callable(msg)
690817 func D (xp,amp) = {
691818 let D = get_D_internal(xp, amp)
692819 $Tuple2([IntegerEntry("D", D)], D)
693820 }
694821
695822
696823
697824 @Callable(msg)
698825 func init (assetIds,_A,_dAppThresholdCoef) = if (!(isDataStorageUntouched(this)))
699826 then throw("Already initialized")
700827 else if ((0 >= _A))
701828 then throw("Amp must be must > 0")
702829 else if ((0 >= _dAppThresholdCoef))
703830 then throw("dApp Threshold Coef must be > 0")
704831 else {
705832 let shareName = "s_Multi_USD"
706833 let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
707834 let issueToken = Issue(shareName, shareDescription, 0, 6, true)
708835 let tokenId = calculateAssetId(issueToken)
709836 if (checkCoins(assetIds))
710837 then throw()
711838 else [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]
712839 }
713840
714841
715842
716843 @Callable(msg)
717844 func addLiquidity (minMintAmount,stakeFarming,lockType) = valueOrElse(isActive(), {
718845 let amp = _A()
719846 let xp = _xp()
720847 let D0 = if ((shareSupply == 0))
721848 then 0
722849 else getDMem(xp, amp)
723- let $t01547015724 = if (if ((lockType > 0))
850+ let $t01901019264 = if (if ((lockType > 0))
724851 then (msg.payments[(size(msg.payments) - 1)].assetId == unit)
725852 else false)
726853 then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]])
727854 else $Tuple2(msg.payments, nil)
728- let payments = $t01547015724._1
729- let lockFee = $t01547015724._2
855+ let payments = $t01901019264._1
856+ let lockFee = $t01901019264._2
730857 let paymentsSize = size(payments)
731858 func validPayments (n) = if ((paymentsSize > nCoins))
732859 then throw(("payments size > " + toString(nCoins)))
733860 else if ((1 > paymentsSize))
734861 then throw("payments size < 1")
735862 else if (if ((shareSupply == 0))
736863 then (nCoins != paymentsSize)
737864 else false)
738865 then throw("initial deposit requires all coins")
739866 else {
740867 func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId)))
741868 then true
742869 else throw("Invalid asset in payment")
743870
744871 let $l = payments
745872 let $s = size($l)
746873 let $acc0 = false
747874 func $f0_1 ($a,$i) = if (($i >= $s))
748875 then $a
749876 else paymantValid($a, $l[$i])
750877
751878 func $f0_2 ($a,$i) = if (($i >= $s))
752879 then $a
753880 else throw("List size exceeds 10")
754881
755882 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
756883 }
757884
758885 if (!(validPayments(paymentsSize)))
759886 then throw()
760887 else {
761888 let suspicious = checkSuspicious()
762889 if (suspicious._1)
763890 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments))
764891 else {
765892 func parsePayments (acc,assetId) = {
766- let $t01659416620 = acc
767- let newBalances = $t01659416620._1
768- let i = $t01659416620._2
893+ let $t02013420160 = acc
894+ let newBalances = $t02013420160._1
895+ let i = $t02013420160._2
769896 func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId))
770897 then (newBalance + payment.amount)
771898 else newBalance
772899
773900 let newBalace = {
774901 let $l = payments
775902 let $s = size($l)
776903 let $acc0 = xp[i]
777904 func $f0_1 ($a,$i) = if (($i >= $s))
778905 then $a
779906 else parsePayment($a, $l[$i])
780907
781908 func $f0_2 ($a,$i) = if (($i >= $s))
782909 then $a
783910 else throw("List size exceeds 10")
784911
785912 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
786913 }
787914 $Tuple2((newBalances :+ newBalace), (i + 1))
788915 }
789916
790- let $t01697017037 = {
917+ let $t02051020577 = {
791918 let $l = assetIds
792919 let $s = size($l)
793920 let $acc0 = $Tuple2(nil, 0)
794921 func $f0_1 ($a,$i) = if (($i >= $s))
795922 then $a
796923 else parsePayments($a, $l[$i])
797924
798925 func $f0_2 ($a,$i) = if (($i >= $s))
799926 then $a
800927 else throw("List size exceeds 10")
801928
802929 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
803930 }
804- let newBalances = $t01697017037._1
805- let k = $t01697017037._2
931+ let newBalances = $t02051020577._1
932+ let k = $t02051020577._2
806933 if (checkDAppThreshold(newBalances))
807934 then throw()
808935 else {
809936 let D1 = getDMem(newBalances, amp)
810937 if (assert((D1 > D0)))
811938 then throw("D1 > D0")
812939 else {
813940 let feeDiscount = calculateFeeDiscount(msg.caller)
814941 func calcScriptActions (acc,newBalance) = {
815- let $t01735717398 = acc
816- let invBalances = $t01735717398._1
817- let scriptActions = $t01735717398._2
818- let i = $t01735717398._3
942+ let $t02089720938 = acc
943+ let invBalances = $t02089720938._1
944+ let scriptActions = $t02089720938._2
945+ let i = $t02089720938._3
819946 if ((shareSupply > 0))
820947 then {
821948 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
822949 let fees = {
823950 let idealBalance = fraction(D1, xp[i], D0)
824951 let difference = if ((idealBalance > newBalance))
825952 then (idealBalance - newBalance)
826953 else (newBalance - idealBalance)
827954 fraction(_fee, difference, feeScale6)
828955 }
829956 let governanceFees = fraction(fees, feeGovernance, feeScale6)
830957 let finalBalance = (newBalance - fees)
831958 let invariantBalance = (newBalance - fees)
832959 let pmt = (newBalance - xp[i])
833960 let lpFees = (fees - governanceFees)
834961 let inv = if ((pmt > 0))
835962 then stake((pmt - fees), assetIds[i])
836963 else unstake(fees, assetIds[i])
837964 if ((inv == inv))
838965 then {
839966 let airdrop = if ((lpFees > 0))
840967 then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)])
841968 else 0
842969 if ((airdrop == airdrop))
843970 then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1))
844971 else throw("Strict value is not equal to itself.")
845972 }
846973 else throw("Strict value is not equal to itself.")
847974 }
848975 else {
849976 let inv = stake(newBalance, assetIds[i])
850977 if ((inv == inv))
851978 then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1))
852979 else throw("Strict value is not equal to itself.")
853980 }
854981 }
855982
856- let $t01910319191 = {
983+ let $t02264322731 = {
857984 let $l = newBalances
858985 let $s = size($l)
859986 let $acc0 = $Tuple3(nil, nil, 0)
860987 func $f1_1 ($a,$i) = if (($i >= $s))
861988 then $a
862989 else calcScriptActions($a, $l[$i])
863990
864991 func $f1_2 ($a,$i) = if (($i >= $s))
865992 then $a
866993 else throw("List size exceeds 10")
867994
868995 $f1_2($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)
869996 }
870- let invBalances = $t01910319191._1
871- let scriptActions = $t01910319191._2
997+ let invBalances = $t02264322731._1
998+ let scriptActions = $t02264322731._2
872999 let D2 = getDMem(invBalances, amp)
8731000 let mint_amount = if ((shareSupply == 0))
8741001 then D1
8751002 else fraction(shareSupply, (D2 - D0), D0)
8761003 if (assert((mint_amount >= minMintAmount)))
8771004 then throw("Slippage screwed you")
8781005 else if (stakeFarming)
8791006 then {
8801007 let re = invoke(this, "reissueShare", [mint_amount], nil)
8811008 if ((re == re))
8821009 then {
8831010 let s = invoke(farmingAddress, "lockShareTokensFromPool", [msg.caller.bytes, toString(this), lockType], ([AttachedPayment(shareAssetId, mint_amount)] ++ lockFee))
8841011 if ((s == s))
8851012 then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount)))
8861013 else throw("Strict value is not equal to itself.")
8871014 }
8881015 else throw("Strict value is not equal to itself.")
8891016 }
8901017 else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))])
8911018 }
8921019 }
8931020 }
8941021 }
8951022 })
8961023
8971024
8981025
8991026 @Callable(msg)
9001027 func calcMintAmount (newBalances,user) = {
9011028 let amp = _A()
9021029 let xp = _xp()
9031030 let D1 = getDMem(newBalances, amp)
9041031 if ((shareSupply == 0))
9051032 then $Tuple2(nil, D1)
9061033 else {
9071034 let D0 = getDMem(xp, amp)
9081035 let feeDiscount = calculateFeeDiscount(user)
9091036 func calcInvBalances (acc,newBalance) = {
910- let $t02046720493 = acc
911- let invBalances = $t02046720493._1
912- let i = $t02046720493._2
1037+ let $t02400724033 = acc
1038+ let invBalances = $t02400724033._1
1039+ let i = $t02400724033._2
9131040 let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1)))
9141041 let fees = {
9151042 let idealBalance = fraction(D1, xp[i], D0)
9161043 let difference = if ((idealBalance > newBalance))
9171044 then (idealBalance - newBalance)
9181045 else (newBalance - idealBalance)
9191046 fraction(_fee, difference, feeScale6)
9201047 }
9211048 let invariantBalance = (newBalance - fees)
9221049 $Tuple2((invBalances :+ invariantBalance), (i + 1))
9231050 }
9241051
925- let $t02109521165 = {
1052+ let $t02463524705 = {
9261053 let $l = newBalances
9271054 let $s = size($l)
9281055 let $acc0 = $Tuple2(nil, 0)
9291056 func $f0_1 ($a,$i) = if (($i >= $s))
9301057 then $a
9311058 else calcInvBalances($a, $l[$i])
9321059
9331060 func $f0_2 ($a,$i) = if (($i >= $s))
9341061 then $a
9351062 else throw("List size exceeds 10")
9361063
9371064 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
9381065 }
939- let invBalances = $t02109521165._1
940- let k = $t02109521165._2
1066+ let invBalances = $t02463524705._1
1067+ let k = $t02463524705._2
9411068 let D2 = getDMem(invBalances, amp)
9421069 let mintAmount = fraction(shareSupply, (D2 - D0), D0)
9431070 $Tuple2(nil, mintAmount)
9441071 }
9451072 }
9461073
9471074
9481075
9491076 @Callable(msg)
9501077 func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)])
9511078
9521079
9531080
9541081 @Callable(msg)
9551082 func getDy (assetFrom,assetTo,dx,userAddress) = {
9561083 let xp = _xp()
9571084 let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in")
9581085 let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out")
9591086 let x = (xp[fromIndex] + dx)
9601087 let y = getY(fromIndex, toIndex, x, xp)
9611088 let dy = ((xp[toIndex] - y) - 1)
9621089 let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress)))
9631090 let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6)
9641091 $Tuple2(nil, $Tuple2((dy - _fee), _fee))
9651092 }
9661093
9671094
9681095
9691096 @Callable(msg)
9701097 func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
9711098 then throw("size(payments) != 1")
9721099 else {
9731100 let suspicious = checkSuspicious()
9741101 if (suspicious._1)
9751102 then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
9761103 else {
9771104 let payment = msg.payments[0]
9781105 let tokenIn = getStrAssetId(payment.assetId)
9791106 let tokenOutB58 = fromBase58String(tokenOut)
9801107 let dx = payment.amount
9811108 let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in")
9821109 let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
9831110 let xp = _xp()
9841111 let x = (xp[fromIndex] + dx)
9851112 let y = getY(fromIndex, toIndex, x, xp)
9861113 let _dy = ((xp[toIndex] - y) - 1)
9871114 let feeDiscount = calculateFeeDiscount(msg.originCaller)
9881115 let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6)
9891116 let dy = (_dy - _fee)
9901117 let governanceFees = fraction(_fee, feeGovernance, feeScale6)
9911118 if (assert((dy >= min_dy)))
9921119 then throw("Exchange resulted in fewer coins than expected")
9931120 else {
9941121 func makeNewBalances (acc,tokenBalance) = {
995- let $t02320623232 = acc
996- let newBalances = $t02320623232._1
997- let i = $t02320623232._2
1122+ let $t02674626772 = acc
1123+ let newBalances = $t02674626772._1
1124+ let i = $t02674626772._2
9981125 if ((i == fromIndex))
9991126 then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1))
10001127 else if ((i == toIndex))
10011128 then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1))
10021129 else $Tuple2((newBalances :+ tokenBalance), (i + 1))
10031130 }
10041131
1005- let $t02348323544 = {
1132+ let $t02702327084 = {
10061133 let $l = xp
10071134 let $s = size($l)
10081135 let $acc0 = $Tuple2(nil, 0)
10091136 func $f0_1 ($a,$i) = if (($i >= $s))
10101137 then $a
10111138 else makeNewBalances($a, $l[$i])
10121139
10131140 func $f0_2 ($a,$i) = if (($i >= $s))
10141141 then $a
10151142 else throw("List size exceeds 10")
10161143
10171144 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
10181145 }
1019- let newBalances = $t02348323544._1
1020- let i = $t02348323544._2
1146+ let newBalances = $t02702327084._1
1147+ let i = $t02702327084._2
10211148 if (checkDAppThreshold(newBalances))
10221149 then throw()
10231150 else {
10241151 let s = stake(payment.amount, getStrAssetId(payment.assetId))
10251152 if ((s == s))
10261153 then {
10271154 let us = unstake(_dy, tokenOut)
10281155 if ((us == us))
10291156 then {
10301157 let lpFees = (_fee - governanceFees)
10311158 let airdrop = if ((lpFees > 0))
10321159 then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
10331160 else 0
10341161 if ((airdrop == airdrop))
10351162 then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58])
10361163 else throw("Strict value is not equal to itself.")
10371164 }
10381165 else throw("Strict value is not equal to itself.")
10391166 }
10401167 else throw("Strict value is not equal to itself.")
10411168 }
10421169 }
10431170 }
10441171 })
10451172
10461173
10471174
10481175 @Callable(msg)
1049-func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
1050- then throw("size(payments) != 1")
1051- else {
1052- let pmtAmount = msg.payments[0].amount
1053- let pmtAssetId = msg.payments[0].assetId
1054- if ((shareAssetId != pmtAssetId))
1055- then throw("unknown payment token")
1056- else {
1057- let suspicious = checkSuspicious()
1058- if (suspicious._1)
1059- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
1060- else {
1061- func calcScriptActions (acc,balance) = {
1062- let $t02483524863 = acc
1063- let scriptActions = $t02483524863._1
1064- let i = $t02483524863._2
1065- let wAmount = fraction(balance, pmtAmount, shareSupply)
1066- if (assert((wAmount >= minAmounts[i])))
1067- then throw("Withdrawal resulted in fewer coins than expected")
1068- else {
1069- let us = unstake(wAmount, assetIds[i])
1070- if ((us == us))
1071- then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1))
1072- else throw("Strict value is not equal to itself.")
1073- }
1074- }
1075-
1076- let $t02535325421 = {
1077- let $l = _xp()
1078- let $s = size($l)
1079- let $acc0 = $Tuple2(nil, 0)
1080- func $f0_1 ($a,$i) = if (($i >= $s))
1081- then $a
1082- else calcScriptActions($a, $l[$i])
1083-
1084- func $f0_2 ($a,$i) = if (($i >= $s))
1085- then $a
1086- else throw("List size exceeds 10")
1087-
1088- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
1089- }
1090- let scriptActions = $t02535325421._1
1091- let i = $t02535325421._2
1092- (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))])
1093- }
1094- }
1095- })
1176+func withdraw (minAmounts) = valueOrElse(isActive(), calcWithdraw(msg, minAmounts, 0))
10961177
10971178
10981179
10991180 @Callable(msg)
11001181 func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
11011182 then throw("Unlock amount must be positive")
11021183 else {
1103- let suspicious = checkSuspicious()
1104- if (suspicious._1)
1105- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
1106- else {
1107- let pmtAmount = if ((size(msg.payments) > 0))
1108- then if ((size(msg.payments) != 1))
1109- then throw("size(payments) != 1")
1110- else {
1111- let pmtAssetId = msg.payments[0].assetId
1112- if ((shareAssetId != pmtAssetId))
1113- then throw("unknown payment token")
1114- else msg.payments[0].amount
1115- }
1116- else 0
1117- let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1118- if ((unlock == unlock))
1119- then {
1120- let withdrawAmount = (pmtAmount + unlockAmount)
1121- let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)])
1122- if ((inv == inv))
1123- then nil
1124- else throw("Strict value is not equal to itself.")
1125- }
1126- else throw("Strict value is not equal to itself.")
1127- }
1184+ let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1185+ if ((unlock == unlock))
1186+ then calcWithdraw(msg, minAmounts, unlockAmount)
1187+ else throw("Strict value is not equal to itself.")
11281188 })
11291189
11301190
11311191
11321192 @Callable(msg)
11331193 func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = if ((0 >= tokenAmount))
11341194 then throw("Amount must be positive")
11351195 else {
11361196 let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
11371197 $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1)
11381198 }
11391199
11401200
11411201
11421202 @Callable(msg)
1143-func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1))
1144- then throw("size(payments) != 1")
1145- else {
1146- let suspicious = checkSuspicious()
1147- if (suspicious._1)
1148- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments))
1149- else {
1150- let pmtAmount = msg.payments[0].amount
1151- let pmtAssetId = msg.payments[0].assetId
1152- if ((pmtAssetId != shareAssetId))
1153- then throw("unknown token")
1154- else {
1155- let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out")
1156- let tokenOutB58 = fromBase58String(tokenOut)
1157- let xp = _xp()
1158- let $t02747927561 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller)
1159- let dy = $t02747927561._1
1160- let dy_fee = $t02747927561._2
1161- if (assert((dy >= minAmount)))
1162- then throw("Not enough coins removed")
1163- else {
1164- let governanceFees = fraction(dy_fee, feeGovernance, feeScale6)
1165- let dy_and_fee = (dy + dy_fee)
1166- func makeNewBalances (acc,tokenBalance) = {
1167- let $t02781927845 = acc
1168- let newBalances = $t02781927845._1
1169- let i = $t02781927845._2
1170- if ((i == outIndex))
1171- then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1))
1172- else $Tuple2((newBalances :+ tokenBalance), (i + 1))
1173- }
1174-
1175- let $t02801228073 = {
1176- let $l = xp
1177- let $s = size($l)
1178- let $acc0 = $Tuple2(nil, 0)
1179- func $f0_1 ($a,$i) = if (($i >= $s))
1180- then $a
1181- else makeNewBalances($a, $l[$i])
1182-
1183- func $f0_2 ($a,$i) = if (($i >= $s))
1184- then $a
1185- else throw("List size exceeds 10")
1186-
1187- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
1188- }
1189- let newBalances = $t02801228073._1
1190- let v = $t02801228073._2
1191- if (checkDAppThreshold(newBalances))
1192- then throw()
1193- else {
1194- let us = unstake(dy_and_fee, tokenOut)
1195- if ((us == us))
1196- then {
1197- let lpFees = (dy_fee - governanceFees)
1198- let airdrop = if ((lpFees > 0))
1199- then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)])
1200- else 0
1201- if ((airdrop == airdrop))
1202- then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]
1203- else throw("Strict value is not equal to itself.")
1204- }
1205- else throw("Strict value is not equal to itself.")
1206- }
1207- }
1208- }
1209- }
1210- })
1203+func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), calcWithdrawOneCoinEntries(msg, tokenOut, minAmount, 0))
12111204
12121205
12131206
12141207 @Callable(msg)
12151208 func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount))
12161209 then throw("Unlock amount must be positive")
12171210 else {
1218- let suspicious = checkSuspicious()
1219- if (suspicious._1)
1220- then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments))
1221- else {
1222- let pmtAmount = if ((size(msg.payments) > 0))
1223- then if ((size(msg.payments) != 1))
1224- then throw("size(payments) != 1")
1225- else {
1226- let pmtAssetId = msg.payments[0].assetId
1227- if ((shareAssetId != pmtAssetId))
1228- then throw("unknown payment token")
1229- else msg.payments[0].amount
1230- }
1231- else 0
1232- let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1233- if ((unlock == unlock))
1234- then {
1235- let withdrawAmount = (pmtAmount + unlockAmount)
1236- let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)])
1237- if ((inv == inv))
1238- then nil
1239- else throw("Strict value is not equal to itself.")
1240- }
1241- else throw("Strict value is not equal to itself.")
1242- }
1211+ let unlock = invoke(farmingAddress, "withdrawShareTokensFromPool", [msg.caller.bytes, toString(this), unlockAmount], nil)
1212+ if ((unlock == unlock))
1213+ then calcWithdrawOneCoinEntries(msg, tokenOut, minAmount, unlockAmount)
1214+ else throw("Strict value is not equal to itself.")
12431215 })
12441216
12451217
12461218
12471219 @Callable(msg)
12481220 func A () = $Tuple2(nil, _A())
12491221
12501222
12511223
12521224 @Callable(msg)
12531225 func getVirtualPrice () = {
12541226 let D = get_D(_xp(), _A())
12551227 $Tuple2(nil, fraction(D, PRECISION, shareSupply))
12561228 }
12571229
12581230
12591231
12601232 @Callable(msg)
12611233 func calcTokenAmount (amounts,deposit) = {
12621234 let amp = _A()
12631235 let balances = _xp()
12641236 let D0 = getDMem(balances, amp)
12651237 func calcNewBalances (acc,balance) = {
1266- let $t03011630142 = acc
1267- let newBalances = $t03011630142._1
1268- let i = $t03011630142._2
1238+ let $t02959129617 = acc
1239+ let newBalances = $t02959129617._1
1240+ let i = $t02959129617._2
12691241 let newBalance = (balance + (if (deposit)
12701242 then amounts[i]
12711243 else -(amounts[i])))
12721244 $Tuple2((newBalances :+ newBalance), (i + 1))
12731245 }
12741246
12751247 let newBalances = ( let $l = balances
12761248 let $s = size($l)
12771249 let $acc0 = $Tuple2(nil, 0)
12781250 func $f0_1 ($a,$i) = if (($i >= $s))
12791251 then $a
12801252 else calcNewBalances($a, $l[$i])
12811253
12821254 func $f0_2 ($a,$i) = if (($i >= $s))
12831255 then $a
12841256 else throw("List size exceeds 10")
12851257
12861258 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1
12871259 let D1 = getDMem(newBalances, amp)
12881260 let diff = if (deposit)
12891261 then (D1 - D0)
12901262 else (D0 - D1)
12911263 $Tuple2(nil, fraction(diff, shareSupply, D0))
12921264 }
12931265
12941266
12951267
12961268 @Callable(msg)
12971269 func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME))))
12981270 then throw("too often")
12991271 else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME))))
13001272 then throw("insufficient time")
13011273 else {
13021274 let _initial_A = _A()
13031275 if (assert(if ((_futureA > 0))
13041276 then (MAX_A > _futureA)
13051277 else false))
13061278 then throw("out of base range")
13071279 else if (assert(if (if ((_futureA >= _initial_A))
13081280 then ((_initial_A * MAX_A_CHANGE) >= _futureA)
13091281 else false)
13101282 then true
13111283 else if ((_initial_A > _futureA))
13121284 then ((_futureA * MAX_A_CHANGE) >= _initial_A)
13131285 else false))
13141286 then throw("out of range")
13151287 else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)]
13161288 }))
13171289
13181290
13191291
13201292 @Callable(msg)
13211293 func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), {
13221294 let currentA = _A()
13231295 [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)]
13241296 }))
13251297
13261298
13271299
13281300 @Callable(msg)
13291301 func shutdown () = valueOrElse(isAdminCall(msg), if (!(active))
13301302 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
13311303 else suspend("Paused by admin"))
13321304
13331305
13341306
13351307 @Callable(msg)
13361308 func activate () = valueOrElse(isAdminCall(msg), if (active)
13371309 then throwIsActive()
13381310 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
13391311
13401312
13411313
13421314 @Callable(msg)
13431315 func takeIntoAccountExtraFunds () = valueOrElse(isActive(), if ((msg.caller != moneyBoxAddress))
13441316 then throw("Only the wallet can call this function")
13451317 else {
13461318 let balances = _xp()
13471319 func takeExtraFunds (acc,assetId) = {
1348- let $t03248432502 = acc
1349- let sum = $t03248432502._1
1350- let i = $t03248432502._2
1320+ let $t03195931977 = acc
1321+ let sum = $t03195931977._1
1322+ let i = $t03195931977._2
13511323 let tokenB58 = fromBase58String(assetId)
13521324 let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58))
13531325 let enrollAmount = (rBalance - balances[i])
13541326 if ((0 > enrollAmount))
13551327 then suspend(("Enroll amount negative for asset" + assetId))
13561328 else {
13571329 let airdrop = if ((enrollAmount > 0))
13581330 then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenB58, enrollAmount)])
13591331 else 0
13601332 if ((airdrop == airdrop))
13611333 then $Tuple2((sum + enrollAmount), (i + 1))
13621334 else throw("Strict value is not equal to itself.")
13631335 }
13641336 }
13651337
13661338 let k = {
13671339 let $l = assetIds
13681340 let $s = size($l)
13691341 let $acc0 = $Tuple2(0, 0)
13701342 func $f0_1 ($a,$i) = if (($i >= $s))
13711343 then $a
13721344 else takeExtraFunds($a, $l[$i])
13731345
13741346 func $f0_2 ($a,$i) = if (($i >= $s))
13751347 then $a
13761348 else throw("List size exceeds 10")
13771349
13781350 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
13791351 }
13801352 if ((k._1 == 0))
13811353 then throw("No money to take")
13821354 else nil
13831355 })
13841356
13851357
13861358 @Verifier(tx)
13871359 func verify () = {
13881360 let multiSignedByAdmins = {
13891361 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
13901362 then 1
13911363 else 0
13921364 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
13931365 then 1
13941366 else 0
13951367 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
13961368 then 1
13971369 else 0
13981370 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
13991371 }
14001372 match tx {
14011373 case inv: InvokeScriptTransaction =>
14021374 let callTakeIntoAccount = if ((inv.dApp == this))
14031375 then (inv.function == "takeIntoAccountExtraFunds")
14041376 else false
14051377 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
14061378 then true
14071379 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
14081380 then true
14091381 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
14101382 then true
14111383 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
14121384 if (if (callTakeIntoAccount)
14131385 then signedByAdmin
14141386 else false)
14151387 then true
14161388 else multiSignedByAdmins
14171389 case _ =>
14181390 multiSignedByAdmins
14191391 }
14201392 }
14211393

github/deemru/w8io/026f985 
136.39 ms