tx · C56HDkyxree3ybz1WY5p55UQ3NVPEVyaE5iyJCZLgrdh 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi: -0.04000000 Waves 2022.09.26 14:38 [2246048] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves
{ "type": 13, "id": "C56HDkyxree3ybz1WY5p55UQ3NVPEVyaE5iyJCZLgrdh", "fee": 4000000, "feeAssetId": null, "timestamp": 1664192299565, "version": 1, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "5qhvee7gbqMEVHktASiryorGTVe6DRs6A35m2ru1raKJTEKqXfAvTh6B7AyaGwLrgYk4PbL3XFXdj5bjh4WisP3w", "4itgsh9dEE6YnCp72yZ9YGKk2aAcFCDTZXLjCEiBBcKh3ArvqFsxQng6NAStDx7J4YjBkQKxep7h5CLQx851L7in", "5f9b2PtR4SnPcarViryyXwHRePvcm1HQzw4rD5hbWMSvqU3ZzNSwod11cBjbWRjMAFvrx61uTqH255qvmFuBY8zg" ], "script": "base64:AAIFAAAAAAAAADkIAhIFCgMICAESAwoBARIHCgUBAQEBARIDCgEBEgQKAgECEgMKAQESABIFCgMBAQESBwoFAQEBAQEAAABeAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAB1NDQUxFMTYAAAAAAAAAABAAAAAAA1NFUAIAAAACX18AAAAABUhBTEY4AAAAAAAC+vCAAAAAAAhFVUxFUlgxNgkAATYAAAABAABgkqET2NV0AAAAAARUV09YCQABNgAAAAEAAAAAAAAAAAIAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9eEAAAAAAAdNVUxUWDEwCQABNgA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wgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAA05RgNo=", "chainId": 84, "height": 2246048, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D1knKt5DLKSJYLDCzip82Sx2wiTDA9vM2sEsY4esLMrj Next: 55cw3hVWu7YLPwVgxpDrT2FQRqDRXiycbhrtg2K8JjMo Full:
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 MULTSCALE = 8 | |
7 | 7 | ||
8 | 8 | let SCALE16 = 16 | |
9 | 9 | ||
10 | 10 | let SEP = "__" | |
11 | 11 | ||
12 | 12 | let HALF8 = 50000000 | |
13 | 13 | ||
14 | 14 | let EULERX16 = toBigInt(27182818284590452) | |
15 | 15 | ||
16 | 16 | let TWOX = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let MULT6 = 1000000 | |
19 | 19 | ||
20 | 20 | let MULTX6 = toBigInt(1000000) | |
21 | 21 | ||
22 | 22 | let MULT8 = 100000000 | |
23 | 23 | ||
24 | 24 | let MULTX8 = toBigInt(100000000) | |
25 | 25 | ||
26 | 26 | let MULTX10 = toBigInt(10000000000) | |
27 | 27 | ||
28 | 28 | let MULTX16 = toBigInt(10000000000000000) | |
29 | 29 | ||
30 | 30 | let WAVESID = fromBase58String("WAVES") | |
31 | 31 | ||
32 | 32 | let kResultIdxA = 0 | |
33 | 33 | ||
34 | 34 | let kResultIdxPaulB = 1 | |
35 | 35 | ||
36 | 36 | let kResultIdxWReservesInUsdn = 2 | |
37 | 37 | ||
38 | 38 | let kResultIdxMultBR = 3 | |
39 | 39 | ||
40 | 40 | let kResultIdxMultPower = 4 | |
41 | 41 | ||
42 | 42 | let kResultIdxMultExpInPowerStr = 5 | |
43 | 43 | ||
44 | 44 | let kResultIdxMultKStr = 6 | |
45 | 45 | ||
46 | 46 | let nMetricIdxPrice = 0 | |
47 | 47 | ||
48 | 48 | let nMetricIdxUsdnLockedBalance = 1 | |
49 | 49 | ||
50 | 50 | let nMetricIdxWavesLockedBalance = 2 | |
51 | 51 | ||
52 | 52 | let nMetricIdxReserve = 3 | |
53 | 53 | ||
54 | 54 | let nMetricIdxReserveInUsdn = 4 | |
55 | 55 | ||
56 | 56 | let nMetricIdxUsdnSupply = 5 | |
57 | 57 | ||
58 | 58 | let nMetricIdxSurplus = 6 | |
59 | 59 | ||
60 | 60 | let nMetricIdxSurplusPercent = 7 | |
61 | 61 | ||
62 | 62 | let nMetricIdxBR = 8 | |
63 | 63 | ||
64 | 64 | let nMetricIdxNsbtSupply = 9 | |
65 | 65 | ||
66 | 66 | let nMetricIdxMaxNsbtSupply = 10 | |
67 | 67 | ||
68 | 68 | let nMetricIdxSurfSupply = 11 | |
69 | 69 | ||
70 | 70 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keySwapAmountAParam () = "%s%s__config__swapAParam" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keySwapAmountBParam () = "%s%s__config__swapBParam" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyNsbtAssetId () = "bond_asset_id" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keySurfAssetId () = "surf_asset_id" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyBalanceLocked () = "balance_lock_" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func swapsTimeframeKEY () = "swaps_timeframe" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyPrice () = "price" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | let RpdBalanceKey = "rpd_balance" | |
116 | 116 | ||
117 | 117 | func rpdUserBalanceKey (owner,assetId) = makeString([RpdBalanceKey, assetId, owner], "_") | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getNumberByKey (address,key) = valueOrElse(getInteger(address, key), 0) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16)) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func asAnyList (val) = match val { | |
145 | 145 | case valAnyLyst: List[Any] => | |
146 | 146 | valAnyLyst | |
147 | 147 | case _ => | |
148 | 148 | throw("fail to cast into List[Any]") | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func asInt (val) = match val { | |
153 | 153 | case valInt: Int => | |
154 | 154 | valInt | |
155 | 155 | case _ => | |
156 | 156 | throw("fail to cast into Int") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func asString (val) = match val { | |
161 | 161 | case valStr: String => | |
162 | 162 | valStr | |
163 | 163 | case _ => | |
164 | 164 | throw("fail to cast into String") | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | let IdxControlCfgNeutrinoDapp = 1 | |
169 | 169 | ||
170 | 170 | let IdxControlCfgAuctionDapp = 2 | |
171 | 171 | ||
172 | 172 | let IdxControlCfgRpdDapp = 3 | |
173 | 173 | ||
174 | 174 | let IdxControlCfgMathDapp = 4 | |
175 | 175 | ||
176 | 176 | let IdxControlCfgLiquidationDapp = 5 | |
177 | 177 | ||
178 | 178 | let IdxControlCfgRestDapp = 6 | |
179 | 179 | ||
180 | 180 | let IdxControlCfgNodeRegistryDapp = 7 | |
181 | 181 | ||
182 | 182 | let IdxControlCfgNsbtStakingDapp = 8 | |
183 | 183 | ||
184 | 184 | let IdxControlCfgMediatorDapp = 9 | |
185 | 185 | ||
186 | 186 | func keyControlAddress () = "%s%s__config__controlAddress" | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func keyControlCfg () = "%s__controlConfig" | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
199 | 199 | ||
200 | 200 | let controlCfg = readControlCfgOrFail(controlContract) | |
201 | 201 | ||
202 | 202 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
203 | 203 | ||
204 | 204 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
205 | 205 | ||
206 | 206 | let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp) | |
207 | 207 | ||
208 | 208 | let usdnStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp) | |
209 | 209 | ||
210 | 210 | let neutrinoAssetIdStr = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
211 | 211 | ||
212 | 212 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdStr) | |
213 | 213 | ||
214 | 214 | let nsbtAssetId = fromBase58String(getStringValue(neutrinoContract, keyNsbtAssetId())) | |
215 | 215 | ||
216 | 216 | let surfAssetId = fromBase58String(getStringValue(auctionContract, keySurfAssetId())) | |
217 | 217 | ||
218 | 218 | func calcUsdnOutOfMarketSupply () = { | |
219 | 219 | let outOfMarketAddressList = valueOrElse(getString(controlContract, "%s%s__control__outOfMarketAddressList"), "") | |
220 | 220 | if ((outOfMarketAddressList == "")) | |
221 | 221 | then 0 | |
222 | 222 | else { | |
223 | 223 | func balancesSUM (outOfMarketSupply,nextAddress) = ((outOfMarketSupply + valueOrElse(getInteger(usdnStakingContract, rpdUserBalanceKey(nextAddress, neutrinoAssetIdStr)), 0)) + assetBalance(addressFromStringValue(nextAddress), neutrinoAssetId)) | |
224 | 224 | ||
225 | 225 | let sum = { | |
226 | 226 | let $l = split(outOfMarketAddressList, SEP) | |
227 | 227 | let $s = size($l) | |
228 | 228 | let $acc0 = 0 | |
229 | 229 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
230 | 230 | then $a | |
231 | 231 | else balancesSUM($a, $l[$i]) | |
232 | 232 | ||
233 | 233 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
234 | 234 | then $a | |
235 | 235 | else throw("List size exceeds 4") | |
236 | 236 | ||
237 | 237 | $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4) | |
238 | 238 | } | |
239 | 239 | throw((((("" + outOfMarketAddressList) + " ") + toString(sum)) + "neutrinoAssetIdStr")) | |
240 | 240 | } | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
245 | 245 | ||
246 | 246 | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
247 | 247 | ||
248 | 248 | let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0) | |
249 | 249 | ||
250 | 250 | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
251 | 251 | ||
252 | 252 | let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice) | |
253 | 253 | ||
254 | 254 | let neutrinoOutOfMarketSupply = calcUsdnOutOfMarketSupply() | |
255 | 255 | ||
256 | 256 | let neutrinoTotalSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
257 | 257 | ||
258 | 258 | let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply) | |
259 | 259 | ||
260 | 260 | let BR = if ((neutrinoSupply == 0)) | |
261 | 261 | then 0 | |
262 | 262 | else fraction(reservesInUsdn, MULT6, neutrinoSupply) | |
263 | 263 | ||
264 | 264 | @Callable(i) | |
265 | 265 | func constructor (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this)) | |
266 | 266 | then throw("not authorized") | |
267 | 267 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)] | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | ||
271 | 271 | @Callable(i) | |
272 | 272 | func calcSwapLimitREADONLY (gNsbtAmount) = { | |
273 | 273 | let limitWavesInUsdn = if ((0 >= gNsbtAmount)) | |
274 | 274 | then 0 | |
275 | 275 | else { | |
276 | 276 | let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam())) | |
277 | 277 | let bParamX16 = toBigInt(getIntOrFail(this, keySwapAmountBParam())) | |
278 | 278 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
279 | 279 | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
280 | 280 | } | |
281 | 281 | let limitWaves = convertNeutrinoToWaves(limitWavesInUsdn, currentPrice) | |
282 | 282 | let limitUsdn = if ((0 >= gNsbtAmount)) | |
283 | 283 | then 0 | |
284 | 284 | else { | |
285 | 285 | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
286 | 286 | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
287 | 287 | let brX6 = toBigInt(BR) | |
288 | 288 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
289 | 289 | toInt(fraction(fraction(aParamX8, powPartX8, MULTX10), brX6, MULTX6)) | |
290 | 290 | } | |
291 | 291 | $Tuple2(nil, [limitWavesInUsdn, limitWaves, limitUsdn]) | |
292 | 292 | } | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | ||
296 | 296 | @Callable(i) | |
297 | 297 | func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = { | |
298 | 298 | let EXP = toBigInt(2718281) | |
299 | 299 | let EXPSCALE = 6 | |
300 | 300 | let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3) | |
301 | 301 | let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10)) | |
302 | 302 | let wReservesInUsdn = convertWavesToNeutrino(wRaw, price) | |
303 | 303 | let multBR = fraction(wReservesInUsdn, MULT8, uRaw) | |
304 | 304 | if ((multBR > 10678564816)) | |
305 | 305 | then throw((("BR=" + toString(multBR)) + " > 10678.564816% will overflow exponent")) | |
306 | 306 | else { | |
307 | 307 | let multPower = (a * (multBR - MULT8)) | |
308 | 308 | let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN) | |
309 | 309 | let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6) | |
310 | 310 | $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)]) | |
311 | 311 | } | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | ||
316 | 316 | @Callable(i) | |
317 | 317 | func curveFunctionREADONLY (wavesPayRaw) = { | |
318 | 318 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
319 | 319 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
320 | 320 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
321 | 321 | let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
322 | 322 | let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
323 | 323 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
324 | 324 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
325 | 325 | let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
326 | 326 | let usdnPay = convertWavesToNeutrino(wavesPayRaw, price) | |
327 | 327 | let bigMaxNsbtSupply = toBigInt(mRaw) | |
328 | 328 | let bigNsbtSupply = toBigInt((mRaw - sRaw)) | |
329 | 329 | let step1 = fraction(toBigInt(usdnPay), MULTX16, multK) | |
330 | 330 | let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply) | |
331 | 331 | let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply))) | |
332 | 332 | let nsbtAmountRaw = ((mRaw - sRaw) - step3) | |
333 | 333 | $Tuple2(nil, [nsbtAmountRaw, usdnPay, wRaw, uRaw, mRaw, sRaw, asInt(kCalcArray[kResultIdxA]), asInt(kCalcArray[kResultIdxPaulB]), asInt(kCalcArray[kResultIdxWReservesInUsdn]), price, asInt(kCalcArray[kResultIdxMultBR]), asInt(kCalcArray[kResultIdxMultPower]), kCalcArray[kResultIdxMultExpInPowerStr], kCalcArray[kResultIdxMultKStr], toString(step1), toString(step2), step3]) | |
334 | 334 | } | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | ||
338 | 338 | @Callable(i) | |
339 | 339 | func surfFunctionREADONLY (amount,assetId) = if ((0 > amount)) | |
340 | 340 | then throw("amount should be positive") | |
341 | 341 | else { | |
342 | 342 | let price = currentPrice | |
343 | 343 | let priceBig = toBigInt(price) | |
344 | 344 | let reserveBig = toBigInt(reserve) | |
345 | 345 | let supply = neutrinoSupply | |
346 | 346 | let supplyBig = toBigInt(supply) | |
347 | 347 | if ((BR >= MULT6)) | |
348 | 348 | then throw((("BR = " + toString(BR)) + ", cannot buy SURF")) | |
349 | 349 | else { | |
350 | 350 | let maxWavesPay = (fraction(supply, MULT8, price) - reserve) | |
351 | 351 | let maxUsdnPay = (supply - fraction(reserve, price, MULT8)) | |
352 | 352 | let useAmount = if ((assetId == neutrinoAssetId)) | |
353 | 353 | then if ((amount > maxUsdnPay)) | |
354 | 354 | then maxUsdnPay | |
355 | 355 | else amount | |
356 | 356 | else if ((assetId == WAVESID)) | |
357 | 357 | then if ((amount > maxWavesPay)) | |
358 | 358 | then maxWavesPay | |
359 | 359 | else amount | |
360 | 360 | else 0 | |
361 | 361 | let amountBig = toBigInt(useAmount) | |
362 | 362 | if ((assetId == neutrinoAssetId)) | |
363 | 363 | then $Tuple2(nil, [toInt(fraction(fraction(amountBig, MULTX8, priceBig), (supplyBig - (amountBig / TWOX)), reserveBig)), 0, useAmount, reserve, supply, BR, reserve, (supply - useAmount), fraction(convertWavesToNeutrino(reserve, price), MULT6, (supply - useAmount)), (amount - useAmount), price]) | |
364 | 364 | else if ((assetId == WAVESID)) | |
365 | 365 | then $Tuple2(nil, [toInt(fraction(supplyBig, log(fraction((reserveBig + amountBig), MULTX16, reserveBig), 16, EULERX16, 16, 16, HALFUP), MULTX16)), useAmount, 0, reserve, supply, BR, (reserve + useAmount), supply, fraction(convertWavesToNeutrino((reserve + useAmount), price), MULT6, supply), (amount - useAmount), price]) | |
366 | 366 | else throw("Unsupported asset") | |
367 | 367 | } | |
368 | 368 | } | |
369 | 369 | ||
370 | 370 | ||
371 | 371 | ||
372 | 372 | @Callable(i) | |
373 | 373 | func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = { | |
374 | 374 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
375 | 375 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
376 | 376 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
377 | 377 | let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA) | |
378 | 378 | let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA) | |
379 | 379 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
380 | 380 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
381 | 381 | let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
382 | 382 | let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw))) | |
383 | 383 | let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16) | |
384 | 384 | let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16) | |
385 | 385 | let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16)) | |
386 | 386 | let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price) | |
387 | 387 | $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice]) | |
388 | 388 | } | |
389 | 389 | ||
390 | 390 | ||
391 | 391 | ||
392 | 392 | @Callable(i) | |
393 | 393 | func calcNeutinoMetricsREADONLY () = { | |
394 | 394 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
395 | 395 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
396 | 396 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
397 | 397 | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply]) | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | ||
402 | 402 | @Callable(i) | |
403 | 403 | func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8)) | |
404 | 404 | ||
405 | 405 | ||
406 | 406 | ||
407 | 407 | @Callable(i) | |
408 | 408 | func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = { | |
409 | 409 | let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8) | |
410 | 410 | let v = fraction((amount1 + amount2), MULT8, (amount1 + w)) | |
411 | 411 | $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8))) | |
412 | 412 | } | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | @Verifier(tx) | |
416 | 416 | func verify () = { | |
417 | 417 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
418 | 418 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
419 | 419 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
420 | 420 | then 1 | |
421 | 421 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
422 | 422 | then 1 | |
423 | 423 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
424 | 424 | then 1 | |
425 | 425 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
426 | 426 | then 2 | |
427 | 427 | else 0)) | |
428 | 428 | (count >= 3) | |
429 | 429 | } | |
430 | 430 |
github/deemru/w8io/026f985 40.74 ms ◑