tx · 29bcfrjpeZeVUggTeBN1Qx9m5L6KgiLMdfzbqPUaGL9g

3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi:  -0.01400000 Waves

2022.03.17 13:21 [1967810] smart account 3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi > SELF 0.00000000 Waves

{ "type": 13, "id": "29bcfrjpeZeVUggTeBN1Qx9m5L6KgiLMdfzbqPUaGL9g", "fee": 1400000, "feeAssetId": null, "timestamp": 1647512596283, "version": 1, "sender": "3N7LYefWk1WhvCsY5A9nTq244SbVPmhCypi", "senderPublicKey": "4qGVXRFATZNzo2RZZ5UYHXojGyJgSRBwtgJcCU8rJe5A", "proofs": [ "3TnQC7D873UgiCnm8wLPMkbDT84RkapoucxXgD7xrRg5xynHyZpqG5nkujP9P1npSLmx9GbKsbPZVjBvBGm96dko" ], "script": "base64:AAIFAAAAAAAAADUIAhIFCgMICAESAwoBARIHCgUBAQEBARIDCgEBEgASAwoBARIAEgUKAwEBARIHCgUBAQEBAQAAAC8AAAAAB1dBVkVMRVQAAAAAAAX14QAAAAAABVBBVUxJAAAAAAAAD0JAAAAAAAhCSUdQQVVMSQkAATYAAAABAAAAAAAAD0JAAAAAAAhQUklDRUxFVAAAAAAAAA9CQAAAAAAETVVMVAAAAAAABfXhAAAAAAAJQklHTVVMVDE2CQABNgAAAAEAACOG8m/BAAAAAAAACU1VTFRTQ0FMRQAAAAAAAAAACAAAAAAHU0NBTEUxNgAAAAAAAAAAEAAAAAADU0VQAgAAAAJfXwAAAAAFSEFMRjgAAAAAAAL68IAAAAAAC0VVTEVSTlVNQkVSCQABNgAAAAEAAGCSoRPY1XQAAAAABnNjYWxlNgAAAAAAAA9CQAAAAAAMc2NhbGU2QmlnSW50CQABNgAAAAEAAAAAAAAPQkAAAAAADHNjYWxlOEJpZ0ludAkAATYAAAABAAAAAAAF9eEAAAAAAA1zY2FsZTEwQmlnSW50CQABNgAAAAEAAAAAAlQL5AABAAAAEmtleU5ldXRyaW5vQWRkc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AADCQAAZQAAAAIFAAAAB2hlaWdodDIFAAAAB2hlaWdodDEFAAAABE1VTFQFAAAACGhhbGZMaWZlAAAAAAAAAAAIAAAAAAAAAAAIBQAAAAZIQUxGVVAFAAAABE1VTFQEAAAAAXYJAABrAAAAAwkAAGQAAAACBQAAAAdhbW91bnQxBQAAAAdhbW91bnQyBQAAAARNVUxUCQAAZAAAAAIFAAAAB2Ftb3VudDEFAAAAAXcJAAUUAAAAAgUAAAADbmlsCQAAZAAAAAIFAAAAB2hlaWdodDEJAABpAAAAAgkAAGUAAAACBQAAAAVIQUxGOAkAAGgAAAACBQAAAAhoYWxmTGlmZQkAAG0AAAAGBQAAAAF2AAAAAAAAAAAIAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAIBQAAAAZIQUxGVVAFAAAABE1VTFQAAAAAH8TtVQ==", "chainId": 84, "height": 1967810, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EeMUW2dwaLTbNFfHdhtpuQJeDjY3VW9mSTgZfk74L5gJ Next: B5PKtkw2C9MdNE1Mz2x7qHVWpi26LDXcfH67Bm5GGjrU Diff:
OldNewDifferences
142142 then asInt(neutrinoMetrics[9])
143143 else value(nsbtSupplyOverride)
144144 let currentPrice = asInt(neutrinoMetrics[0])
145- let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [asInt(neutrinoMetrics[4]), asInt(neutrinoMetrics[6]), currentPrice, nsbtSupplyMAX, nsbtSupply], nil))
145+ let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [asInt(neutrinoMetrics[3]), asInt(neutrinoMetrics[5]), currentPrice, nsbtSupplyMAX, nsbtSupply], nil))
146146 if ((kCalcArray == kCalcArray))
147147 then {
148148 let multK = parseBigIntValue(asString(kCalcArray[6]))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let WAVELET = 100000000
55
66 let PAULI = 1000000
77
88 let BIGPAULI = toBigInt(1000000)
99
1010 let PRICELET = 1000000
1111
1212 let MULT = 100000000
1313
1414 let BIGMULT16 = toBigInt(10000000000000000)
1515
1616 let MULTSCALE = 8
1717
1818 let SCALE16 = 16
1919
2020 let SEP = "__"
2121
2222 let HALF8 = 50000000
2323
2424 let EULERNUMBER = toBigInt(27182818284590452)
2525
2626 let scale6 = 1000000
2727
2828 let scale6BigInt = toBigInt(1000000)
2929
3030 let scale8BigInt = toBigInt(100000000)
3131
3232 let scale10BigInt = toBigInt(10000000000)
3333
3434 func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
3535
3636
3737 func keySwapAmountAParam () = "%s%s__config__swapAParam"
3838
3939
4040 func keyNeutrinoAssetId () = "neutrino_asset_id"
4141
4242
4343 func keyLiquidationContractAddress () = "liquidation_contract"
4444
4545
4646 func keyAuctionContract () = "auction_contract"
4747
4848
4949 func keyContolContract () = "control_contract"
5050
5151
5252 func keyBondAssetId () = "bond_asset_id"
5353
5454
5555 func keyBalanceLocked () = "balance_lock_"
5656
5757
5858 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
5959
6060
6161 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
6262
6363
6464 func swapsTimeframeKEY () = "swaps_timeframe"
6565
6666
6767 func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP)
6868
6969
7070 func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP)
7171
7272
7373 func keyPrice () = "price"
7474
7575
7676 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
7777
7878
7979 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
8080
8181
8282 func getNumberByKey (address,key) = valueOrElse(getInteger(address, key), 0)
8383
8484
8585 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
8686
8787
8888 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI)
8989
9090
9191 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET)
9292
9393
9494 func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), BIGMULT16, toBigInt(origScaleMult))
9595
9696
9797 func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), BIGMULT16))
9898
9999
100100 func asAnyList (val) = match val {
101101 case valAnyLyst: List[Any] =>
102102 valAnyLyst
103103 case _ =>
104104 throw("fail to cast into List[Any]")
105105 }
106106
107107
108108 func asInt (val) = match val {
109109 case valInt: Int =>
110110 valInt
111111 case _ =>
112112 throw("fail to cast into Int")
113113 }
114114
115115
116116 func asString (val) = match val {
117117 case valStr: String =>
118118 valStr
119119 case _ =>
120120 throw("fail to cast into String")
121121 }
122122
123123
124124 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
125125
126126 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
127127
128128 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
129129
130130 let liquidationContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyLiquidationContractAddress()))
131131
132132 let neutrinoAssetId = fromBase58String(getStringOrFail(neutrinoContract, keyNeutrinoAssetId()))
133133
134134 let nsbtAssetId = fromBase58String(getStringValue(neutrinoContract, keyBondAssetId()))
135135
136136 func calcContractNsbtPriceInternal (nsbtSupplyOverride) = {
137137 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
138138 let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil))
139139 if ((neutrinoMetrics == neutrinoMetrics))
140140 then {
141141 let nsbtSupply = if ((nsbtSupplyOverride == unit))
142142 then asInt(neutrinoMetrics[9])
143143 else value(nsbtSupplyOverride)
144144 let currentPrice = asInt(neutrinoMetrics[0])
145- let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [asInt(neutrinoMetrics[4]), asInt(neutrinoMetrics[6]), currentPrice, nsbtSupplyMAX, nsbtSupply], nil))
145+ let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [asInt(neutrinoMetrics[3]), asInt(neutrinoMetrics[5]), currentPrice, nsbtSupplyMAX, nsbtSupply], nil))
146146 if ((kCalcArray == kCalcArray))
147147 then {
148148 let multK = parseBigIntValue(asString(kCalcArray[6]))
149149 let mK = fromX16(multK, MULT)
150150 let multStep1 = fraction(nsbtSupplyMAX, MULT, (nsbtSupplyMAX - nsbtSupply))
151151 let multStep2 = fraction(multStep1, multStep1, MULT)
152152 let multNsbt2usdnPrice = fraction(mK, multStep2, MULT)
153153 let nsbt2usdnPrice = fraction(multNsbt2usdnPrice, PAULI, MULT)
154154 let nsbt2wavesPrice = fraction(nsbt2usdnPrice, PAULI, currentPrice)
155155 $Tuple2(nil, [nsbt2usdnPrice, nsbt2wavesPrice])
156156 }
157157 else throw("Strict value is not equal to itself.")
158158 }
159159 else throw("Strict value is not equal to itself.")
160160 }
161161
162162
163163 @Callable(i)
164164 func constructor (neutrinoAddress,nsbtLockAddress,swapAmountAParam) = if ((i.caller != this))
165165 then throw("not authorized")
166166 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), IntegerEntry(keySwapAmountAParam(), swapAmountAParam)]
167167
168168
169169
170170 @Callable(i)
171171 func calcSwapLimitREADONLY (gNsbtAmount) = {
172172 let limitParamA = toBigInt(getIntOrFail(this, keySwapAmountAParam()))
173173 let gNsbtAmountScale16 = toX16(gNsbtAmount, scale6)
174174 let limitPowPart = pow(gNsbtAmountScale16, 16, EULERNUMBER, 16, 8, CEILING)
175175 let limit = fraction(limitParamA, limitPowPart, scale10BigInt)
176176 $Tuple2(nil, toInt(limit))
177177 }
178178
179179
180180
181181 @Callable(i)
182182 func calculateKREADONLY (wRaw,uRaw,price,mRaw,sRaw) = {
183183 let EXP = toBigInt(2718281)
184184 let EXPSCALE = 6
185185 let a = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_a"), 3)
186186 let paulB = valueOrElse(getInteger(auctionContract, "nsbtCurveParam_b"), ((3 * PAULI) / 10))
187187 let wReservesInUsdn = convertWavesToNeutrino(wRaw, price)
188188 let multBR = fraction(wReservesInUsdn, MULT, uRaw)
189189 if ((multBR > 10678564816))
190190 then throw("BR > 10678.564816% will overflow exponent")
191191 else {
192192 let multPower = (a * (multBR - MULT))
193193 let multExpInPower = pow(EXP, EXPSCALE, toBigInt(multPower), MULTSCALE, SCALE16, DOWN)
194194 let multK = fraction(toBigInt(paulB), multExpInPower, BIGPAULI)
195195 $Tuple2(nil, [a, paulB, wReservesInUsdn, multBR, multPower, toString(multExpInPower), toString(multK)])
196196 }
197197 }
198198
199199
200200
201201 @Callable(i)
202202 func curveFunctionREADONLY (wavesPayRaw) = {
203203 let neutrinoMetrics = asAnyList(invoke(this, "calcNeutinoMetricsREADONLY", nil, nil))
204204 if ((neutrinoMetrics == neutrinoMetrics))
205205 then {
206206 let price = asInt(neutrinoMetrics[0])
207207 let wRaw = asInt(neutrinoMetrics[3])
208208 let uRaw = asInt(neutrinoMetrics[5])
209209 let sRaw = asInt(neutrinoMetrics[9])
210210 let mRaw = value(assetInfo(nsbtAssetId)).quantity
211211 let kCalcArray = asAnyList(invoke(this, "calculateKREADONLY", [wRaw, uRaw, price, mRaw, sRaw], nil))
212212 if ((kCalcArray == kCalcArray))
213213 then {
214214 let multK = parseBigIntValue(asString(kCalcArray[6]))
215215 let usdnPay = convertWavesToNeutrino(wavesPayRaw, price)
216216 let bigMaxNsbtSupply = toBigInt(mRaw)
217217 let bigNsbtSupply = toBigInt((mRaw - sRaw))
218218 let step1 = fraction(toBigInt(usdnPay), BIGMULT16, multK)
219219 let step2 = fraction(step1, bigNsbtSupply, bigMaxNsbtSupply)
220220 let step3 = toInt(fraction(bigNsbtSupply, bigMaxNsbtSupply, (step2 + bigMaxNsbtSupply)))
221221 let nsbtAmountRaw = ((mRaw - sRaw) - step3)
222222 $Tuple2(nil, [nsbtAmountRaw, usdnPay, wRaw, uRaw, mRaw, sRaw, asInt(kCalcArray[0]), asInt(kCalcArray[1]), asInt(kCalcArray[2]), price, asInt(kCalcArray[3]), asInt(kCalcArray[4]), kCalcArray[5], kCalcArray[6], toString(step1), toString(step2), step3])
223223 }
224224 else throw("Strict value is not equal to itself.")
225225 }
226226 else throw("Strict value is not equal to itself.")
227227 }
228228
229229
230230
231231 @Callable(i)
232232 func calcContractNsbtPriceREADONLY () = calcContractNsbtPriceInternal(unit)
233233
234234
235235
236236 @Callable(i)
237237 func calcContractNsbtPriceBySupplyREADONLY (nsbtSupply) = calcContractNsbtPriceInternal(nsbtSupply)
238238
239239
240240
241241 @Callable(i)
242242 func calcNeutinoMetricsREADONLY () = {
243243 let currentPrice = getIntegerValue(controlContract, keyPrice())
244244 let neutrinoLockedBalance = valueOrElse(getInteger(neutrinoContract, keyNeutrinoLockedBalance()), 0)
245245 let wavesLockedBalance = valueOrElse(getInteger(neutrinoContract, keyWavesLockedBalance()), 0)
246246 let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance)
247247 let reservesInUsdn = convertWavesToNeutrino(reserve, currentPrice)
248248 let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
249249 let surplus = (reservesInUsdn - neutrinoSupply)
250250 let deficit = (neutrinoSupply - reservesInUsdn)
251251 let surplusPercent = if ((neutrinoSupply == 0))
252252 then 0
253253 else (fraction(surplus, PAULI, neutrinoSupply) * 100)
254254 let BR = if ((neutrinoSupply == 0))
255255 then 0
256256 else fraction(reservesInUsdn, PAULI, neutrinoSupply)
257257 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
258258 let nsbtSupply = (nsbtSupplyMAX - assetBalance(auctionContract, nsbtAssetId))
259259 $Tuple2(nil, [currentPrice, neutrinoLockedBalance, wavesLockedBalance, reserve, reservesInUsdn, neutrinoSupply, surplus, surplusPercent, BR, nsbtSupply, nsbtSupplyMAX])
260260 }
261261
262262
263263
264264 @Callable(i)
265265 func getUnstakeComissionAmountREADONLY (amount,startHeight,halfLife) = $Tuple2(nil, fraction(amount, pow(2, 0, fraction(-((height - startHeight)), MULT, halfLife), 8, 8, HALFUP), MULT))
266266
267267
268268
269269 @Callable(i)
270270 func mergeStakesREADONLY (amount1,height1,amount2,height2,halfLife) = {
271271 let w = fraction(amount2, pow(2, 0, fraction((height2 - height1), MULT, halfLife), 8, 8, HALFUP), MULT)
272272 let v = fraction((amount1 + amount2), MULT, (amount1 + w))
273273 $Tuple2(nil, (height1 + ((HALF8 - (halfLife * log(v, 8, 2, 0, 8, HALFUP))) / MULT)))
274274 }
275275
276276

github/deemru/w8io/026f985 
51.02 ms