tx · 38p7PXikfdfsTMYhNYjzUu3DP7EaMH9CsHBqHcm5UB2f

3MyaVYsqzGDdaQbE7uREMJZHcEbTQB8YGni:  -0.01000000 Waves

2021.07.27 18:08 [1632212] smart account 3MyaVYsqzGDdaQbE7uREMJZHcEbTQB8YGni > SELF 0.00000000 Waves

{ "type": 13, "id": "38p7PXikfdfsTMYhNYjzUu3DP7EaMH9CsHBqHcm5UB2f", "fee": 1000000, "feeAssetId": null, "timestamp": 1627398544366, "version": 2, "chainId": 84, "sender": "3MyaVYsqzGDdaQbE7uREMJZHcEbTQB8YGni", "senderPublicKey": "J1663AujAooArK7NK4wm4ADjFD2QMEofeeSptgpLvCR1", "proofs": [ "666YwBZNw4twgP8yRsJGfvfGLDBh1aNcobGxVYcXLizw4SFpByyekjr7ZwpZo5xzkJSrZvKzYr2KgdtUAeNzyQtJ" ], "script": "base64:AAIEAAAAAAAAABMIAhIAEgMKAQgSCAoGAQEBAQEBAAAASgEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAAFmdldEJvb2xCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQcBAAAAGGdldFN0cmluZ0J5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AgAAAAABAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcw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AnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAQAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAgAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAA4rvdeY=", "height": 1632212, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
5+
6+
7+func getStringByKey (key) = valueOrElse(getString(this, key), "")
8+
9+
10+func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false)
11+
12+
13+func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "")
14+
15+
16+func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0)
17+
18+
19+let WAVELET = 100000000
20+
21+let PAULI = 1000000
22+
23+let PAULISCALE = 6
24+
25+let PRICELET = 1000000
26+
27+let MULT = 100000000
28+
29+let MULTSCALE = 8
30+
31+let MINORDERTOTAL = (10 * WAVELET)
32+
33+let MAXROI = 95
34+
35+let CANCELED = "canceled"
36+
37+let NEW = "new"
38+
39+let FILLED = "filled"
40+
41+let PriceKey = "price"
42+
43+let NsbtAssetIdKey = "bond_asset_id"
44+
45+let NeutrinoAssetIdKey = "neutrino_asset_id"
46+
47+let BalanceLockedkKey = "balance_lock_"
48+
49+let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
50+
51+let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
52+
53+let FirstOrderKey = "order_first"
54+
55+func getRoiByOrderIdKey (orderId) = ("debug_order_roi_" + orderId)
56+
57+
58+func getOrderPriceKey (orderId) = ("order_price_" + orderId)
59+
60+
61+func getOrderTotalKey (orderId) = ("order_total_" + orderId)
62+
63+
64+func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
65+
66+
67+func getOrderHeightKey (orderId) = ("order_height_" + orderId)
68+
69+
70+func getOrderStatusKey (orderId) = ("order_status_" + orderId)
71+
72+
73+func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
74+
75+
76+func getPrevOrderKey (orderId) = ("order_prev_" + orderId)
77+
78+
79+func getNextOrderKey (orderId) = ("order_next_" + orderId)
80+
81+
82+func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI)
83+
84+
85+func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET)
86+
87+
88+func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price)
89+
90+
91+func convertBondToWaves (amount,price) = convertNeutrinoToWaves(amount, price)
92+
93+
94+let neutrinoContract = Address(base58'3PC9BfRwJWWiw9AREE2B3eWzCks3CYtg4yo')
95+
96+let controlContract = Address(base58'3P5Bfd58PPfNvBM2Hy8QfbcDqMeNtzg7KfP')
97+
98+let liquidationContract = Address(base58'3P4PCxsJqMzQBALo8zANHtBDZRRquobHQp7')
99+
100+let neutrinoAssetId = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
101+
102+let nsbtAssetId = base58'6nSpVyNH7yM69eg446wrQR94ipbbcmZMU1ENPwanC97g'
103+
104+let isBlocked = getBoolByAddressAndKey(controlContract, "is_blocked")
105+
106+let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
107+
108+let neutrinoLockedBalance = getNumberByAddressAndKey(neutrinoContract, NeutrinoLockedBalanceKey)
109+
110+let reserve = (wavesBalance(neutrinoContract).regular - getNumberByAddressAndKey(neutrinoContract, WavesLockedBalanceKey))
111+
112+let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice)
113+
114+let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
115+
116+let deficit = (neutrinoSupply - reservesInUsdn)
117+
118+let currentMaxRoi = fraction(deficit, 100, neutrinoSupply)
119+
120+let currentBrMult = fraction(reservesInUsdn, MULT, neutrinoSupply)
121+
122+let firstOrder = getStringByKey(FirstOrderKey)
123+
124+let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
125+
126+let nsbtSupply = (nsbtSupplyMAX - assetBalance(this, nsbtAssetId))
127+
128+func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id))
129+
130+
131+func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
132+
133+
134+func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
135+
136+
137+func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
138+
139+
140+func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
141+
142+
143+func getPrevOrder (id) = getStringByKey(getPrevOrderKey(id))
144+
145+
146+func getNextOrder (id) = getStringByKey(getNextOrderKey(id))
147+
148+
149+func getPriceForRoi (roiPercents) = fraction((100 + roiPercents), currentPrice, 100)
150+
151+
152+func getReversePrice (price) = ((PRICELET * PRICELET) / price)
153+
154+
155+func calcNsbt2WavesPriceRaw (spentWavesRaw,receivedNsbtRaw) = fraction(spentWavesRaw, (PAULI * PRICELET), receivedNsbtRaw)
156+
157+
158+func orderData (orderId,totalWavelets,filledWavelets,owner,status,roi,price) = [IntegerEntry(getOrderPriceKey(orderId), price), IntegerEntry(getOrderTotalKey(orderId), totalWavelets), IntegerEntry(getOrderFilledTotalKey(orderId), filledWavelets), StringEntry(getOrderOwnerKey(orderId), owner), IntegerEntry(getOrderHeightKey(orderId), height), StringEntry(getOrderStatusKey(orderId), status), IntegerEntry(("debug_order_currentPrice_" + orderId), currentPrice), IntegerEntry(getRoiByOrderIdKey(orderId), roi)]
159+
160+
161+let IdxA = 0
162+
163+let IdxPaulB = 1
164+
165+let IdxWResAsUsdn = 2
166+
167+let IdxMultBR = 3
168+
169+let IdxMultPower = 4
170+
171+let IdxMultExpInPower = 5
172+
173+let IdxMultK = 6
174+
175+func calculateK (wRaw,uRaw,price,mRaw,sRaw) = {
176+ let EXP = 271828100
177+ let a = valueOrElse(getInteger(this, "nsbtCurveParam_a"), 3)
178+ let paulB = valueOrElse(getInteger(this, "nsbtCurveParam_b"), ((3 * PAULI) / 10))
179+ let wReservesInUsdn = convertWavesToNeutrino(wRaw, price)
180+ let multBR = fraction(wReservesInUsdn, MULT, uRaw)
181+ let multPower = (a * (multBR - (1 * MULT)))
182+ let multExpInPower = pow(EXP, MULTSCALE, multPower, MULTSCALE, MULTSCALE, DOWN)
183+ let multK = fraction(paulB, multExpInPower, PAULI)
184+[a, paulB, wReservesInUsdn, multBR, multPower, multExpInPower, multK]
185+ }
186+
187+
188+func curveFunction (wRaw,uRaw,price,mRaw,sRaw,wavesPayRaw) = {
189+ let kCalcArray = calculateK(wRaw, uRaw, price, mRaw, sRaw)
190+ let multK = kCalcArray[IdxMultK]
191+ let usdnPay = convertWavesToNeutrino(wavesPayRaw, price)
192+ let multStepM1 = fraction(multK, mRaw, PAULI)
193+ let multStep2 = fraction(multStepM1, PAULI, (mRaw - sRaw))
194+ let multStepM3 = (fraction(usdnPay, MULT, PAULI) + fraction(multStep2, mRaw, PAULI))
195+ let multStep4 = fraction(multStepM1, MULT, multStepM3)
196+ let stepM5 = fraction(multStep4, mRaw, MULT)
197+ let nsbtAmountRaw = ((mRaw - sRaw) - stepM5)
198+[nsbtAmountRaw, usdnPay, wRaw, uRaw, mRaw, sRaw, kCalcArray[IdxA], kCalcArray[IdxPaulB], kCalcArray[IdxWResAsUsdn], price, kCalcArray[IdxMultBR], kCalcArray[IdxMultPower], kCalcArray[IdxMultExpInPower], multK, multStepM1, multStep2, multStepM3, multStep4, stepM5]
199+ }
200+
201+
202+func toStr (name,curveResult) = (((((((((((((((((((((((((((((((((((((((name + "[nsbtAmountRaw=") + toString(curveResult[0])) + " usdnPayment=") + toString(curveResult[1])) + " wRaw=") + toString(curveResult[2])) + " uRaw=") + toString(curveResult[3])) + " mRaw=") + toString(curveResult[4])) + " sRaw=") + toString(curveResult[5])) + " nsbtCurveParam_a=") + toString(curveResult[6])) + " nsbtCurveParam_b=") + toString(curveResult[7])) + " wReservesInUsdn=") + toString(curveResult[8])) + " price=") + toString(curveResult[9])) + " multBR=") + toString(curveResult[10])) + " multPower=") + toString(curveResult[11])) + " multExpInPower=") + toString(curveResult[12])) + " multK=") + toString(curveResult[13])) + " multStepM1=") + toString(curveResult[14])) + " multStep2=") + toString(curveResult[15])) + " multStepM3=") + toString(curveResult[16])) + " multStep4=") + toString(curveResult[17])) + " stepM5=") + toString(curveResult[18])) + "]")
203+
204+
205+@Callable(i)
206+func buyNsbt () = {
207+ let pmt = value(i.payments[0])
208+ let pmtAmount = pmt.amount
209+ let wavesPay = pmtAmount
210+ let ownerAddress = i.caller
211+ if (isBlocked)
212+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
213+ else if (isDefined(pmt.assetId))
214+ then throw("can use waves only")
215+ else if (((10 * WAVELET) > pmtAmount))
216+ then throw("min 10 waves expected")
217+ else {
218+ let curveResult = curveFunction(reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay)
219+ let nsbtAmount = curveResult[0]
220+ if ((0 >= nsbtAmount))
221+ then throw("nsbtAmount <= 0")
222+ else {
223+ let nsbt2WavesPriceRaw = calcNsbt2WavesPriceRaw(wavesPay, nsbtAmount)
224+ let roi = 0
225+ (orderData(toBase58String(i.transactionId), pmtAmount, pmtAmount, toString(ownerAddress), FILLED, roi, nsbt2WavesPriceRaw) ++ [ScriptTransfer(ownerAddress, nsbtAmount, nsbtAssetId), ScriptTransfer(neutrinoContract, wavesPay, unit), StringEntry("debug_curveResult", toStr("curveResult", curveResult))])
226+ }
227+ }
228+ }
229+
230+
231+
232+@Callable(i)
233+func cancelOrder (orderId) = {
234+ let owner = getOrderOwner(orderId)
235+ let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
236+ let caller = toString(i.caller)
237+ let nextOrder = getNextOrder(orderId)
238+ let prevOrder = getPrevOrder(orderId)
239+ if ((getOrderStatus(orderId) != NEW))
240+ then throw("invalid order status")
241+ else [StringEntry(FirstOrderKey, if ((firstOrder == orderId))
242+ then nextOrder
243+ else firstOrder), StringEntry(getNextOrderKey(prevOrder), nextOrder), StringEntry(getPrevOrderKey(nextOrder), prevOrder), StringEntry(getOrderStatusKey(orderId), CANCELED), ScriptTransfer(i.caller, amount, unit)]
244+ }
245+
246+
247+
248+@Callable(i)
249+func curveRest (wRaw,uRaw,price,mRaw,sRaw,wavesPayRaw) = {
250+ let curveResult = curveFunction(reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPayRaw)
251+ let results = toStr("curveResult", curveResult)
252+ throw(results)
253+ }
254+
255+
256+@Verifier(tx)
257+func verify () = {
258+ let pubKeyAdminsList = ["GJdLSaLiv5K7xuejac8mcRcHoyo3dPrESrvktG3a6MAR", "FWVffYr2ALmHMejZm3WqeLz6Sdym3gLFGtJn4KTwyU5x", "3Wh2LaWcb5gg7K2pPcW3Ep6EAuRBzYkAgrdpt43jTDFa", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
259+ let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
260+ then 1
261+ else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
262+ then 1
263+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
264+ then 1
265+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
266+ then 2
267+ else 0))
268+ (count >= 3)
269+ }
270+

github/deemru/w8io/169f3d6 
22.23 ms