tx · 6Es7UKSekY86uqz7sUG9c6FaVHgg1VFmsN76TgWaKTGT

3MvF41iRZuAvfuNtGBDCJ8F1Xa8p9hknjAn:  -0.01000000 Waves

2022.03.09 22:19 [1956822] smart account 3MvF41iRZuAvfuNtGBDCJ8F1Xa8p9hknjAn > SELF 0.00000000 Waves

{ "type": 13, "id": "6Es7UKSekY86uqz7sUG9c6FaVHgg1VFmsN76TgWaKTGT", "fee": 1000000, "feeAssetId": null, "timestamp": 1646853567459, "version": 1, "sender": "3MvF41iRZuAvfuNtGBDCJ8F1Xa8p9hknjAn", "senderPublicKey": "9e3NLZmkhcYzu8g696RHkkXB4sJsoBZPPhVbiVoL86rG", "proofs": [ "536HVt1uar82xjbYiELkq6bbngyQy7RKo36KWuwNRiEN5ggg7pTxjT89w6W7zPkKwAtPsrXGVTJzhswaG2j5xob6" ], "script": "base64:AAIFAAAAAAAAACgIAhIFCgMICAgSABIDCgEIEgMKAQgSAwoBARIGCgQBAQEBEgQKAgEBAAAAPAAAAAAIUFJJQ0VMRVQAAAAAAAAPQkAAAAAACU1VTFRTQ0FMRQAAAAAAAAAACAAAAAALRVVMRVJOVU1CRVIAAAAAABAzxNYAAAAABnNjYWxlNgAAAAAAAA9CQAAAAAAMc2NhbGU2QmlnSW50CQABNgAAAAEAAAAAAAAPQkAAAAAABnNjYWxlOAAAAAAABfXhAAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QAAAAAAB3NjYWxlMTIAAAAA6NSlEAAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwEAAAASa2V5TmV1dHJpbm9BZGRyZXNzAAAAAAIAAAAdJXMlc19fY29uZmlnX19uZXV0cmlub0FkZHJlc3MBAAAAEmtleU5ldXRyaW5vQXNzZXRJZAAAAAACAAAAEW5ldXRyaW5vX2Fzc2V0X2lkAQAAAB1rZXlMaXF1aWRhdGlvbkNvbnRyYWN0QWRkcmVzcwAAAAACAAAAF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mcndw==", "chainId": 84, "height": 1956822, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let PRICELET = 1000000
5+
6+let MULTSCALE = 8
7+
8+let EULERNUMBER = 271828182
9+
10+let scale6 = 1000000
11+
12+let scale6BigInt = toBigInt(1000000)
13+
14+let scale8 = 100000000
15+
16+let scale8BigInt = toBigInt(100000000)
17+
18+let scale12 = 1000000000000
19+
20+let scale18 = toBigInt(1000000000000000000)
21+
22+let SEP = "__"
23+
24+func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
25+
26+
27+func keyNeutrinoAssetId () = "neutrino_asset_id"
28+
29+
30+func keyLiquidationContractAddress () = "liquidation_contract"
31+
32+
33+func keyRPDContract () = "rpd_contract"
34+
35+
36+func keyAuctionContract () = "auction_contract"
37+
38+
39+func keyContolContract () = "control_contract"
40+
41+
42+func keyBondAssetId () = "bond_asset_id"
43+
44+
45+func keyBalanceLocked () = "balance_lock_"
46+
47+
48+func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
49+
50+
51+func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
52+
53+
54+func keyMinWavesSwapAmount () = "min_waves_swap_amount"
55+
56+
57+func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount"
58+
59+
60+func keyWavesOutFeePart () = "wavesOut_swap_feePart"
61+
62+
63+func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart"
64+
65+
66+func keyNsbtLockContract () = "%s__nsbtLockContract"
67+
68+
69+func keyMathContract () = "%s__mathContract"
70+
71+
72+func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration"
73+
74+
75+func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP)
76+
77+
78+func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP)
79+
80+
81+func keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
82+
83+
84+func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
85+
86+
87+func keySwapsTimeframe () = "swaps_timeframe"
88+
89+
90+func keyPrice () = "price"
91+
92+
93+func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
94+
95+
96+func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
97+
98+
99+func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP)
100+
101+
102+func keyMinLockAmount () = "%s__minLockAmount"
103+
104+
105+func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
106+
107+
108+func keyMinNsbtSell () = "min_nsbt_sell"
109+
110+
111+func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
112+
113+
114+func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
115+
116+
117+func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
118+
119+
120+func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6)
121+
122+
123+func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8)
124+
125+
126+func asAnyList (val) = match val {
127+ case valAnyList: List[Any] =>
128+ valAnyList
129+ case _ =>
130+ throw("fail to cast into List[Any]")
131+}
132+
133+
134+func asInt (val) = match val {
135+ case valInt: Int =>
136+ valInt
137+ case _ =>
138+ throw("fail to cast into Int")
139+}
140+
141+
142+func asString (val) = match val {
143+ case valStr: String =>
144+ valStr
145+ case _ =>
146+ throw("fail to cast into String")
147+}
148+
149+
150+func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
151+
152+
153+func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
154+
155+
156+let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
157+
158+let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
159+
160+let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
161+
162+let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress())
163+
164+let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract())
165+
166+let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract()))
167+
168+let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract()))
169+
170+let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
171+
172+let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
173+
174+let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId())
175+
176+let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
177+
178+@Callable(i)
179+func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this))
180+ then throw("not authorized")
181+ else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)]
182+
183+
184+
185+@Callable(i)
186+func neutrinoStatsREADONLY () = {
187+ let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
188+ if ((neutrinoMetrics == neutrinoMetrics))
189+ then {
190+ let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH", nil, nil))
191+ if ((prices == prices))
192+ then {
193+ let currentPrice = asInt(neutrinoMetrics[0])
194+ let neutrinoLockedBalance = asInt(neutrinoMetrics[1])
195+ let wavesLockedBalance = asInt(neutrinoMetrics[2])
196+ let reservesInWaves = asInt(neutrinoMetrics[3])
197+ let reservesInUsdn = asInt(neutrinoMetrics[4])
198+ let neutrinoSupply = asInt(neutrinoMetrics[5])
199+ let surplus = asInt(neutrinoMetrics[6])
200+ let surplusPercent = asInt(neutrinoMetrics[7])
201+ let BR = asInt(neutrinoMetrics[8])
202+ let nsbtSupply = asInt(neutrinoMetrics[9])
203+ let maxNsbtSupply = asInt(neutrinoMetrics[10])
204+ let nsbt2usdnPrice = asInt(prices[0])
205+ let nsbt2wavesPrice = asInt(prices[1])
206+ let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy())
207+ let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell())
208+ let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount())
209+ $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), toString(minNsbtsell), toString(minNsbtLockAmt)], SEP))
210+ }
211+ else throw("Strict value is not equal to itself.")
212+ }
213+ else throw("Strict value is not equal to itself.")
214+ }
215+
216+
217+
218+@Callable(i)
219+func swapInfoREADONLY (userAddressStr) = {
220+ let currentPrice = getIntegerValue(controlContract, keyPrice())
221+ let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount())
222+ let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount())
223+ let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart())
224+ let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
225+ let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
226+ let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
227+ let $t081579236 = if ((userAddressStr == ""))
228+ then $Tuple4(0, 0, 0, 0)
229+ else {
230+ let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
231+ let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil))
232+ if ((usdnLmtMax == usdnLmtMax))
233+ then {
234+ let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440)
235+ let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0)
236+ let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks)
237+ let quickSwapUserSpent = if (isNewQuickSwapPeriod)
238+ then 0
239+ else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0)
240+ let blcks2LmtReset = if (isNewQuickSwapPeriod)
241+ then 0
242+ else (quickSwapResetBlocks - (height - lastQuickSwapBlock))
243+ let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice)
244+ $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax)
245+ }
246+ else throw("Strict value is not equal to itself.")
247+ }
248+ let quickSwapUserSpent = $t081579236._1
249+ let blocks2LimitReset = $t081579236._2
250+ let maxUsdnLimit = $t081579236._3
251+ let maxWavesLimit = $t081579236._4
252+ $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))
253+ }
254+
255+
256+
257+@Callable(i)
258+func gnsbtInfoREADONLY (userAddressStr) = {
259+ let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
260+ let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0)
261+ let gnsbtShare = fraction((gnsbtAmount * 100), scale12, gnsbtTotal)
262+ let claimedTotalInUsdn = 10000
263+ let claimedUsdn = 10000
264+ let claimedWaves = 10000
265+ let unclaimedTotalInUsdn = 10000
266+ let unclaimedUsdn = 10000
267+ let unclaimedWaves = 10000
268+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP))
269+ }
270+
271+
272+
273+@Callable(i)
274+func buyNsbtREADONLY (wavesPay) = {
275+ let minWavesAmountNsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
276+ if ((minWavesAmountNsbtBuy > wavesPay))
277+ then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
278+ else {
279+ let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
280+ if ((neutrinoMetrics == neutrinoMetrics))
281+ then {
282+ let currentPrice = asInt(neutrinoMetrics[0])
283+ let reserve = asInt(neutrinoMetrics[3])
284+ let neutrinoSupply = asInt(neutrinoMetrics[5])
285+ let nsbtSupply = asInt(neutrinoMetrics[9])
286+ let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
287+ let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay], nil))
288+ if ((curveResult == curveResult))
289+ then {
290+ let nsbtAmount = asInt(curveResult[0])
291+ if ((0 >= nsbtAmount))
292+ then throw("nsbtAmount <= 0")
293+ else if ((wavesPay > (nsbtAmount * 9223372)))
294+ then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount)))
295+ else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP))
296+ }
297+ else throw("Strict value is not equal to itself.")
298+ }
299+ else throw("Strict value is not equal to itself.")
300+ }
301+ }
302+
303+
304+
305+@Callable(i)
306+func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
307+ let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
308+ if ((h == h))
309+ then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
310+ else throw("Strict value is not equal to itself.")
311+ }
312+
313+
314+
315+@Callable(i)
316+func unstakeComissionAmountREADONLY (amount,startHeight) = {
317+ let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
318+ if ((a == a))
319+ then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
320+ else throw("Strict value is not equal to itself.")
321+ }
322+
323+

github/deemru/w8io/026f985 
38.30 ms