tx · 6nJwJ9yrHYtBgYUfeZDYnP3B99Y3FVi5AcZqjBoX4r6o

3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS:  -0.02000000 Waves

2022.02.24 20:33 [1938038] smart account 3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS > SELF 0.00000000 Waves

{ "type": 13, "id": "6nJwJ9yrHYtBgYUfeZDYnP3B99Y3FVi5AcZqjBoX4r6o", "fee": 2000000, "feeAssetId": null, "timestamp": 1645724079359, "version": 1, "sender": "3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS", "senderPublicKey": "rqCnkHfz5ix6HNKiVvYE3URUtLs6f2nWzt4hpdGGQdm", "proofs": [ "5Uw8MmhEsTwm83DDBQWkm4B8bLeGgXGe5kRKB3YjScfa4WUdLX5zXktKwmRaSLjf8eXaKGwNq2kj1yTrakrGW5Rp" ], "script": "base64:AAIFAAAAAAAAACoIAhIFCgMICAgSABIDCgEIEgMKAQgSAwoBARIAEgYKBAEBAQESBAoCAQEAAAA4AAAAAAhQUklDRUxFVAAAAAAAAA9CQAAAAAAJTVVMVFNDQUxFAAAAAAAAAAAIAAAAAAtFVUxFUk5VTUJFUgAAAAAAEDPE1gAAAAAGc2NhbGU2AAAAAAAAD0JAAAAAAAxzY2FsZTZCaWdJbnQJAAE2AAAAAQAAAAAAAA9CQAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAxzY2FsZThCaWdJbnQJAAE2AAAAAQAAAAAABfXhAAAAAAAHc2NhbGUxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAQAAABJrZXlOZXV0cmlub0FkZHJlc3MAAAAAAgAAAB0lcyVzX19jb25maWdfX25ldXRyaW5vQWRkcmVzcwEAAAASa2V5TmV1dHJpbm9Bc3NldElkAAAAAAIAAAARbmV1dHJpbm9fYXNzZXRfaWQBAAAAHWtleUxpcXVpZGF0aW9uQ29udHJhY3RBZGRyZXNzAAAAAAIAAAAUbGlxdWlkYXRpb25f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CQAEuQAAAAIJAARMAAAAAgIAAAACJWQJAARMAAAAAgkAAaQAAAABBQAAAAFhBQAAAANuaWwFAAAAA1NFUAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAAZ+Zkxw==", "chainId": 84, "height": 1938038, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: VrH8DNkPjqZZWJSfbmHuorB3whuUei6MCbYtrqm1TqP Next: DZBPMfSX4Wo5g67P5CiYefi13qT3vmRRXrxeMdwVfwVC Diff:
OldNewDifferences
192192 let maxNsbtSupply = asInt(neutrinoMetrics[10])
193193 let nsbt2usdnPrice = asInt(prices[0])
194194 let nsbt2wavesPrice = asInt(prices[1])
195- let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
195+ let minWaves4NsbtBuy = 100000000
196196 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy)], SEP))
197197 }
198198 else throw("Strict value is not equal to itself.")
211211 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
212212 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
213213 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
214- let $t076788772 = if ((userAddressStr == ""))
214+ let $t077238817 = if ((userAddressStr == ""))
215215 then $Tuple4(0, 0, 0, 0)
216216 else {
217217 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
236236 }
237237 else throw("Strict value is not equal to itself.")
238238 }
239- let quickSwapUserSpent = $t076788772._1
240- let blocks2LimitReset = $t076788772._2
241- let maxUsdnLimit = $t076788772._3
242- let maxWavesLimit = $t076788772._4
239+ let quickSwapUserSpent = $t077238817._1
240+ let blocks2LimitReset = $t077238817._2
241+ let maxUsdnLimit = $t077238817._3
242+ let maxWavesLimit = $t077238817._4
243243 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP))
244244 }
245245
261261
262262 @Callable(i)
263263 func buyNsbtREADONLY (wavesPay) = {
264- let minWavesAmountNsbtBuy = valueOrElse(getInteger(auctionContract, keyMinWavesForNsbtBuy()), 10)
265- if (((minWavesAmountNsbtBuy * scale8) > wavesPay))
264+ let minWavesAmountNsbtBuy = 100000000
265+ if ((minWavesAmountNsbtBuy > wavesPay))
266266 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
267267 else {
268268 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PRICELET = 1000000
55
66 let MULTSCALE = 8
77
88 let EULERNUMBER = 271828182
99
1010 let scale6 = 1000000
1111
1212 let scale6BigInt = toBigInt(1000000)
1313
1414 let scale8 = 100000000
1515
1616 let scale8BigInt = toBigInt(100000000)
1717
1818 let scale18 = toBigInt(1000000000000000000)
1919
2020 let SEP = "__"
2121
2222 func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
2323
2424
2525 func keyNeutrinoAssetId () = "neutrino_asset_id"
2626
2727
2828 func keyLiquidationContractAddress () = "liquidation_contract"
2929
3030
3131 func keyRPDContract () = "rpd_contract"
3232
3333
3434 func keyAuctionContract () = "auction_contract"
3535
3636
3737 func keyContolContract () = "control_contract"
3838
3939
4040 func keyBondAssetId () = "bond_asset_id"
4141
4242
4343 func keyBalanceLocked () = "balance_lock_"
4444
4545
4646 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
4747
4848
4949 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
5050
5151
5252 func keyMinWavesSwapAmount () = "min_waves_swap_amount"
5353
5454
5555 func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount"
5656
5757
5858 func keyWavesOutFeePart () = "wavesOut_swap_feePart"
5959
6060
6161 func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart"
6262
6363
6464 func keyNsbtLockContract () = "%s__nsbtLockContract"
6565
6666
6767 func keyMathContract () = "%s__mathContract"
6868
6969
7070 func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration"
7171
7272
7373 func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP)
7474
7575
7676 func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP)
7777
7878
7979 func keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
8080
8181
8282 func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
8383
8484
8585 func keyPrice () = "price"
8686
8787
8888 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
8989
9090
9191 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
9292
9393
9494 func keyMinLockAmount () = "%s__minLockAmount"
9595
9696
9797 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
9898
9999
100100 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
101101
102102
103103 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
104104
105105
106106 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
107107
108108
109109 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6)
110110
111111
112112 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8)
113113
114114
115115 func asAnyList (val) = match val {
116116 case valAnyList: List[Any] =>
117117 valAnyList
118118 case _ =>
119119 throw("fail to cast into List[Any]")
120120 }
121121
122122
123123 func asInt (val) = match val {
124124 case valInt: Int =>
125125 valInt
126126 case _ =>
127127 throw("fail to cast into Int")
128128 }
129129
130130
131131 func asString (val) = match val {
132132 case valStr: String =>
133133 valStr
134134 case _ =>
135135 throw("fail to cast into String")
136136 }
137137
138138
139139 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
140140
141141
142142 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
143143
144144
145145 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
146146
147147 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
148148
149149 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
150150
151151 let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress())
152152
153153 let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract())
154154
155155 let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract()))
156156
157157 let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract()))
158158
159159 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
160160
161161 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
162162
163163 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId())
164164
165165 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
166166
167167 @Callable(i)
168168 func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this))
169169 then throw("not authorized")
170170 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)]
171171
172172
173173
174174 @Callable(i)
175175 func neutrinoStatsREADONLY () = {
176176 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
177177 if ((neutrinoMetrics == neutrinoMetrics))
178178 then {
179179 let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH", nil, nil))
180180 if ((prices == prices))
181181 then {
182182 let currentPrice = asInt(neutrinoMetrics[0])
183183 let neutrinoLockedBalance = asInt(neutrinoMetrics[1])
184184 let wavesLockedBalance = asInt(neutrinoMetrics[2])
185185 let reservesInWaves = asInt(neutrinoMetrics[3])
186186 let reservesInUsdn = asInt(neutrinoMetrics[4])
187187 let neutrinoSupply = asInt(neutrinoMetrics[5])
188188 let surplus = asInt(neutrinoMetrics[6])
189189 let surplusPercent = asInt(neutrinoMetrics[7])
190190 let BR = asInt(neutrinoMetrics[8])
191191 let nsbtSupply = asInt(neutrinoMetrics[9])
192192 let maxNsbtSupply = asInt(neutrinoMetrics[10])
193193 let nsbt2usdnPrice = asInt(prices[0])
194194 let nsbt2wavesPrice = asInt(prices[1])
195- let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
195+ let minWaves4NsbtBuy = 100000000
196196 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy)], SEP))
197197 }
198198 else throw("Strict value is not equal to itself.")
199199 }
200200 else throw("Strict value is not equal to itself.")
201201 }
202202
203203
204204
205205 @Callable(i)
206206 func swapInfoREADONLY (userAddressStr) = {
207207 let currentPrice = getIntegerValue(controlContract, keyPrice())
208208 let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount())
209209 let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount())
210210 let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart())
211211 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
212212 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
213213 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
214- let $t076788772 = if ((userAddressStr == ""))
214+ let $t077238817 = if ((userAddressStr == ""))
215215 then $Tuple4(0, 0, 0, 0)
216216 else {
217217 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
218218 if ((userGNsbtAmount == userGNsbtAmount))
219219 then {
220220 let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil))
221221 if ((usdnLmtMax == usdnLmtMax))
222222 then {
223223 let quickSwapResetBlocks = getIntegerValue(neutrinoContract, keyQuickSwapLimitDuration())
224224 let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0)
225225 let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks)
226226 let quickSwapUserSpent = if (isNewQuickSwapPeriod)
227227 then 0
228228 else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0)
229229 let blcks2LmtReset = if (isNewQuickSwapPeriod)
230230 then 0
231231 else (quickSwapResetBlocks - (height - lastQuickSwapBlock))
232232 let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice)
233233 $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax)
234234 }
235235 else throw("Strict value is not equal to itself.")
236236 }
237237 else throw("Strict value is not equal to itself.")
238238 }
239- let quickSwapUserSpent = $t076788772._1
240- let blocks2LimitReset = $t076788772._2
241- let maxUsdnLimit = $t076788772._3
242- let maxWavesLimit = $t076788772._4
239+ let quickSwapUserSpent = $t077238817._1
240+ let blocks2LimitReset = $t077238817._2
241+ let maxUsdnLimit = $t077238817._3
242+ let maxWavesLimit = $t077238817._4
243243 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP))
244244 }
245245
246246
247247
248248 @Callable(i)
249249 func gnsbtInfoREADONLY (userAddressStr) = {
250250 let gnsbtShare = 10000
251251 let claimedTotalInUsdn = 10000
252252 let claimedUsdn = 10000
253253 let claimedWaves = 10000
254254 let unclaimedTotalInUsdn = 10000
255255 let unclaimedUsdn = 10000
256256 let unclaimedWaves = 10000
257257 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP))
258258 }
259259
260260
261261
262262 @Callable(i)
263263 func buyNsbtREADONLY (wavesPay) = {
264- let minWavesAmountNsbtBuy = valueOrElse(getInteger(auctionContract, keyMinWavesForNsbtBuy()), 10)
265- if (((minWavesAmountNsbtBuy * scale8) > wavesPay))
264+ let minWavesAmountNsbtBuy = 100000000
265+ if ((minWavesAmountNsbtBuy > wavesPay))
266266 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
267267 else {
268268 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
269269 if ((neutrinoMetrics == neutrinoMetrics))
270270 then {
271271 let currentPrice = asInt(neutrinoMetrics[0])
272272 let reserve = asInt(neutrinoMetrics[3])
273273 let neutrinoSupply = asInt(neutrinoMetrics[5])
274274 let nsbtSupply = asInt(neutrinoMetrics[9])
275275 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
276276 let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay], nil))
277277 if ((curveResult == curveResult))
278278 then {
279279 let nsbtAmount = asInt(curveResult[0])
280280 if ((0 >= nsbtAmount))
281281 then throw("nsbtAmount <= 0")
282282 else if ((wavesPay > (nsbtAmount * 9223372)))
283283 then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount)))
284284 else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP))
285285 }
286286 else throw("Strict value is not equal to itself.")
287287 }
288288 else throw("Strict value is not equal to itself.")
289289 }
290290 }
291291
292292
293293
294294 @Callable(i)
295295 func minStakedAmountREADONLY () = $Tuple2(nil, makeString(["%d", toString(getIntOrFail(nsbtStakingContract, keyMinLockAmount()))], SEP))
296296
297297
298298
299299 @Callable(i)
300300 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
301301 let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
302302 if ((h == h))
303303 then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
304304 else throw("Strict value is not equal to itself.")
305305 }
306306
307307
308308
309309 @Callable(i)
310310 func unstakeComissionAmountREADONLY (amount,startHeight) = {
311311 let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
312312 if ((a == a))
313313 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
314314 else throw("Strict value is not equal to itself.")
315315 }
316316
317317

github/deemru/w8io/026f985 
59.42 ms