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