tx · 2oJAvgpNXanhSNGoPpc88dYB5rnUGKAEG6M3joKzpFKY 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi: -0.04000000 Waves 2022.08.23 14:58 [2197101] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves
{ "type": 13, "id": "2oJAvgpNXanhSNGoPpc88dYB5rnUGKAEG6M3joKzpFKY", "fee": 4000000, "feeAssetId": null, "timestamp": 1661256046163, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "4tUNJcT64B9N1Sr6VBD9Ypw7ePYqG3N1kEqkp6jo4e5maEFR2dedYm9MqyS3c3xVeyzx6bVj9LygSnnRjZH6Jm2d" ], "script": "base64:AAIFAAAAAAAAAEMIAhIFCgMICAgSABIDCgEIEgQKAggBEgASAwoBARIFCgMIAQgSAwoBCBIGCgQBAQEBEgQKAgEBEgQKAgEIEgASABIAAAAAbQAAAAALcmV2aXNpb25OdW0CAAAAAAAAAAAGRVVMRVI4AAAAAAAQM8TWAAAAAAVNVUxUNgAAAAAAAA9CQAAAAAAGTVVMVFg2CQABNgAAAAEAAAAAAAAPQkAAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAZNVUxUWDgJAAE2AAAAAQAAAAAABfXhAAAAAAAGTVVMVDEyAAAAAOjUpRAAAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAHV0FWRVNJRAkAAlkAAAABAgAAAAVXQVZFUwAAAAAPbk1ldHJpY0lkeFByaWNlAAAAAAAAAAAAAAAAABtuTWV0cmljSWR4VXNkbkxvY2tlZEJhbGFuY2UAAAAAAAAAAAEAAAAAHG5NZXRyaWNJZHhXYXZlc0xvY2tlZEJhbGFuY2UAAAAAAAAAAAIAAAAAEW5NZXRyaWNJZHhSZXNl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QAAAA5uZXV0cmlub1N1cHBseQQAAAAQc3VyZlByaWNlSW5XYXZlcwkAAGsAAAADBQAAAA9yZXNlcnZlc0luV2F2ZXMFAAAABU1VTFQ4BQAAAA5uZXV0cmlub1N1cHBseQQAAAAIcmVzdERhdGEJAAS5AAAAAgkABEwAAAACAgAAABJzdGFydFN1cmZQcmljZVJFU1QJAARMAAAAAgkAAaQAAAABBQAAAA9zdXJmUHJpY2VJblVzZG4JAARMAAAAAgkAAaQAAAABBQAAABBzdXJmUHJpY2VJbldhdmVzCQAETAAAAAICAAAAEGVuZFN1cmZQcmljZVJFU1QFAAAAA25pbAIAAAACX18JAAACAAAAAQUAAAAIcmVzdERhdGEAAAAAl2g1qg==", "chainId": 84, "height": 2197101, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4gkctSnq8UE9e4nJTwGEACTUMRiVo7b4Gm6hgPCiQz9W Next: AkGJNhSJpz361AjUUUDCw8r1MPF8mGQuMr7PYj1Uba2W Diff:
Old | New | Differences | |
---|---|---|---|
187 | 187 | ||
188 | 188 | ||
189 | 189 | func asSwapParamsSTRUCT (val) = match val { | |
190 | - | case struct: (Int, Int, Int, Int, Int) => | |
190 | + | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
191 | 191 | struct | |
192 | 192 | case _ => | |
193 | - | throw("fail to cast into | |
193 | + | throw("fail to cast into SwapParamsSTRUCT") | |
194 | 194 | } | |
195 | 195 | ||
196 | 196 | ||
352 | 352 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
353 | 353 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
354 | 354 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
355 | - | let $t01174611910 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
356 | - | let swapLimitMaxUsdn = $t01174611910._1 | |
357 | - | let swapLimitSpentUsdn = $t01174611910._2 | |
358 | - | let blcks2LmtReset = $t01174611910._3 | |
359 | - | let swapLimitMaxWaves = convertNeutrinoToWaves(swapLimitMaxUsdn, currentPrice) | |
360 | - | $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)) | |
355 | + | let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
356 | + | let swapLimitMaxUsdn = swapParamsSTRUCT._1 | |
357 | + | let swapLimitSpentUsdn = swapParamsSTRUCT._2 | |
358 | + | let blcks2LmtReset = swapParamsSTRUCT._3 | |
359 | + | let wavesSwapLimitMax = swapParamsSTRUCT._6 | |
360 | + | let usdnSwapLimitMax = swapParamsSTRUCT._7 | |
361 | + | $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(wavesSwapLimitMax), toString(usdnSwapLimitMax), toString(swapLimitSpentUsdn)], SEP)) | |
361 | 362 | } | |
362 | 363 | ||
363 | 364 | ||
365 | 366 | @Callable(i) | |
366 | 367 | func gnsbtInfoREADONLY (userAddressStrOpt,nsbtAmtDiff) = { | |
367 | 368 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
368 | - | let $t01291613099 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
369 | - | let limitMaxUsdn = $t01291613099._1 | |
370 | - | let limitSpent = $t01291613099._2 | |
371 | - | let blcks2LmtReset = $t01291613099._3 | |
372 | - | let gnsbtAmt = $t01291613099._4 | |
373 | - | let gnsbtAmtTotal = $t01291613099._5 | |
374 | - | let $t01310313311 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil)) | |
375 | - | let limitMaxUsdnNEW = $t01310313311._1 | |
376 | - | let limitSpentNEW = $t01310313311._2 | |
377 | - | let blcks2LmtResetNEW = $t01310313311._3 | |
378 | - | let gnsbtAmtNEW = $t01310313311._4 | |
379 | - | let gnsbtAmtTotalNEW = $t01310313311._5 | |
380 | - | let limitMaxWaves = convertNeutrinoToWaves(limitMaxUsdn, currentPrice) | |
381 | - | let limitMaxWavesNEW = convertNeutrinoToWaves(limitMaxUsdnNEW, currentPrice) | |
369 | + | let swapParams = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
370 | + | let blcks2LmtReset = swapParams._3 | |
371 | + | let gnsbtAmt = swapParams._4 | |
372 | + | let gnsbtAmtTotal = swapParams._5 | |
373 | + | let limitMaxWaves = swapParams._6 | |
374 | + | let limitMaxUsdn = swapParams._7 | |
375 | + | let swapParamsNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil)) | |
376 | + | let blcks2LmtResetNEW = swapParamsNEW._3 | |
377 | + | let gnsbtAmtNEW = swapParamsNEW._4 | |
378 | + | let gnsbtAmtTotalNEW = swapParamsNEW._5 | |
379 | + | let limitMaxWavesNEW = swapParamsNEW._6 | |
380 | + | let limitMaxUsdnNEW = swapParamsNEW._7 | |
382 | 381 | let gnsbtShare = if ((gnsbtAmtTotal != 0)) | |
383 | 382 | then fraction((gnsbtAmt * 100), MULT12, gnsbtAmtTotal) | |
384 | 383 | else 0 | |
395 | 394 | then (gnsbtAmtNEW == 0) | |
396 | 395 | else false | |
397 | 396 | let startHeight = if (isEmptyNsbtBalance) | |
398 | - | then | |
397 | + | then height | |
399 | 398 | else asInt(nsbtData[2]) | |
400 | 399 | let startTimestamp = toTimestamp(startHeight) | |
401 | 400 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
459 | 458 | let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [amount, assetId], nil)) | |
460 | 459 | let surfAmount = asInt(surfResult[bFuncIdxSurf]) | |
461 | 460 | let gNsbtAmount = asInt(invoke(surfStakingContract, "gnsbtFromSurfSYSREADONLY", [surfAmount], nil)) | |
462 | - | let limitOld = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._ | |
463 | - | let limitNew = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, gNsbtAmount], nil))._ | |
461 | + | let limitOld = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._7 | |
462 | + | let limitNew = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, gNsbtAmount], nil))._7 | |
464 | 463 | let price = asInt(surfResult[bFuncIdxWavesPrice]) | |
465 | 464 | let additionalLimitUsdn = (limitNew - limitOld) | |
466 | 465 | let additionalLimitWaves = fraction(additionalLimitUsdn, MULT8, price) |
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 bFuncIdxRest = 9 | |
67 | 67 | ||
68 | 68 | let bFuncIdxWavesPrice = 10 | |
69 | 69 | ||
70 | 70 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyNsbtAssetId () = "bond_asset_id" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keySurfAssetId () = "surf_asset_id" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyBalanceLocked () = "balance_lock_" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyMinWavesSwapAmount () = "min_waves_swap_amount" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyWavesOutFeePart () = "wavesOut_swap_feePart" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keySwapAmountAParam () = "%s%s__config__swapAParam" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func keySwapAmountBParam () = "%s%s__config__swapBParam" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyNsbtLockContract () = "%s__nsbtLockContract" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyMathContract () = "%s__mathContract" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyBalanceWavesLockInterval () = "balance_waves_lock_interval" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyPrice () = "price" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyHalfLife () = "%s__halfLife" | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyMinLockAmount () = "%s__minLockAmount" | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy" | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func keyMinNsbtSell () = "min_nsbt_sell" | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func keyRpdContractBalanceKey (assetId) = ("rpd_balance_" + assetId) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func asAnyList (val) = match val { | |
158 | 158 | case valAnyList: List[Any] => | |
159 | 159 | valAnyList | |
160 | 160 | case _ => | |
161 | 161 | throw("fail to cast into List[Any]") | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func asInt (val) = match val { | |
166 | 166 | case valInt: Int => | |
167 | 167 | valInt | |
168 | 168 | case _ => | |
169 | 169 | throw("fail to cast into Int") | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func asString (val) = match val { | |
174 | 174 | case valStr: String => | |
175 | 175 | valStr | |
176 | 176 | case _ => | |
177 | 177 | throw("fail to cast into String") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func asTuple2Ints (val) = match val { | |
182 | 182 | case v: (Int, Int) => | |
183 | 183 | v | |
184 | 184 | case _ => | |
185 | 185 | throw("fail to cast into Tuple2 ints") | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func asSwapParamsSTRUCT (val) = match val { | |
190 | - | case struct: (Int, Int, Int, Int, Int) => | |
190 | + | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
191 | 191 | struct | |
192 | 192 | case _ => | |
193 | - | throw("fail to cast into | |
193 | + | throw("fail to cast into SwapParamsSTRUCT") | |
194 | 194 | } | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func toTimestamp (start) = if ((0 > start)) | |
198 | 198 | then -1 | |
199 | 199 | else match blockInfoByHeight(start) { | |
200 | 200 | case block: BlockInfo => | |
201 | 201 | block.timestamp | |
202 | 202 | case _ => | |
203 | 203 | -1 | |
204 | 204 | } | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | let IdxControlCfgNeutrinoDapp = 1 | |
214 | 214 | ||
215 | 215 | let IdxControlCfgAuctionDapp = 2 | |
216 | 216 | ||
217 | 217 | let IdxControlCfgRpdDapp = 3 | |
218 | 218 | ||
219 | 219 | let IdxControlCfgMathDapp = 4 | |
220 | 220 | ||
221 | 221 | let IdxControlCfgLiquidationDapp = 5 | |
222 | 222 | ||
223 | 223 | let IdxControlCfgRestDapp = 6 | |
224 | 224 | ||
225 | 225 | let IdxControlCfgNodeRegistryDapp = 7 | |
226 | 226 | ||
227 | 227 | let IdxControlCfgNsbtStakingDapp = 8 | |
228 | 228 | ||
229 | 229 | let IdxControlCfgMediatorDapp = 9 | |
230 | 230 | ||
231 | 231 | let IdxControlCfgSurfStakingDapp = 10 | |
232 | 232 | ||
233 | 233 | let IdxControlCfgGnsbtControllerDapp = 11 | |
234 | 234 | ||
235 | 235 | let IdxControlCfgRestV2Dapp = 12 | |
236 | 236 | ||
237 | 237 | func keyControlAddress () = "%s%s__config__controlAddress" | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func keyControlCfg () = "%s__controlConfig" | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
250 | 250 | ||
251 | 251 | let controlCfg = readControlCfgOrFail(controlContract) | |
252 | 252 | ||
253 | 253 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
254 | 254 | ||
255 | 255 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
256 | 256 | ||
257 | 257 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
258 | 258 | ||
259 | 259 | let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp) | |
260 | 260 | ||
261 | 261 | let rpdContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp) | |
262 | 262 | ||
263 | 263 | let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp) | |
264 | 264 | ||
265 | 265 | let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp) | |
266 | 266 | ||
267 | 267 | let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp) | |
268 | 268 | ||
269 | 269 | let restV2Contract = getContractAddressOrFail(controlCfg, IdxControlCfgRestV2Dapp) | |
270 | 270 | ||
271 | 271 | let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
272 | 272 | ||
273 | 273 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
274 | 274 | ||
275 | 275 | let nsbtAssetIdStr = getStringValue(neutrinoContract, keyNsbtAssetId()) | |
276 | 276 | ||
277 | 277 | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
278 | 278 | ||
279 | 279 | let surfAssetIdStr = getStringValue(auctionContract, keySurfAssetId()) | |
280 | 280 | ||
281 | 281 | let surfAssetId = fromBase58String(surfAssetIdStr) | |
282 | 282 | ||
283 | 283 | func minWavesForNsbtBuy () = asInt(invoke(auctionContract, "minWavesAmountNsbtBuySYSREADONLY", nil, nil)) | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func minNsbtForSell () = asInt(invoke(auctionContract, "minNsbtAmountForSellSYSREADONLY", nil, nil)) | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | func minWavesForSurfBuy () = asInt(invoke(auctionContract, "minWavesAmountSurfBuySYSREADONLY", nil, nil)) | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | func minUsdnForSurfBuy () = asInt(invoke(auctionContract, "minUsdnAmountSurfBuySYSREADONLY", nil, nil)) | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | func privateNsbtPriceREST () = { | |
296 | 296 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [0], nil)) | |
297 | 297 | let nsbt2usdnPrice = asInt(prices[0]) | |
298 | 298 | let nsbt2wavesPrice = asInt(prices[1]) | |
299 | 299 | $Tuple2(IntegerEntry("nsbt2usdnPrice", nsbt2usdnPrice), IntegerEntry("nsbt2wavesPrice", nsbt2wavesPrice)) | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func getLockedOnRpd (addrStr,assetIdStr) = { | |
304 | 304 | let key = makeString(["rpd_balance", assetIdStr, addrStr], "_") | |
305 | 305 | valueOrElse(getInteger(rpdContract, key), 0) | |
306 | 306 | } | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | @Callable(i) | |
310 | 310 | func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this)) | |
311 | 311 | then throw("not authorized") | |
312 | 312 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)] | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | ||
316 | 316 | @Callable(i) | |
317 | 317 | func neutrinoStatsREADONLY () = { | |
318 | 318 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
319 | 319 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [0], nil)) | |
320 | 320 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
321 | 321 | let neutrinoLockedBalance = asInt(neutrinoMetrics[nMetricIdxUsdnLockedBalance]) | |
322 | 322 | let wavesLockedBalance = asInt(neutrinoMetrics[nMetricIdxWavesLockedBalance]) | |
323 | 323 | let reservesInWaves = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
324 | 324 | let reservesInUsdn = asInt(neutrinoMetrics[nMetricIdxReserveInUsdn]) | |
325 | 325 | let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
326 | 326 | let surplus = asInt(neutrinoMetrics[nMetricIdxSurplus]) | |
327 | 327 | let surplusPercent = asInt(neutrinoMetrics[nMetricIdxSurplusPercent]) | |
328 | 328 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
329 | 329 | let nsbtSupply = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
330 | 330 | let maxNsbtSupply = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
331 | 331 | let nsbt2usdnPrice = asInt(prices[0]) | |
332 | 332 | let nsbt2wavesPrice = asInt(prices[1]) | |
333 | 333 | let minWaves4NsbtBuy = minWavesForNsbtBuy() | |
334 | 334 | let minNsbtsell = minNsbtForSell() | |
335 | 335 | let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount()) | |
336 | 336 | let maxWaves2BuySurf = (fraction(neutrinoSupply, MULT8, currentPrice) - reservesInWaves) | |
337 | 337 | let maxUsdn2BuySurf = (neutrinoSupply - reservesInUsdn) | |
338 | 338 | let surfPriceInUsdn = BR | |
339 | 339 | let surfPriceInWaves = fraction(BR, MULT6, currentPrice) | |
340 | 340 | let totalUsdnStaked = valueOrElse(getInteger(rpdContract, keyRpdContractBalanceKey(neutrinoAssetIdString)), 0) | |
341 | 341 | $Tuple2(nil, makeString(["%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(maxWaves2BuySurf), toString(maxUsdn2BuySurf), toString(surfPriceInUsdn), toString(surfPriceInWaves), toString(totalUsdnStaked)], SEP)) | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | ||
345 | 345 | ||
346 | 346 | @Callable(i) | |
347 | 347 | func swapInfoREADONLY (userAddressStrOpt) = { | |
348 | 348 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
349 | 349 | let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount()) | |
350 | 350 | let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount()) | |
351 | 351 | let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart()) | |
352 | 352 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
353 | 353 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
354 | 354 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
355 | - | let $t01174611910 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
356 | - | let swapLimitMaxUsdn = $t01174611910._1 | |
357 | - | let swapLimitSpentUsdn = $t01174611910._2 | |
358 | - | let blcks2LmtReset = $t01174611910._3 | |
359 | - | let swapLimitMaxWaves = convertNeutrinoToWaves(swapLimitMaxUsdn, currentPrice) | |
360 | - | $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)) | |
355 | + | let swapParamsSTRUCT = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
356 | + | let swapLimitMaxUsdn = swapParamsSTRUCT._1 | |
357 | + | let swapLimitSpentUsdn = swapParamsSTRUCT._2 | |
358 | + | let blcks2LmtReset = swapParamsSTRUCT._3 | |
359 | + | let wavesSwapLimitMax = swapParamsSTRUCT._6 | |
360 | + | let usdnSwapLimitMax = swapParamsSTRUCT._7 | |
361 | + | $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(wavesSwapLimitMax), toString(usdnSwapLimitMax), toString(swapLimitSpentUsdn)], SEP)) | |
361 | 362 | } | |
362 | 363 | ||
363 | 364 | ||
364 | 365 | ||
365 | 366 | @Callable(i) | |
366 | 367 | func gnsbtInfoREADONLY (userAddressStrOpt,nsbtAmtDiff) = { | |
367 | 368 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
368 | - | let $t01291613099 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
369 | - | let limitMaxUsdn = $t01291613099._1 | |
370 | - | let limitSpent = $t01291613099._2 | |
371 | - | let blcks2LmtReset = $t01291613099._3 | |
372 | - | let gnsbtAmt = $t01291613099._4 | |
373 | - | let gnsbtAmtTotal = $t01291613099._5 | |
374 | - | let $t01310313311 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil)) | |
375 | - | let limitMaxUsdnNEW = $t01310313311._1 | |
376 | - | let limitSpentNEW = $t01310313311._2 | |
377 | - | let blcks2LmtResetNEW = $t01310313311._3 | |
378 | - | let gnsbtAmtNEW = $t01310313311._4 | |
379 | - | let gnsbtAmtTotalNEW = $t01310313311._5 | |
380 | - | let limitMaxWaves = convertNeutrinoToWaves(limitMaxUsdn, currentPrice) | |
381 | - | let limitMaxWavesNEW = convertNeutrinoToWaves(limitMaxUsdnNEW, currentPrice) | |
369 | + | let swapParams = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil)) | |
370 | + | let blcks2LmtReset = swapParams._3 | |
371 | + | let gnsbtAmt = swapParams._4 | |
372 | + | let gnsbtAmtTotal = swapParams._5 | |
373 | + | let limitMaxWaves = swapParams._6 | |
374 | + | let limitMaxUsdn = swapParams._7 | |
375 | + | let swapParamsNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil)) | |
376 | + | let blcks2LmtResetNEW = swapParamsNEW._3 | |
377 | + | let gnsbtAmtNEW = swapParamsNEW._4 | |
378 | + | let gnsbtAmtTotalNEW = swapParamsNEW._5 | |
379 | + | let limitMaxWavesNEW = swapParamsNEW._6 | |
380 | + | let limitMaxUsdnNEW = swapParamsNEW._7 | |
382 | 381 | let gnsbtShare = if ((gnsbtAmtTotal != 0)) | |
383 | 382 | then fraction((gnsbtAmt * 100), MULT12, gnsbtAmtTotal) | |
384 | 383 | else 0 | |
385 | 384 | let gnsbtShareNEW = if ((gnsbtAmtTotalNEW != 0)) | |
386 | 385 | then fraction((gnsbtAmtNEW * 100), MULT12, gnsbtAmtTotalNEW) | |
387 | 386 | else 0 | |
388 | 387 | let rewardInfo = asString(invoke(nsbtStakingContract, "unclaimedRewardsREADONLY", [userAddressStrOpt], nil)) | |
389 | 388 | let nsbtAmt = gnsbtAmt | |
390 | 389 | let nsbtAmtNew = gnsbtAmtNEW | |
391 | 390 | let nsbtAmtStakedTotal = gnsbtAmtTotal | |
392 | 391 | let nsbtAmtStakedTotalNew = gnsbtAmtTotalNEW | |
393 | 392 | let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil)) | |
394 | 393 | let isEmptyNsbtBalance = if ((gnsbtAmt == 0)) | |
395 | 394 | then (gnsbtAmtNEW == 0) | |
396 | 395 | else false | |
397 | 396 | let startHeight = if (isEmptyNsbtBalance) | |
398 | - | then | |
397 | + | then height | |
399 | 398 | else asInt(nsbtData[2]) | |
400 | 399 | let startTimestamp = toTimestamp(startHeight) | |
401 | 400 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
402 | 401 | let startHeightNew = if (isEmptyNsbtBalance) | |
403 | 402 | then height | |
404 | 403 | else asInt(invoke(mathContract, "mergeStakesREADONLY", [gnsbtAmt, startHeight, gnsbtAmtNEW, height, halfLife], nil)) | |
405 | 404 | let startTimestampNew = toTimestamp(startHeightNew) | |
406 | 405 | $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)) | |
407 | 406 | } | |
408 | 407 | ||
409 | 408 | ||
410 | 409 | ||
411 | 410 | @Callable(i) | |
412 | 411 | func neutrinoConfigREADONLY () = { | |
413 | 412 | let limitParamA = getIntegerValue(mathContract, keySwapAmountAParam()) | |
414 | 413 | let limitParamB = getIntegerValue(mathContract, keySwapAmountBParam()) | |
415 | 414 | let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount()) | |
416 | 415 | let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount()) | |
417 | 416 | let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart()) | |
418 | 417 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
419 | 418 | let minWaves4NsbtBuy = minWavesForNsbtBuy() | |
420 | 419 | let minNsbtsell = minNsbtForSell() | |
421 | 420 | let minNsbtLockAmt = getIntegerValue(nsbtStakingContract, keyMinLockAmount()) | |
422 | 421 | let halfLife = getIntegerValue(nsbtStakingContract, keyHalfLife()) | |
423 | 422 | let minWaves4SurfBuy = minWavesForSurfBuy() | |
424 | 423 | let minUsdn4SurfBuy = minUsdnForSurfBuy() | |
425 | 424 | let surfStakingCfg = asAnyList(invoke(surfStakingContract, "configSYSREADONLY", nil, nil)) | |
426 | 425 | let minSurfStakeAmt = asInt(surfStakingCfg[0]) | |
427 | 426 | let gnsbtFromSurfCoeff = asInt(surfStakingCfg[1]) | |
428 | 427 | let surfVotingPowerRestrictivePeriod = asInt(surfStakingCfg[2]) | |
429 | 428 | let brToStartSurfTransformation = asInt(surfStakingCfg[3]) | |
430 | 429 | let shutdown = valueOrElse(getBoolean(controlContract, "is_blocked"), false) | |
431 | 430 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%b", toString(limitParamA), toString(limitParamB), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(minWaves4NsbtBuy), toString(minNsbtsell), toString(minNsbtLockAmt), toString(halfLife), toString(minWaves4SurfBuy), toString(minUsdn4SurfBuy), toString(minSurfStakeAmt), toString(gnsbtFromSurfCoeff), toString(surfVotingPowerRestrictivePeriod), toString(brToStartSurfTransformation), toString(shutdown)], SEP)) | |
432 | 431 | } | |
433 | 432 | ||
434 | 433 | ||
435 | 434 | ||
436 | 435 | @Callable(i) | |
437 | 436 | func buyNsbtREADONLY (wavesPay) = { | |
438 | 437 | let minWavesAmountNsbtBuy = minWavesForNsbtBuy() | |
439 | 438 | if ((minWavesAmountNsbtBuy > wavesPay)) | |
440 | 439 | then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected")) | |
441 | 440 | else { | |
442 | 441 | let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil)) | |
443 | 442 | if ((curveResult == curveResult)) | |
444 | 443 | then { | |
445 | 444 | let nsbtAmount = asInt(curveResult[0]) | |
446 | 445 | if ((0 >= nsbtAmount)) | |
447 | 446 | then throw("nsbtAmount <= 0") | |
448 | 447 | else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP)) | |
449 | 448 | } | |
450 | 449 | else throw("Strict value is not equal to itself.") | |
451 | 450 | } | |
452 | 451 | } | |
453 | 452 | ||
454 | 453 | ||
455 | 454 | ||
456 | 455 | @Callable(i) | |
457 | 456 | func buySurfREADONLY (userAddressStrOpt,amount,assetIdStr) = { | |
458 | 457 | let assetId = fromBase58String(assetIdStr) | |
459 | 458 | let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [amount, assetId], nil)) | |
460 | 459 | let surfAmount = asInt(surfResult[bFuncIdxSurf]) | |
461 | 460 | let gNsbtAmount = asInt(invoke(surfStakingContract, "gnsbtFromSurfSYSREADONLY", [surfAmount], nil)) | |
462 | - | let limitOld = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._ | |
463 | - | let limitNew = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, gNsbtAmount], nil))._ | |
461 | + | let limitOld = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._7 | |
462 | + | let limitNew = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, gNsbtAmount], nil))._7 | |
464 | 463 | let price = asInt(surfResult[bFuncIdxWavesPrice]) | |
465 | 464 | let additionalLimitUsdn = (limitNew - limitOld) | |
466 | 465 | let additionalLimitWaves = fraction(additionalLimitUsdn, MULT8, price) | |
467 | 466 | let br0 = asInt(surfResult[bFuncIdxBRStart]) | |
468 | 467 | let br1 = asInt(surfResult[bFuncIdxBREnd]) | |
469 | 468 | let priceSurf2Waves0 = fraction(br0, MULT6, price) | |
470 | 469 | let priceSurf2Waves1 = fraction(br1, MULT6, price) | |
471 | 470 | let gsnbtRestV2DATA = asAnyList(invoke(restV2Contract, "gnsbtInfoINTERNAL", [userAddressStrOpt, 0, surfAmount], nil)) | |
472 | 471 | let votingPowerMax = asInt(gsnbtRestV2DATA[21]) | |
473 | 472 | let votingPowerMaxNEW = asInt(gsnbtRestV2DATA[22]) | |
474 | 473 | let votingPowerEtaNEW = asInt(gsnbtRestV2DATA[23]) | |
475 | 474 | let mergedVotingPowerEta = votingPowerEtaNEW | |
476 | 475 | let maxVotingPowerDiff = (votingPowerMaxNEW - votingPowerMax) | |
477 | 476 | let rest = asInt(surfResult[bFuncIdxRest]) | |
478 | 477 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(surfAmount), toString(gNsbtAmount), toString(additionalLimitUsdn), toString(additionalLimitWaves), toString(br0), toString(br1), toString(priceSurf2Waves0), toString(priceSurf2Waves1), toString(mergedVotingPowerEta), toString(maxVotingPowerDiff), toString(rest)], SEP)) | |
479 | 478 | } | |
480 | 479 | ||
481 | 480 | ||
482 | 481 | ||
483 | 482 | @Callable(i) | |
484 | 483 | func walletInfoREADONLY (userAddressStr) = { | |
485 | 484 | let addr = addressFromStringValue(userAddressStr) | |
486 | 485 | let balance = wavesBalance(addr) | |
487 | 486 | let usdnLocked = getLockedOnRpd(userAddressStr, neutrinoAssetIdString) | |
488 | 487 | let nsbtLockedOld = getLockedOnRpd(userAddressStr, nsbtAssetIdStr) | |
489 | 488 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStr, 0, 0], nil)) | |
490 | 489 | let nsbtData = asAnyList(gnsbtData[2]) | |
491 | 490 | let nsbtUser = asInt(nsbtData[0]) | |
492 | 491 | let nsbtTotal = asInt(nsbtData[1]) | |
493 | 492 | let gNsbtFromNsbtUser = asInt(nsbtData[2]) | |
494 | 493 | let gNsbtFromNsbtTotal = asInt(nsbtData[3]) | |
495 | 494 | let surfData = asAnyList(gnsbtData[3]) | |
496 | 495 | let surfUser = asInt(surfData[0]) | |
497 | 496 | let surfTotal = asInt(surfData[1]) | |
498 | 497 | let gNsbtFromSurfUser = asInt(surfData[2]) | |
499 | 498 | let gNsbtFromSurfTotal = asInt(surfData[3]) | |
500 | 499 | let availableUsdnToClaimFromSurf = 0 | |
501 | 500 | let alreadyClaimedUsdnFromSurf = 0 | |
502 | 501 | let gsnbtRestV2DATA = asAnyList(invoke(restV2Contract, "gnsbtInfoINTERNAL", [userAddressStr, 0, 0], nil)) | |
503 | 502 | let votingPower = asInt(gsnbtRestV2DATA[19]) | |
504 | 503 | let votingPowerMax = asInt(gsnbtRestV2DATA[21]) | |
505 | 504 | let votingPowerEta = asInt(gsnbtRestV2DATA[23]) | |
506 | 505 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(balance.regular), toString(balance.available), toString(balance.generating), toString(balance.effective), toString(height), toString(usdnLocked), toString(nsbtLockedOld), toString(nsbtUser), toString(gNsbtFromNsbtUser), toString(gNsbtFromSurfUser), toString(surfUser), toString(votingPower), toString(votingPowerMax), toString(votingPowerEta), toString(availableUsdnToClaimFromSurf), toString(alreadyClaimedUsdnFromSurf), toString(gNsbtFromNsbtTotal), toString(gNsbtFromSurfTotal)], SEP)) | |
507 | 506 | } | |
508 | 507 | ||
509 | 508 | ||
510 | 509 | ||
511 | 510 | @Callable(i) | |
512 | 511 | func mergedStakeREADONLY (amount1,height1,amount2,height2) = { | |
513 | 512 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
514 | 513 | let h = asInt(invoke(mathContract, "mergeStakesREADONLY", [amount1, height1, amount2, height2, halfLife], nil)) | |
515 | 514 | $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP)) | |
516 | 515 | } | |
517 | 516 | ||
518 | 517 | ||
519 | 518 | ||
520 | 519 | @Callable(i) | |
521 | 520 | func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = { | |
522 | 521 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
523 | 522 | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
524 | 523 | if ((a == a)) | |
525 | 524 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
526 | 525 | else throw("Strict value is not equal to itself.") | |
527 | 526 | } | |
528 | 527 | ||
529 | 528 | ||
530 | 529 | ||
531 | 530 | @Callable(i) | |
532 | 531 | func unstakeComissionAmountByUserREADONLY (amount,userAddress) = { | |
533 | 532 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
534 | 533 | let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height) | |
535 | 534 | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil)) | |
536 | 535 | if ((a == a)) | |
537 | 536 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
538 | 537 | else throw("Strict value is not equal to itself.") | |
539 | 538 | } | |
540 | 539 | ||
541 | 540 | ||
542 | 541 | ||
543 | 542 | @Callable(i) | |
544 | 543 | func neutrinoStateREST () = { | |
545 | 544 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
546 | 545 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
547 | 546 | let neutrinoLockedBalance = asInt(neutrinoMetrics[nMetricIdxUsdnLockedBalance]) | |
548 | 547 | let wavesLockedBalance = asInt(neutrinoMetrics[nMetricIdxWavesLockedBalance]) | |
549 | 548 | let reservesInWaves = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
550 | 549 | let reservesInUsdn = asInt(neutrinoMetrics[nMetricIdxReserveInUsdn]) | |
551 | 550 | let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
552 | 551 | let surplus = asInt(neutrinoMetrics[nMetricIdxSurplus]) | |
553 | 552 | let surplusPercent = asInt(neutrinoMetrics[nMetricIdxSurplusPercent]) | |
554 | 553 | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
555 | 554 | let nsbtSupply = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
556 | 555 | let nsbtSupplyMax = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
557 | 556 | let surfSupply = asInt(neutrinoMetrics[nMetricIdxSurfSupply]) | |
558 | 557 | 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)], "__")) | |
559 | 558 | } | |
560 | 559 | ||
561 | 560 | ||
562 | 561 | ||
563 | 562 | @Callable(i) | |
564 | 563 | func nsbtPriceREST () = { | |
565 | 564 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [0], nil)) | |
566 | 565 | let nsbt2usdnPrice = asInt(prices[0]) | |
567 | 566 | let nsbt2wavesPrice = asInt(prices[1]) | |
568 | 567 | let restData = makeString(["startNsbtPriceREST", toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), "endNsbtPriceREST"], "__") | |
569 | 568 | throw(restData) | |
570 | 569 | } | |
571 | 570 | ||
572 | 571 | ||
573 | 572 | ||
574 | 573 | @Callable(i) | |
575 | 574 | func surfPriceREST () = { | |
576 | 575 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
577 | 576 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
578 | 577 | let reservesInWaves = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
579 | 578 | let neutrinoSupply = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
580 | 579 | let surfPriceInUsdn = fraction(reservesInWaves, currentPrice, neutrinoSupply) | |
581 | 580 | let surfPriceInWaves = fraction(reservesInWaves, MULT8, neutrinoSupply) | |
582 | 581 | let restData = makeString(["startSurfPriceREST", toString(surfPriceInUsdn), toString(surfPriceInWaves), "endSurfPriceREST"], "__") | |
583 | 582 | throw(restData) | |
584 | 583 | } | |
585 | 584 | ||
586 | 585 |
github/deemru/w8io/026f985 68.06 ms ◑