tx · CvxcfPbUSgpLdQa5TPLXJRMcqgi4hKjt8khPhLPtjpP6 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi: -0.04000000 Waves 2022.07.08 13:58 [2130636] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves
{ "type": 13, "id": "CvxcfPbUSgpLdQa5TPLXJRMcqgi4hKjt8khPhLPtjpP6", "fee": 4000000, "feeAssetId": null, "timestamp": 1657277889478, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "35F46wumtfDBZGi1fqJj439zEcPm2Yvh2i9tfXdEcsyubF8bGmkF1WmPYPUfPgvbJ2HpkhbRnxvvZz9EUkG9eZ5x" ], "script": "base64:AAIFAAAAAAAAADwIAhIFCgMICAgSABIDCgEIEgQKAggBEgMKAQESBQoDCAEIEgYKBAEBAQESBAoCAQESBAoCAQgSABIAEgAAAABaAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAAZFVUxFUjgAAAAAABAzxNYAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9eEAAAAAAAZNVUxUMTIAAAAA6NSlEAAAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAAdXQVZFU0lECQACWQAAAAECAAAABVdBVkVTAAAAAA9uTWV0cmljSWR4UHJpY2UAAAAAAAAAAAAAAAAAG25NZXRyaWNJZHhVc2RuTG9ja2VkQmFsYW5jZQAAAAAAAAAAAQAAAAAcbk1ldHJpY0lkeFdhdmVzTG9ja2VkQmFsYW5jZQAAAAAAAAAAAgAAAAARbk1ldHJpY0lkeFJlc2VydmUAAAAAAAAAAAMAAAA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QJAARMAAAAAgkAAaQAAAABBQAAAA9zdXJmUHJpY2VJblVzZG4JAARMAAAAAgkAAaQAAAABBQAAABBzdXJmUHJpY2VJbldhdmVzCQAETAAAAAICAAAAEGVuZFN1cmZQcmljZVJFU1QFAAAAA25pbAIAAAACX18JAAACAAAAAQUAAAAIcmVzdERhdGEAAAAAaQdmgA==", "chainId": 84, "height": 2130636, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HBf8DqhJj8QtA7XJfe2qPz8jWzTUTxmoQ4WfswDrCRzF Next: 71b39dAfXm5YhFqTaAtnaynFDacMqTSarQ5nipDp6Cm3 Diff:
Old | New | Differences | |
---|---|---|---|
410 | 410 | let price = asInt(surfResult[bFuncIdxWavesPrice]) | |
411 | 411 | let priceSurf2Waves0 = fraction(br0, MULT8, price) | |
412 | 412 | let priceSurf2Waves1 = fraction(br1, MULT8, price) | |
413 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(surfAmount), toString(gNsbtAmount), toString(additionalLimit), toString(br0), toString(br1), toString(priceSurf2Waves0), toString(priceSurf2Waves1)], SEP)) | |
413 | + | let votingPowerEta = 1000 | |
414 | + | let restWaves = asInt(surfResult[bFuncIdxRestWaves]) | |
415 | + | let restUsdn = asInt(surfResult[bFuncIdxRestUsdn]) | |
416 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d", toString(surfAmount), toString(gNsbtAmount), toString(additionalLimit), toString(br0), toString(br1), toString(priceSurf2Waves0), toString(priceSurf2Waves1), toString(votingPowerEta), toString(restWaves), toString(restUsdn)], SEP)) | |
414 | 417 | } | |
415 | 418 | } | |
416 | 419 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let revisionNum = "" | |
5 | 5 | ||
6 | 6 | let EULER8 = 271828182 | |
7 | 7 | ||
8 | 8 | let MULT6 = 1000000 | |
9 | 9 | ||
10 | 10 | let MULTX6 = toBigInt(1000000) | |
11 | 11 | ||
12 | 12 | let MULT8 = 100000000 | |
13 | 13 | ||
14 | 14 | let MULTX8 = toBigInt(100000000) | |
15 | 15 | ||
16 | 16 | let MULT12 = 1000000000000 | |
17 | 17 | ||
18 | 18 | let MULT18 = toBigInt(1000000000000000000) | |
19 | 19 | ||
20 | 20 | let SEP = "__" | |
21 | 21 | ||
22 | 22 | let WAVESID = fromBase58String("WAVES") | |
23 | 23 | ||
24 | 24 | let nMetricIdxPrice = 0 | |
25 | 25 | ||
26 | 26 | let nMetricIdxUsdnLockedBalance = 1 | |
27 | 27 | ||
28 | 28 | let nMetricIdxWavesLockedBalance = 2 | |
29 | 29 | ||
30 | 30 | let nMetricIdxReserve = 3 | |
31 | 31 | ||
32 | 32 | let nMetricIdxReserveInUsdn = 4 | |
33 | 33 | ||
34 | 34 | let nMetricIdxUsdnSupply = 5 | |
35 | 35 | ||
36 | 36 | let nMetricIdxSurplus = 6 | |
37 | 37 | ||
38 | 38 | let nMetricIdxSurplusPercent = 7 | |
39 | 39 | ||
40 | 40 | let nMetricIdxBR = 8 | |
41 | 41 | ||
42 | 42 | let nMetricIdxNsbtSupply = 9 | |
43 | 43 | ||
44 | 44 | let nMetricIdxMaxNsbtSupply = 10 | |
45 | 45 | ||
46 | 46 | let nMetricIdxSurfSupply = 11 | |
47 | 47 | ||
48 | 48 | let bFuncIdxSurf = 0 | |
49 | 49 | ||
50 | 50 | let bFuncIdxWaves = 1 | |
51 | 51 | ||
52 | 52 | let bFuncIdxUsdn = 2 | |
53 | 53 | ||
54 | 54 | let bFuncIdxReserveStart = 3 | |
55 | 55 | ||
56 | 56 | let bFuncIdxSupplyStart = 4 | |
57 | 57 | ||
58 | 58 | let bFuncIdxBRStart = 5 | |
59 | 59 | ||
60 | 60 | let bFuncIdxReserveEnd = 6 | |
61 | 61 | ||
62 | 62 | let bFuncIdxSupplyEnd = 7 | |
63 | 63 | ||
64 | 64 | let bFuncIdxBREnd = 8 | |
65 | 65 | ||
66 | 66 | let bFuncIdxRestWaves = 9 | |
67 | 67 | ||
68 | 68 | let bFuncIdxRestUsdn = 10 | |
69 | 69 | ||
70 | 70 | let bFuncIdxWavesPrice = 11 | |
71 | 71 | ||
72 | 72 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyLiquidationContractAddress () = "liquidation_contract" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyRPDContract () = "rpd_contract" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyAuctionContract () = "auction_contract" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyContolContract () = "control_contract" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyNsbtAssetId () = "bond_asset_id" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keySurfAssetId () = "surf_asset_id" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyBalanceLocked () = "balance_lock_" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyMinWavesSwapAmount () = "min_waves_swap_amount" | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount" | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyWavesOutFeePart () = "wavesOut_swap_feePart" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyNsbtLockContract () = "%s__nsbtLockContract" | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyMathContract () = "%s__mathContract" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyBalanceWavesLockInterval () = "balance_waves_lock_interval" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyPrice () = "price" | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyHalfLife () = "%s__halfLife" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyMinLockAmount () = "%s__minLockAmount" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy" | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyMinNsbtSell () = "min_nsbt_sell" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func asAnyList (val) = match val { | |
163 | 163 | case valAnyList: List[Any] => | |
164 | 164 | valAnyList | |
165 | 165 | case _ => | |
166 | 166 | throw("fail to cast into List[Any]") | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func asInt (val) = match val { | |
171 | 171 | case valInt: Int => | |
172 | 172 | valInt | |
173 | 173 | case _ => | |
174 | 174 | throw("fail to cast into Int") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func asString (val) = match val { | |
179 | 179 | case valStr: String => | |
180 | 180 | valStr | |
181 | 181 | case _ => | |
182 | 182 | throw("fail to cast into String") | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func asTuple2Ints (val) = match val { | |
187 | 187 | case v: (Int, Int) => | |
188 | 188 | v | |
189 | 189 | case _ => | |
190 | 190 | throw("fail to cast into Tuple2 ints") | |
191 | 191 | } | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func asSwapParamsSTRUCT (val) = match val { | |
195 | 195 | case struct: (Int, Int, Int, Int, Int) => | |
196 | 196 | struct | |
197 | 197 | case _ => | |
198 | 198 | throw("fail to cast into Int") | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func toTimestamp (start) = if ((0 > start)) | |
203 | 203 | then -1 | |
204 | 204 | else match blockInfoByHeight(start) { | |
205 | 205 | case block: BlockInfo => | |
206 | 206 | block.timestamp | |
207 | 207 | case _ => | |
208 | 208 | -1 | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress())) | |
219 | 219 | ||
220 | 220 | let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract())) | |
221 | 221 | ||
222 | 222 | let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract())) | |
223 | 223 | ||
224 | 224 | let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress()) | |
225 | 225 | ||
226 | 226 | let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract()) | |
227 | 227 | ||
228 | 228 | let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract())) | |
229 | 229 | ||
230 | 230 | let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract())) | |
231 | 231 | ||
232 | 232 | let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
233 | 233 | ||
234 | 234 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
235 | 235 | ||
236 | 236 | let nsbtAssetIdStr = getStringValue(neutrinoContract, keyNsbtAssetId()) | |
237 | 237 | ||
238 | 238 | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
239 | 239 | ||
240 | 240 | let surfAssetIdStr = getStringValue(auctionContract, keySurfAssetId()) | |
241 | 241 | ||
242 | 242 | let surfAssetId = fromBase58String(surfAssetIdStr) | |
243 | 243 | ||
244 | 244 | func minWavesForNsbtBuy () = asInt(invoke(auctionContract, "minWavesAmountNsbtBuySYSREADONLY", nil, nil)) | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func minNsbtForSell () = asInt(invoke(auctionContract, "minNsbtAmountForSellSYSREADONLY", nil, nil)) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func minWavesForSurfBuy () = asInt(invoke(auctionContract, "minWavesAmountSurfBuySYSREADONLY", nil, nil)) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func minUsdnForSurfBuy () = asInt(invoke(auctionContract, "minUsdnAmountSurfBuySYSREADONLY", nil, nil)) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func privateNsbtPriceREST () = { | |
257 | 257 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [0], nil)) | |
258 | 258 | let nsbt2usdnPrice = asInt(prices[0]) | |
259 | 259 | let nsbt2wavesPrice = asInt(prices[1]) | |
260 | 260 | $Tuple2(IntegerEntry("nsbt2usdnPrice", nsbt2usdnPrice), IntegerEntry("nsbt2wavesPrice", nsbt2wavesPrice)) | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | @Callable(i) | |
265 | 265 | func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this)) | |
266 | 266 | then throw("not authorized") | |
267 | 267 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)] | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | ||
271 | 271 | @Callable(i) | |
272 | 272 | func neutrinoStatsREADONLY () = { | |
273 | 273 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
274 | 274 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [0], nil)) | |
275 | 275 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
276 | 276 | let neutrinoLockedBalance = asInt(neutrinoMetrics[nMetricIdxUsdnLockedBalance]) | |
277 | 277 | let wavesLockedBalance = asInt(neutrinoMetrics[nMetricIdxWavesLockedBalance]) | |
278 | 278 | let reservesInWaves = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
279 | 279 | let reservesInUsdn = asInt(neutrinoMetrics[nMetricIdxReserveInUsdn]) | |
280 | 280 | let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
281 | 281 | let surplus = asInt(neutrinoMetrics[nMetricIdxSurplus]) | |
282 | 282 | let surplusPercent = asInt(neutrinoMetrics[nMetricIdxSurplusPercent]) | |
283 | 283 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
284 | 284 | let nsbtSupply = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
285 | 285 | let maxNsbtSupply = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
286 | 286 | let nsbt2usdnPrice = asInt(prices[0]) | |
287 | 287 | let nsbt2wavesPrice = asInt(prices[1]) | |
288 | 288 | let minWaves4NsbtBuy = minWavesForNsbtBuy() | |
289 | 289 | let minNsbtsell = minNsbtForSell() | |
290 | 290 | let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount()) | |
291 | 291 | let minWaves4SurfBuy = minWavesForSurfBuy() | |
292 | 292 | let minUsdn4SurfBuy = minUsdnForSurfBuy() | |
293 | 293 | let maxWaves2BuySurf = (fraction(neutrinoSupply, MULT8, currentPrice) - reservesInWaves) | |
294 | 294 | let maxUsdn2BuySurf = (neutrinoSupply - reservesInUsdn) | |
295 | 295 | let surfPriceInUsdn = fraction(reservesInWaves, currentPrice, neutrinoSupply) | |
296 | 296 | let surfPriceInWaves = fraction(reservesInWaves, 1, neutrinoSupply) | |
297 | 297 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%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), toString(minWaves4SurfBuy), toString(minUsdn4SurfBuy), toString(maxWaves2BuySurf), toString(maxUsdn2BuySurf), toString(surfPriceInUsdn), toString(surfPriceInWaves)], SEP)) | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | ||
302 | 302 | @Callable(i) | |
303 | 303 | func swapInfoREADONLY (userAddressStrOpt) = { | |
304 | 304 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
305 | 305 | let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount()) | |
306 | 306 | let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount()) | |
307 | 307 | let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart()) | |
308 | 308 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
309 | 309 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
310 | 310 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
311 | 311 | let $t01045410618 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
312 | 312 | let swapLimitMaxUsdn = $t01045410618._1 | |
313 | 313 | let swapLimitSpentUsdn = $t01045410618._2 | |
314 | 314 | let blcks2LmtReset = $t01045410618._3 | |
315 | 315 | let swapLimitMaxWaves = convertNeutrinoToWaves(swapLimitMaxUsdn, currentPrice) | |
316 | 316 | $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(blcks2LmtReset), toString(swapLimitMaxWaves), toString(swapLimitMaxUsdn), toString(swapLimitSpentUsdn)], SEP)) | |
317 | 317 | } | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | ||
321 | 321 | @Callable(i) | |
322 | 322 | func gnsbtInfoREADONLY (userAddressStrOpt,nsbtAmtDiff) = { | |
323 | 323 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
324 | 324 | let $t01162411807 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
325 | 325 | let limitMaxUsdn = $t01162411807._1 | |
326 | 326 | let limitSpent = $t01162411807._2 | |
327 | 327 | let blcks2LmtReset = $t01162411807._3 | |
328 | 328 | let gnsbtAmt = $t01162411807._4 | |
329 | 329 | let gnsbtAmtTotal = $t01162411807._5 | |
330 | 330 | let $t01181112019 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil)) | |
331 | 331 | let limitMaxUsdnNEW = $t01181112019._1 | |
332 | 332 | let limitSpentNEW = $t01181112019._2 | |
333 | 333 | let blcks2LmtResetNEW = $t01181112019._3 | |
334 | 334 | let gnsbtAmtNEW = $t01181112019._4 | |
335 | 335 | let gnsbtAmtTotalNEW = $t01181112019._5 | |
336 | 336 | let limitMaxWaves = convertNeutrinoToWaves(limitMaxUsdn, currentPrice) | |
337 | 337 | let limitMaxWavesNEW = convertNeutrinoToWaves(limitMaxUsdnNEW, currentPrice) | |
338 | 338 | let gnsbtShare = if ((gnsbtAmtTotal != 0)) | |
339 | 339 | then fraction((gnsbtAmt * 100), MULT12, gnsbtAmtTotal) | |
340 | 340 | else 0 | |
341 | 341 | let gnsbtShareNEW = if ((gnsbtAmtTotalNEW != 0)) | |
342 | 342 | then fraction((gnsbtAmtNEW * 100), MULT12, gnsbtAmtTotalNEW) | |
343 | 343 | else 0 | |
344 | 344 | let rewardInfo = asString(invoke(nsbtStakingContract, "unclaimedRewardsREADONLY", [userAddressStrOpt], nil)) | |
345 | 345 | let nsbtAmt = gnsbtAmt | |
346 | 346 | let nsbtAmtNew = gnsbtAmtNEW | |
347 | 347 | let nsbtAmtStakedTotal = gnsbtAmtTotal | |
348 | 348 | let nsbtAmtStakedTotalNew = gnsbtAmtTotalNEW | |
349 | 349 | let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressStrOpt], nil)) | |
350 | 350 | let isEmptyNsbtBalance = if ((gnsbtAmt == 0)) | |
351 | 351 | then (gnsbtAmtNEW == 0) | |
352 | 352 | else false | |
353 | 353 | let startHeight = if (isEmptyNsbtBalance) | |
354 | 354 | then -1 | |
355 | 355 | else asInt(nsbtData[2]) | |
356 | 356 | let startTimestamp = toTimestamp(startHeight) | |
357 | 357 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
358 | 358 | let startHeightNew = if (isEmptyNsbtBalance) | |
359 | 359 | then -1 | |
360 | 360 | else asInt(invoke(mathContract, "mergeStakesREADONLY", [gnsbtAmt, startHeight, gnsbtAmtNEW, height, halfLife], nil)) | |
361 | 361 | let startTimestampNew = toTimestamp(startHeightNew) | |
362 | 362 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s%d%d%d%d%d%d%d%d", toString(gnsbtAmt), toString(gnsbtAmtNEW), toString(gnsbtShare), toString(gnsbtShareNEW), toString(limitMaxUsdn), toString(limitMaxWaves), toString(limitMaxUsdnNEW), toString(limitMaxWavesNEW), rewardInfo, toString(nsbtAmt), toString(nsbtAmtNew), toString(nsbtAmtStakedTotal), toString(nsbtAmtStakedTotalNew), toString(startHeight), toString(startTimestamp), toString(startHeightNew), toString(startTimestampNew)], SEP)) | |
363 | 363 | } | |
364 | 364 | ||
365 | 365 | ||
366 | 366 | ||
367 | 367 | @Callable(i) | |
368 | 368 | func buyNsbtREADONLY (wavesPay) = { | |
369 | 369 | let minWavesAmountNsbtBuy = minWavesForNsbtBuy() | |
370 | 370 | if ((minWavesAmountNsbtBuy > wavesPay)) | |
371 | 371 | then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected")) | |
372 | 372 | else { | |
373 | 373 | let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil)) | |
374 | 374 | if ((curveResult == curveResult)) | |
375 | 375 | then { | |
376 | 376 | let nsbtAmount = asInt(curveResult[0]) | |
377 | 377 | if ((0 >= nsbtAmount)) | |
378 | 378 | then throw("nsbtAmount <= 0") | |
379 | 379 | else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP)) | |
380 | 380 | } | |
381 | 381 | else throw("Strict value is not equal to itself.") | |
382 | 382 | } | |
383 | 383 | } | |
384 | 384 | ||
385 | 385 | ||
386 | 386 | ||
387 | 387 | @Callable(i) | |
388 | 388 | func buySurfREADONLY (userAddressStrOpt,amount,assetIdStr) = { | |
389 | 389 | let assetId = fromBase58String(assetIdStr) | |
390 | 390 | if (if ((assetId == WAVESID)) | |
391 | 391 | then (minWavesForSurfBuy() > amount) | |
392 | 392 | else false) | |
393 | 393 | then throw((("min " + toString(minWavesForSurfBuy())) + " WAVES expected")) | |
394 | 394 | else if (if ((assetId == neutrinoAssetId)) | |
395 | 395 | then (minUsdnForSurfBuy() > amount) | |
396 | 396 | else false) | |
397 | 397 | then throw((("min " + toString(minUsdnForSurfBuy())) + " USDN expected")) | |
398 | 398 | else { | |
399 | 399 | let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [amount, assetId], nil)) | |
400 | 400 | let surfAmount = asInt(surfResult[bFuncIdxSurf]) | |
401 | 401 | if ((0 >= surfAmount)) | |
402 | 402 | then throw("surfAmount <= 0") | |
403 | 403 | else { | |
404 | 404 | let gNsbtAmount = (surfAmount / 60) | |
405 | 405 | let limitOld = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._1 | |
406 | 406 | let limitNew = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, gNsbtAmount], nil))._1 | |
407 | 407 | let additionalLimit = (limitNew - limitOld) | |
408 | 408 | let br0 = asInt(surfResult[bFuncIdxBRStart]) | |
409 | 409 | let br1 = asInt(surfResult[bFuncIdxBREnd]) | |
410 | 410 | let price = asInt(surfResult[bFuncIdxWavesPrice]) | |
411 | 411 | let priceSurf2Waves0 = fraction(br0, MULT8, price) | |
412 | 412 | let priceSurf2Waves1 = fraction(br1, MULT8, price) | |
413 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(surfAmount), toString(gNsbtAmount), toString(additionalLimit), toString(br0), toString(br1), toString(priceSurf2Waves0), toString(priceSurf2Waves1)], SEP)) | |
413 | + | let votingPowerEta = 1000 | |
414 | + | let restWaves = asInt(surfResult[bFuncIdxRestWaves]) | |
415 | + | let restUsdn = asInt(surfResult[bFuncIdxRestUsdn]) | |
416 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d", toString(surfAmount), toString(gNsbtAmount), toString(additionalLimit), toString(br0), toString(br1), toString(priceSurf2Waves0), toString(priceSurf2Waves1), toString(votingPowerEta), toString(restWaves), toString(restUsdn)], SEP)) | |
414 | 417 | } | |
415 | 418 | } | |
416 | 419 | } | |
417 | 420 | ||
418 | 421 | ||
419 | 422 | ||
420 | 423 | @Callable(i) | |
421 | 424 | func mergedStakeREADONLY (amount1,height1,amount2,height2) = { | |
422 | 425 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
423 | 426 | let h = asInt(invoke(mathContract, "mergeStakesREADONLY", [amount1, height1, amount2, height2, halfLife], nil)) | |
424 | 427 | if ((h == h)) | |
425 | 428 | then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP)) | |
426 | 429 | else throw("Strict value is not equal to itself.") | |
427 | 430 | } | |
428 | 431 | ||
429 | 432 | ||
430 | 433 | ||
431 | 434 | @Callable(i) | |
432 | 435 | func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = { | |
433 | 436 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
434 | 437 | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
435 | 438 | if ((a == a)) | |
436 | 439 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
437 | 440 | else throw("Strict value is not equal to itself.") | |
438 | 441 | } | |
439 | 442 | ||
440 | 443 | ||
441 | 444 | ||
442 | 445 | @Callable(i) | |
443 | 446 | func unstakeComissionAmountByUserREADONLY (amount,userAddress) = { | |
444 | 447 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
445 | 448 | let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height) | |
446 | 449 | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
447 | 450 | if ((a == a)) | |
448 | 451 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
449 | 452 | else throw("Strict value is not equal to itself.") | |
450 | 453 | } | |
451 | 454 | ||
452 | 455 | ||
453 | 456 | ||
454 | 457 | @Callable(i) | |
455 | 458 | func neutrinoStateREST () = { | |
456 | 459 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
457 | 460 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
458 | 461 | let neutrinoLockedBalance = asInt(neutrinoMetrics[nMetricIdxUsdnLockedBalance]) | |
459 | 462 | let wavesLockedBalance = asInt(neutrinoMetrics[nMetricIdxWavesLockedBalance]) | |
460 | 463 | let reservesInWaves = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
461 | 464 | let reservesInUsdn = asInt(neutrinoMetrics[nMetricIdxReserveInUsdn]) | |
462 | 465 | let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
463 | 466 | let surplus = asInt(neutrinoMetrics[nMetricIdxSurplus]) | |
464 | 467 | let surplusPercent = asInt(neutrinoMetrics[nMetricIdxSurplusPercent]) | |
465 | 468 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
466 | 469 | let nsbtSupply = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
467 | 470 | let nsbtSupplyMax = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
468 | 471 | let surfSupply = asInt(neutrinoMetrics[nMetricIdxSurfSupply]) | |
469 | 472 | throw(makeString(["resultNeutrinoStateREST", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(nsbtSupplyMax), toString(surfSupply)], "__")) | |
470 | 473 | } | |
471 | 474 | ||
472 | 475 | ||
473 | 476 | ||
474 | 477 | @Callable(i) | |
475 | 478 | func nsbtPriceREST () = { | |
476 | 479 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [0], nil)) | |
477 | 480 | let nsbt2usdnPrice = asInt(prices[0]) | |
478 | 481 | let nsbt2wavesPrice = asInt(prices[1]) | |
479 | 482 | let restData = makeString(["startNsbtPriceREST", toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), "endNsbtPriceREST"], "__") | |
480 | 483 | throw(restData) | |
481 | 484 | } | |
482 | 485 | ||
483 | 486 | ||
484 | 487 | ||
485 | 488 | @Callable(i) | |
486 | 489 | func surfPriceREST () = { | |
487 | 490 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
488 | 491 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
489 | 492 | let reservesInWaves = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
490 | 493 | let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
491 | 494 | let surfPriceInUsdn = fraction(reservesInWaves, currentPrice, neutrinoSupply) | |
492 | 495 | let surfPriceInWaves = fraction(reservesInWaves, MULT8, neutrinoSupply) | |
493 | 496 | let restData = makeString(["startSurfPriceREST", toString(surfPriceInUsdn), toString(surfPriceInWaves), "endSurfPriceREST"], "__") | |
494 | 497 | throw(restData) | |
495 | 498 | } | |
496 | 499 | ||
497 | 500 |
github/deemru/w8io/026f985 69.53 ms ◑