tx · 5w6yB7atnfi4C8gKGUUazXp8BHxm4Rf42kWZnHFkScM1 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi: -0.01400000 Waves 2022.03.16 11:20 [1966278] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves
{ "type": 13, "id": "5w6yB7atnfi4C8gKGUUazXp8BHxm4Rf42kWZnHFkScM1", "fee": 1400000, "feeAssetId": null, "timestamp": 1647418829889, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "5KehVQfxNpDs6bqCeAZvw8GdZ2k1GniWeYgn3JoGzZStcjLbvTLPdNStXBqWAauN28T747ym4x11wBMzbvVUq1Ro" ], "script": "base64:AAIFAAAAAAAAAC8IAhIFCgMICAgSABIDCgEIEgQKAggBEgMKAQESBgoEAQEBARIECgIBARIECgIBCAAAAD0AAAAACFBSSUNFTEVUAAAAAAAAD0JAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAC0VVTEVSTlVNQkVSAAAAAAAQM8TWAAAAAAZzY2FsZTYAAAAAAAAPQkAAAAAADHNjYWxlNkJpZ0ludAkAATYAAAABAAAAAAAAD0JAAAAAAAZzY2FsZTgAAAAAAAX14QAAAAAADHNjYWxlOEJpZ0ludAkAATYAAAABAAAAAAAF9eEAAAAAAAdzY2FsZTEyAAAAAOjUpRAAAAAAAAdzY2FsZTE4CQABNgAAAAEADeC2s6dkAAAAAAAAA1NFUAIAAAACX18BAAAAEmtleU5ldXRyaW5vQWRkcmVzcwAAAAACAAAAHSVzJXNfX2NvbmZpZ19fbmV1dHJpbm9BZGRyZXNzAQAAABJrZXlOZXV0cmlub0Fzc2V0SWQAAAAAAgAAABFuZXV0cmlub19hc3NldF9pZAEAAAAda2V5TGlxdWlkYXRpb25Db250cmFjdEFkZHJlc3MAAAAAAgAAAB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AAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFpAQAAACR1bnN0YWtlQ29taXNzaW9uQW1vdW50QnlVc2VyUkVBRE9OTFkAAAACAAAABmFtb3VudAAAAAt1c2VyQWRkcmVzcwQAAAAIaGFsZkxpZmUJAQAAAAxnZXRJbnRPckZhaWwAAAACBQAAABNuc2J0U3Rha2luZ0NvbnRyYWN0CQEAAAALa2V5SGFsZkxpZmUAAAAABAAAAAtzdGFydEhlaWdodAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAABNuc2J0U3Rha2luZ0NvbnRyYWN0CQEAAAAWa2V5TG9ja1BhcmFtU3RhcnRCbG9jawAAAAEFAAAAC3VzZXJBZGRyZXNzBQAAAAZoZWlnaHQEAAAAAWEJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAAMbWF0aENvbnRyYWN0AgAAACFnZXRVbnN0YWtlQ29taXNzaW9uQW1vdW50UkVBRE9OTFkJAARMAAAAAgUAAAAGYW1vdW50CQAETAAAAAIFAAAAC3N0YXJ0SGVpZ2h0CQAETAAAAAIFAAAACGhhbGZMaWZlBQAAAANuaWwFAAAAA25pbAMJAAAAAAAAAgUAAAABYQUAAAABYQkABRQAAAACBQAAAANuaWwJAAS5AAAAAgkABEwAAAACAgAAAAIlZAkABEwAAAACCQABpAAAAAEFAAAAAWEFAAAAA25pbAUAAAADU0VQCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAADrYN1Z", "chainId": 84, "height": 1966278, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FUobVWrWarjW3TKUwg7x2vaBevKRCTP16wEYoBj81kXF Next: G8CTqEpwfL75GH2F9X1nqLzry9UMFnbXMb8MwVZWEU3q Diff:
Old | New | Differences | |
---|---|---|---|
96 | 96 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
97 | 97 | ||
98 | 98 | ||
99 | + | func keyHalfLife () = "%s__halfLife" | |
100 | + | ||
101 | + | ||
99 | 102 | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP) | |
100 | 103 | ||
101 | 104 | ||
184 | 187 | ||
185 | 188 | @Callable(i) | |
186 | 189 | func neutrinoStatsREADONLY () = { | |
187 | - | let neutrinoMetrics = asAnyList(invoke(mathContract, " | |
190 | + | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
188 | 191 | if ((neutrinoMetrics == neutrinoMetrics)) | |
189 | 192 | then { | |
190 | - | let prices = asAnyList(invoke(mathContract, " | |
193 | + | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceREADONLY", nil, nil)) | |
191 | 194 | if ((prices == prices)) | |
192 | 195 | then { | |
193 | 196 | let currentPrice = asInt(neutrinoMetrics[0]) | |
224 | 227 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
225 | 228 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
226 | 229 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
227 | - | let $ | |
230 | + | let $t082019284 = if ((userAddressStr == "")) | |
228 | 231 | then $Tuple4(0, 0, 0, 0) | |
229 | 232 | else { | |
230 | 233 | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
231 | - | let usdnLmtMax = asInt(invoke(mathContract, " | |
234 | + | let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil)) | |
232 | 235 | if ((usdnLmtMax == usdnLmtMax)) | |
233 | 236 | then { | |
234 | 237 | let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440) | |
245 | 248 | } | |
246 | 249 | else throw("Strict value is not equal to itself.") | |
247 | 250 | } | |
248 | - | let quickSwapUserSpent = $ | |
249 | - | let blocks2LimitReset = $ | |
250 | - | let maxUsdnLimit = $ | |
251 | - | let maxWavesLimit = $ | |
251 | + | let quickSwapUserSpent = $t082019284._1 | |
252 | + | let blocks2LimitReset = $t082019284._2 | |
253 | + | let maxUsdnLimit = $t082019284._3 | |
254 | + | let maxWavesLimit = $t082019284._4 | |
252 | 255 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP)) | |
253 | 256 | } | |
254 | 257 | ||
270 | 273 | let maxWavesLimit = 10000000000 | |
271 | 274 | let maxUsdnLimitNew = 1100000000 | |
272 | 275 | let maxWavesLimitNew = 11000000000 | |
273 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew)], SEP)) | |
276 | + | let rewardInfo = asString(invoke(nsbtStakingContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil)) | |
277 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew), rewardInfo], SEP)) | |
274 | 278 | } | |
275 | 279 | ||
276 | 280 | ||
281 | 285 | if ((minWavesAmountNsbtBuy > wavesPay)) | |
282 | 286 | then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected")) | |
283 | 287 | else { | |
284 | - | let curveResult = asAnyList(invoke(mathContract, " | |
288 | + | let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil)) | |
285 | 289 | if ((curveResult == curveResult)) | |
286 | 290 | then { | |
287 | 291 | let nsbtAmount = asInt(curveResult[0]) | |
299 | 303 | ||
300 | 304 | @Callable(i) | |
301 | 305 | func mergedStakeREADONLY (amount1,height1,amount2,height2) = { | |
302 | - | let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil)) | |
306 | + | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
307 | + | let h = asInt(invoke(mathContract, "mergeStakesREADONLY", [amount1, height1, amount2, height2], nil)) | |
303 | 308 | if ((h == h)) | |
304 | 309 | then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP)) | |
305 | 310 | else throw("Strict value is not equal to itself.") | |
309 | 314 | ||
310 | 315 | @Callable(i) | |
311 | 316 | func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = { | |
312 | - | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil)) | |
317 | + | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
318 | + | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
313 | 319 | if ((a == a)) | |
314 | 320 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
315 | 321 | else throw("Strict value is not equal to itself.") | |
319 | 325 | ||
320 | 326 | @Callable(i) | |
321 | 327 | func unstakeComissionAmountByUserREADONLY (amount,userAddress) = { | |
328 | + | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
322 | 329 | let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height) | |
323 | - | let a = asInt(invoke(mathContract, " | |
330 | + | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
324 | 331 | if ((a == a)) | |
325 | 332 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
326 | 333 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PRICELET = 1000000 | |
5 | 5 | ||
6 | 6 | let MULTSCALE = 8 | |
7 | 7 | ||
8 | 8 | let EULERNUMBER = 271828182 | |
9 | 9 | ||
10 | 10 | let scale6 = 1000000 | |
11 | 11 | ||
12 | 12 | let scale6BigInt = toBigInt(1000000) | |
13 | 13 | ||
14 | 14 | let scale8 = 100000000 | |
15 | 15 | ||
16 | 16 | let scale8BigInt = toBigInt(100000000) | |
17 | 17 | ||
18 | 18 | let scale12 = 1000000000000 | |
19 | 19 | ||
20 | 20 | let scale18 = toBigInt(1000000000000000000) | |
21 | 21 | ||
22 | 22 | let SEP = "__" | |
23 | 23 | ||
24 | 24 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func keyLiquidationContractAddress () = "liquidation_contract" | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func keyRPDContract () = "rpd_contract" | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyAuctionContract () = "auction_contract" | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func keyContolContract () = "control_contract" | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func keyBondAssetId () = "bond_asset_id" | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyBalanceLocked () = "balance_lock_" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyMinWavesSwapAmount () = "min_waves_swap_amount" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount" | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyWavesOutFeePart () = "wavesOut_swap_feePart" | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyNsbtLockContract () = "%s__nsbtLockContract" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyMathContract () = "%s__mathContract" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyBalanceWavesLockInterval () = "balance_waves_lock_interval" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keySwapsTimeframe () = "swaps_timeframe" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyPrice () = "price" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
97 | 97 | ||
98 | 98 | ||
99 | + | func keyHalfLife () = "%s__halfLife" | |
100 | + | ||
101 | + | ||
99 | 102 | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP) | |
100 | 103 | ||
101 | 104 | ||
102 | 105 | func keyMinLockAmount () = "%s__minLockAmount" | |
103 | 106 | ||
104 | 107 | ||
105 | 108 | func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy" | |
106 | 109 | ||
107 | 110 | ||
108 | 111 | func keyMinNsbtSell () = "min_nsbt_sell" | |
109 | 112 | ||
110 | 113 | ||
111 | 114 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
112 | 115 | ||
113 | 116 | ||
114 | 117 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
115 | 118 | ||
116 | 119 | ||
117 | 120 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
118 | 121 | ||
119 | 122 | ||
120 | 123 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6) | |
121 | 124 | ||
122 | 125 | ||
123 | 126 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8) | |
124 | 127 | ||
125 | 128 | ||
126 | 129 | func asAnyList (val) = match val { | |
127 | 130 | case valAnyList: List[Any] => | |
128 | 131 | valAnyList | |
129 | 132 | case _ => | |
130 | 133 | throw("fail to cast into List[Any]") | |
131 | 134 | } | |
132 | 135 | ||
133 | 136 | ||
134 | 137 | func asInt (val) = match val { | |
135 | 138 | case valInt: Int => | |
136 | 139 | valInt | |
137 | 140 | case _ => | |
138 | 141 | throw("fail to cast into Int") | |
139 | 142 | } | |
140 | 143 | ||
141 | 144 | ||
142 | 145 | func asString (val) = match val { | |
143 | 146 | case valStr: String => | |
144 | 147 | valStr | |
145 | 148 | case _ => | |
146 | 149 | throw("fail to cast into String") | |
147 | 150 | } | |
148 | 151 | ||
149 | 152 | ||
150 | 153 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
151 | 154 | ||
152 | 155 | ||
153 | 156 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
154 | 157 | ||
155 | 158 | ||
156 | 159 | let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress())) | |
157 | 160 | ||
158 | 161 | let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract())) | |
159 | 162 | ||
160 | 163 | let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract())) | |
161 | 164 | ||
162 | 165 | let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress()) | |
163 | 166 | ||
164 | 167 | let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract()) | |
165 | 168 | ||
166 | 169 | let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract())) | |
167 | 170 | ||
168 | 171 | let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract())) | |
169 | 172 | ||
170 | 173 | let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
171 | 174 | ||
172 | 175 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
173 | 176 | ||
174 | 177 | let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId()) | |
175 | 178 | ||
176 | 179 | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
177 | 180 | ||
178 | 181 | @Callable(i) | |
179 | 182 | func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this)) | |
180 | 183 | then throw("not authorized") | |
181 | 184 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)] | |
182 | 185 | ||
183 | 186 | ||
184 | 187 | ||
185 | 188 | @Callable(i) | |
186 | 189 | func neutrinoStatsREADONLY () = { | |
187 | - | let neutrinoMetrics = asAnyList(invoke(mathContract, " | |
190 | + | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
188 | 191 | if ((neutrinoMetrics == neutrinoMetrics)) | |
189 | 192 | then { | |
190 | - | let prices = asAnyList(invoke(mathContract, " | |
193 | + | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceREADONLY", nil, nil)) | |
191 | 194 | if ((prices == prices)) | |
192 | 195 | then { | |
193 | 196 | let currentPrice = asInt(neutrinoMetrics[0]) | |
194 | 197 | let neutrinoLockedBalance = asInt(neutrinoMetrics[1]) | |
195 | 198 | let wavesLockedBalance = asInt(neutrinoMetrics[2]) | |
196 | 199 | let reservesInWaves = asInt(neutrinoMetrics[3]) | |
197 | 200 | let reservesInUsdn = asInt(neutrinoMetrics[4]) | |
198 | 201 | let neutrinoSupply = asInt(neutrinoMetrics[5]) | |
199 | 202 | let surplus = asInt(neutrinoMetrics[6]) | |
200 | 203 | let surplusPercent = asInt(neutrinoMetrics[7]) | |
201 | 204 | let BR = asInt(neutrinoMetrics[8]) | |
202 | 205 | let nsbtSupply = asInt(neutrinoMetrics[9]) | |
203 | 206 | let maxNsbtSupply = asInt(neutrinoMetrics[10]) | |
204 | 207 | let nsbt2usdnPrice = asInt(prices[0]) | |
205 | 208 | let nsbt2wavesPrice = asInt(prices[1]) | |
206 | 209 | let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy()) | |
207 | 210 | let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell()) | |
208 | 211 | let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount()) | |
209 | 212 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy), toString(minNsbtsell), toString(minNsbtLockAmt)], SEP)) | |
210 | 213 | } | |
211 | 214 | else throw("Strict value is not equal to itself.") | |
212 | 215 | } | |
213 | 216 | else throw("Strict value is not equal to itself.") | |
214 | 217 | } | |
215 | 218 | ||
216 | 219 | ||
217 | 220 | ||
218 | 221 | @Callable(i) | |
219 | 222 | func swapInfoREADONLY (userAddressStr) = { | |
220 | 223 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
221 | 224 | let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount()) | |
222 | 225 | let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount()) | |
223 | 226 | let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart()) | |
224 | 227 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
225 | 228 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
226 | 229 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
227 | - | let $ | |
230 | + | let $t082019284 = if ((userAddressStr == "")) | |
228 | 231 | then $Tuple4(0, 0, 0, 0) | |
229 | 232 | else { | |
230 | 233 | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
231 | - | let usdnLmtMax = asInt(invoke(mathContract, " | |
234 | + | let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil)) | |
232 | 235 | if ((usdnLmtMax == usdnLmtMax)) | |
233 | 236 | then { | |
234 | 237 | let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440) | |
235 | 238 | let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0) | |
236 | 239 | let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks) | |
237 | 240 | let quickSwapUserSpent = if (isNewQuickSwapPeriod) | |
238 | 241 | then 0 | |
239 | 242 | else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0) | |
240 | 243 | let blcks2LmtReset = if (isNewQuickSwapPeriod) | |
241 | 244 | then 0 | |
242 | 245 | else (quickSwapResetBlocks - (height - lastQuickSwapBlock)) | |
243 | 246 | let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice) | |
244 | 247 | $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax) | |
245 | 248 | } | |
246 | 249 | else throw("Strict value is not equal to itself.") | |
247 | 250 | } | |
248 | - | let quickSwapUserSpent = $ | |
249 | - | let blocks2LimitReset = $ | |
250 | - | let maxUsdnLimit = $ | |
251 | - | let maxWavesLimit = $ | |
251 | + | let quickSwapUserSpent = $t082019284._1 | |
252 | + | let blocks2LimitReset = $t082019284._2 | |
253 | + | let maxUsdnLimit = $t082019284._3 | |
254 | + | let maxWavesLimit = $t082019284._4 | |
252 | 255 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP)) | |
253 | 256 | } | |
254 | 257 | ||
255 | 258 | ||
256 | 259 | ||
257 | 260 | @Callable(i) | |
258 | 261 | func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtAmountOrZero) = { | |
259 | 262 | let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStrOrEmpty)), 0) | |
260 | 263 | let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0) | |
261 | 264 | let gnsbtAmountNew = (gnsbtAmount + additionalNsbtAmountOrZero) | |
262 | 265 | let gnsbtTotalNew = (gnsbtTotal + additionalNsbtAmountOrZero) | |
263 | 266 | let gnsbtShare = if ((gnsbtTotal != 0)) | |
264 | 267 | then fraction((gnsbtAmount * 100), scale12, gnsbtTotal) | |
265 | 268 | else 0 | |
266 | 269 | let gnsbtShareNew = if ((gnsbtTotalNew != 0)) | |
267 | 270 | then fraction((gnsbtAmountNew * 100), scale12, gnsbtTotalNew) | |
268 | 271 | else 0 | |
269 | 272 | let maxUsdnLimit = 1000000000 | |
270 | 273 | let maxWavesLimit = 10000000000 | |
271 | 274 | let maxUsdnLimitNew = 1100000000 | |
272 | 275 | let maxWavesLimitNew = 11000000000 | |
273 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew)], SEP)) | |
276 | + | let rewardInfo = asString(invoke(nsbtStakingContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil)) | |
277 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew), rewardInfo], SEP)) | |
274 | 278 | } | |
275 | 279 | ||
276 | 280 | ||
277 | 281 | ||
278 | 282 | @Callable(i) | |
279 | 283 | func buyNsbtREADONLY (wavesPay) = { | |
280 | 284 | let minWavesAmountNsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy()) | |
281 | 285 | if ((minWavesAmountNsbtBuy > wavesPay)) | |
282 | 286 | then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected")) | |
283 | 287 | else { | |
284 | - | let curveResult = asAnyList(invoke(mathContract, " | |
288 | + | let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil)) | |
285 | 289 | if ((curveResult == curveResult)) | |
286 | 290 | then { | |
287 | 291 | let nsbtAmount = asInt(curveResult[0]) | |
288 | 292 | if ((0 >= nsbtAmount)) | |
289 | 293 | then throw("nsbtAmount <= 0") | |
290 | 294 | else if ((wavesPay > (nsbtAmount * 9223372))) | |
291 | 295 | then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount))) | |
292 | 296 | else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP)) | |
293 | 297 | } | |
294 | 298 | else throw("Strict value is not equal to itself.") | |
295 | 299 | } | |
296 | 300 | } | |
297 | 301 | ||
298 | 302 | ||
299 | 303 | ||
300 | 304 | @Callable(i) | |
301 | 305 | func mergedStakeREADONLY (amount1,height1,amount2,height2) = { | |
302 | - | let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil)) | |
306 | + | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
307 | + | let h = asInt(invoke(mathContract, "mergeStakesREADONLY", [amount1, height1, amount2, height2], nil)) | |
303 | 308 | if ((h == h)) | |
304 | 309 | then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP)) | |
305 | 310 | else throw("Strict value is not equal to itself.") | |
306 | 311 | } | |
307 | 312 | ||
308 | 313 | ||
309 | 314 | ||
310 | 315 | @Callable(i) | |
311 | 316 | func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = { | |
312 | - | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil)) | |
317 | + | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
318 | + | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
313 | 319 | if ((a == a)) | |
314 | 320 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
315 | 321 | else throw("Strict value is not equal to itself.") | |
316 | 322 | } | |
317 | 323 | ||
318 | 324 | ||
319 | 325 | ||
320 | 326 | @Callable(i) | |
321 | 327 | func unstakeComissionAmountByUserREADONLY (amount,userAddress) = { | |
328 | + | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
322 | 329 | let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height) | |
323 | - | let a = asInt(invoke(mathContract, " | |
330 | + | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
324 | 331 | if ((a == a)) | |
325 | 332 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
326 | 333 | else throw("Strict value is not equal to itself.") | |
327 | 334 | } | |
328 | 335 | ||
329 | 336 |
github/deemru/w8io/026f985 56.75 ms ◑