tx · Fz3garjVGrjr9DDgv3AVf6FpmjwR5vfs1ctvEm2uz481 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT: -0.03300000 Waves 2022.11.30 10:24 [2339550] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves
{ "type": 13, "id": "Fz3garjVGrjr9DDgv3AVf6FpmjwR5vfs1ctvEm2uz481", "fee": 3300000, "feeAssetId": null, "timestamp": 1669793062843, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "ds1nASTUk86SdBqQ64QPZ2MAfd6xeKt4fiKHLtwPcDdC7rm68Ydc1bR54SgTdzjxjpXAeStUP8HkPje3nmxMnVA" ], "script": "base64:BgLZJggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZhY3RTdGFrQ250ciISaWR4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mVlUkVBRE9OTFkACQCUCgIFA25pbAUCYWgBAmhzAQJodAAEAmh1BAJhQwkBAmZSAAMJAAECBQJhQwIKQnl0ZVZlY3RvcgQCZlYFAmFDBQJmVgMJAAECBQJhQwIEVW5pdAgFAmhzD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yBAJhQwUCaHMDCQABAgUCYUMCBU9yZGVyBAJkUQUCYUMEAmh2CQECYU8ABAJodwkBAmRQAQUCZFEEAmh4CQD0AwMIBQJkUQlib2R5Qnl0ZXMJAJEDAggFAmRRBnByb29mcwAACAUCZFEPc2VuZGVyUHVibGljS2V5BAJoeQkA9AMDCAUCZFEJYm9keUJ5dGVzCQCRAwIIBQJkUQZwcm9vZnMAAQUCaHYDAwMFAmh3BQJoeAcFAmh5BwYJAQJheAMFAmh3BQJoeAUCaHkDCQABAgUCYUMCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJlbgUCYUMEAmh6CQD2AwEJAQV2YWx1ZQEIBQJlbgZzY3JpcHQEAmhBCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUwJAQJhdgAEAmhCCQDxBwEFBHRoaXMDAwkAAAIFAmhBBQJoegkBAiE9AgUCaEIFAmh6BwYJAPQDAwgFAmhzCWJvZHlCeXRlcwkAkQMCCAUCaHMGcHJvb2ZzAAAFAmh1CQD0AwMIBQJocwlib2R5Qnl0ZXMJAJEDAggFAmhzBnByb29mcwAABQJodU+D3yE=", "chainId": 84, "height": 2339550, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8rK5KoYi8F3fGjzvSu5FwGmBFHYG6WoL3ToAbYnfgLoC Next: EiUzic1cRvSiLn447aA6A9RydyLZ5jD47RPBFvkTWguY Diff:
Old | New | Differences | |
---|---|---|---|
739 | 739 | then { | |
740 | 740 | let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
741 | 741 | if ((burn == burn)) | |
742 | - | then $Tuple2(state, totalAmount) | |
742 | + | then { | |
743 | + | let $t02943829788 = { | |
744 | + | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
745 | + | then 0 | |
746 | + | else feeAmount | |
747 | + | let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId)) | |
748 | + | then true | |
749 | + | else false | |
750 | + | if (outInAmountAsset) | |
751 | + | then $Tuple2(-((totalGet + feeAmountForCalc)), 0) | |
752 | + | else $Tuple2(0, -((totalGet + feeAmountForCalc))) | |
753 | + | } | |
754 | + | let amountAssetBalanceDelta = $t02943829788._1 | |
755 | + | let priceAssetBalanceDelta = $t02943829788._2 | |
756 | + | let $t02979129899 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
757 | + | let refreshDLpActions = $t02979129899._1 | |
758 | + | let updatedDLp = $t02979129899._2 | |
759 | + | $Tuple2((state ++ refreshDLpActions), totalAmount) | |
760 | + | } | |
743 | 761 | else throw("Strict value is not equal to itself.") | |
744 | 762 | } | |
745 | 763 | else throw("Strict value is not equal to itself.") | |
887 | 905 | else throw("Strict value is not equal to itself.") | |
888 | 906 | } | |
889 | 907 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
890 | - | (state ++ lpTrnsfr) | |
908 | + | let $t03348133546 = refreshDLpInternal(0, 0, 0) | |
909 | + | let refreshDLpActions = $t03348133546._1 | |
910 | + | let updatedDLp = $t03348133546._2 | |
911 | + | ((state ++ lpTrnsfr) ++ refreshDLpActions) | |
891 | 912 | } | |
892 | 913 | else throw("Strict value is not equal to itself.") | |
893 | 914 | } | |
937 | 958 | let pmt = value(i.payments[0]) | |
938 | 959 | let pmtAssetId = toBase58String(value(pmt.assetId)) | |
939 | 960 | let pmtAmt = pmt.amount | |
940 | - | let $ | |
941 | - | if (($ | |
961 | + | let $t03460834766 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true) | |
962 | + | if (($t03460834766 == $t03460834766)) | |
942 | 963 | then { | |
943 | - | let feeAmount = $ | |
944 | - | let state = $ | |
945 | - | let estimLP = $ | |
964 | + | let feeAmount = $t03460834766._3 | |
965 | + | let state = $t03460834766._2 | |
966 | + | let estimLP = $t03460834766._1 | |
946 | 967 | let emitLpAmt = if (if ((minOutAmount > 0)) | |
947 | 968 | then (minOutAmount > estimLP) | |
948 | 969 | else false) | |
970 | 991 | let sendFeeToMatcher = if ((feeAmount > 0)) | |
971 | 992 | then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))] | |
972 | 993 | else nil | |
973 | - | $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt) | |
994 | + | let $t03558135930 = if ((this == feeCollectorAddress)) | |
995 | + | then $Tuple2(0, 0) | |
996 | + | else { | |
997 | + | let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId)) | |
998 | + | then true | |
999 | + | else false | |
1000 | + | if (paymentInAmountAsset) | |
1001 | + | then $Tuple2(-(feeAmount), 0) | |
1002 | + | else $Tuple2(0, -(feeAmount)) | |
1003 | + | } | |
1004 | + | let amountAssetBalanceDelta = $t03558135930._1 | |
1005 | + | let priceAssetBalanceDelta = $t03558135930._2 | |
1006 | + | let $t03593336041 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1007 | + | let refreshDLpActions = $t03593336041._1 | |
1008 | + | let updatedDLp = $t03593336041._2 | |
1009 | + | $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt) | |
974 | 1010 | } | |
975 | 1011 | else throw("Strict value is not equal to itself.") | |
976 | 1012 | } | |
990 | 1026 | then throw("2 pmnts expd") | |
991 | 1027 | else { | |
992 | 1028 | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, true, 0, "") | |
993 | - | estPut._9 | |
1029 | + | let state = estPut._9 | |
1030 | + | let $t03679736862 = refreshDLpInternal(0, 0, 0) | |
1031 | + | let refreshDLpActions = $t03679736862._1 | |
1032 | + | let updatedKLp = $t03679736862._2 | |
1033 | + | (state ++ refreshDLpActions) | |
994 | 1034 | } | |
995 | 1035 | ||
996 | 1036 | ||
1005 | 1045 | let state = r._5 | |
1006 | 1046 | let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1007 | 1047 | if ((b == b)) | |
1008 | - | then state | |
1048 | + | then { | |
1049 | + | let $t03749437576 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0) | |
1050 | + | let refreshDLpActions = $t03749437576._1 | |
1051 | + | let updatedDLp = $t03749437576._2 | |
1052 | + | (state ++ refreshDLpActions) | |
1053 | + | } | |
1009 | 1054 | else throw("Strict value is not equal to itself.") | |
1010 | 1055 | } | |
1011 | 1056 | ||
1033 | 1078 | else throwErr("exactly 1 payment are expected")] | |
1034 | 1079 | if ((checks == checks)) | |
1035 | 1080 | then { | |
1036 | - | let $ | |
1037 | - | let state = $ | |
1038 | - | let totalAmount = $ | |
1081 | + | let $t03812138276 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId) | |
1082 | + | let state = $t03812138276._1 | |
1083 | + | let totalAmount = $t03812138276._2 | |
1039 | 1084 | $Tuple2(state, totalAmount) | |
1040 | 1085 | } | |
1041 | 1086 | else throw("Strict value is not equal to itself.") | |
1051 | 1096 | else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], "")) | |
1052 | 1097 | if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight)) | |
1053 | 1098 | then { | |
1054 | - | let $ | |
1055 | - | let actions = $ | |
1056 | - | let updatedKLp = $ | |
1099 | + | let $t03867438729 = refreshDLpInternal(0, 0, 0) | |
1100 | + | let actions = $t03867438729._1 | |
1101 | + | let updatedKLp = $t03867438729._2 | |
1057 | 1102 | $Tuple2(actions, toString(updatedKLp)) | |
1058 | 1103 | } | |
1059 | 1104 | else throw("Strict value is not equal to itself.") | |
1079 | 1124 | let newY = getYD(xp, index, D1) | |
1080 | 1125 | let dy = (xp[index] - newY) | |
1081 | 1126 | let totalGetRaw = max([0, toInt((dy - big1))]) | |
1082 | - | let $ | |
1083 | - | let totalGet = $ | |
1084 | - | let feeAmount = $ | |
1127 | + | let $t03953139580 = takeFee(totalGetRaw) | |
1128 | + | let totalGet = $t03953139580._1 | |
1129 | + | let feeAmount = $t03953139580._2 | |
1085 | 1130 | $Tuple2(nil, $Tuple2(totalGet, feeAmount)) | |
1086 | 1131 | } | |
1087 | 1132 | ||
1095 | 1140 | let lpId = poolConfig[idxLPAsId] | |
1096 | 1141 | let amBalance = getAccBalance(amId) | |
1097 | 1142 | let prBalance = getAccBalance(prId) | |
1098 | - | let $ | |
1143 | + | let $t03992540040 = { | |
1099 | 1144 | let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil) | |
1100 | 1145 | if ($isInstanceOf(@, "(Int, Int)")) | |
1101 | 1146 | then @ | |
1102 | 1147 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
1103 | 1148 | } | |
1104 | - | let totalGet = $ | |
1105 | - | let feeAmount = $ | |
1149 | + | let totalGet = $t03992540040._1 | |
1150 | + | let feeAmount = $t03992540040._2 | |
1106 | 1151 | let r = ego("", lpId, lpAssetAmount, this) | |
1107 | 1152 | let outAmAmt = r._1 | |
1108 | 1153 | let outPrAmt = r._2 | |
1132 | 1177 | else { | |
1133 | 1178 | let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1134 | 1179 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1135 | - | then state | |
1180 | + | then { | |
1181 | + | let $t04112641207 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1182 | + | let refreshDLpActions = $t04112641207._1 | |
1183 | + | let updatedDLp = $t04112641207._2 | |
1184 | + | (state ++ refreshDLpActions) | |
1185 | + | } | |
1136 | 1186 | else throw("Strict value is not equal to itself.") | |
1137 | 1187 | } | |
1138 | 1188 | } | |
1154 | 1204 | if ((unstakeInv == unstakeInv)) | |
1155 | 1205 | then { | |
1156 | 1206 | let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
1207 | + | let outAmAmt = r._1 | |
1208 | + | let outPrAmt = r._2 | |
1157 | 1209 | let sts = parseIntValue(r._9) | |
1158 | 1210 | let state = r._10 | |
1159 | 1211 | let v = if (if (igs()) | |
1165 | 1217 | then { | |
1166 | 1218 | let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
1167 | 1219 | if ((burnA == burnA)) | |
1168 | - | then state | |
1220 | + | then { | |
1221 | + | let $t04212042201 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1222 | + | let refreshDLpActions = $t04212042201._1 | |
1223 | + | let updatedDLp = $t04212042201._2 | |
1224 | + | (state ++ refreshDLpActions) | |
1225 | + | } | |
1169 | 1226 | else throw("Strict value is not equal to itself.") | |
1170 | 1227 | } | |
1171 | 1228 | else throw("Strict value is not equal to itself.") | |
1205 | 1262 | then { | |
1206 | 1263 | let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1207 | 1264 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1208 | - | then state | |
1265 | + | then { | |
1266 | + | let $t04329943380 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1267 | + | let refreshDLpActions = $t04329943380._1 | |
1268 | + | let updatedDLp = $t04329943380._2 | |
1269 | + | (state ++ refreshDLpActions) | |
1270 | + | } | |
1209 | 1271 | else throw("Strict value is not equal to itself.") | |
1210 | 1272 | } | |
1211 | 1273 | else throw("Strict value is not equal to itself.") | |
1246 | 1308 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil) | |
1247 | 1309 | if ((unstakeInv == unstakeInv)) | |
1248 | 1310 | then { | |
1249 | - | let $ | |
1250 | - | let state = $ | |
1251 | - | let totalAmount = $ | |
1311 | + | let $t04424144429 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId) | |
1312 | + | let state = $t04424144429._1 | |
1313 | + | let totalAmount = $t04424144429._2 | |
1252 | 1314 | $Tuple2(state, totalAmount) | |
1253 | 1315 | } | |
1254 | 1316 | else throw("Strict value is not equal to itself.") | |
1264 | 1326 | let amId = poolConfig[idxAmAsId] | |
1265 | 1327 | let prId = poolConfig[idxPrAsId] | |
1266 | 1328 | let lpId = poolConfig[idxLPAsId] | |
1267 | - | let $ | |
1268 | - | let lpAmount = $ | |
1269 | - | let state = $ | |
1270 | - | let feeAmount = $ | |
1271 | - | let bonus = $ | |
1329 | + | let $t04468844791 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true) | |
1330 | + | let lpAmount = $t04468844791._1 | |
1331 | + | let state = $t04468844791._2 | |
1332 | + | let feeAmount = $t04468844791._3 | |
1333 | + | let bonus = $t04468844791._4 | |
1272 | 1334 | $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus)) | |
1273 | 1335 | } | |
1274 | 1336 | ||
1280 | 1342 | let amId = poolConfig[idxAmAsId] | |
1281 | 1343 | let prId = poolConfig[idxPrAsId] | |
1282 | 1344 | let lpId = poolConfig[idxLPAsId] | |
1283 | - | let $ | |
1284 | - | let lpAmount = $ | |
1285 | - | let state = $ | |
1286 | - | let feeAmount = $ | |
1287 | - | let bonus = $ | |
1345 | + | let $t04507045174 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false) | |
1346 | + | let lpAmount = $t04507045174._1 | |
1347 | + | let state = $t04507045174._2 | |
1348 | + | let feeAmount = $t04507045174._3 | |
1349 | + | let bonus = $t04507045174._4 | |
1288 | 1350 | $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus)) | |
1289 | 1351 | } | |
1290 | 1352 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let scale8 = 100000000 | |
5 | 5 | ||
6 | 6 | let scale8BigInt = toBigInt(100000000) | |
7 | 7 | ||
8 | 8 | let scale18 = toBigInt(1000000000000000000) | |
9 | 9 | ||
10 | 10 | let zeroBigInt = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let big0 = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let big1 = toBigInt(1) | |
15 | 15 | ||
16 | 16 | let big2 = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8))) | |
19 | 19 | ||
20 | 20 | let wavesString = "WAVES" | |
21 | 21 | ||
22 | 22 | let Amult = "100" | |
23 | 23 | ||
24 | 24 | let Dconv = "1" | |
25 | 25 | ||
26 | 26 | let SEP = "__" | |
27 | 27 | ||
28 | 28 | let EMPTY = "" | |
29 | 29 | ||
30 | 30 | let PoolActive = 1 | |
31 | 31 | ||
32 | 32 | let PoolPutDis = 2 | |
33 | 33 | ||
34 | 34 | let PoolMatcherDis = 3 | |
35 | 35 | ||
36 | 36 | let PoolShutdown = 4 | |
37 | 37 | ||
38 | 38 | let idxPoolAddress = 1 | |
39 | 39 | ||
40 | 40 | let idxPoolSt = 2 | |
41 | 41 | ||
42 | 42 | let idxLPAsId = 3 | |
43 | 43 | ||
44 | 44 | let idxAmAsId = 4 | |
45 | 45 | ||
46 | 46 | let idxPrAsId = 5 | |
47 | 47 | ||
48 | 48 | let idxAmtAsDcm = 6 | |
49 | 49 | ||
50 | 50 | let idxPriceAsDcm = 7 | |
51 | 51 | ||
52 | 52 | let idxIAmtAsId = 8 | |
53 | 53 | ||
54 | 54 | let idxIPriceAsId = 9 | |
55 | 55 | ||
56 | 56 | let idxFactStakCntr = 1 | |
57 | 57 | ||
58 | 58 | let idxFactoryRestCntr = 6 | |
59 | 59 | ||
60 | 60 | let idxFactSlippCntr = 7 | |
61 | 61 | ||
62 | 62 | let idxFactGwxRewCntr = 10 | |
63 | 63 | ||
64 | 64 | let feeDefault = fraction(10, scale8, 10000) | |
65 | 65 | ||
66 | 66 | func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func abs (val) = if ((zeroBigInt > val)) | |
76 | 76 | then -(val) | |
77 | 77 | else val | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func absBigInt (val) = if ((zeroBigInt > val)) | |
81 | 81 | then -(val) | |
82 | 82 | else val | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func fc () = "%s__factoryContract" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func mpk () = "%s__managerPublicKey" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func pmpk () = "%s__pendingManagerPublicKey" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func pl () = "%s%s__price__last" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func aa () = "%s__amountAsset" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func pa () = "%s__priceAsset" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func amp () = "%s__amp" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func ada () = "%s__addonAddr" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | let keyFee = "%s__fee" | |
119 | 119 | ||
120 | 120 | let fee = valueOrElse(getInteger(this, keyFee), feeDefault) | |
121 | 121 | ||
122 | 122 | let keyDLp = makeString(["%s", "dLp"], SEP) | |
123 | 123 | ||
124 | 124 | let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP) | |
125 | 125 | ||
126 | 126 | let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP) | |
127 | 127 | ||
128 | 128 | let dLpRefreshDelayDefault = 30 | |
129 | 129 | ||
130 | 130 | let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault) | |
131 | 131 | ||
132 | 132 | func fcfg () = "%s__factoryConfig" | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func mtpk () = "%s%s__matcher__publicKey" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func aps () = "%s__shutdown" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash" | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyFeeCollectorAddress () = "%s__feeCollectorAddress" | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV))) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func str (val) = match val { | |
157 | 157 | case valStr: String => | |
158 | 158 | valStr | |
159 | 159 | case _ => | |
160 | 160 | throw("fail cast to String") | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " ")) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ") | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | let fca = addressFromStringValue(strf(this, fc())) | |
177 | 177 | ||
178 | 178 | let A = strf(this, amp()) | |
179 | 179 | ||
180 | 180 | func igs () = valueOrElse(getBoolean(fca, aps()), false) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func mp () = fromBase58String(strf(fca, mtpk())) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress())) | |
187 | 187 | ||
188 | 188 | func gpc () = { | |
189 | 189 | let amtAs = strf(this, aa()) | |
190 | 190 | let priceAs = strf(this, pa()) | |
191 | 191 | let iPriceAs = intf(fca, mba(priceAs)) | |
192 | 192 | let iAmtAs = intf(fca, mba(amtAs)) | |
193 | 193 | split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP) | |
194 | 194 | } | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func parseAssetId (input) = if ((input == wavesString)) | |
198 | 198 | then unit | |
199 | 199 | else fromBase58String(input) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func assetIdToString (input) = if ((input == unit)) | |
203 | 203 | then wavesString | |
204 | 204 | else toBase58String(value(input)) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm])) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | let poolConfigParsed = parsePoolConfig(gpc()) | |
211 | 211 | ||
212 | 212 | let $t072087394 = poolConfigParsed | |
213 | 213 | ||
214 | 214 | let cfgPoolAddress = $t072087394._1 | |
215 | 215 | ||
216 | 216 | let cfgPoolStatus = $t072087394._2 | |
217 | 217 | ||
218 | 218 | let cfgLpAssetId = $t072087394._3 | |
219 | 219 | ||
220 | 220 | let cfgAmountAssetId = $t072087394._4 | |
221 | 221 | ||
222 | 222 | let cfgPriceAssetId = $t072087394._5 | |
223 | 223 | ||
224 | 224 | let cfgAmountAssetDecimals = $t072087394._6 | |
225 | 225 | ||
226 | 226 | let cfgPriceAssetDecimals = $t072087394._7 | |
227 | 227 | ||
228 | 228 | func gfc () = split(strf(fca, fcfg()), SEP) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | let factoryConfig = gfc() | |
232 | 232 | ||
233 | 233 | let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address") | |
234 | 234 | ||
235 | 235 | let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address") | |
236 | 236 | ||
237 | 237 | let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address") | |
238 | 238 | ||
239 | 239 | let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address") | |
240 | 240 | ||
241 | 241 | func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP) | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func dataGetActionInfo (outAmtAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmtAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP) | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
248 | 248 | then wavesBalance(this).available | |
249 | 249 | else assetBalance(this, fromBase58String(assetId)) | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func vad (A1,A2,slippage) = { | |
256 | 256 | let diff = fraction((A1 - A2), scale8BigInt, A2) | |
257 | 257 | let pass = ((slippage - abs(diff)) > zeroBigInt) | |
258 | 258 | if (!(pass)) | |
259 | 259 | then throw(("Big slpg: " + toString(diff))) | |
260 | 260 | else $Tuple2(pass, min([A1, A2])) | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func vd (D1,D0,slpg) = { | |
265 | 265 | let diff = fraction(D0, scale8BigInt, D1) | |
266 | 266 | let fail = (slpg > diff) | |
267 | 267 | if (if (fail) | |
268 | 268 | then true | |
269 | 269 | else (D0 > D1)) | |
270 | 270 | then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg))) | |
271 | 271 | else fail | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
276 | 276 | let amtAsAmtX18 = t1(amAmt, amAssetDcm) | |
277 | 277 | let prAsAmtX18 = t1(prAmt, prAssetDcm) | |
278 | 278 | cpbi(prAsAmtX18, amtAsAmtX18) | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
283 | 283 | let cfg = gpc() | |
284 | 284 | let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
285 | 285 | let prAsDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
286 | 286 | let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt) | |
287 | 287 | let amAmtX18 = t1(amAmt, amtAsDcm) | |
288 | 288 | let prAmtX18 = t1(prAmt, prAsDcm) | |
289 | 289 | let lpAmtX18 = t1(lpAmt, scale8) | |
290 | 290 | let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18) | |
291 | 291 | let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18) | |
292 | 292 | [priceX18, lpPrInAmAsX18, lpPrInPrAsX18] | |
293 | 293 | } | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
297 | 297 | let p = calcPrices(amAmt, prAmt, lpAmt) | |
298 | 298 | [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)] | |
299 | 299 | } | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | func takeFee (amount) = { | |
303 | 303 | let feeAmount = fraction(amount, fee, scale8) | |
304 | 304 | $Tuple2((amount - feeAmount), feeAmount) | |
305 | 305 | } | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
309 | 309 | let cfg = gpc() | |
310 | 310 | let lpId = cfg[idxLPAsId] | |
311 | 311 | let amId = cfg[idxAmAsId] | |
312 | 312 | let prId = cfg[idxPrAsId] | |
313 | 313 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
314 | 314 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
315 | 315 | let sts = cfg[idxPoolSt] | |
316 | 316 | let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity | |
317 | 317 | if ((lpId != pmtAssetId)) | |
318 | 318 | then throw("Wrong pmt asset") | |
319 | 319 | else { | |
320 | 320 | let amBalance = getAccBalance(amId) | |
321 | 321 | let amBalanceX18 = t1(amBalance, amDcm) | |
322 | 322 | let prBalance = getAccBalance(prId) | |
323 | 323 | let prBalanceX18 = t1(prBalance, prDcm) | |
324 | 324 | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
325 | 325 | let curPrice = f1(curPriceX18, scale8) | |
326 | 326 | let pmtLpAmtX18 = t1(pmtLpAmt, scale8) | |
327 | 327 | let lpEmissX18 = t1(lpEmiss, scale8) | |
328 | 328 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18) | |
329 | 329 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18) | |
330 | 330 | let outAmAmt = f1(outAmAmtX18, amDcm) | |
331 | 331 | let outPrAmt = f1(outPrAmtX18, prDcm) | |
332 | 332 | let state = if ((txId58 == "")) | |
333 | 333 | then nil | |
334 | 334 | else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES")) | |
335 | 335 | then unit | |
336 | 336 | else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES")) | |
337 | 337 | then unit | |
338 | 338 | else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)] | |
339 | 339 | $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state) | |
340 | 340 | } | |
341 | 341 | } | |
342 | 342 | ||
343 | 343 | ||
344 | 344 | func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = { | |
345 | 345 | let cfg = gpc() | |
346 | 346 | let lpId = fromBase58String(cfg[idxLPAsId]) | |
347 | 347 | let amIdStr = cfg[idxAmAsId] | |
348 | 348 | let prIdStr = cfg[idxPrAsId] | |
349 | 349 | let inAmIdStr = cfg[idxIAmtAsId] | |
350 | 350 | let inPrIdStr = cfg[idxIPriceAsId] | |
351 | 351 | let amtDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
352 | 352 | let priceDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
353 | 353 | let sts = cfg[idxPoolSt] | |
354 | 354 | let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity | |
355 | 355 | let amBalance = if (isEval) | |
356 | 356 | then getAccBalance(amIdStr) | |
357 | 357 | else if (if (isOneAsset) | |
358 | 358 | then (pmtId == amIdStr) | |
359 | 359 | else false) | |
360 | 360 | then (getAccBalance(amIdStr) - pmtAmt) | |
361 | 361 | else if (isOneAsset) | |
362 | 362 | then getAccBalance(amIdStr) | |
363 | 363 | else (getAccBalance(amIdStr) - inAmAmt) | |
364 | 364 | let prBalance = if (isEval) | |
365 | 365 | then getAccBalance(prIdStr) | |
366 | 366 | else if (if (isOneAsset) | |
367 | 367 | then (pmtId == prIdStr) | |
368 | 368 | else false) | |
369 | 369 | then (getAccBalance(prIdStr) - pmtAmt) | |
370 | 370 | else if (isOneAsset) | |
371 | 371 | then getAccBalance(prIdStr) | |
372 | 372 | else (getAccBalance(prIdStr) - inPrAmt) | |
373 | 373 | let inAmAssetAmtX18 = t1(inAmAmt, amtDcm) | |
374 | 374 | let inPrAssetAmtX18 = t1(inPrAmt, priceDcm) | |
375 | 375 | let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18) | |
376 | 376 | let amBalanceX18 = t1(amBalance, amtDcm) | |
377 | 377 | let prBalanceX18 = t1(prBalance, priceDcm) | |
378 | 378 | let r = if ((lpEm == 0)) | |
379 | 379 | then { | |
380 | 380 | let curPriceX18 = zeroBigInt | |
381 | 381 | let slippageX18 = zeroBigInt | |
382 | 382 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
383 | 383 | $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
384 | 384 | } | |
385 | 385 | else { | |
386 | 386 | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
387 | 387 | let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
388 | 388 | let slippageX18 = t1(slippage, scale8) | |
389 | 389 | if (if (if (validateSlippage) | |
390 | 390 | then (curPriceX18 != zeroBigInt) | |
391 | 391 | else false) | |
392 | 392 | then (slippageRealX18 > slippageX18) | |
393 | 393 | else false) | |
394 | 394 | then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18))) | |
395 | 395 | else { | |
396 | 396 | let lpEmissionX18 = t1(lpEm, scale8) | |
397 | 397 | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
398 | 398 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
399 | 399 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
400 | 400 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
401 | 401 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
402 | 402 | let expAmtAssetAmtX18 = expectedAmts._1 | |
403 | 403 | let expPriceAssetAmtX18 = expectedAmts._2 | |
404 | 404 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
405 | 405 | $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18) | |
406 | 406 | } | |
407 | 407 | } | |
408 | 408 | let calcLpAmt = r._1 | |
409 | 409 | let calcAmAssetPmt = r._2 | |
410 | 410 | let calcPrAssetPmt = r._3 | |
411 | 411 | let curPrice = f1(r._4, scale8) | |
412 | 412 | let slippageCalc = f1(r._5, scale8) | |
413 | 413 | if ((0 >= calcLpAmt)) | |
414 | 414 | then throw("LP <= 0") | |
415 | 415 | else { | |
416 | 416 | let emitLpAmt = if (!(emitLp)) | |
417 | 417 | then 0 | |
418 | 418 | else calcLpAmt | |
419 | 419 | let amDiff = (inAmAmt - calcAmAssetPmt) | |
420 | 420 | let prDiff = (inPrAmt - calcPrAssetPmt) | |
421 | 421 | let $t01782518170 = if (if (isOneAsset) | |
422 | 422 | then (pmtId == amIdStr) | |
423 | 423 | else false) | |
424 | 424 | then $Tuple2(pmtAmt, 0) | |
425 | 425 | else if (if (isOneAsset) | |
426 | 426 | then (pmtId == prIdStr) | |
427 | 427 | else false) | |
428 | 428 | then $Tuple2(0, pmtAmt) | |
429 | 429 | else $Tuple2(calcAmAssetPmt, calcPrAssetPmt) | |
430 | 430 | let writeAmAmt = $t01782518170._1 | |
431 | 431 | let writePrAmt = $t01782518170._2 | |
432 | 432 | let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
433 | 433 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId) | |
434 | 434 | } | |
435 | 435 | } | |
436 | 436 | ||
437 | 437 | ||
438 | 438 | func calcDLp (amountBalance,priceBalance,lpEmission) = { | |
439 | 439 | let updatedDLp = fraction((amountBalance * priceBalance), scale18, lpEmission) | |
440 | 440 | updatedDLp | |
441 | 441 | } | |
442 | 442 | ||
443 | 443 | ||
444 | 444 | func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = { | |
445 | 445 | let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta) | |
446 | 446 | let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta) | |
447 | 447 | let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta) | |
448 | 448 | let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission)) | |
449 | 449 | let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))] | |
450 | 450 | $Tuple2(actions, updatedDLp) | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | ||
454 | 454 | func moa (order) = { | |
455 | 455 | let amountAssetAmount = order.amount | |
456 | 456 | let priceAssetAmount = fraction(order.amount, order.price, scale8) | |
457 | 457 | let $t02011920331 = if ((order.orderType == Buy)) | |
458 | 458 | then $Tuple2(amountAssetAmount, -(priceAssetAmount)) | |
459 | 459 | else $Tuple2(-(amountAssetAmount), priceAssetAmount) | |
460 | 460 | let amountAssetBalanceDelta = $t02011920331._1 | |
461 | 461 | let priceAssetBalanceDelta = $t02011920331._2 | |
462 | 462 | if (if (if (igs()) | |
463 | 463 | then true | |
464 | 464 | else (cfgPoolStatus == PoolMatcherDis)) | |
465 | 465 | then true | |
466 | 466 | else (cfgPoolStatus == PoolShutdown)) | |
467 | 467 | then throw("Admin blocked") | |
468 | 468 | else if (if ((order.assetPair.amountAsset != cfgAmountAssetId)) | |
469 | 469 | then true | |
470 | 470 | else (order.assetPair.priceAsset != cfgPriceAssetId)) | |
471 | 471 | then throw("Wr assets") | |
472 | 472 | else { | |
473 | 473 | let dLp = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, keyDLp), fmtErr("dLp is required"))), fmtErr("invalid dLp")) | |
474 | 474 | let $t02075820858 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
475 | 475 | let unusedActions = $t02075820858._1 | |
476 | 476 | let dLpNew = $t02075820858._2 | |
477 | 477 | let isOrderValid = (dLpNew > dLp) | |
478 | 478 | isOrderValid | |
479 | 479 | } | |
480 | 480 | } | |
481 | 481 | ||
482 | 482 | ||
483 | 483 | func cg (i) = if ((size(i.payments) != 1)) | |
484 | 484 | then throw("1 pmnt exp") | |
485 | 485 | else { | |
486 | 486 | let pmt = value(i.payments[0]) | |
487 | 487 | let pmtAssetId = value(pmt.assetId) | |
488 | 488 | let pmtAmt = pmt.amount | |
489 | 489 | let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
490 | 490 | let outAmAmt = r._1 | |
491 | 491 | let outPrAmt = r._2 | |
492 | 492 | let sts = parseIntValue(r._9) | |
493 | 493 | let state = r._10 | |
494 | 494 | if (if (igs()) | |
495 | 495 | then true | |
496 | 496 | else (sts == PoolShutdown)) | |
497 | 497 | then throw(("Admin blocked: " + toString(sts))) | |
498 | 498 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
499 | 499 | } | |
500 | 500 | ||
501 | 501 | ||
502 | 502 | func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = { | |
503 | 503 | let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId) | |
504 | 504 | let sts = parseIntValue(r._8) | |
505 | 505 | if (if (if (igs()) | |
506 | 506 | then true | |
507 | 507 | else (sts == PoolPutDis)) | |
508 | 508 | then true | |
509 | 509 | else (sts == PoolShutdown)) | |
510 | 510 | then throw(("Blocked:" + toString(sts))) | |
511 | 511 | else r | |
512 | 512 | } | |
513 | 513 | ||
514 | 514 | ||
515 | 515 | func getD (xp) = { | |
516 | 516 | let n = big2 | |
517 | 517 | let xp0 = xp[0] | |
518 | 518 | let xp1 = xp[1] | |
519 | 519 | let aPrecision = parseBigIntValue(Amult) | |
520 | 520 | let a = (parseBigIntValue(A) * aPrecision) | |
521 | 521 | let s = (xp0 + xp1) | |
522 | 522 | if ((s == big0)) | |
523 | 523 | then big0 | |
524 | 524 | else { | |
525 | 525 | let ann = (a * n) | |
526 | 526 | let xp0_xp1_n_n = (((xp0 * xp1) * n) * n) | |
527 | 527 | let ann_s_aPrecision = ((ann * s) / aPrecision) | |
528 | 528 | let ann_aPrecision = (ann - aPrecision) | |
529 | 529 | let n1 = (n + big1) | |
530 | 530 | func calc (acc,cur) = { | |
531 | 531 | let $t02301123031 = acc | |
532 | 532 | let d = $t02301123031._1 | |
533 | 533 | let found = $t02301123031._2 | |
534 | 534 | if ((found != unit)) | |
535 | 535 | then acc | |
536 | 536 | else { | |
537 | 537 | let dp = (((d * d) * d) / xp0_xp1_n_n) | |
538 | 538 | let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp))) | |
539 | 539 | let dDiff = absBigInt((dNext - value(d))) | |
540 | 540 | if ((big1 >= dDiff)) | |
541 | 541 | then $Tuple2(dNext, cur) | |
542 | 542 | else $Tuple2(dNext, unit) | |
543 | 543 | } | |
544 | 544 | } | |
545 | 545 | ||
546 | 546 | let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
547 | 547 | let $t02345223499 = { | |
548 | 548 | let $l = arr | |
549 | 549 | let $s = size($l) | |
550 | 550 | let $acc0 = $Tuple2(s, unit) | |
551 | 551 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
552 | 552 | then $a | |
553 | 553 | else calc($a, $l[$i]) | |
554 | 554 | ||
555 | 555 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
556 | 556 | then $a | |
557 | 557 | else throw("List size exceeds 15") | |
558 | 558 | ||
559 | 559 | $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) | |
560 | 560 | } | |
561 | 561 | let d = $t02345223499._1 | |
562 | 562 | let found = $t02345223499._2 | |
563 | 563 | if ((found != unit)) | |
564 | 564 | then d | |
565 | 565 | else throw(("D calculation error, D = " + toString(d))) | |
566 | 566 | } | |
567 | 567 | } | |
568 | 568 | ||
569 | 569 | ||
570 | 570 | func getYD (xp,i,D) = { | |
571 | 571 | let n = big2 | |
572 | 572 | let x = xp[if ((i == 0)) | |
573 | 573 | then 1 | |
574 | 574 | else 0] | |
575 | 575 | let aPrecision = parseBigIntValue(Amult) | |
576 | 576 | let a = (parseBigIntValue(A) * aPrecision) | |
577 | 577 | let s = x | |
578 | 578 | let ann = (a * n) | |
579 | 579 | let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n)) | |
580 | 580 | let b = ((s + ((D * aPrecision) / ann)) - D) | |
581 | 581 | func calc (acc,cur) = { | |
582 | 582 | let $t02399924019 = acc | |
583 | 583 | let y = $t02399924019._1 | |
584 | 584 | let found = $t02399924019._2 | |
585 | 585 | if ((found != unit)) | |
586 | 586 | then acc | |
587 | 587 | else { | |
588 | 588 | let yNext = (((y * y) + c) / ((big2 * y) + b)) | |
589 | 589 | let yDiff = absBigInt((yNext - value(y))) | |
590 | 590 | if ((big1 >= yDiff)) | |
591 | 591 | then $Tuple2(yNext, cur) | |
592 | 592 | else $Tuple2(yNext, unit) | |
593 | 593 | } | |
594 | 594 | } | |
595 | 595 | ||
596 | 596 | let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
597 | 597 | let $t02432624373 = { | |
598 | 598 | let $l = arr | |
599 | 599 | let $s = size($l) | |
600 | 600 | let $acc0 = $Tuple2(D, unit) | |
601 | 601 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
602 | 602 | then $a | |
603 | 603 | else calc($a, $l[$i]) | |
604 | 604 | ||
605 | 605 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
606 | 606 | then $a | |
607 | 607 | else throw("List size exceeds 15") | |
608 | 608 | ||
609 | 609 | $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) | |
610 | 610 | } | |
611 | 611 | let y = $t02432624373._1 | |
612 | 612 | let found = $t02432624373._2 | |
613 | 613 | if ((found != unit)) | |
614 | 614 | then y | |
615 | 615 | else throw(("Y calculation error, Y = " + toString(y))) | |
616 | 616 | } | |
617 | 617 | ||
618 | 618 | ||
619 | 619 | func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = { | |
620 | 620 | let poolConfig = gpc() | |
621 | 621 | let amId = poolConfig[idxAmAsId] | |
622 | 622 | let prId = poolConfig[idxPrAsId] | |
623 | 623 | let lpId = poolConfig[idxLPAsId] | |
624 | 624 | let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm]) | |
625 | 625 | let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm]) | |
626 | 626 | let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity) | |
627 | 627 | let chechEmission = if ((lpAssetEmission > big0)) | |
628 | 628 | then true | |
629 | 629 | else throw("initial deposit requires all coins") | |
630 | 630 | if ((chechEmission == chechEmission)) | |
631 | 631 | then { | |
632 | 632 | let amBalance = getAccBalance(amId) | |
633 | 633 | let prBalance = getAccBalance(prId) | |
634 | 634 | let $t02515625618 = if ((txId == "")) | |
635 | 635 | then $Tuple2(amBalance, prBalance) | |
636 | 636 | else if ((pmtAssetId == amId)) | |
637 | 637 | then if ((pmtAmtRaw > amBalance)) | |
638 | 638 | then throw("invalid payment amount") | |
639 | 639 | else $Tuple2((amBalance - pmtAmtRaw), prBalance) | |
640 | 640 | else if ((pmtAssetId == prId)) | |
641 | 641 | then if ((pmtAmtRaw > prBalance)) | |
642 | 642 | then throw("invalid payment amount") | |
643 | 643 | else $Tuple2(amBalance, (prBalance - pmtAmtRaw)) | |
644 | 644 | else throw("wrong pmtAssetId") | |
645 | 645 | let amBalanceOld = $t02515625618._1 | |
646 | 646 | let prBalanceOld = $t02515625618._2 | |
647 | 647 | let $t02562425800 = if ((pmtAssetId == amId)) | |
648 | 648 | then $Tuple2(pmtAmtRaw, 0) | |
649 | 649 | else if ((pmtAssetId == prId)) | |
650 | 650 | then $Tuple2(0, pmtAmtRaw) | |
651 | 651 | else throw("invalid payment") | |
652 | 652 | let amAmountRaw = $t02562425800._1 | |
653 | 653 | let prAmountRaw = $t02562425800._2 | |
654 | 654 | let $t02580426043 = if (withTakeFee) | |
655 | 655 | then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2) | |
656 | 656 | else $Tuple3(amAmountRaw, prAmountRaw, 0) | |
657 | 657 | let amAmount = $t02580426043._1 | |
658 | 658 | let prAmount = $t02580426043._2 | |
659 | 659 | let feeAmount = $t02580426043._3 | |
660 | 660 | let amBalanceNew = (amBalanceOld + amAmount) | |
661 | 661 | let prBalanceNew = (prBalanceOld + prAmount) | |
662 | 662 | let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)]) | |
663 | 663 | let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)]) | |
664 | 664 | let checkD = if ((D1 > D0)) | |
665 | 665 | then true | |
666 | 666 | else throw() | |
667 | 667 | if ((checkD == checkD)) | |
668 | 668 | then { | |
669 | 669 | let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0) | |
670 | 670 | let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8) | |
671 | 671 | let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
672 | 672 | let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld) | |
673 | 673 | let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8)) | |
674 | 674 | let priceAssetPart = (pmtAmtRaw - amountAssetPart) | |
675 | 675 | let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld)) | |
676 | 676 | let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth)) | |
677 | 677 | $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus) | |
678 | 678 | } | |
679 | 679 | else throw("Strict value is not equal to itself.") | |
680 | 680 | } | |
681 | 681 | else throw("Strict value is not equal to itself.") | |
682 | 682 | } | |
683 | 683 | ||
684 | 684 | ||
685 | 685 | func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = { | |
686 | 686 | let poolConfig = gpc() | |
687 | 687 | let lpId = poolConfig[idxLPAsId] | |
688 | 688 | let amId = poolConfig[idxAmAsId] | |
689 | 689 | let prId = poolConfig[idxPrAsId] | |
690 | 690 | let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm]) | |
691 | 691 | let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm]) | |
692 | 692 | let poolStatus = poolConfig[idxPoolSt] | |
693 | 693 | let userAddress = if ((caller == restContract)) | |
694 | 694 | then originCaller | |
695 | 695 | else caller | |
696 | 696 | let pmt = value(payments[0]) | |
697 | 697 | let pmtAssetId = value(pmt.assetId) | |
698 | 698 | let pmtAmt = pmt.amount | |
699 | 699 | let txId58 = toBase58String(transactionId) | |
700 | 700 | if ((lpId != toBase58String(pmtAssetId))) | |
701 | 701 | then throw("Wrong LP") | |
702 | 702 | else { | |
703 | 703 | let amBalance = getAccBalance(amId) | |
704 | 704 | let prBalance = getAccBalance(prId) | |
705 | 705 | let $t02804528156 = { | |
706 | 706 | let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil) | |
707 | 707 | if ($isInstanceOf(@, "(Int, Int)")) | |
708 | 708 | then @ | |
709 | 709 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
710 | 710 | } | |
711 | 711 | if (($t02804528156 == $t02804528156)) | |
712 | 712 | then { | |
713 | 713 | let feeAmount = $t02804528156._2 | |
714 | 714 | let totalGet = $t02804528156._1 | |
715 | 715 | let totalAmount = if (if ((minOutAmount > 0)) | |
716 | 716 | then (minOutAmount > totalGet) | |
717 | 717 | else false) | |
718 | 718 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
719 | 719 | else totalGet | |
720 | 720 | let $t02834628653 = if ((outAssetId == amId)) | |
721 | 721 | then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance) | |
722 | 722 | else if ((outAssetId == prId)) | |
723 | 723 | then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount)) | |
724 | 724 | else throw("invalid out asset id") | |
725 | 725 | let outAm = $t02834628653._1 | |
726 | 726 | let outPr = $t02834628653._2 | |
727 | 727 | let amBalanceNew = $t02834628653._3 | |
728 | 728 | let prBalanceNew = $t02834628653._4 | |
729 | 729 | let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals)) | |
730 | 730 | let curPr = f1(curPrX18, scale8) | |
731 | 731 | let outAssetIdOrWaves = if ((outAssetId == "WAVES")) | |
732 | 732 | then unit | |
733 | 733 | else fromBase58String(outAssetId) | |
734 | 734 | let sendFeeToMatcher = if ((feeAmount > 0)) | |
735 | 735 | then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)] | |
736 | 736 | else nil | |
737 | 737 | let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher) | |
738 | 738 | if ((state == state)) | |
739 | 739 | then { | |
740 | 740 | let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
741 | 741 | if ((burn == burn)) | |
742 | - | then $Tuple2(state, totalAmount) | |
742 | + | then { | |
743 | + | let $t02943829788 = { | |
744 | + | let feeAmountForCalc = if ((this == feeCollectorAddress)) | |
745 | + | then 0 | |
746 | + | else feeAmount | |
747 | + | let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId)) | |
748 | + | then true | |
749 | + | else false | |
750 | + | if (outInAmountAsset) | |
751 | + | then $Tuple2(-((totalGet + feeAmountForCalc)), 0) | |
752 | + | else $Tuple2(0, -((totalGet + feeAmountForCalc))) | |
753 | + | } | |
754 | + | let amountAssetBalanceDelta = $t02943829788._1 | |
755 | + | let priceAssetBalanceDelta = $t02943829788._2 | |
756 | + | let $t02979129899 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
757 | + | let refreshDLpActions = $t02979129899._1 | |
758 | + | let updatedDLp = $t02979129899._2 | |
759 | + | $Tuple2((state ++ refreshDLpActions), totalAmount) | |
760 | + | } | |
743 | 761 | else throw("Strict value is not equal to itself.") | |
744 | 762 | } | |
745 | 763 | else throw("Strict value is not equal to itself.") | |
746 | 764 | } | |
747 | 765 | else throw("Strict value is not equal to itself.") | |
748 | 766 | } | |
749 | 767 | } | |
750 | 768 | ||
751 | 769 | ||
752 | 770 | func m () = match getString(mpk()) { | |
753 | 771 | case s: String => | |
754 | 772 | fromBase58String(s) | |
755 | 773 | case _: Unit => | |
756 | 774 | unit | |
757 | 775 | case _ => | |
758 | 776 | throw("Match error") | |
759 | 777 | } | |
760 | 778 | ||
761 | 779 | ||
762 | 780 | func pm () = match getString(pmpk()) { | |
763 | 781 | case s: String => | |
764 | 782 | fromBase58String(s) | |
765 | 783 | case _: Unit => | |
766 | 784 | unit | |
767 | 785 | case _ => | |
768 | 786 | throw("Match error") | |
769 | 787 | } | |
770 | 788 | ||
771 | 789 | ||
772 | 790 | let pd = throw("Permission denied") | |
773 | 791 | ||
774 | 792 | func isManager (i) = match m() { | |
775 | 793 | case pk: ByteVector => | |
776 | 794 | (i.callerPublicKey == pk) | |
777 | 795 | case _: Unit => | |
778 | 796 | (i.caller == this) | |
779 | 797 | case _ => | |
780 | 798 | throw("Match error") | |
781 | 799 | } | |
782 | 800 | ||
783 | 801 | ||
784 | 802 | func mm (i) = match m() { | |
785 | 803 | case pk: ByteVector => | |
786 | 804 | if ((i.callerPublicKey == pk)) | |
787 | 805 | then true | |
788 | 806 | else pd | |
789 | 807 | case _: Unit => | |
790 | 808 | if ((i.caller == this)) | |
791 | 809 | then true | |
792 | 810 | else pd | |
793 | 811 | case _ => | |
794 | 812 | throw("Match error") | |
795 | 813 | } | |
796 | 814 | ||
797 | 815 | ||
798 | 816 | @Callable(i) | |
799 | 817 | func constructor (fc) = { | |
800 | 818 | let c = mm(i) | |
801 | 819 | if ((c == c)) | |
802 | 820 | then [StringEntry(fc(), fc)] | |
803 | 821 | else throw("Strict value is not equal to itself.") | |
804 | 822 | } | |
805 | 823 | ||
806 | 824 | ||
807 | 825 | ||
808 | 826 | @Callable(i) | |
809 | 827 | func setManager (pendingManagerPublicKey) = { | |
810 | 828 | let c = mm(i) | |
811 | 829 | if ((c == c)) | |
812 | 830 | then { | |
813 | 831 | let cm = fromBase58String(pendingManagerPublicKey) | |
814 | 832 | if ((cm == cm)) | |
815 | 833 | then [StringEntry(pmpk(), pendingManagerPublicKey)] | |
816 | 834 | else throw("Strict value is not equal to itself.") | |
817 | 835 | } | |
818 | 836 | else throw("Strict value is not equal to itself.") | |
819 | 837 | } | |
820 | 838 | ||
821 | 839 | ||
822 | 840 | ||
823 | 841 | @Callable(i) | |
824 | 842 | func confirmManager () = { | |
825 | 843 | let p = pm() | |
826 | 844 | let hpm = if (isDefined(p)) | |
827 | 845 | then true | |
828 | 846 | else throw("No pending manager") | |
829 | 847 | if ((hpm == hpm)) | |
830 | 848 | then { | |
831 | 849 | let cpm = if ((i.callerPublicKey == value(p))) | |
832 | 850 | then true | |
833 | 851 | else throw("You are not pending manager") | |
834 | 852 | if ((cpm == cpm)) | |
835 | 853 | then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())] | |
836 | 854 | else throw("Strict value is not equal to itself.") | |
837 | 855 | } | |
838 | 856 | else throw("Strict value is not equal to itself.") | |
839 | 857 | } | |
840 | 858 | ||
841 | 859 | ||
842 | 860 | ||
843 | 861 | @Callable(i) | |
844 | 862 | func put (slip,autoStake) = { | |
845 | 863 | let factCfg = gfc() | |
846 | 864 | let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr") | |
847 | 865 | let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr") | |
848 | 866 | if ((0 > slip)) | |
849 | 867 | then throw("Wrong slippage") | |
850 | 868 | else if ((size(i.payments) != 2)) | |
851 | 869 | then throw("2 pmnts expd") | |
852 | 870 | else { | |
853 | 871 | let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, true, 0, "") | |
854 | 872 | let emitLpAmt = e._2 | |
855 | 873 | let lpAssetId = e._7 | |
856 | 874 | let state = e._9 | |
857 | 875 | let amDiff = e._10 | |
858 | 876 | let prDiff = e._11 | |
859 | 877 | let amId = e._12 | |
860 | 878 | let prId = e._13 | |
861 | 879 | let r = invoke(fca, "emit", [emitLpAmt], nil) | |
862 | 880 | if ((r == r)) | |
863 | 881 | then { | |
864 | 882 | let el = match r { | |
865 | 883 | case legacy: Address => | |
866 | 884 | invoke(legacy, "emit", [emitLpAmt], nil) | |
867 | 885 | case _ => | |
868 | 886 | unit | |
869 | 887 | } | |
870 | 888 | if ((el == el)) | |
871 | 889 | then { | |
872 | 890 | let sa = if ((amDiff > 0)) | |
873 | 891 | then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)]) | |
874 | 892 | else nil | |
875 | 893 | if ((sa == sa)) | |
876 | 894 | then { | |
877 | 895 | let sp = if ((prDiff > 0)) | |
878 | 896 | then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)]) | |
879 | 897 | else nil | |
880 | 898 | if ((sp == sp)) | |
881 | 899 | then { | |
882 | 900 | let lpTrnsfr = if (autoStake) | |
883 | 901 | then { | |
884 | 902 | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
885 | 903 | if ((ss == ss)) | |
886 | 904 | then nil | |
887 | 905 | else throw("Strict value is not equal to itself.") | |
888 | 906 | } | |
889 | 907 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
890 | - | (state ++ lpTrnsfr) | |
908 | + | let $t03348133546 = refreshDLpInternal(0, 0, 0) | |
909 | + | let refreshDLpActions = $t03348133546._1 | |
910 | + | let updatedDLp = $t03348133546._2 | |
911 | + | ((state ++ lpTrnsfr) ++ refreshDLpActions) | |
891 | 912 | } | |
892 | 913 | else throw("Strict value is not equal to itself.") | |
893 | 914 | } | |
894 | 915 | else throw("Strict value is not equal to itself.") | |
895 | 916 | } | |
896 | 917 | else throw("Strict value is not equal to itself.") | |
897 | 918 | } | |
898 | 919 | else throw("Strict value is not equal to itself.") | |
899 | 920 | } | |
900 | 921 | } | |
901 | 922 | ||
902 | 923 | ||
903 | 924 | ||
904 | 925 | @Callable(i) | |
905 | 926 | func putOneTknV2 (minOutAmount,autoStake) = { | |
906 | 927 | let isPoolOneTokenOperationsDisabled = { | |
907 | 928 | let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
908 | 929 | if ($isInstanceOf(@, "Boolean")) | |
909 | 930 | then @ | |
910 | 931 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
911 | 932 | } | |
912 | 933 | let isPutDisabled = if (if (if (igs()) | |
913 | 934 | then true | |
914 | 935 | else (cfgPoolStatus == PoolPutDis)) | |
915 | 936 | then true | |
916 | 937 | else (cfgPoolStatus == PoolShutdown)) | |
917 | 938 | then true | |
918 | 939 | else isPoolOneTokenOperationsDisabled | |
919 | 940 | let checks = [if (if (!(isPutDisabled)) | |
920 | 941 | then true | |
921 | 942 | else isManager(i)) | |
922 | 943 | then true | |
923 | 944 | else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1)) | |
924 | 945 | then true | |
925 | 946 | else throwErr("exactly 1 payment are expected")] | |
926 | 947 | if ((checks == checks)) | |
927 | 948 | then { | |
928 | 949 | let poolConfig = gpc() | |
929 | 950 | let amId = poolConfig[idxAmAsId] | |
930 | 951 | let prId = poolConfig[idxPrAsId] | |
931 | 952 | let lpId = fromBase58String(poolConfig[idxLPAsId]) | |
932 | 953 | let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm]) | |
933 | 954 | let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm]) | |
934 | 955 | let userAddress = if ((i.caller == this)) | |
935 | 956 | then i.originCaller | |
936 | 957 | else i.caller | |
937 | 958 | let pmt = value(i.payments[0]) | |
938 | 959 | let pmtAssetId = toBase58String(value(pmt.assetId)) | |
939 | 960 | let pmtAmt = pmt.amount | |
940 | - | let $ | |
941 | - | if (($ | |
961 | + | let $t03460834766 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true) | |
962 | + | if (($t03460834766 == $t03460834766)) | |
942 | 963 | then { | |
943 | - | let feeAmount = $ | |
944 | - | let state = $ | |
945 | - | let estimLP = $ | |
964 | + | let feeAmount = $t03460834766._3 | |
965 | + | let state = $t03460834766._2 | |
966 | + | let estimLP = $t03460834766._1 | |
946 | 967 | let emitLpAmt = if (if ((minOutAmount > 0)) | |
947 | 968 | then (minOutAmount > estimLP) | |
948 | 969 | else false) | |
949 | 970 | then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], "")) | |
950 | 971 | else estimLP | |
951 | 972 | let e = invoke(fca, "emit", [emitLpAmt], nil) | |
952 | 973 | if ((e == e)) | |
953 | 974 | then { | |
954 | 975 | let el = match e { | |
955 | 976 | case legacy: Address => | |
956 | 977 | invoke(legacy, "emit", [emitLpAmt], nil) | |
957 | 978 | case _ => | |
958 | 979 | unit | |
959 | 980 | } | |
960 | 981 | if ((el == el)) | |
961 | 982 | then { | |
962 | 983 | let lpTrnsfr = if (autoStake) | |
963 | 984 | then { | |
964 | 985 | let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)]) | |
965 | 986 | if ((ss == ss)) | |
966 | 987 | then nil | |
967 | 988 | else throw("Strict value is not equal to itself.") | |
968 | 989 | } | |
969 | 990 | else [ScriptTransfer(i.caller, emitLpAmt, lpId)] | |
970 | 991 | let sendFeeToMatcher = if ((feeAmount > 0)) | |
971 | 992 | then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))] | |
972 | 993 | else nil | |
973 | - | $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt) | |
994 | + | let $t03558135930 = if ((this == feeCollectorAddress)) | |
995 | + | then $Tuple2(0, 0) | |
996 | + | else { | |
997 | + | let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId)) | |
998 | + | then true | |
999 | + | else false | |
1000 | + | if (paymentInAmountAsset) | |
1001 | + | then $Tuple2(-(feeAmount), 0) | |
1002 | + | else $Tuple2(0, -(feeAmount)) | |
1003 | + | } | |
1004 | + | let amountAssetBalanceDelta = $t03558135930._1 | |
1005 | + | let priceAssetBalanceDelta = $t03558135930._2 | |
1006 | + | let $t03593336041 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0) | |
1007 | + | let refreshDLpActions = $t03593336041._1 | |
1008 | + | let updatedDLp = $t03593336041._2 | |
1009 | + | $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt) | |
974 | 1010 | } | |
975 | 1011 | else throw("Strict value is not equal to itself.") | |
976 | 1012 | } | |
977 | 1013 | else throw("Strict value is not equal to itself.") | |
978 | 1014 | } | |
979 | 1015 | else throw("Strict value is not equal to itself.") | |
980 | 1016 | } | |
981 | 1017 | else throw("Strict value is not equal to itself.") | |
982 | 1018 | } | |
983 | 1019 | ||
984 | 1020 | ||
985 | 1021 | ||
986 | 1022 | @Callable(i) | |
987 | 1023 | func putForFree (maxSlpg) = if ((0 > maxSlpg)) | |
988 | 1024 | then throw("Wrong slpg") | |
989 | 1025 | else if ((size(i.payments) != 2)) | |
990 | 1026 | then throw("2 pmnts expd") | |
991 | 1027 | else { | |
992 | 1028 | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, true, 0, "") | |
993 | - | estPut._9 | |
1029 | + | let state = estPut._9 | |
1030 | + | let $t03679736862 = refreshDLpInternal(0, 0, 0) | |
1031 | + | let refreshDLpActions = $t03679736862._1 | |
1032 | + | let updatedKLp = $t03679736862._2 | |
1033 | + | (state ++ refreshDLpActions) | |
994 | 1034 | } | |
995 | 1035 | ||
996 | 1036 | ||
997 | 1037 | ||
998 | 1038 | @Callable(i) | |
999 | 1039 | func get () = { | |
1000 | 1040 | let r = cg(i) | |
1001 | 1041 | let outAmtAmt = r._1 | |
1002 | 1042 | let outPrAmt = r._2 | |
1003 | 1043 | let pmtAmt = r._3 | |
1004 | 1044 | let pmtAssetId = r._4 | |
1005 | 1045 | let state = r._5 | |
1006 | 1046 | let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1007 | 1047 | if ((b == b)) | |
1008 | - | then state | |
1048 | + | then { | |
1049 | + | let $t03749437576 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0) | |
1050 | + | let refreshDLpActions = $t03749437576._1 | |
1051 | + | let updatedDLp = $t03749437576._2 | |
1052 | + | (state ++ refreshDLpActions) | |
1053 | + | } | |
1009 | 1054 | else throw("Strict value is not equal to itself.") | |
1010 | 1055 | } | |
1011 | 1056 | ||
1012 | 1057 | ||
1013 | 1058 | ||
1014 | 1059 | @Callable(i) | |
1015 | 1060 | func getOneTknV2 (outAssetId,minOutAmount) = { | |
1016 | 1061 | let isPoolOneTokenOperationsDisabled = { | |
1017 | 1062 | let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1018 | 1063 | if ($isInstanceOf(@, "Boolean")) | |
1019 | 1064 | then @ | |
1020 | 1065 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1021 | 1066 | } | |
1022 | 1067 | let isGetDisabled = if (if (igs()) | |
1023 | 1068 | then true | |
1024 | 1069 | else (cfgPoolStatus == PoolShutdown)) | |
1025 | 1070 | then true | |
1026 | 1071 | else isPoolOneTokenOperationsDisabled | |
1027 | 1072 | let checks = [if (if (!(isGetDisabled)) | |
1028 | 1073 | then true | |
1029 | 1074 | else isManager(i)) | |
1030 | 1075 | then true | |
1031 | 1076 | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1)) | |
1032 | 1077 | then true | |
1033 | 1078 | else throwErr("exactly 1 payment are expected")] | |
1034 | 1079 | if ((checks == checks)) | |
1035 | 1080 | then { | |
1036 | - | let $ | |
1037 | - | let state = $ | |
1038 | - | let totalAmount = $ | |
1081 | + | let $t03812138276 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId) | |
1082 | + | let state = $t03812138276._1 | |
1083 | + | let totalAmount = $t03812138276._2 | |
1039 | 1084 | $Tuple2(state, totalAmount) | |
1040 | 1085 | } | |
1041 | 1086 | else throw("Strict value is not equal to itself.") | |
1042 | 1087 | } | |
1043 | 1088 | ||
1044 | 1089 | ||
1045 | 1090 | ||
1046 | 1091 | @Callable(i) | |
1047 | 1092 | func refreshDLp () = { | |
1048 | 1093 | let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0) | |
1049 | 1094 | let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay)) | |
1050 | 1095 | then unit | |
1051 | 1096 | else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], "")) | |
1052 | 1097 | if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight)) | |
1053 | 1098 | then { | |
1054 | - | let $ | |
1055 | - | let actions = $ | |
1056 | - | let updatedKLp = $ | |
1099 | + | let $t03867438729 = refreshDLpInternal(0, 0, 0) | |
1100 | + | let actions = $t03867438729._1 | |
1101 | + | let updatedKLp = $t03867438729._2 | |
1057 | 1102 | $Tuple2(actions, toString(updatedKLp)) | |
1058 | 1103 | } | |
1059 | 1104 | else throw("Strict value is not equal to itself.") | |
1060 | 1105 | } | |
1061 | 1106 | ||
1062 | 1107 | ||
1063 | 1108 | ||
1064 | 1109 | @Callable(i) | |
1065 | 1110 | func getOneTknV2READONLY (outAssetId,lpAssetAmount) = { | |
1066 | 1111 | let poolConfig = gpc() | |
1067 | 1112 | let amId = poolConfig[idxAmAsId] | |
1068 | 1113 | let prId = poolConfig[idxPrAsId] | |
1069 | 1114 | let lpId = poolConfig[idxLPAsId] | |
1070 | 1115 | let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))] | |
1071 | 1116 | let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity) | |
1072 | 1117 | let D0 = getD(xp) | |
1073 | 1118 | let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission)) | |
1074 | 1119 | let index = if ((outAssetId == amId)) | |
1075 | 1120 | then 0 | |
1076 | 1121 | else if ((outAssetId == prId)) | |
1077 | 1122 | then 1 | |
1078 | 1123 | else throw("invalid out asset id") | |
1079 | 1124 | let newY = getYD(xp, index, D1) | |
1080 | 1125 | let dy = (xp[index] - newY) | |
1081 | 1126 | let totalGetRaw = max([0, toInt((dy - big1))]) | |
1082 | - | let $ | |
1083 | - | let totalGet = $ | |
1084 | - | let feeAmount = $ | |
1127 | + | let $t03953139580 = takeFee(totalGetRaw) | |
1128 | + | let totalGet = $t03953139580._1 | |
1129 | + | let feeAmount = $t03953139580._2 | |
1085 | 1130 | $Tuple2(nil, $Tuple2(totalGet, feeAmount)) | |
1086 | 1131 | } | |
1087 | 1132 | ||
1088 | 1133 | ||
1089 | 1134 | ||
1090 | 1135 | @Callable(i) | |
1091 | 1136 | func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = { | |
1092 | 1137 | let poolConfig = gpc() | |
1093 | 1138 | let amId = poolConfig[idxAmAsId] | |
1094 | 1139 | let prId = poolConfig[idxPrAsId] | |
1095 | 1140 | let lpId = poolConfig[idxLPAsId] | |
1096 | 1141 | let amBalance = getAccBalance(amId) | |
1097 | 1142 | let prBalance = getAccBalance(prId) | |
1098 | - | let $ | |
1143 | + | let $t03992540040 = { | |
1099 | 1144 | let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil) | |
1100 | 1145 | if ($isInstanceOf(@, "(Int, Int)")) | |
1101 | 1146 | then @ | |
1102 | 1147 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
1103 | 1148 | } | |
1104 | - | let totalGet = $ | |
1105 | - | let feeAmount = $ | |
1149 | + | let totalGet = $t03992540040._1 | |
1150 | + | let feeAmount = $t03992540040._2 | |
1106 | 1151 | let r = ego("", lpId, lpAssetAmount, this) | |
1107 | 1152 | let outAmAmt = r._1 | |
1108 | 1153 | let outPrAmt = r._2 | |
1109 | 1154 | let sumOfGetAssets = (outAmAmt + outPrAmt) | |
1110 | 1155 | let bonus = if ((sumOfGetAssets == 0)) | |
1111 | 1156 | then if ((totalGet == 0)) | |
1112 | 1157 | then 0 | |
1113 | 1158 | else throw("bonus calculation error") | |
1114 | 1159 | else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets) | |
1115 | 1160 | $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus)) | |
1116 | 1161 | } | |
1117 | 1162 | ||
1118 | 1163 | ||
1119 | 1164 | ||
1120 | 1165 | @Callable(i) | |
1121 | 1166 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
1122 | 1167 | let r = cg(i) | |
1123 | 1168 | let outAmAmt = r._1 | |
1124 | 1169 | let outPrAmt = r._2 | |
1125 | 1170 | let pmtAmt = r._3 | |
1126 | 1171 | let pmtAssetId = r._4 | |
1127 | 1172 | let state = r._5 | |
1128 | 1173 | if ((noLessThenAmtAsset > outAmAmt)) | |
1129 | 1174 | then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
1130 | 1175 | else if ((noLessThenPriceAsset > outPrAmt)) | |
1131 | 1176 | then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
1132 | 1177 | else { | |
1133 | 1178 | let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
1134 | 1179 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1135 | - | then state | |
1180 | + | then { | |
1181 | + | let $t04112641207 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1182 | + | let refreshDLpActions = $t04112641207._1 | |
1183 | + | let updatedDLp = $t04112641207._2 | |
1184 | + | (state ++ refreshDLpActions) | |
1185 | + | } | |
1136 | 1186 | else throw("Strict value is not equal to itself.") | |
1137 | 1187 | } | |
1138 | 1188 | } | |
1139 | 1189 | ||
1140 | 1190 | ||
1141 | 1191 | ||
1142 | 1192 | @Callable(i) | |
1143 | 1193 | func unstakeAndGet (amount) = { | |
1144 | 1194 | let checkPayments = if ((size(i.payments) != 0)) | |
1145 | 1195 | then throw("No pmnts expd") | |
1146 | 1196 | else true | |
1147 | 1197 | if ((checkPayments == checkPayments)) | |
1148 | 1198 | then { | |
1149 | 1199 | let cfg = gpc() | |
1150 | 1200 | let factoryCfg = gfc() | |
1151 | 1201 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
1152 | 1202 | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
1153 | 1203 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
1154 | 1204 | if ((unstakeInv == unstakeInv)) | |
1155 | 1205 | then { | |
1156 | 1206 | let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
1207 | + | let outAmAmt = r._1 | |
1208 | + | let outPrAmt = r._2 | |
1157 | 1209 | let sts = parseIntValue(r._9) | |
1158 | 1210 | let state = r._10 | |
1159 | 1211 | let v = if (if (igs()) | |
1160 | 1212 | then true | |
1161 | 1213 | else (sts == PoolShutdown)) | |
1162 | 1214 | then throw(("Blocked: " + toString(sts))) | |
1163 | 1215 | else true | |
1164 | 1216 | if ((v == v)) | |
1165 | 1217 | then { | |
1166 | 1218 | let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
1167 | 1219 | if ((burnA == burnA)) | |
1168 | - | then state | |
1220 | + | then { | |
1221 | + | let $t04212042201 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1222 | + | let refreshDLpActions = $t04212042201._1 | |
1223 | + | let updatedDLp = $t04212042201._2 | |
1224 | + | (state ++ refreshDLpActions) | |
1225 | + | } | |
1169 | 1226 | else throw("Strict value is not equal to itself.") | |
1170 | 1227 | } | |
1171 | 1228 | else throw("Strict value is not equal to itself.") | |
1172 | 1229 | } | |
1173 | 1230 | else throw("Strict value is not equal to itself.") | |
1174 | 1231 | } | |
1175 | 1232 | else throw("Strict value is not equal to itself.") | |
1176 | 1233 | } | |
1177 | 1234 | ||
1178 | 1235 | ||
1179 | 1236 | ||
1180 | 1237 | @Callable(i) | |
1181 | 1238 | func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = { | |
1182 | 1239 | let isGetDisabled = if (igs()) | |
1183 | 1240 | then true | |
1184 | 1241 | else (cfgPoolStatus == PoolShutdown) | |
1185 | 1242 | let checks = [if (!(isGetDisabled)) | |
1186 | 1243 | then true | |
1187 | 1244 | else throw("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1188 | 1245 | then true | |
1189 | 1246 | else throw("no payments are expected")] | |
1190 | 1247 | if ((checks == checks)) | |
1191 | 1248 | then { | |
1192 | 1249 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil) | |
1193 | 1250 | if ((unstakeInv == unstakeInv)) | |
1194 | 1251 | then { | |
1195 | 1252 | let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller) | |
1196 | 1253 | let outAmAmt = res._1 | |
1197 | 1254 | let outPrAmt = res._2 | |
1198 | 1255 | let state = res._10 | |
1199 | 1256 | let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset)) | |
1200 | 1257 | then true | |
1201 | 1258 | else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset)) | |
1202 | 1259 | then true | |
1203 | 1260 | else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))] | |
1204 | 1261 | if ((checkAmounts == checkAmounts)) | |
1205 | 1262 | then { | |
1206 | 1263 | let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)]) | |
1207 | 1264 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
1208 | - | then state | |
1265 | + | then { | |
1266 | + | let $t04329943380 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0) | |
1267 | + | let refreshDLpActions = $t04329943380._1 | |
1268 | + | let updatedDLp = $t04329943380._2 | |
1269 | + | (state ++ refreshDLpActions) | |
1270 | + | } | |
1209 | 1271 | else throw("Strict value is not equal to itself.") | |
1210 | 1272 | } | |
1211 | 1273 | else throw("Strict value is not equal to itself.") | |
1212 | 1274 | } | |
1213 | 1275 | else throw("Strict value is not equal to itself.") | |
1214 | 1276 | } | |
1215 | 1277 | else throw("Strict value is not equal to itself.") | |
1216 | 1278 | } | |
1217 | 1279 | ||
1218 | 1280 | ||
1219 | 1281 | ||
1220 | 1282 | @Callable(i) | |
1221 | 1283 | func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = { | |
1222 | 1284 | let isPoolOneTokenOperationsDisabled = { | |
1223 | 1285 | let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1224 | 1286 | if ($isInstanceOf(@, "Boolean")) | |
1225 | 1287 | then @ | |
1226 | 1288 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
1227 | 1289 | } | |
1228 | 1290 | let isGetDisabled = if (if (igs()) | |
1229 | 1291 | then true | |
1230 | 1292 | else (cfgPoolStatus == PoolShutdown)) | |
1231 | 1293 | then true | |
1232 | 1294 | else isPoolOneTokenOperationsDisabled | |
1233 | 1295 | let checks = [if (if (!(isGetDisabled)) | |
1234 | 1296 | then true | |
1235 | 1297 | else isManager(i)) | |
1236 | 1298 | then true | |
1237 | 1299 | else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0)) | |
1238 | 1300 | then true | |
1239 | 1301 | else throwErr("no payments are expected")] | |
1240 | 1302 | if ((checks == checks)) | |
1241 | 1303 | then { | |
1242 | 1304 | let cfg = gpc() | |
1243 | 1305 | let factoryCfg = gfc() | |
1244 | 1306 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
1245 | 1307 | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
1246 | 1308 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil) | |
1247 | 1309 | if ((unstakeInv == unstakeInv)) | |
1248 | 1310 | then { | |
1249 | - | let $ | |
1250 | - | let state = $ | |
1251 | - | let totalAmount = $ | |
1311 | + | let $t04424144429 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId) | |
1312 | + | let state = $t04424144429._1 | |
1313 | + | let totalAmount = $t04424144429._2 | |
1252 | 1314 | $Tuple2(state, totalAmount) | |
1253 | 1315 | } | |
1254 | 1316 | else throw("Strict value is not equal to itself.") | |
1255 | 1317 | } | |
1256 | 1318 | else throw("Strict value is not equal to itself.") | |
1257 | 1319 | } | |
1258 | 1320 | ||
1259 | 1321 | ||
1260 | 1322 | ||
1261 | 1323 | @Callable(i) | |
1262 | 1324 | func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = { | |
1263 | 1325 | let poolConfig = gpc() | |
1264 | 1326 | let amId = poolConfig[idxAmAsId] | |
1265 | 1327 | let prId = poolConfig[idxPrAsId] | |
1266 | 1328 | let lpId = poolConfig[idxLPAsId] | |
1267 | - | let $ | |
1268 | - | let lpAmount = $ | |
1269 | - | let state = $ | |
1270 | - | let feeAmount = $ | |
1271 | - | let bonus = $ | |
1329 | + | let $t04468844791 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true) | |
1330 | + | let lpAmount = $t04468844791._1 | |
1331 | + | let state = $t04468844791._2 | |
1332 | + | let feeAmount = $t04468844791._3 | |
1333 | + | let bonus = $t04468844791._4 | |
1272 | 1334 | $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus)) | |
1273 | 1335 | } | |
1274 | 1336 | ||
1275 | 1337 | ||
1276 | 1338 | ||
1277 | 1339 | @Callable(i) | |
1278 | 1340 | func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = { | |
1279 | 1341 | let poolConfig = gpc() | |
1280 | 1342 | let amId = poolConfig[idxAmAsId] | |
1281 | 1343 | let prId = poolConfig[idxPrAsId] | |
1282 | 1344 | let lpId = poolConfig[idxLPAsId] | |
1283 | - | let $ | |
1284 | - | let lpAmount = $ | |
1285 | - | let state = $ | |
1286 | - | let feeAmount = $ | |
1287 | - | let bonus = $ | |
1345 | + | let $t04507045174 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false) | |
1346 | + | let lpAmount = $t04507045174._1 | |
1347 | + | let state = $t04507045174._2 | |
1348 | + | let feeAmount = $t04507045174._3 | |
1349 | + | let bonus = $t04507045174._4 | |
1288 | 1350 | $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus)) | |
1289 | 1351 | } | |
1290 | 1352 | ||
1291 | 1353 | ||
1292 | 1354 | ||
1293 | 1355 | @Callable(i) | |
1294 | 1356 | func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca))) | |
1295 | 1357 | then throw("denied") | |
1296 | 1358 | else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success") | |
1297 | 1359 | ||
1298 | 1360 | ||
1299 | 1361 | ||
1300 | 1362 | @Callable(i) | |
1301 | 1363 | func setS (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
1302 | 1364 | then pd | |
1303 | 1365 | else [StringEntry(k, v)] | |
1304 | 1366 | ||
1305 | 1367 | ||
1306 | 1368 | ||
1307 | 1369 | @Callable(i) | |
1308 | 1370 | func setI (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
1309 | 1371 | then pd | |
1310 | 1372 | else [IntegerEntry(k, v)] | |
1311 | 1373 | ||
1312 | 1374 | ||
1313 | 1375 | ||
1314 | 1376 | @Callable(i) | |
1315 | 1377 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc()) | |
1316 | 1378 | ||
1317 | 1379 | ||
1318 | 1380 | ||
1319 | 1381 | @Callable(i) | |
1320 | 1382 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
1321 | 1383 | ||
1322 | 1384 | ||
1323 | 1385 | ||
1324 | 1386 | @Callable(i) | |
1325 | 1387 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
1326 | 1388 | let pr = calcPrices(amAmt, prAmt, lpAmt) | |
1327 | 1389 | $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])]) | |
1328 | 1390 | } | |
1329 | 1391 | ||
1330 | 1392 | ||
1331 | 1393 | ||
1332 | 1394 | @Callable(i) | |
1333 | 1395 | func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult)) | |
1334 | 1396 | ||
1335 | 1397 | ||
1336 | 1398 | ||
1337 | 1399 | @Callable(i) | |
1338 | 1400 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult))) | |
1339 | 1401 | ||
1340 | 1402 | ||
1341 | 1403 | ||
1342 | 1404 | @Callable(i) | |
1343 | 1405 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
1344 | 1406 | ||
1345 | 1407 | ||
1346 | 1408 | ||
1347 | 1409 | @Callable(i) | |
1348 | 1410 | func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, "")) | |
1349 | 1411 | ||
1350 | 1412 | ||
1351 | 1413 | ||
1352 | 1414 | @Callable(i) | |
1353 | 1415 | func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = { | |
1354 | 1416 | let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr)) | |
1355 | 1417 | $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10)) | |
1356 | 1418 | } | |
1357 | 1419 | ||
1358 | 1420 | ||
1359 | 1421 | ||
1360 | 1422 | @Callable(i) | |
1361 | 1423 | func getFeeREADONLY () = $Tuple2(nil, fee) | |
1362 | 1424 | ||
1363 | 1425 | ||
1364 | 1426 | @Verifier(tx) | |
1365 | 1427 | func verify () = { | |
1366 | 1428 | let targetPublicKey = match m() { | |
1367 | 1429 | case pk: ByteVector => | |
1368 | 1430 | pk | |
1369 | 1431 | case _: Unit => | |
1370 | 1432 | tx.senderPublicKey | |
1371 | 1433 | case _ => | |
1372 | 1434 | throw("Match error") | |
1373 | 1435 | } | |
1374 | 1436 | match tx { | |
1375 | 1437 | case order: Order => | |
1376 | 1438 | let matcherPub = mp() | |
1377 | 1439 | let orderValid = moa(order) | |
1378 | 1440 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
1379 | 1441 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
1380 | 1442 | if (if (if (orderValid) | |
1381 | 1443 | then senderValid | |
1382 | 1444 | else false) | |
1383 | 1445 | then matcherValid | |
1384 | 1446 | else false) | |
1385 | 1447 | then true | |
1386 | 1448 | else toe(orderValid, senderValid, matcherValid) | |
1387 | 1449 | case s: SetScriptTransaction => | |
1388 | 1450 | let newHash = blake2b256(value(s.script)) | |
1389 | 1451 | let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash()))) | |
1390 | 1452 | let currentHash = scriptHash(this) | |
1391 | 1453 | if (if ((allowedHash == newHash)) | |
1392 | 1454 | then (currentHash != newHash) | |
1393 | 1455 | else false) | |
1394 | 1456 | then true | |
1395 | 1457 | else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
1396 | 1458 | case _ => | |
1397 | 1459 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
1398 | 1460 | } | |
1399 | 1461 | } | |
1400 | 1462 |
github/deemru/w8io/026f985 150.20 ms ◑