tx · 9XFbBUXPLZcJpYhU53UhmPggLGwL8hE2bbSzb8GpV2nk 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi: -0.04000000 Waves 2022.08.23 14:58 [2197101] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves
{ "type": 13, "id": "9XFbBUXPLZcJpYhU53UhmPggLGwL8hE2bbSzb8GpV2nk", "fee": 4000000, "feeAssetId": null, "timestamp": 1661256047355, "version": 1, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "5T2HWPRYwoxcTXPJA8BqkuCZg1qjtxBREDZJbkC74U4U5H8B73avHShz1PFPnnTseRREruQ5bKjF5vgNEPVcC8p4", "pHrME2iqAFsDQD87WXAfoqSQjCxkRiaM8WHCsjoxjWU5k4oAdD4WGJGPvdse98jE2MFQcGwUcCRrFRLV2TCKz9y", "3Tg3xCL429YdmbdSzWqXgkDiMVHaubBSRLJ5ZA7wH3JmBBHbNEzsd7uxMA9sLeFA3cXJBBMSvVAvUCJg6WzEZWQA" ], "script": "base64:AAIFAAAAAAAAADkIAhIFCgMICAESAwoBARIHCgUBAQEBARIDCgEBEgQKAgECEgMKAQESABIFCgMBAQESBwoFAQEBAQEAAABXAAAAAAtyZXZpc2lvbk51bQIAAAAAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAB1NDQUxFMTYAAAAAAAAAABAAAAAAA1NFUAIAAAACX18AAAAABUhBTEY4AAAAAAAC+vCAAAAAAAhFVUxFUlgxNgkAATYAAAABAABgkqET2NV0AAAAAARUV09YCQABNgAAAAEAAAAAAAAAAAIAAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAZNVUxUWDYJAAE2AAAAAQAAAAAAAA9CQAAAAAAFTVVMVDgAAAAAAAX14QAAAAAABk1VTFRYOAkAATYAAAABAAAAAAAF9eEAAAAAAAdN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Alib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAEAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAwkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAMAAAAAAAAAAAIAAAAAAAAAAAAJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAPcPwq3", "chainId": 84, "height": 2197101, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DrecysSgZVcyzTwuipRov3KjjtBhzUMG37Qdbj38XRvk Next: HryhGkGQ4wsumQgUB5mtqa3SKHorT4xmBEML2My3VyzK Diff:
Old | New | Differences | |
---|---|---|---|
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keySwapAmountBParam () = "%s%s__config__swapBParam" | |
77 | + | ||
78 | + | ||
79 | + | func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam" | |
80 | + | ||
81 | + | ||
82 | + | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
77 | 83 | ||
78 | 84 | ||
79 | 85 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
200 | 206 | ||
201 | 207 | let surfAssetId = fromBase58String(getStringValue(auctionContract, keySurfAssetId())) | |
202 | 208 | ||
209 | + | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
210 | + | ||
211 | + | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
212 | + | ||
213 | + | let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0) | |
214 | + | ||
215 | + | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
216 | + | ||
217 | + | let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice) | |
218 | + | ||
219 | + | let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
220 | + | ||
221 | + | let BR = if ((neutrinoSupply == 0)) | |
222 | + | then 0 | |
223 | + | else fraction(reservesInUsdn, MULT6, neutrinoSupply) | |
224 | + | ||
203 | 225 | @Callable(i) | |
204 | 226 | func constructor (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this)) | |
205 | 227 | then throw("not authorized") | |
209 | 231 | ||
210 | 232 | @Callable(i) | |
211 | 233 | func calcSwapLimitREADONLY (gNsbtAmount) = { | |
212 | - | let | |
234 | + | let limitWavesInUsdn = if ((0 >= gNsbtAmount)) | |
213 | 235 | then 0 | |
214 | 236 | else { | |
215 | 237 | let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam())) | |
217 | 239 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
218 | 240 | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
219 | 241 | } | |
220 | - | $Tuple2(nil, limit) | |
242 | + | let limitWaves = convertNeutrinoToWaves(limitWavesInUsdn, currentPrice) | |
243 | + | let limitUsdn = if ((0 >= gNsbtAmount)) | |
244 | + | then 0 | |
245 | + | else { | |
246 | + | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
247 | + | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
248 | + | let brX6 = toBigInt(BR) | |
249 | + | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
250 | + | toInt(fraction(fraction(aParamX8, powPartX8, MULTX10), brX6, MULTX6)) | |
251 | + | } | |
252 | + | $Tuple2(nil, [limitWavesInUsdn, limitWaves, limitUsdn]) | |
221 | 253 | } | |
222 | 254 | ||
223 | 255 | ||
268 | 300 | func surfFunctionREADONLY (amount,assetId) = if ((0 > amount)) | |
269 | 301 | then throw("amount should be positive") | |
270 | 302 | else { | |
271 | - | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
272 | - | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
303 | + | let price = currentPrice | |
273 | 304 | let priceBig = toBigInt(price) | |
274 | - | let reserve = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
275 | 305 | let reserveBig = toBigInt(reserve) | |
276 | - | let supply = | |
306 | + | let supply = neutrinoSupply | |
277 | 307 | let supplyBig = toBigInt(supply) | |
278 | - | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
279 | 308 | if ((BR >= MULT6)) | |
280 | 309 | then throw((("BR = " + toString(BR)) + ", cannot buy SURF")) | |
281 | 310 | else { | |
323 | 352 | ||
324 | 353 | @Callable(i) | |
325 | 354 | func calcNeutinoMetricsREADONLY () = { | |
326 | - | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
327 | - | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
328 | - | let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0) | |
329 | - | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
330 | - | let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice) | |
331 | - | let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
332 | 355 | let surplus = (reservesInUsdn - neutrinoSupply) | |
333 | 356 | let deficit = (neutrinoSupply - reservesInUsdn) | |
334 | 357 | let surplusPercent = if ((neutrinoSupply == 0)) | |
335 | 358 | then 0 | |
336 | 359 | else (fraction(surplus, MULT6, neutrinoSupply) * 100) | |
337 | - | let BR = if ((neutrinoSupply == 0)) | |
338 | - | then 0 | |
339 | - | else fraction(reservesInUsdn, MULT6, neutrinoSupply) | |
340 | 360 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
341 | 361 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
342 | 362 | let surfSupply = value(assetInfo(surfAssetId)).quantity |
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 | + | ||
78 | + | ||
79 | + | func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam" | |
80 | + | ||
81 | + | ||
82 | + | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
77 | 83 | ||
78 | 84 | ||
79 | 85 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
80 | 86 | ||
81 | 87 | ||
82 | 88 | func keyNsbtAssetId () = "bond_asset_id" | |
83 | 89 | ||
84 | 90 | ||
85 | 91 | func keySurfAssetId () = "surf_asset_id" | |
86 | 92 | ||
87 | 93 | ||
88 | 94 | func keyBalanceLocked () = "balance_lock_" | |
89 | 95 | ||
90 | 96 | ||
91 | 97 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
92 | 98 | ||
93 | 99 | ||
94 | 100 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
95 | 101 | ||
96 | 102 | ||
97 | 103 | func swapsTimeframeKEY () = "swaps_timeframe" | |
98 | 104 | ||
99 | 105 | ||
100 | 106 | func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP) | |
101 | 107 | ||
102 | 108 | ||
103 | 109 | func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP) | |
104 | 110 | ||
105 | 111 | ||
106 | 112 | func keyPrice () = "price" | |
107 | 113 | ||
108 | 114 | ||
109 | 115 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
110 | 116 | ||
111 | 117 | ||
112 | 118 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
113 | 119 | ||
114 | 120 | ||
115 | 121 | func getNumberByKey (address,key) = valueOrElse(getInteger(address, key), 0) | |
116 | 122 | ||
117 | 123 | ||
118 | 124 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
119 | 125 | ||
120 | 126 | ||
121 | 127 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
122 | 128 | ||
123 | 129 | ||
124 | 130 | func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8) | |
125 | 131 | ||
126 | 132 | ||
127 | 133 | func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult)) | |
128 | 134 | ||
129 | 135 | ||
130 | 136 | func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16)) | |
131 | 137 | ||
132 | 138 | ||
133 | 139 | func asAnyList (val) = match val { | |
134 | 140 | case valAnyLyst: List[Any] => | |
135 | 141 | valAnyLyst | |
136 | 142 | case _ => | |
137 | 143 | throw("fail to cast into List[Any]") | |
138 | 144 | } | |
139 | 145 | ||
140 | 146 | ||
141 | 147 | func asInt (val) = match val { | |
142 | 148 | case valInt: Int => | |
143 | 149 | valInt | |
144 | 150 | case _ => | |
145 | 151 | throw("fail to cast into Int") | |
146 | 152 | } | |
147 | 153 | ||
148 | 154 | ||
149 | 155 | func asString (val) = match val { | |
150 | 156 | case valStr: String => | |
151 | 157 | valStr | |
152 | 158 | case _ => | |
153 | 159 | throw("fail to cast into String") | |
154 | 160 | } | |
155 | 161 | ||
156 | 162 | ||
157 | 163 | let IdxControlCfgNeutrinoDapp = 1 | |
158 | 164 | ||
159 | 165 | let IdxControlCfgAuctionDapp = 2 | |
160 | 166 | ||
161 | 167 | let IdxControlCfgRpdDapp = 3 | |
162 | 168 | ||
163 | 169 | let IdxControlCfgMathDapp = 4 | |
164 | 170 | ||
165 | 171 | let IdxControlCfgLiquidationDapp = 5 | |
166 | 172 | ||
167 | 173 | let IdxControlCfgRestDapp = 6 | |
168 | 174 | ||
169 | 175 | let IdxControlCfgNodeRegistryDapp = 7 | |
170 | 176 | ||
171 | 177 | let IdxControlCfgNsbtStakingDapp = 8 | |
172 | 178 | ||
173 | 179 | let IdxControlCfgMediatorDapp = 9 | |
174 | 180 | ||
175 | 181 | func keyControlAddress () = "%s%s__config__controlAddress" | |
176 | 182 | ||
177 | 183 | ||
178 | 184 | func keyControlCfg () = "%s__controlConfig" | |
179 | 185 | ||
180 | 186 | ||
181 | 187 | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
182 | 188 | ||
183 | 189 | ||
184 | 190 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
185 | 191 | ||
186 | 192 | ||
187 | 193 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
188 | 194 | ||
189 | 195 | let controlCfg = readControlCfgOrFail(controlContract) | |
190 | 196 | ||
191 | 197 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
192 | 198 | ||
193 | 199 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
194 | 200 | ||
195 | 201 | let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp) | |
196 | 202 | ||
197 | 203 | let neutrinoAssetId = fromBase58String(getStringOrFail(neutrinoContract, keyNeutrinoAssetId())) | |
198 | 204 | ||
199 | 205 | let nsbtAssetId = fromBase58String(getStringValue(neutrinoContract, keyNsbtAssetId())) | |
200 | 206 | ||
201 | 207 | let surfAssetId = fromBase58String(getStringValue(auctionContract, keySurfAssetId())) | |
202 | 208 | ||
209 | + | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
210 | + | ||
211 | + | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
212 | + | ||
213 | + | let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0) | |
214 | + | ||
215 | + | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
216 | + | ||
217 | + | let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice) | |
218 | + | ||
219 | + | let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
220 | + | ||
221 | + | let BR = if ((neutrinoSupply == 0)) | |
222 | + | then 0 | |
223 | + | else fraction(reservesInUsdn, MULT6, neutrinoSupply) | |
224 | + | ||
203 | 225 | @Callable(i) | |
204 | 226 | func constructor (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this)) | |
205 | 227 | then throw("not authorized") | |
206 | 228 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)] | |
207 | 229 | ||
208 | 230 | ||
209 | 231 | ||
210 | 232 | @Callable(i) | |
211 | 233 | func calcSwapLimitREADONLY (gNsbtAmount) = { | |
212 | - | let | |
234 | + | let limitWavesInUsdn = if ((0 >= gNsbtAmount)) | |
213 | 235 | then 0 | |
214 | 236 | else { | |
215 | 237 | let aParamX8 = toBigInt(getIntOrFail(this, keySwapAmountAParam())) | |
216 | 238 | let bParamX16 = toBigInt(getIntOrFail(this, keySwapAmountBParam())) | |
217 | 239 | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
218 | 240 | toInt(fraction(aParamX8, powPartX8, MULTX10)) | |
219 | 241 | } | |
220 | - | $Tuple2(nil, limit) | |
242 | + | let limitWaves = convertNeutrinoToWaves(limitWavesInUsdn, currentPrice) | |
243 | + | let limitUsdn = if ((0 >= gNsbtAmount)) | |
244 | + | then 0 | |
245 | + | else { | |
246 | + | let aParamX8 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountAParam())) | |
247 | + | let bParamX16 = toBigInt(getIntOrFail(this, keyUsdnSwapAmountBParam())) | |
248 | + | let brX6 = toBigInt(BR) | |
249 | + | let powPartX8 = pow(toBigInt(gNsbtAmount), 6, bParamX16, 16, 8, CEILING) | |
250 | + | toInt(fraction(fraction(aParamX8, powPartX8, MULTX10), brX6, MULTX6)) | |
251 | + | } | |
252 | + | $Tuple2(nil, [limitWavesInUsdn, limitWaves, limitUsdn]) | |
221 | 253 | } | |
222 | 254 | ||
223 | 255 | ||
224 | 256 | ||
225 | 257 | @Callable(i) | |
226 | 258 | func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = { | |
227 | 259 | let EXP = toBigInt(2718281) | |
228 | 260 | let EXPSCALE = 6 | |
229 | 261 | let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3) | |
230 | 262 | let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * MULT6) / 10)) | |
231 | 263 | let wReservesInUsdn = convertWavesToNeutrino(wRaw, price) | |
232 | 264 | let multBR = fraction(wReservesInUsdn, MULT8, uRaw) | |
233 | 265 | if ((multBR > 10678564816)) | |
234 | 266 | then throw((("BR=" + toString(multBR)) + " > 10678.564816% will overflow exponent")) | |
235 | 267 | else { | |
236 | 268 | let multPower = (a * (multBR - MULT8)) | |
237 | 269 | let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN) | |
238 | 270 | let multK = fraction(toBigInt(paulB), multExpInPower, MULTX6) | |
239 | 271 | $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)]) | |
240 | 272 | } | |
241 | 273 | } | |
242 | 274 | ||
243 | 275 | ||
244 | 276 | ||
245 | 277 | @Callable(i) | |
246 | 278 | func curveFunctionREADONLY (wavesPayRaw) = { | |
247 | 279 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
248 | 280 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
249 | 281 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
250 | 282 | let uRaw = asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) | |
251 | 283 | let sRaw = asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) | |
252 | 284 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
253 | 285 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
254 | 286 | let multK = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
255 | 287 | let usdnPay = convertWavesToNeutrino(wavesPayRaw, price) | |
256 | 288 | let bigMaxNsbtSupply = toBigInt(mRaw) | |
257 | 289 | let bigNsbtSupply = toBigInt((mRaw - sRaw)) | |
258 | 290 | let step1 = fraction(toBigInt(usdnPay), MULTX16, multK) | |
259 | 291 | let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply) | |
260 | 292 | let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply))) | |
261 | 293 | let nsbtAmountRaw = ((mRaw - sRaw) - step3) | |
262 | 294 | $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]) | |
263 | 295 | } | |
264 | 296 | ||
265 | 297 | ||
266 | 298 | ||
267 | 299 | @Callable(i) | |
268 | 300 | func surfFunctionREADONLY (amount,assetId) = if ((0 > amount)) | |
269 | 301 | then throw("amount should be positive") | |
270 | 302 | else { | |
271 | - | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
272 | - | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
303 | + | let price = currentPrice | |
273 | 304 | let priceBig = toBigInt(price) | |
274 | - | let reserve = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
275 | 305 | let reserveBig = toBigInt(reserve) | |
276 | - | let supply = | |
306 | + | let supply = neutrinoSupply | |
277 | 307 | let supplyBig = toBigInt(supply) | |
278 | - | let BR = asInt(neutrinoMetrics[nMetricIdxBR]) | |
279 | 308 | if ((BR >= MULT6)) | |
280 | 309 | then throw((("BR = " + toString(BR)) + ", cannot buy SURF")) | |
281 | 310 | else { | |
282 | 311 | let maxWavesPay = (fraction(supply, MULT8, price) - reserve) | |
283 | 312 | let maxUsdnPay = (supply - fraction(reserve, price, MULT8)) | |
284 | 313 | let useAmount = if ((assetId == neutrinoAssetId)) | |
285 | 314 | then if ((amount > maxUsdnPay)) | |
286 | 315 | then maxUsdnPay | |
287 | 316 | else amount | |
288 | 317 | else if ((assetId == WAVESID)) | |
289 | 318 | then if ((amount > maxWavesPay)) | |
290 | 319 | then maxWavesPay | |
291 | 320 | else amount | |
292 | 321 | else 0 | |
293 | 322 | let amountBig = toBigInt(useAmount) | |
294 | 323 | if ((assetId == neutrinoAssetId)) | |
295 | 324 | 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]) | |
296 | 325 | else if ((assetId == WAVESID)) | |
297 | 326 | 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]) | |
298 | 327 | else throw("Unsupported asset") | |
299 | 328 | } | |
300 | 329 | } | |
301 | 330 | ||
302 | 331 | ||
303 | 332 | ||
304 | 333 | @Callable(i) | |
305 | 334 | func calcContractNsbtPriceSYSREADONLY (nsbtSupplyDELTA) = { | |
306 | 335 | let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil)) | |
307 | 336 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
308 | 337 | let wRaw = asInt(neutrinoMetrics[nMetricIdxReserve]) | |
309 | 338 | let uRaw = (asInt(neutrinoMetrics[nMetricIdxUsdnSupply]) - nsbtSupplyDELTA) | |
310 | 339 | let sRaw = (asInt(neutrinoMetrics[nMetricIdxNsbtSupply]) + nsbtSupplyDELTA) | |
311 | 340 | let mRaw = asInt(neutrinoMetrics[nMetricIdxMaxNsbtSupply]) | |
312 | 341 | let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil)) | |
313 | 342 | let multKX16 = parseBigIntValue(asString(kCalcArray[kResultIdxMultKStr])) | |
314 | 343 | let multStep1X16 = fraction(toBigInt(mRaw), MULTX16, toBigInt((mRaw - sRaw))) | |
315 | 344 | let multStep2X16 = fraction(multStep1X16, multStep1X16, MULTX16) | |
316 | 345 | let multNsbt2usdnPriceX16 = fraction(multKX16, multStep2X16, MULTX16) | |
317 | 346 | let nsbt2usdnPrice = toInt(fraction(multNsbt2usdnPriceX16, toBigInt(MULT6), MULTX16)) | |
318 | 347 | let nsbt2wavesPrice = fraction(nsbt2usdnPrice, MULT6, price) | |
319 | 348 | $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice]) | |
320 | 349 | } | |
321 | 350 | ||
322 | 351 | ||
323 | 352 | ||
324 | 353 | @Callable(i) | |
325 | 354 | func calcNeutinoMetricsREADONLY () = { | |
326 | - | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
327 | - | let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0) | |
328 | - | let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0) | |
329 | - | let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance) | |
330 | - | let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice) | |
331 | - | let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId)) | |
332 | 355 | let surplus = (reservesInUsdn - neutrinoSupply) | |
333 | 356 | let deficit = (neutrinoSupply - reservesInUsdn) | |
334 | 357 | let surplusPercent = if ((neutrinoSupply == 0)) | |
335 | 358 | then 0 | |
336 | 359 | else (fraction(surplus, MULT6, neutrinoSupply) * 100) | |
337 | - | let BR = if ((neutrinoSupply == 0)) | |
338 | - | then 0 | |
339 | - | else fraction(reservesInUsdn, MULT6, neutrinoSupply) | |
340 | 360 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
341 | 361 | let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId)) | |
342 | 362 | let surfSupply = value(assetInfo(surfAssetId)).quantity | |
343 | 363 | $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, surplus, surplusPercent, BR, nsbtSupply, nsbtSupplyMAX, surfSupply]) | |
344 | 364 | } | |
345 | 365 | ||
346 | 366 | ||
347 | 367 | ||
348 | 368 | @Callable(i) | |
349 | 369 | func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT8, halfLife), 8, 8, HALFUP), MULT8)) | |
350 | 370 | ||
351 | 371 | ||
352 | 372 | ||
353 | 373 | @Callable(i) | |
354 | 374 | func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = { | |
355 | 375 | let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT8, halfLife), 8, 8, HALFUP), MULT8) | |
356 | 376 | let v = fraction((amount1 + amount2), MULT8, (amount1 + w)) | |
357 | 377 | $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT8))) | |
358 | 378 | } | |
359 | 379 | ||
360 | 380 | ||
361 | 381 | @Verifier(tx) | |
362 | 382 | func verify () = { | |
363 | 383 | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
364 | 384 | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
365 | 385 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
366 | 386 | then 1 | |
367 | 387 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
368 | 388 | then 1 | |
369 | 389 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
370 | 390 | then 1 | |
371 | 391 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
372 | 392 | then 2 | |
373 | 393 | else 0)) | |
374 | 394 | (count >= 3) | |
375 | 395 | } | |
376 | 396 |
github/deemru/w8io/026f985 51.29 ms ◑