tx · 7aYrCD9kXqDKtmZqZEE3x51z4b8ScfMzfZBL3kRQXi6s 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi: -0.02100000 Waves 2022.11.21 13:53 [2326780] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves
{ "type": 13, "id": "7aYrCD9kXqDKtmZqZEE3x51z4b8ScfMzfZBL3kRQXi6s", "fee": 2100000, "feeAssetId": null, "timestamp": 1669028000567, "version": 2, "chainId": 84, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "2EumJffSeuekuzc1gpZzBWT1aKvrbsY1NVqBSsKs7Ex8pGLbLUgcJmpwTuUQDJhWsCMiZt5pqjmegFCDoYtzYFTj", "4zbPdizXMyrqWtuoeEAHNDMys2UCfPBrDRkPAmAmLpMaWND2kRd2MwtzGXuQCQA9F433dtLa2LA8JxTZrMmHbPxm", "f8grNfKYxv7nRcfkgzkYW3VazziyZiHcyeAEydBqfA5BF278SuFCP7ck9eK1WDWtZPcGAyru3TyUgVF6yfr6nmf" ], "script": "base64:AAIFAAAAAAAAADkIAhIFCgMICAESAwoBARIHCgUBAQEBARIDCgEBEgQKAgECEgMKAQESABIFCgMBAQESBwoFAQEBAQEAAABeAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAB1NDQUxFMTYAAAAAAAAAABAAAAAAA1NFUAIAAAACX18AAAAABUhBTEY4AAAAAAAC+vCAAAAAAAhFVUxFUlgxNgkAATYAAAABAABgkqET2NV0AAAAAARUV09YCQABNgAAAAEAAAAAAAAAAAIAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9eEAAA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AAAAAAAJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAMDm0RS", "height": 2326780, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GLFdBgEuuobAc1SFq2fmyito8FHnjXzrufEvqcmM77tQ Next: 5VxCdrkmizEmZUs9VPXcDnfaeVj7jPf3ZcvSPgETpoGB Diff:
Old | New | Differences | |
---|---|---|---|
231 | 231 | ||
232 | 232 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
233 | 233 | then $a | |
234 | - | else throw("List size exceeds | |
234 | + | else throw("List size exceeds 5") | |
235 | 235 | ||
236 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4) | |
236 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
237 | 237 | } | |
238 | 238 | } | |
239 | 239 |
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 $l = split(outOfMarketAddressList, SEP) | |
226 | 226 | let $s = size($l) | |
227 | 227 | let $acc0 = 0 | |
228 | 228 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
229 | 229 | then $a | |
230 | 230 | else balancesSUM($a, $l[$i]) | |
231 | 231 | ||
232 | 232 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
233 | 233 | then $a | |
234 | - | else throw("List size exceeds | |
234 | + | else throw("List size exceeds 5") | |
235 | 235 | ||
236 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4) | |
236 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
237 | 237 | } | |
238 | 238 | } | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
242 | 242 | ||
243 | 243 | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
244 | 244 | ||
245 | 245 | let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0) | |
246 | 246 | ||
247 | 247 | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
248 | 248 | ||
249 | 249 | let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice) | |
250 | 250 | ||
251 | 251 | let neutrinoOutOfMarketSupply = calcUsdnOutOfMarketSupply() | |
252 | 252 | ||
253 | 253 | let neutrinoTotalSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
254 | 254 | ||
255 | 255 | let neutrinoSupply = (neutrinoTotalSupply - neutrinoOutOfMarketSupply) | |
256 | 256 | ||
257 | 257 | let BR = if ((neutrinoSupply == 0)) | |
258 | 258 | then 0 | |
259 | 259 | else fraction(reservesInUsdn, MULT6, neutrinoSupply) | |
260 | 260 | ||
261 | 261 | @Callable(i) | |
262 | 262 | func constructor (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this)) | |
263 | 263 | then throw("not authorized") | |
264 | 264 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)] | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | ||
268 | 268 | @Callable(i) | |
269 | 269 | func calcSwapLimitREADONLY (gNsbtAmount) = { | |
270 | 270 | let limitWavesInUsdn = if ((0 >= gNsbtAmount)) | |
271 | 271 | then 0 | |
272 | 272 | else { | |
273 | 273 | let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam())) | |
274 | 274 | let bParamX16 = toBigInt(getIntOrFail(this, keySwapAmountBParam())) | |
275 | 275 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
276 | 276 | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
277 | 277 | } | |
278 | 278 | let limitWaves = convertNeutrinoToWaves(limitWavesInUsdn, currentPrice) | |
279 | 279 | let limitUsdn = if ((0 >= gNsbtAmount)) | |
280 | 280 | then 0 | |
281 | 281 | else { | |
282 | 282 | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
283 | 283 | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
284 | 284 | let brX6 = toBigInt(BR) | |
285 | 285 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
286 | 286 | toInt(fraction(fraction(aParamX8, powPartX8, MULTX10), brX6, MULTX6)) | |
287 | 287 | } | |
288 | 288 | $Tuple2(nil, [limitWavesInUsdn, limitWaves, limitUsdn]) | |
289 | 289 | } | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | ||
293 | 293 | @Callable(i) | |
294 | 294 | func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = { | |
295 | 295 | let EXP = toBigInt(2718281) | |
296 | 296 | let EXPSCALE = 6 | |
297 | 297 | let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3) | |
298 | 298 | let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10)) | |
299 | 299 | let wReservesInUsdn = convertWavesToNeutrino(wRaw, price) | |
300 | 300 | let multBR = fraction(wReservesInUsdn, MULT8, uRaw) | |
301 | 301 | if ((multBR > 10678564816)) | |
302 | 302 | then throw((("BR=" + toString(multBR)) + " > 10678.564816% will overflow exponent")) | |
303 | 303 | else { | |
304 | 304 | let multPower = (a * (multBR - MULT8)) | |
305 | 305 | let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN) | |
306 | 306 | let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6) | |
307 | 307 | $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)]) | |
308 | 308 | } | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | ||
313 | 313 | @Callable(i) | |
314 | 314 | func curveFunctionREADONLY (wavesPayRaw) = { | |
315 | 315 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
316 | 316 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
317 | 317 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
318 | 318 | let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
319 | 319 | let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
320 | 320 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
321 | 321 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
322 | 322 | let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
323 | 323 | let usdnPay = convertWavesToNeutrino(wavesPayRaw, price) | |
324 | 324 | let bigMaxNsbtSupply = toBigInt(mRaw) | |
325 | 325 | let bigNsbtSupply = toBigInt((mRaw - sRaw)) | |
326 | 326 | let step1 = fraction(toBigInt(usdnPay), MULTX16, multK) | |
327 | 327 | let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply) | |
328 | 328 | let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply))) | |
329 | 329 | let nsbtAmountRaw = ((mRaw - sRaw) - step3) | |
330 | 330 | $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]) | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | ||
335 | 335 | @Callable(i) | |
336 | 336 | func surfFunctionREADONLY (amount,assetId) = if ((0 > amount)) | |
337 | 337 | then throw("amount should be positive") | |
338 | 338 | else { | |
339 | 339 | let price = currentPrice | |
340 | 340 | let priceBig = toBigInt(price) | |
341 | 341 | let reserveBig = toBigInt(reserve) | |
342 | 342 | let supply = neutrinoSupply | |
343 | 343 | let supplyBig = toBigInt(supply) | |
344 | 344 | if ((BR >= MULT6)) | |
345 | 345 | then throw((("BR = " + toString(BR)) + ", cannot buy SURF")) | |
346 | 346 | else { | |
347 | 347 | let maxWavesPay = (fraction(supply, MULT8, price) - reserve) | |
348 | 348 | let maxUsdnPay = (supply - fraction(reserve, price, MULT8)) | |
349 | 349 | let useAmount = if ((assetId == neutrinoAssetId)) | |
350 | 350 | then if ((amount > maxUsdnPay)) | |
351 | 351 | then maxUsdnPay | |
352 | 352 | else amount | |
353 | 353 | else if ((assetId == WAVESID)) | |
354 | 354 | then if ((amount > maxWavesPay)) | |
355 | 355 | then maxWavesPay | |
356 | 356 | else amount | |
357 | 357 | else 0 | |
358 | 358 | let amountBig = toBigInt(useAmount) | |
359 | 359 | if ((assetId == neutrinoAssetId)) | |
360 | 360 | 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]) | |
361 | 361 | else if ((assetId == WAVESID)) | |
362 | 362 | 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]) | |
363 | 363 | else throw("Unsupported asset") | |
364 | 364 | } | |
365 | 365 | } | |
366 | 366 | ||
367 | 367 | ||
368 | 368 | ||
369 | 369 | @Callable(i) | |
370 | 370 | func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = { | |
371 | 371 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
372 | 372 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
373 | 373 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
374 | 374 | let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA) | |
375 | 375 | let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA) | |
376 | 376 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
377 | 377 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
378 | 378 | let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
379 | 379 | let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw))) | |
380 | 380 | let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16) | |
381 | 381 | let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16) | |
382 | 382 | let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16)) | |
383 | 383 | let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price) | |
384 | 384 | $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice]) | |
385 | 385 | } | |
386 | 386 | ||
387 | 387 | ||
388 | 388 | ||
389 | 389 | @Callable(i) | |
390 | 390 | func calcNeutinoMetricsREADONLY () = { | |
391 | 391 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
392 | 392 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
393 | 393 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
394 | 394 | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, neutrinoOutOfMarketSupply, neutrinoTotalSupply, BR, nsbtSupply, nsbtSupplyMAX, surfSupply]) | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8)) | |
401 | 401 | ||
402 | 402 | ||
403 | 403 | ||
404 | 404 | @Callable(i) | |
405 | 405 | func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = { | |
406 | 406 | let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8) | |
407 | 407 | let v = fraction((amount1 + amount2), MULT8, (amount1 + w)) | |
408 | 408 | $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8))) | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | @Verifier(tx) | |
413 | 413 | func verify () = { | |
414 | 414 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
415 | 415 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
416 | 416 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
417 | 417 | then 1 | |
418 | 418 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
419 | 419 | then 1 | |
420 | 420 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
421 | 421 | then 1 | |
422 | 422 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
423 | 423 | then 2 | |
424 | 424 | else 0)) | |
425 | 425 | (count >= 3) | |
426 | 426 | } | |
427 | 427 |
github/deemru/w8io/026f985 52.46 ms ◑