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