tx · 5FdSS9RqcRhx5ng65ePpcAARKSu7MER8U9nr7sFqKN1E 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh: -0.02200000 Waves 2023.01.07 12:05 [2394331] smart account 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh > SELF 0.00000000 Waves
{ "type": 13, "id": "5FdSS9RqcRhx5ng65ePpcAARKSu7MER8U9nr7sFqKN1E", "fee": 2200000, "feeAssetId": null, "timestamp": 1673082350284, "version": 2, "chainId": 84, "sender": "3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh", "senderPublicKey": "HiTi1JT7GQRqLNxg4yZhD1mV42y1Mv2AYvRx92JQRbwX", "proofs": [ "5pBqy8Qzt1ze7qfkHnnerWarF8x25eQpUeWAXzmvmur6nqbdDLdcuYFZWToaC4YjqcWuaBZzwVCbNsU1mfEFoMzW" ], "script": "base64:BgJPCAISBAoCAQQSBQoDCAEBEgUKAwgBARIDCgEIEgMKAQgSBAoCCAESBQoDCAEIEgUKAwgBCBIDCgEBEgMKAQESBAoCAQESAwoBARIECgIBAXIABkVVTEVSOADWic+BAQAFTVVMVDYAwIQ9AAZNVUxUWDYJALYCAQDAhD0ABU1VTFQ4AIDC1y8ABk1VTFRYOAkAtgIBAIDC1y8AB01VTFRYMTAJALYCAQCAyK+gJQAGTVVMVDEyAICglKWNHQAHTVVMVFgxNgkAtgIBAICAhP6m3uERAAZNVUxUMTgJALYCAQCAgJC7utat8A0AA1NFUAICX18AEURFRkFVTFRTV0FQRkVFTjJXAIgnABFERUZBVUxUU1dBUEZFRVcyTgCgnAEAC0JSUFJPVEVDVEVEAKCNBgAHV0FWRVNJRAkA2QQBAgVXQVZFUwAJREFZTUlMTElTAIC4mSkBEmtleU5ldXRyaW5vQXNzZXRJZAACEW5ldXRyaW5vX2Fzc2V0X2lkAQ5rZXlOc2J0QXNzZXRJZAACDWJvbmRfYXNzZXRfaWQBDmtleVN1cmZBc3NldElkAAINc3VyZl9hc3NldF9pZA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icationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EgKEtT2Gva2Fvg7pqTBdUtNF6iMc71HH1ZXZgyZg28Zq Next: C6B1me3ckcGDpGuc2g2E6HnqunrnMsdN8bCpepNqm1Di Diff:
Old | New | Differences | |
---|---|---|---|
171 | 171 | ||
172 | 172 | ||
173 | 173 | func asWithdrawResultSTRUCT (val) = match val { | |
174 | - | case struct: (Int, Unit, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int) => | |
174 | + | case struct: (Int, Unit, Int, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int, Int) => | |
175 | 175 | struct | |
176 | 176 | case _ => | |
177 | 177 | throw("fail to cast into WithdrawResult") | |
323 | 323 | let currStartOfDay = toStartOfDay(lastBlock.timestamp) | |
324 | 324 | let startTimestamp = (currStartOfDay - (DAYMILLIS * (days + 1))) | |
325 | 325 | let endTimestamp = (currStartOfDay - DAYMILLIS) | |
326 | - | let | |
326 | + | let startUsdnAmtTMP = readUsdnIncomeForDay(stakingAcc, startTimestamp, neutrinoMetrics) | |
327 | 327 | let endUsdnAmt = readUsdnIncomeForDay(stakingAcc, endTimestamp, neutrinoMetrics) | |
328 | + | let startUsdnAmt = if ((startUsdnAmtTMP == 0)) | |
329 | + | then endUsdnAmt | |
330 | + | else startUsdnAmtTMP | |
328 | 331 | (endUsdnAmt - startUsdnAmt) | |
329 | 332 | } | |
330 | 333 | ||
332 | 335 | func calcApr (stakingAcc,periodInDays,incomeForPeriod,stakingAssetPriceToUsdnX6) = { | |
333 | 336 | let totalStaked = getIntOrElse(stakingAcc, "%s%s__stats__activeTotalLocked", 1) | |
334 | 337 | let totalStakedInUsdn = fraction(totalStaked, stakingAssetPriceToUsdnX6, MULT6) | |
335 | - | fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays)) | |
338 | + | if ((0 > incomeForPeriod)) | |
339 | + | then 0 | |
340 | + | else fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays)) | |
336 | 341 | } | |
337 | 342 | ||
338 | 343 | ||
518 | 523 | let unleaseAmt = withdrawTuple._5 | |
519 | 524 | let outFeeAmount = withdrawTuple._6 | |
520 | 525 | let outAmtGross = withdrawTuple._7 | |
521 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(price), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP)) | |
526 | + | let withdrawPrice = withdrawTuple._8 | |
527 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(withdrawPrice), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP)) | |
522 | 528 | } | |
523 | 529 | ||
524 | 530 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let EULER8 = 271828182 | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULTX6 = toBigInt(1000000) | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let MULTX8 = toBigInt(100000000) | |
13 | 13 | ||
14 | 14 | let MULTX10 = toBigInt(10000000000) | |
15 | 15 | ||
16 | 16 | let MULT12 = 1000000000000 | |
17 | 17 | ||
18 | 18 | let MULTX16 = toBigInt(10000000000000000) | |
19 | 19 | ||
20 | 20 | let MULT18 = toBigInt(1000000000000000000) | |
21 | 21 | ||
22 | 22 | let SEP = "__" | |
23 | 23 | ||
24 | 24 | let DEFAULTSWAPFEEN2W = 5000 | |
25 | 25 | ||
26 | 26 | let DEFAULTSWAPFEEW2N = 20000 | |
27 | 27 | ||
28 | 28 | let BRPROTECTED = 100000 | |
29 | 29 | ||
30 | 30 | let WAVESID = fromBase58String("WAVES") | |
31 | 31 | ||
32 | 32 | let DAYMILLIS = 86400000 | |
33 | 33 | ||
34 | 34 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func keyNsbtAssetId () = "bond_asset_id" | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keySurfAssetId () = "surf_asset_id" | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func keyBalanceLocked () = "balance_lock_" | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyMinWavesSwapAmount () = "min_waves_swap_amount" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount" | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyWavesOutFeePart () = "wavesOut_swap_feePart" | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart" | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keySwapAmountAParam () = "%s%s__config__swapAParam" | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keySwapAmountBParam () = "%s%s__config__swapBParam" | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyNsbtLockContract () = "%s__nsbtLockContract" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyMathContract () = "%s__mathContract" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyBalanceWavesLockInterval () = "balance_waves_lock_interval" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyPrice () = "price" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyHalfLife () = "%s__halfLife" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyMinLockAmount () = "%s__minLockAmount" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keyMinNsbtSell () = "min_nsbt_sell" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], SEP) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getIntOrElse (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func getStrOrElse (address,key,defaultVal) = valueOrElse(getString(address, key), defaultVal) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func asAnyList (val) = match val { | |
134 | 134 | case valAnyList: List[Any] => | |
135 | 135 | valAnyList | |
136 | 136 | case _ => | |
137 | 137 | throw("fail to cast into List[Any]") | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func asInt (val) = match val { | |
142 | 142 | case valInt: Int => | |
143 | 143 | valInt | |
144 | 144 | case _ => | |
145 | 145 | throw("fail to cast into Int") | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func asString (val) = match val { | |
150 | 150 | case valStr: String => | |
151 | 151 | valStr | |
152 | 152 | case _ => | |
153 | 153 | throw("fail to cast into String") | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func asTuple2Ints (val) = match val { | |
158 | 158 | case v: (Int, Int) => | |
159 | 159 | v | |
160 | 160 | case _ => | |
161 | 161 | throw("fail to cast into Tuple2 ints") | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func asSwapParamsSTRUCT (val) = match val { | |
166 | 166 | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
167 | 167 | struct | |
168 | 168 | case _ => | |
169 | 169 | throw("fail to cast into SwapParamsSTRUCT") | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func asWithdrawResultSTRUCT (val) = match val { | |
174 | - | case struct: (Int, Unit, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int) => | |
174 | + | case struct: (Int, Unit, Int, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int, Int) => | |
175 | 175 | struct | |
176 | 176 | case _ => | |
177 | 177 | throw("fail to cast into WithdrawResult") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func toTimestamp (start) = if ((0 > start)) | |
182 | 182 | then -1 | |
183 | 183 | else match blockInfoByHeight(start) { | |
184 | 184 | case block: BlockInfo => | |
185 | 185 | block.timestamp | |
186 | 186 | case _ => | |
187 | 187 | -1 | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | let nMetricIdxPrice = 0 | |
198 | 198 | ||
199 | 199 | let nMetricIdxUsdnLockedBalance = 1 | |
200 | 200 | ||
201 | 201 | let nMetricIdxWavesLockedBalance = 2 | |
202 | 202 | ||
203 | 203 | let nMetricIdxReserve = 3 | |
204 | 204 | ||
205 | 205 | let nMetricIdxReserveInUsdn = 4 | |
206 | 206 | ||
207 | 207 | let nMetricIdxUsdnSupply = 5 | |
208 | 208 | ||
209 | 209 | let nMetricIdxSurplus = 6 | |
210 | 210 | ||
211 | 211 | let nMetricIdxSurplusPercent = 7 | |
212 | 212 | ||
213 | 213 | let nMetricIdxBR = 8 | |
214 | 214 | ||
215 | 215 | let nMetricIdxNsbtSupply = 9 | |
216 | 216 | ||
217 | 217 | let nMetricIdxMaxNsbtSupply = 10 | |
218 | 218 | ||
219 | 219 | let nMetricIdxSurfSupply = 11 | |
220 | 220 | ||
221 | 221 | let IdxControlCfgNeutrinoDapp = 1 | |
222 | 222 | ||
223 | 223 | let IdxControlCfgAuctionDapp = 2 | |
224 | 224 | ||
225 | 225 | let IdxControlCfgRpdDapp = 3 | |
226 | 226 | ||
227 | 227 | let IdxControlCfgMathDapp = 4 | |
228 | 228 | ||
229 | 229 | let IdxControlCfgLiquidationDapp = 5 | |
230 | 230 | ||
231 | 231 | let IdxControlCfgRestDapp = 6 | |
232 | 232 | ||
233 | 233 | let IdxControlCfgNodeRegistryDapp = 7 | |
234 | 234 | ||
235 | 235 | let IdxControlCfgNsbtStakingDapp = 8 | |
236 | 236 | ||
237 | 237 | let IdxControlCfgMediatorDapp = 9 | |
238 | 238 | ||
239 | 239 | let IdxControlCfgSurfStakingDapp = 10 | |
240 | 240 | ||
241 | 241 | let IdxControlCfgGnsbtControllerDapp = 11 | |
242 | 242 | ||
243 | 243 | let bFuncIdxSurf = 0 | |
244 | 244 | ||
245 | 245 | let bFuncIdxWaves = 1 | |
246 | 246 | ||
247 | 247 | let bFuncIdxUsdn = 2 | |
248 | 248 | ||
249 | 249 | let bFuncIdxReserveStart = 3 | |
250 | 250 | ||
251 | 251 | let bFuncIdxSupplyStart = 4 | |
252 | 252 | ||
253 | 253 | let bFuncIdxBRStart = 5 | |
254 | 254 | ||
255 | 255 | let bFuncIdxReserveEnd = 6 | |
256 | 256 | ||
257 | 257 | let bFuncIdxSupplyEnd = 7 | |
258 | 258 | ||
259 | 259 | let bFuncIdxBREnd = 8 | |
260 | 260 | ||
261 | 261 | let bFuncIdxRest = 9 | |
262 | 262 | ||
263 | 263 | let bFuncIdxWavesPrice = 10 | |
264 | 264 | ||
265 | 265 | func keyControlAddress () = "%s%s__config__controlAddress" | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func keyControlCfg () = "%s__controlConfig" | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
278 | 278 | ||
279 | 279 | let controlCfg = readControlCfgOrFail(controlContract) | |
280 | 280 | ||
281 | 281 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
282 | 282 | ||
283 | 283 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
284 | 284 | ||
285 | 285 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
286 | 286 | ||
287 | 287 | let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp) | |
288 | 288 | ||
289 | 289 | let rpdContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp) | |
290 | 290 | ||
291 | 291 | let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp) | |
292 | 292 | ||
293 | 293 | let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp) | |
294 | 294 | ||
295 | 295 | let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp) | |
296 | 296 | ||
297 | 297 | let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
298 | 298 | ||
299 | 299 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
300 | 300 | ||
301 | 301 | let nsbtAssetIdStr = getStringValue(neutrinoContract, keyNsbtAssetId()) | |
302 | 302 | ||
303 | 303 | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
304 | 304 | ||
305 | 305 | let surfAssetIdStr = getStringValue(auctionContract, keySurfAssetId()) | |
306 | 306 | ||
307 | 307 | let surfAssetId = fromBase58String(surfAssetIdStr) | |
308 | 308 | ||
309 | 309 | func readUsdnIncomeForDay (stakingAcc,startOfDayTimestamp,neutrinoMetrics) = { | |
310 | 310 | let amtByDayKEY = keyStatsDepositAmtByDay(startOfDayTimestamp) | |
311 | 311 | let incomeStr = getStrOrElse(stakingAcc, amtByDayKEY, "%s%s__0__0") | |
312 | 312 | let incomeArray = split(incomeStr, SEP) | |
313 | 313 | let wavesAmt = parseIntValue(incomeArray[1]) | |
314 | 314 | let usdnAmt = parseIntValue(incomeArray[2]) | |
315 | 315 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
316 | 316 | let wavesAsUsdnAmt = fraction(wavesAmt, currentPrice, MULT8) | |
317 | 317 | (wavesAsUsdnAmt + usdnAmt) | |
318 | 318 | } | |
319 | 319 | ||
320 | 320 | ||
321 | 321 | func calcUsdnIncomeForPeriod (stakingAcc,days) = { | |
322 | 322 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
323 | 323 | let currStartOfDay = toStartOfDay(lastBlock.timestamp) | |
324 | 324 | let startTimestamp = (currStartOfDay - (DAYMILLIS * (days + 1))) | |
325 | 325 | let endTimestamp = (currStartOfDay - DAYMILLIS) | |
326 | - | let | |
326 | + | let startUsdnAmtTMP = readUsdnIncomeForDay(stakingAcc, startTimestamp, neutrinoMetrics) | |
327 | 327 | let endUsdnAmt = readUsdnIncomeForDay(stakingAcc, endTimestamp, neutrinoMetrics) | |
328 | + | let startUsdnAmt = if ((startUsdnAmtTMP == 0)) | |
329 | + | then endUsdnAmt | |
330 | + | else startUsdnAmtTMP | |
328 | 331 | (endUsdnAmt - startUsdnAmt) | |
329 | 332 | } | |
330 | 333 | ||
331 | 334 | ||
332 | 335 | func calcApr (stakingAcc,periodInDays,incomeForPeriod,stakingAssetPriceToUsdnX6) = { | |
333 | 336 | let totalStaked = getIntOrElse(stakingAcc, "%s%s__stats__activeTotalLocked", 1) | |
334 | 337 | let totalStakedInUsdn = fraction(totalStaked, stakingAssetPriceToUsdnX6, MULT6) | |
335 | - | fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays)) | |
338 | + | if ((0 > incomeForPeriod)) | |
339 | + | then 0 | |
340 | + | else fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays)) | |
336 | 341 | } | |
337 | 342 | ||
338 | 343 | ||
339 | 344 | @Callable(i) | |
340 | 345 | func reverseSwapLimitREADONLY (lim,isWavesSwap) = { | |
341 | 346 | let BR = asInt(asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))[nMetricIdxBR]) | |
342 | 347 | let gNsbt = if ((0 >= lim)) | |
343 | 348 | then 0 | |
344 | 349 | else { | |
345 | 350 | let aParamX8 = toBigInt(getIntOrFail(mathContract, if (isWavesSwap) | |
346 | 351 | then keySwapAmountAParam() | |
347 | 352 | else keyUsdnSwapAmountAParam())) | |
348 | 353 | let bParamX16 = toBigInt(getIntOrFail(mathContract, if (isWavesSwap) | |
349 | 354 | then keySwapAmountBParam() | |
350 | 355 | else keyUsdnSwapAmountBParam())) | |
351 | 356 | let limDivAX8 = if (isWavesSwap) | |
352 | 357 | then fraction(toBigInt(lim), MULTX10, aParamX8) | |
353 | 358 | else fraction(fraction(toBigInt(lim), MULTX10, aParamX8), MULTX6, toBigInt(BR)) | |
354 | 359 | let revBX16 = fraction(MULTX16, MULTX16, bParamX16) | |
355 | 360 | toInt(pow(limDivAX8, 8, revBX16, 16, 6, CEILING)) | |
356 | 361 | } | |
357 | 362 | $Tuple2(nil, gNsbt) | |
358 | 363 | } | |
359 | 364 | ||
360 | 365 | ||
361 | 366 | ||
362 | 367 | @Callable(i) | |
363 | 368 | func gnsbtInfoINTERNAL (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = { | |
364 | 369 | let userAddressOrThis = if ((userAddressStrOrEmpty != "")) | |
365 | 370 | then addressFromStringValue(userAddressStrOrEmpty) | |
366 | 371 | else this | |
367 | 372 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
368 | 373 | let gnsbtFromNsbtDiff = additionalNsbtToStakeOrZero | |
369 | 374 | let gnsbtFromSurfDiff = asInt(invoke(surfStakingContract, "gnsbtFromSurfSYSREADONLY", [additionalSurfToStakeOrZero], nil)) | |
370 | 375 | let gNsbtDiff = (gnsbtFromNsbtDiff + gnsbtFromSurfDiff) | |
371 | 376 | let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil)) | |
372 | 377 | let blcks2LmtReset = swapParamsTuple._3 | |
373 | 378 | let gnsbtAmt = swapParamsTuple._4 | |
374 | 379 | let gnsbtAmtTotal = swapParamsTuple._5 | |
375 | 380 | let limitMaxWaves = swapParamsTuple._6 | |
376 | 381 | let limitMaxUsdn = swapParamsTuple._7 | |
377 | 382 | let swapParamsTupleNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil)) | |
378 | 383 | let blcks2LmtResetNEW = swapParamsTupleNEW._3 | |
379 | 384 | let gnsbtAmtNEW = swapParamsTupleNEW._4 | |
380 | 385 | let gnsbtAmtTotalNEW = swapParamsTupleNEW._5 | |
381 | 386 | let limitMaxWavesNEW = swapParamsTupleNEW._6 | |
382 | 387 | let limitMaxUsdnNEW = swapParamsTupleNEW._7 | |
383 | 388 | let nsbtBalance = if ((userAddressStrOrEmpty != "")) | |
384 | 389 | then assetBalance(userAddressOrThis, nsbtAssetId) | |
385 | 390 | else 0 | |
386 | 391 | let surfBalance = if ((userAddressStrOrEmpty != "")) | |
387 | 392 | then assetBalance(userAddressOrThis, surfAssetId) | |
388 | 393 | else 0 | |
389 | 394 | let nsbtBalanceDiff = if ((additionalNsbtToStakeOrZero >= 0)) | |
390 | 395 | then additionalNsbtToStakeOrZero | |
391 | 396 | else { | |
392 | 397 | let nsbtUnstakingData = asAnyList(invoke(nsbtStakingContract, "nsbtUnstakingSYSREADONLY", [userAddressStrOrEmpty, (-1 * additionalNsbtToStakeOrZero)], nil)) | |
393 | 398 | let nsbtReceiveAmount = asInt(nsbtUnstakingData[2]) | |
394 | 399 | let result = -(nsbtReceiveAmount) | |
395 | 400 | result | |
396 | 401 | } | |
397 | 402 | let nsbtBalanceNew = (nsbtBalance - nsbtBalanceDiff) | |
398 | 403 | let surfBalanceNew = (surfBalance - additionalSurfToStakeOrZero) | |
399 | 404 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil)) | |
400 | 405 | let gnsbtUser = asInt(gnsbtData[0]) | |
401 | 406 | let gnsbtTotal = asInt(gnsbtData[1]) | |
402 | 407 | let nsbtData = asAnyList(gnsbtData[2]) | |
403 | 408 | let surfData = asAnyList(gnsbtData[3]) | |
404 | 409 | let vpEffectiveHeight = asInt(gnsbtData[4]) | |
405 | 410 | let vpEffectiveHeightNEW = asInt(gnsbtData[5]) | |
406 | 411 | let gnsbtAmtFromNsbt = asInt(nsbtData[2]) | |
407 | 412 | let gnsbtAmtFromSurf = asInt(surfData[2]) | |
408 | 413 | let gnsbtAmtFromNsbtNEW = (gnsbtAmtFromNsbt + gnsbtFromNsbtDiff) | |
409 | 414 | let gnsbtAmtFromSurfNEW = (gnsbtAmtFromSurf + gnsbtFromSurfDiff) | |
410 | 415 | let gnsbtFromNsbtTotal = asInt(nsbtData[3]) | |
411 | 416 | let gnsbtFromSurfTotal = asInt(surfData[3]) | |
412 | 417 | let gnsbtFromSurfActiveTotal = 0 | |
413 | 418 | let gnsbtFromSurfFrozenTotal = gnsbtFromSurfTotal | |
414 | 419 | let gnsbtFromNsbtTotalNEW = (gnsbtFromNsbtTotal + gnsbtFromNsbtDiff) | |
415 | 420 | let gnsbtFromSurfTotalNEW = (gnsbtFromSurfTotal + gnsbtFromSurfDiff) | |
416 | 421 | let gnsbtFromSurfFrozenTotalNEW = gnsbtFromSurfTotalNEW | |
417 | 422 | let votingPower = fraction(gnsbtAmtFromNsbt, MULT8, (gnsbtFromNsbtTotal + gnsbtFromSurfActiveTotal)) | |
418 | 423 | let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT8, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfActiveTotal)) | |
419 | 424 | let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT8, ((gnsbtFromNsbtTotal + gnsbtFromSurfActiveTotal) + gnsbtFromSurfFrozenTotal)) | |
420 | 425 | let votingPowerMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT8, ((gnsbtFromNsbtTotalNEW + gnsbtFromSurfActiveTotal) + gnsbtFromSurfFrozenTotalNEW)) | |
421 | 426 | let votingPowerEta = if ((vpEffectiveHeight == 0)) | |
422 | 427 | then height | |
423 | 428 | else vpEffectiveHeight | |
424 | 429 | let votingPowerEtaNew = if ((vpEffectiveHeightNEW == 0)) | |
425 | 430 | then height | |
426 | 431 | else vpEffectiveHeightNEW | |
427 | 432 | $Tuple2(nil, [0, nsbtBalance, surfBalance, nsbtBalanceNew, surfBalanceNew, gnsbtAmtFromNsbt, gnsbtAmtFromSurf, gnsbtAmtFromNsbtNEW, gnsbtAmtFromSurfNEW, gnsbtFromNsbtTotal, gnsbtFromSurfTotal, gnsbtFromNsbtTotalNEW, gnsbtFromSurfTotalNEW, limitMaxUsdn, limitMaxWaves, limitMaxUsdnNEW, limitMaxWavesNEW, blcks2LmtReset, blcks2LmtResetNEW, votingPower, votingPowerNew, votingPowerMax, votingPowerMaxNew, votingPowerEta, votingPowerEtaNew]) | |
428 | 433 | } | |
429 | 434 | ||
430 | 435 | ||
431 | 436 | ||
432 | 437 | @Callable(i) | |
433 | 438 | func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = { | |
434 | 439 | let gnsbtInfoDATA = asAnyList(invoke(this, "gnsbtInfoINTERNAL", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil)) | |
435 | 440 | $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%d%d", toString(asInt(gnsbtInfoDATA[1])), toString(asInt(gnsbtInfoDATA[2])), toString(asInt(gnsbtInfoDATA[3])), toString(asInt(gnsbtInfoDATA[4])), toString(asInt(gnsbtInfoDATA[5])), toString(asInt(gnsbtInfoDATA[6])), toString(asInt(gnsbtInfoDATA[7])), toString(asInt(gnsbtInfoDATA[8])), toString(asInt(gnsbtInfoDATA[9])), toString(asInt(gnsbtInfoDATA[10])), toString(asInt(gnsbtInfoDATA[11])), toString(asInt(gnsbtInfoDATA[12])), toString(asInt(gnsbtInfoDATA[13])), toString(asInt(gnsbtInfoDATA[14])), toString(asInt(gnsbtInfoDATA[15])), toString(asInt(gnsbtInfoDATA[16])), toString(asInt(gnsbtInfoDATA[17])), toString(asInt(gnsbtInfoDATA[18])), toString(asInt(gnsbtInfoDATA[19])), toString(asInt(gnsbtInfoDATA[20])), toString(asInt(gnsbtInfoDATA[21])), toString(asInt(gnsbtInfoDATA[22])), toString(asInt(gnsbtInfoDATA[23])), toString(asInt(gnsbtInfoDATA[24]))], SEP)) | |
436 | 441 | } | |
437 | 442 | ||
438 | 443 | ||
439 | 444 | ||
440 | 445 | @Callable(i) | |
441 | 446 | func gnsbtEffectiveREADONLY (userAddressStrOrEmpty) = { | |
442 | 447 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, 0, 0], nil)) | |
443 | 448 | let nsbtData = asAnyList(gnsbtData[2]) | |
444 | 449 | let userFromNsbt = asInt(nsbtData[2]) | |
445 | 450 | let totalFromNsbt = asInt(nsbtData[3]) | |
446 | 451 | let userMatureFromSurf = asInt(gnsbtData[9]) | |
447 | 452 | let totalMatureFromSurf = asInt(gnsbtData[6]) | |
448 | 453 | $Tuple2(nil, makeString(["%d%d", toString((totalFromNsbt + totalMatureFromSurf)), toString((userFromNsbt + userMatureFromSurf))], SEP)) | |
449 | 454 | } | |
450 | 455 | ||
451 | 456 | ||
452 | 457 | ||
453 | 458 | @Callable(i) | |
454 | 459 | func rewardInfoREADONLY (userAddressStrOrEmpty) = { | |
455 | 460 | let rewardsData = asAnyList(invoke(gnsbtControllerContract, "gnsbtRewardsSYSREADONLY", [userAddressStrOrEmpty], nil)) | |
456 | 461 | let usdnRewards = asString(invoke(rpdContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil)) | |
457 | 462 | $Tuple2(nil, makeString(["%s%s%s", asString(rewardsData[0]), asString(rewardsData[1]), usdnRewards], SEP)) | |
458 | 463 | } | |
459 | 464 | ||
460 | 465 | ||
461 | 466 | ||
462 | 467 | @Callable(i) | |
463 | 468 | func mergeNsbtREADONLY (userAddressMandatory,newAmount) = { | |
464 | 469 | let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressMandatory, newAmount], nil)) | |
465 | 470 | let amount0 = asInt(nsbtData[0]) | |
466 | 471 | let startHeight = if ((0 >= amount0)) | |
467 | 472 | then -1 | |
468 | 473 | else asInt(nsbtData[2]) | |
469 | 474 | let startTimestamp = toTimestamp(startHeight) | |
470 | 475 | let startHeightNew = if ((0 >= newAmount)) | |
471 | 476 | then startHeight | |
472 | 477 | else if ((0 >= amount0)) | |
473 | 478 | then height | |
474 | 479 | else { | |
475 | 480 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
476 | 481 | asInt(invoke(mathContract, "mergeStakesREADONLY", [amount0, startHeight, newAmount, height, halfLife], nil)) | |
477 | 482 | } | |
478 | 483 | let startTimestampNew = toTimestamp(startHeightNew) | |
479 | 484 | $Tuple2(nil, makeString(["%d%d%d%d", toString(startHeight), toString(startTimestamp), toString(startHeightNew), toString(startTimestampNew)], SEP)) | |
480 | 485 | } | |
481 | 486 | ||
482 | 487 | ||
483 | 488 | ||
484 | 489 | @Callable(i) | |
485 | 490 | func swapLimitCalculatorREADONLY (userAddressStrOpt,limitWanted,assetIdStr) = { | |
486 | 491 | let gNsbtCurrent = if ((userAddressStrOpt == "")) | |
487 | 492 | then 0 | |
488 | 493 | else asInt(asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._4) | |
489 | 494 | let limitWantedUsdn = if ((assetIdStr == "WAVES")) | |
490 | 495 | then convertWavesToNeutrino(limitWanted, getIntegerValue(controlContract, keyPrice())) | |
491 | 496 | else limitWanted | |
492 | 497 | let gNsbtNeeded = asInt(invoke(this, "reverseSwapLimitREADONLY", [limitWantedUsdn, (assetIdStr == "WAVES")], nil)) | |
493 | 498 | let gNsbtDelta = (gNsbtNeeded - gNsbtCurrent) | |
494 | 499 | $Tuple2(nil, makeString(["%s%s", toString(gNsbtCurrent), toString(gNsbtDelta)], SEP)) | |
495 | 500 | } | |
496 | 501 | ||
497 | 502 | ||
498 | 503 | ||
499 | 504 | @Callable(i) | |
500 | 505 | func swapInfoREADONLY (userAddressStrOrEmpty,amount,assetIdStr) = { | |
501 | 506 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
502 | 507 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
503 | 508 | let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil)) | |
504 | 509 | let blcks2LmtReset = swapParamsTuple._3 | |
505 | 510 | let limitMaxWaves = swapParamsTuple._6 | |
506 | 511 | let limitMaxUsdn = swapParamsTuple._7 | |
507 | 512 | let assetId = fromBase58String(assetIdStr) | |
508 | 513 | let swapType = if ((assetId == WAVESID)) | |
509 | 514 | then "waves" | |
510 | 515 | else if ((assetId == neutrinoAssetId)) | |
511 | 516 | then "neutrino" | |
512 | 517 | else throw(("Can't swap assetId=" + assetIdStr)) | |
513 | 518 | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price], nil)) | |
514 | 519 | let outNetAmount = withdrawTuple._1 | |
515 | 520 | let outAssetId = withdrawTuple._2 | |
516 | 521 | let outSurfAmt = withdrawTuple._3 | |
517 | 522 | let inAmtToSurfPart = withdrawTuple._4 | |
518 | 523 | let unleaseAmt = withdrawTuple._5 | |
519 | 524 | let outFeeAmount = withdrawTuple._6 | |
520 | 525 | let outAmtGross = withdrawTuple._7 | |
521 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(price), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP)) | |
526 | + | let withdrawPrice = withdrawTuple._8 | |
527 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(withdrawPrice), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP)) | |
522 | 528 | } | |
523 | 529 | ||
524 | 530 | ||
525 | 531 | ||
526 | 532 | @Callable(i) | |
527 | 533 | func usdnStakingAprREADONLY (days) = { | |
528 | 534 | let tmpDays = 1 | |
529 | 535 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
530 | 536 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
531 | 537 | let wavesIncome = (6000 * MULT8) | |
532 | 538 | let incomeForPeriod = fraction(wavesIncome, currentPrice, MULT8) | |
533 | 539 | let apr = calcApr(rpdContract, tmpDays, incomeForPeriod, MULT6) | |
534 | 540 | $Tuple2(nil, ("%d__" + toString(apr))) | |
535 | 541 | } | |
536 | 542 | ||
537 | 543 | ||
538 | 544 | ||
539 | 545 | @Callable(i) | |
540 | 546 | func surfStakingAprREADONLY (days) = { | |
541 | 547 | let tmpDays = 3 | |
542 | 548 | let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays) | |
543 | 549 | let surfPriceToUsdnX6 = 86400 | |
544 | 550 | let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfPriceToUsdnX6) | |
545 | 551 | $Tuple2(nil, ("%d__" + toString(apr))) | |
546 | 552 | } | |
547 | 553 | ||
548 | 554 | ||
549 | 555 | ||
550 | 556 | @Callable(i) | |
551 | 557 | func surfStakingAprV2READONLY (days,surfUsdnPriceX6) = { | |
552 | 558 | let tmpDays = 3 | |
553 | 559 | let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays) | |
554 | 560 | let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfUsdnPriceX6) | |
555 | 561 | $Tuple2(nil, ("%d__" + toString(apr))) | |
556 | 562 | } | |
557 | 563 | ||
558 | 564 | ||
559 | 565 | ||
560 | 566 | @Callable(i) | |
561 | 567 | func nsbtStakingAprREADONLY (days) = { | |
562 | 568 | let tmpDays = 3 | |
563 | 569 | let nsbtPriceToUsdnX6 = 8000000 | |
564 | 570 | let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays) | |
565 | 571 | let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtPriceToUsdnX6) | |
566 | 572 | $Tuple2(nil, ("%d__" + toString(apr))) | |
567 | 573 | } | |
568 | 574 | ||
569 | 575 | ||
570 | 576 | ||
571 | 577 | @Callable(i) | |
572 | 578 | func nsbtStakingAprV2READONLY (days,nsbtUsdnPriceX6) = { | |
573 | 579 | let tmpDays = 3 | |
574 | 580 | let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays) | |
575 | 581 | let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtUsdnPriceX6) | |
576 | 582 | $Tuple2(nil, ("%d__" + toString(apr))) | |
577 | 583 | } | |
578 | 584 | ||
579 | 585 |
github/deemru/w8io/026f985 65.73 ms ◑