tx · 2ouMhj8ivPh81KrkUmZgL4kB7fTEiErURkQn1vkfTRo3

3MxbR7b3gHF4XdQKNTT5aQMRiazHvrVWC8N:  -0.02000000 Waves

2021.01.08 12:09 [1344231] smart account 3MxbR7b3gHF4XdQKNTT5aQMRiazHvrVWC8N > SELF 0.00000000 Waves

{ "type": 13, "id": "2ouMhj8ivPh81KrkUmZgL4kB7fTEiErURkQn1vkfTRo3", "fee": 2000000, "feeAssetId": null, "timestamp": 1610096966621, "version": 1, "sender": "3MxbR7b3gHF4XdQKNTT5aQMRiazHvrVWC8N", "senderPublicKey": "4bj7YXaphTC4Ldx7DqqMmrTjNshRtw1yNsej2XXZcAzS", "proofs": [ "4c18zeLSpHoRQdwXJ4rXYFkKXY9qpfHbqniBA859V71yw1eECwVEydTLzGsBLTZmLkqNgd3iSDXJ6zN7wHyTfzBw", "29jSoxPWjixqvp18ynpqHrcWeuAxq3g9kvdwb6rxY9mszvWgYkDSeN5kH3iJGr9YKr628RHXfw3p8UEUHLdiv28p", "5HGPe8egu81gSyvwBa57MZDh4JjXaD9LLARTdj7xrWVtTc4PdWy6KXR5LQnoeRezuKwSNoLgJrELYogoyYzi8fvY" ], "script": "base64:AAIEAAAAAAAAABkIAhIDCgEBEgMKAQESBAoCAQgSAwoBCBIAAAAAQwEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAAFmdldEJvb2xCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQcBAAAAGGdldFN0cmluZ0J5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AAAAAgkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAwkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAMAAAAAAAAAAAIAAAAAAAAAAAAJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAPshzqS", "chainId": 84, "height": 1344231, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JhGsAs6Bqp8mhbTCBfZTGwBrVWBoiJf2tHEfGdmja1n Next: DhMtx3H2y2LAeqHiaVwHyApA3YZLUWeZKymVZ6hsYW3a Diff:
OldNewDifferences
310310
311311
312312 @Callable(i)
313-func buyNsbtInSurplus (nsbtAmount,toleranceRaw) = {
313+func buyNsbtInSurplus (nsbtAmount) = {
314314 let pmt = value(i.payments[0])
315315 let pmtAmount = pmt.amount
316316 let ownerAddress = i.caller
328328 let requiredWaves = curveResult[0]
329329 if ((requiredWaves > pmtAmount))
330330 then throw(((("Payment amount is less then required: pmtAmount=" + toString(pmtAmount)) + " requiredWaves=") + toString(requiredWaves)))
331- else if ((0 > toleranceRaw))
332- then throw("Invalid tolerance param")
333- else {
334- let maxAllowedPayment = fraction(requiredWaves, (toleranceRaw + PAULI), PAULI)
335- if ((requiredWaves > maxAllowedPayment))
336- then throw(((("Tolerance check failed: pmtAmount=" + toString(pmtAmount)) + " maxAllowedPayment=") + toString(maxAllowedPayment)))
337- else {
338- let nsbt2WavesPriceRaw = calcNsbt2WavesPriceRaw(requiredWaves, nsbtAmount)
339- let roi = (fraction(getReversePrice(nsbt2WavesPriceRaw), 100, currentPrice) - 100)
340- (orderData(toBase58String(i.transactionId), pmtAmount, pmtAmount, toString(ownerAddress), FILLED, roi, nsbt2WavesPriceRaw) ++ [ScriptTransfer(ownerAddress, nsbtAmount, bondAssetId), ScriptTransfer(ownerAddress, (pmtAmount - requiredWaves), unit), ScriptTransfer(neutrinoContract, requiredWaves, unit), StringEntry("debug_curveResult", toStr("curveResult", curveResult)), IntegerEntry("tmp_issuedNsbt", (issuedNsbt + nsbtAmount))])
341- }
342- }
331+ else {
332+ let nsbt2WavesPriceRaw = calcNsbt2WavesPriceRaw(requiredWaves, nsbtAmount)
333+ let roi = (fraction(getReversePrice(nsbt2WavesPriceRaw), 100, currentPrice) - 100)
334+ (orderData(toBase58String(i.transactionId), pmtAmount, pmtAmount, toString(ownerAddress), FILLED, roi, nsbt2WavesPriceRaw) ++ [ScriptTransfer(ownerAddress, nsbtAmount, bondAssetId), ScriptTransfer(ownerAddress, (pmtAmount - requiredWaves), unit), ScriptTransfer(neutrinoContract, requiredWaves, unit), StringEntry("debug_curveResult", toStr("curveResult", curveResult)), IntegerEntry("tmp_issuedNsbt", (issuedNsbt + nsbtAmount))])
335+ }
343336 }
344337 }
345338
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
55
66
77 func getStringByKey (key) = valueOrElse(getString(this, key), "")
88
99
1010 func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false)
1111
1212
1313 func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "")
1414
1515
1616 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0)
1717
1818
1919 let WAVELET = 100000000
2020
2121 let PAULI = 1000000
2222
2323 let PAULISCALE = 6
2424
2525 let PRICELET = 1000000
2626
2727 let MULT = 100000000
2828
2929 let MULTSCALE = 8
3030
3131 let MINORDERTOTAL = (10 * WAVELET)
3232
3333 let MAXROI = 95
3434
3535 let CANCELED = "canceled"
3636
3737 let NEW = "new"
3838
3939 let FILLED = "filled"
4040
4141 let PriceKey = "price"
4242
4343 let BondAssetIdKey = "bond_asset_id"
4444
4545 let NeutrinoAssetIdKey = "neutrino_asset_id"
4646
4747 let BalanceLockedkKey = "balance_lock_"
4848
4949 let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
5050
5151 let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
5252
5353 let FirstOrderKey = "order_first"
5454
5555 func getRoiByOrderIdKey (orderId) = ("debug_order_roi_" + orderId)
5656
5757
5858 func getOrderPriceKey (orderId) = ("order_price_" + orderId)
5959
6060
6161 func getOrderTotalKey (orderId) = ("order_total_" + orderId)
6262
6363
6464 func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
6565
6666
6767 func getOrderHeightKey (orderId) = ("order_height_" + orderId)
6868
6969
7070 func getOrderStatusKey (orderId) = ("order_status_" + orderId)
7171
7272
7373 func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
7474
7575
7676 func getPrevOrderKey (orderId) = ("order_prev_" + orderId)
7777
7878
7979 func getNextOrderKey (orderId) = ("order_next_" + orderId)
8080
8181
8282 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI)
8383
8484
8585 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET)
8686
8787
8888 func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price)
8989
9090
9191 func convertBondToWaves (amount,price) = convertNeutrinoToWaves(amount, price)
9292
9393
9494 let neutrinoContract = Address(base58'3Mzbx34Ex5rRbn39vUHx9kiwh3nneF8S5we')
9595
9696 let controlContract = Address(base58'3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx')
9797
9898 let liquidationContract = Address(base58'3N5nmMvMH8o3RPEyCKCaoWahBTYTexnZy62')
9999
100100 let neutrinoAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
101101
102102 let bondAssetId = base58'BGhPYquXSK6UYjnPLEn94gFhetp4Jvf7toekEY4x1VDH'
103103
104104 let isBlocked = getBoolByAddressAndKey(controlContract, "is_blocked")
105105
106106 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
107107
108108 let neutrinoLockedBalance = getNumberByAddressAndKey(neutrinoContract, NeutrinoLockedBalanceKey)
109109
110110 let reserve = (wavesBalance(neutrinoContract).regular - getNumberByAddressAndKey(neutrinoContract, WavesLockedBalanceKey))
111111
112112 let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice)
113113
114114 let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
115115
116116 let deficit = (neutrinoSupply - reservesInUsdn)
117117
118118 let currentMaxRoi = fraction(deficit, 100, neutrinoSupply)
119119
120120 let currentBrMult = fraction(reservesInUsdn, MULT, neutrinoSupply)
121121
122122 let firstOrder = getStringByKey(FirstOrderKey)
123123
124124 func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id))
125125
126126
127127 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
128128
129129
130130 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
131131
132132
133133 func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
134134
135135
136136 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
137137
138138
139139 func getPrevOrder (id) = getStringByKey(getPrevOrderKey(id))
140140
141141
142142 func getNextOrder (id) = getStringByKey(getNextOrderKey(id))
143143
144144
145145 func getPriceForRoi (roiPercents) = fraction((100 + roiPercents), currentPrice, 100)
146146
147147
148148 func getReversePrice (price) = ((PRICELET * PRICELET) / price)
149149
150150
151151 func calcNsbt2WavesPriceRaw (spentWavesRaw,receivedNsbtRaw) = fraction(spentWavesRaw, (PAULI * PRICELET), receivedNsbtRaw)
152152
153153
154154 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)]
155155
156156
157157 func internalSellBond (pFirstOrder,pNextOrder,pFilledTotal,pRoi,pPrice,pPaymentWavelets,orderOwnerAddress,instantOrder) = {
158158 let priceWavesByBondCents = getPriceForRoi(pRoi)
159159 let remainedTotal = (pPaymentWavelets - pFilledTotal)
160160 let fillableOrderAmount = convertWavesToBond(remainedTotal, priceWavesByBondCents)
161161 let totalOrderWaveletesRequired = convertBondToWaves(fillableOrderAmount, priceWavesByBondCents)
162162 let nbTokensSellCondition = (currentMaxRoi >= pRoi)
163163 if (!(nbTokensSellCondition))
164164 then throw(("innapropriate roi: " + toString(pRoi)))
165165 else if ((totalOrderWaveletesRequired == 0))
166166 then throw("cannot fill order at the moment")
167167 else {
168168 let changeWavelets = (remainedTotal - totalOrderWaveletesRequired)
169169 let writeSetData = if (instantOrder)
170170 then orderData(pFirstOrder, pPaymentWavelets, (pFilledTotal + totalOrderWaveletesRequired), toBase58String(orderOwnerAddress.bytes), FILLED, pRoi, currentPrice)
171171 else [IntegerEntry(getOrderFilledTotalKey(pFirstOrder), (pFilledTotal + totalOrderWaveletesRequired)), StringEntry(getOrderStatusKey(pFirstOrder), FILLED), StringEntry(getPrevOrderKey(pNextOrder), ""), StringEntry(FirstOrderKey, pNextOrder)]
172172 (writeSetData ++ [ScriptTransfer(orderOwnerAddress, fillableOrderAmount, bondAssetId), ScriptTransfer(neutrinoContract, totalOrderWaveletesRequired, unit), ScriptTransfer(orderOwnerAddress, changeWavelets, unit)])
173173 }
174174 }
175175
176176
177177 func internalAddBuyBondOrder (roi,price,prevOrder,inv,instantOrder) = {
178178 let pmt = value(inv.payments[0])
179179 let newOrderId = toBase58String(inv.transactionId)
180180 if (isBlocked)
181181 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
182182 else if ((MINORDERTOTAL > pmt.amount))
183183 then throw(("min order total equals " + toString(MINORDERTOTAL)))
184184 else if ((roi > MAXROI))
185185 then throw("max setOrder ROI is 95%")
186186 else if ((0 > roi))
187187 then throw("can't place order with negative roi")
188188 else if ((roi == 0))
189189 then throw("roi should not be equal to 0")
190190 else if (isDefined(pmt.assetId))
191191 then throw("can use waves only")
192192 else if ((getOrderOwner(newOrderId) != ""))
193193 then throw("order exists")
194194 else if (if ((prevOrder != ""))
195195 then (getOrderStatus(prevOrder) != NEW)
196196 else false)
197197 then throw("prev order status is not new")
198198 else {
199199 let isNewOrderAtFirstPosition = (prevOrder == "")
200200 let owner = toString(inv.caller)
201201 let nextOrder = if (isNewOrderAtFirstPosition)
202202 then firstOrder
203203 else getNextOrder(prevOrder)
204204 let nextOrderRoi = getNumberByKey(getRoiByOrderIdKey(nextOrder))
205205 let isNextOrderError = if (if ((nextOrder != ""))
206206 then (roi >= nextOrderRoi)
207207 else false)
208208 then true
209209 else false
210210 let prevOrderRoi = getNumberByKey(getRoiByOrderIdKey(prevOrder))
211211 let isPrevOrderError = if (if ((prevOrder != ""))
212212 then (prevOrderRoi > roi)
213213 else false)
214214 then true
215215 else false
216216 if (if (isNextOrderError)
217217 then true
218218 else isPrevOrderError)
219219 then throw(((("invalid order isPrevOrderError:" + toString(isPrevOrderError)) + " isNextOrderError:") + toString(isNextOrderError)))
220220 else if (if (isNewOrderAtFirstPosition)
221221 then (currentMaxRoi >= roi)
222222 else false)
223223 then internalSellBond(newOrderId, nextOrder, 0, roi, price, pmt.amount, inv.caller, true)
224224 else if (instantOrder)
225225 then throw("Instant order couldn't be added into waiting queue")
226226 else ([StringEntry(getPrevOrderKey(newOrderId), prevOrder), StringEntry(getNextOrderKey(newOrderId), nextOrder), StringEntry(getNextOrderKey(prevOrder), if ((prevOrder == ""))
227227 then ""
228228 else newOrderId), StringEntry(getPrevOrderKey(nextOrder), if ((nextOrder == ""))
229229 then ""
230230 else newOrderId), StringEntry(FirstOrderKey, if (if ((firstOrder == ""))
231231 then true
232232 else (firstOrder == nextOrder))
233233 then newOrderId
234234 else firstOrder)] ++ orderData(newOrderId, pmt.amount, 0, owner, NEW, roi, price))
235235 }
236236 }
237237
238238
239239 func curveFunction (wRaw,uRaw,price,mRaw,sRaw,nRaw) = {
240240 let EXP = 271828100
241241 let nsbtCurveParamA = valueOrElse(getInteger(this, "nsbtCurveParam_a"), 3)
242242 let wReservesInUsdn = convertWavesToNeutrino(wRaw, price)
243243 let brMult = fraction(wReservesInUsdn, MULT, uRaw)
244244 let powerMult = (nsbtCurveParamA * (brMult - (1 * MULT)))
245245 let expInPowerMult = pow(EXP, MULTSCALE, powerMult, MULTSCALE, MULTSCALE, DOWN)
246246 let lnRes1 = log(((mRaw - sRaw) - nRaw), PAULISCALE, EXP, MULTSCALE, MULTSCALE, DOWN)
247247 let lnRes0 = log((mRaw - sRaw), PAULISCALE, EXP, MULTSCALE, MULTSCALE, DOWN)
248248 let lnDiffMult = (lnRes0 - lnRes1)
249249 let lnDiffMultipliedMaxRaw = fraction(mRaw, lnDiffMult, MULT)
250250 let usdnPaymentRaw = fraction(expInPowerMult, lnDiffMultipliedMaxRaw, MULT)
251251 let wavesPayment = convertNeutrinoToWaves(usdnPaymentRaw, price)
252252 [wavesPayment, usdnPaymentRaw, wRaw, uRaw, mRaw, sRaw, nRaw, nsbtCurveParamA, wReservesInUsdn, brMult, powerMult, expInPowerMult, lnRes0, lnRes1, lnDiffMult, lnDiffMultipliedMaxRaw]
253253 }
254254
255255
256256 func toStr (name,curveResult) = (((((((((((((((((((((((((((((((((name + "[wavesPayment=") + toString(curveResult[0])) + " usdnPayment=") + toString(curveResult[1])) + " wRaw=") + toString(curveResult[2])) + " uRaw=") + toString(curveResult[3])) + " mRaw=") + toString(curveResult[4])) + " sRaw=") + toString(curveResult[5])) + " nRaw=") + toString(curveResult[6])) + " nsbtCurveParamA=") + toString(curveResult[7])) + " wReservesInUsdn=") + toString(curveResult[8])) + " brMult=") + toString(curveResult[9])) + " powerMult=") + toString(curveResult[10])) + " expInPowerMult=") + toString(curveResult[11])) + " lnRes0=") + toString(curveResult[12])) + " lnRes1=") + toString(curveResult[13])) + " lnDiffMult=") + toString(curveResult[14])) + " maxXlndiff=") + toString(curveResult[15])) + "]")
257257
258258
259259 func bigComplexity (i) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (!(isDefined(transferTransactionById(fromBase58String("PdLw5JK5ppfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k")))))
260260 then !(isDefined(transferTransactionById(fromBase58String("adLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
261261 else false)
262262 then !(isDefined(transferTransactionById(fromBase58String("sdLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
263263 else false)
264264 then !(isDefined(transferTransactionById(fromBase58String("ddLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
265265 else false)
266266 then !(isDefined(transferTransactionById(fromBase58String("fdLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
267267 else false)
268268 then !(isDefined(transferTransactionById(fromBase58String("gdLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
269269 else false)
270270 then !(isDefined(transferTransactionById(fromBase58String("hdLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
271271 else false)
272272 then !(isDefined(transferTransactionById(fromBase58String("jdLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
273273 else false)
274274 then !(isDefined(transferTransactionById(fromBase58String("kdLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
275275 else false)
276276 then !(isDefined(transferTransactionById(fromBase58String("rdLw5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
277277 else false)
278278 then !(isDefined(transferTransactionById(fromBase58String("tdLq5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
279279 else false)
280280 then !(isDefined(transferTransactionById(fromBase58String("tdLy5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
281281 else false)
282282 then !(isDefined(transferTransactionById(fromBase58String("tdLu5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
283283 else false)
284284 then !(isDefined(transferTransactionById(fromBase58String("tdLh5JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
285285 else false)
286286 then !(isDefined(transferTransactionById(fromBase58String("1dL4JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
287287 else false)
288288 then !(isDefined(transferTransactionById(fromBase58String("2dL25JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
289289 else false)
290290 then !(isDefined(transferTransactionById(fromBase58String("3dL95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
291291 else false)
292292 then !(isDefined(transferTransactionById(fromBase58String("4dL95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
293293 else false)
294294 then !(isDefined(transferTransactionById(fromBase58String("5dL95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
295295 else false)
296296 then !(isDefined(transferTransactionById(fromBase58String("6dL95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
297297 else false)
298298 then !(isDefined(transferTransactionById(fromBase58String("7dL95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
299299 else false)
300300 then !(isDefined(transferTransactionById(fromBase58String("8dL95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
301301 else false)
302302 then !(isDefined(transferTransactionById(fromBase58String("91L95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
303303 else false)
304304 then !(isDefined(transferTransactionById(fromBase58String("92L95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
305305 else false)
306306 then !(isDefined(transferTransactionById(fromBase58String("93L95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
307307 else false)
308308 then !(isDefined(transferTransactionById(fromBase58String("94L95JKdpqfSEqvmFJvchejorAkzd4BrWLvoFwvMGu5k"))))
309309 else false
310310
311311
312312 @Callable(i)
313-func buyNsbtInSurplus (nsbtAmount,toleranceRaw) = {
313+func buyNsbtInSurplus (nsbtAmount) = {
314314 let pmt = value(i.payments[0])
315315 let pmtAmount = pmt.amount
316316 let ownerAddress = i.caller
317317 if (isBlocked)
318318 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
319319 else if (isDefined(pmt.assetId))
320320 then throw("can use waves only")
321321 else if (((10 * WAVELET) > pmtAmount))
322322 then throw("min 10 waves expected")
323323 else {
324324 let issuedNsbt = valueOrElse(getInteger(this, "tmp_issuedNsbt"), 0)
325325 let nsbtMax = ((2500 * 1000) * PAULI)
326326 let nsbtCurrent = (((1500 * 1000) * PAULI) + issuedNsbt)
327327 let curveResult = curveFunction(reserve, neutrinoSupply, currentPrice, nsbtMax, nsbtCurrent, nsbtAmount)
328328 let requiredWaves = curveResult[0]
329329 if ((requiredWaves > pmtAmount))
330330 then throw(((("Payment amount is less then required: pmtAmount=" + toString(pmtAmount)) + " requiredWaves=") + toString(requiredWaves)))
331- else if ((0 > toleranceRaw))
332- then throw("Invalid tolerance param")
333- else {
334- let maxAllowedPayment = fraction(requiredWaves, (toleranceRaw + PAULI), PAULI)
335- if ((requiredWaves > maxAllowedPayment))
336- then throw(((("Tolerance check failed: pmtAmount=" + toString(pmtAmount)) + " maxAllowedPayment=") + toString(maxAllowedPayment)))
337- else {
338- let nsbt2WavesPriceRaw = calcNsbt2WavesPriceRaw(requiredWaves, nsbtAmount)
339- let roi = (fraction(getReversePrice(nsbt2WavesPriceRaw), 100, currentPrice) - 100)
340- (orderData(toBase58String(i.transactionId), pmtAmount, pmtAmount, toString(ownerAddress), FILLED, roi, nsbt2WavesPriceRaw) ++ [ScriptTransfer(ownerAddress, nsbtAmount, bondAssetId), ScriptTransfer(ownerAddress, (pmtAmount - requiredWaves), unit), ScriptTransfer(neutrinoContract, requiredWaves, unit), StringEntry("debug_curveResult", toStr("curveResult", curveResult)), IntegerEntry("tmp_issuedNsbt", (issuedNsbt + nsbtAmount))])
341- }
342- }
331+ else {
332+ let nsbt2WavesPriceRaw = calcNsbt2WavesPriceRaw(requiredWaves, nsbtAmount)
333+ let roi = (fraction(getReversePrice(nsbt2WavesPriceRaw), 100, currentPrice) - 100)
334+ (orderData(toBase58String(i.transactionId), pmtAmount, pmtAmount, toString(ownerAddress), FILLED, roi, nsbt2WavesPriceRaw) ++ [ScriptTransfer(ownerAddress, nsbtAmount, bondAssetId), ScriptTransfer(ownerAddress, (pmtAmount - requiredWaves), unit), ScriptTransfer(neutrinoContract, requiredWaves, unit), StringEntry("debug_curveResult", toStr("curveResult", curveResult)), IntegerEntry("tmp_issuedNsbt", (issuedNsbt + nsbtAmount))])
335+ }
343336 }
344337 }
345338
346339
347340
348341 @Callable(i)
349342 func instantBuyNsbtOrFail (noLessThenRoi) = {
350343 let pmt = value(i.payments[0])
351344 let roi = currentMaxRoi
352345 if ((noLessThenRoi > roi))
353346 then throw(((("Current maxRoi=" + toString(roi)) + " is less then passed parameter noLessThenRoi=") + toString(noLessThenRoi)))
354347 else {
355348 let priceWavesByBondCents = getPriceForRoi(roi)
356349 internalAddBuyBondOrder(roi, getReversePrice(priceWavesByBondCents), "", i, true)
357350 }
358351 }
359352
360353
361354
362355 @Callable(i)
363356 func addBuyBondOrder (price,prevOrder) = {
364357 let pmt = value(i.payments[0])
365358 let priceWavesByBondCents = getReversePrice(price)
366359 if ((0 >= price))
367360 then throw("price less zero")
368361 else internalAddBuyBondOrder(fraction((priceWavesByBondCents - currentPrice), 100, currentPrice), price, prevOrder, i, false)
369362 }
370363
371364
372365
373366 @Callable(i)
374367 func cancelOrder (orderId) = {
375368 let owner = getOrderOwner(orderId)
376369 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
377370 let caller = toString(i.caller)
378371 let nextOrder = getNextOrder(orderId)
379372 let prevOrder = getPrevOrder(orderId)
380373 if (isBlocked)
381374 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
382375 else if ((owner != caller))
383376 then throw("permission denied")
384377 else if ((getOrderStatus(orderId) != NEW))
385378 then throw("invalid order status")
386379 else [StringEntry(FirstOrderKey, if ((firstOrder == orderId))
387380 then nextOrder
388381 else firstOrder), StringEntry(getNextOrderKey(prevOrder), nextOrder), StringEntry(getPrevOrderKey(nextOrder), prevOrder), StringEntry(getOrderStatusKey(orderId), CANCELED), ScriptTransfer(i.caller, amount, unit)]
389382 }
390383
391384
392385
393386 @Callable(i)
394387 func sellBond () = if (isBlocked)
395388 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
396389 else if ((firstOrder == ""))
397390 then throw("empty orderbook")
398391 else {
399392 let nextOrder = getNextOrder(firstOrder)
400393 let filledTotal = getOrderFilledTotal(firstOrder)
401394 let orderPrice = getOrderPrice(firstOrder)
402395 let roi = getNumberByKey(getRoiByOrderIdKey(firstOrder))
403396 let paymentWavelets = getOrderTotal(firstOrder)
404397 let orderOwnerAddress = Address(fromBase58String(getOrderOwner(firstOrder)))
405398 internalSellBond(firstOrder, nextOrder, filledTotal, roi, orderPrice, paymentWavelets, orderOwnerAddress, false)
406399 }
407400
408401
409402 @Verifier(tx)
410403 func verify () = {
411404 let pubKeyAdminsList = ["GXxmZaCigPgJsT6d1cLr8nUXA65nGX8V7FuAzzrY8wQE", "3xumx4hrPpeeoo79HLGbZCgfz95L39ZFdxxwWeSUC2Pu", "D4CqtK5fBsnzRo33ZMhrM7niLseDH2uRoK6weBq2JQ3A", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
412405 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
413406 then 1
414407 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
415408 then 1
416409 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
417410 then 1
418411 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
419412 then 2
420413 else 0))
421414 (count >= 3)
422415 }
423416

github/deemru/w8io/169f3d6 
72.92 ms