tx · 6sheZFMRfTAE9enRiTfug2UpBoQpdUaLgzJuhRvvmHpY 3MyLfEjWaZMZ3afgDYCf8g7pHexXEkPXffc: -0.01400000 Waves 2021.04.15 16:33 [1483626] smart account 3MyLfEjWaZMZ3afgDYCf8g7pHexXEkPXffc > SELF 0.00000000 Waves
{ "type": 13, "id": "6sheZFMRfTAE9enRiTfug2UpBoQpdUaLgzJuhRvvmHpY", "fee": 1400000, "feeAssetId": null, "timestamp": 1618493639534, "version": 1, "sender": "3MyLfEjWaZMZ3afgDYCf8g7pHexXEkPXffc", "senderPublicKey": "DoeRC9WSwJNdJzQYBEDUB3g6ZcE95e6PjGqwV3q7JNMF", "proofs": [ "WJM14kmo2mJt1MkNed3DvWNX73rem5srTJFjgZfhBuy7bpsqYQJNZGWBVMpKmiLm4bedmQYiGAwPvvBNxiHHqQn" ], "script": "base64:AAIEAAAAAAAAABMIAhIAEgASBAoCCAgSABIDCgEIAAAAdwEAAAARa2V5QWNjdW11bGF0ZWRGZWUAAAAAAgAAABIlc19fYWNjdW11bGF0ZWRGZWUBAAAAGWtleUFjY3VtdWxhdGVkUHJvdG9jb2xGZWUAAAAAAgAAABolc19fYWNjdW11bGF0ZWRQcm90b2NvbEZlZQEAAAAOa2V5VWNvbGxhdGVyYWwAAAAAAgAAAA8lc19fdWNvbGxhdGVyYWwBAAAAGWtleVRvdGFsTGVuZGVkQXRPdGhlckFjY3MAAAAAAgAAABolc19fdG90YWxMZW5kZWRBdE90aGVyQWNjcwEAAAATa2V5QXNzZXRMb2NrZWRUb3RhbAAAAAEAAAAHYXNzZXRJZAkAASwAAAACAgAAABglcyVzX19hc3NldExvY2tlZFRvdGFsX18FAAAAB2Fzc2V0SWQBAAAAE2tleUFjY291bnRPcGVyYXRpb24AAAADAAAADHVubG9ja0hlaWdodAAAAAdhZGRyZXNzAAAABnN0YXR1cwkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAHiVzJXMlZCVzX19kZWZv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", "chainId": 84, "height": 1483626, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EXL8Bh5c3wK339PzNFoBhpDMaq9Ywu3W2h42svmqCpXT Next: none Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func keyAccumulatedFee () = "%s__accumulatedFee" | |
5 | + | ||
6 | + | ||
7 | + | func keyAccumulatedProtocolFee () = "%s__accumulatedProtocolFee" | |
5 | 8 | ||
6 | 9 | ||
7 | 10 | func keyUcollateral () = "%s__ucollateral" | |
38 | 41 | ||
39 | 42 | let IdxOperationAssetOut = 5 | |
40 | 43 | ||
41 | - | func assetDataSwapOperation (amountIn,assetIn,price,amountOut,assetOut,bruttoAmount,feeAmount) = makeString(["%d%s%d%s%d%d%d", toString(amountIn), assetIn, toString(amountOut), assetOut, toString(price), toString(bruttoAmount), toString(feeAmount)], "__") | |
44 | + | func assetDataSwapOperation (amountIn,assetIn,price,amountOut,assetOut,bruttoAmount,feeAmount,protocolFeeAmount) = makeString(["%d%s%d%s%d%d%d%d", toString(amountIn), assetIn, toString(amountOut), assetOut, toString(price), toString(bruttoAmount), toString(feeAmount), toString(protocolFeeAmount)], "__") | |
42 | 45 | ||
43 | 46 | ||
44 | 47 | func assetDataRebalanceTrace (debtorAssetCode,debtPmt,basePmt,lendedAmtBefore,lendedAmtAfter) = makeString(["%s%s%d%s%d%d%d", debtorAssetCode, toBase58String(value(debtPmt.assetId)), toString(debtPmt.amount), toBase58String(value(basePmt.assetId)), toString(basePmt.amount), toString(lendedAmtBefore), toString(lendedAmtAfter)], "__") | |
55 | 58 | let nullStr = "NULL" | |
56 | 59 | ||
57 | 60 | let factoryAcc = addressFromStringValue(valueOrErrorMessage(getString(this, keyFactory()), ((("No config at this=" + toString(this)) + " for key=") + keyFactory()))) | |
61 | + | ||
62 | + | func keyFactoryNeutrinoContractAddressKey () = "%s%s__commonConfig__neutrinoContractAddress" | |
63 | + | ||
58 | 64 | ||
59 | 65 | func keyFactoryDebtAssetId () = "%s%s__commonConfig__debtAssetId" | |
60 | 66 | ||
143 | 149 | ||
144 | 150 | let IdxPoolStabilityFeePart = 21 | |
145 | 151 | ||
152 | + | let IdxProtocolFeePercent = 22 | |
153 | + | ||
146 | 154 | let thisCfgArray = factoryReadAssetCfgByAddress(toString(this)) | |
147 | 155 | ||
148 | 156 | let defoAssetCode = thisCfgArray[IdxDefoAssetCode] | |
185 | 193 | ||
186 | 194 | let poolStabilityFeePart = parseIntValue(thisCfgArray[IdxPoolStabilityFeePart]) | |
187 | 195 | ||
196 | + | let protocolFeePercent = parseIntValue(thisCfgArray[IdxProtocolFeePercent]) | |
197 | + | ||
188 | 198 | func keyIsBlocked () = "%s__isBlocked" | |
189 | 199 | ||
190 | 200 | ||
220 | 230 | ||
221 | 231 | let isBlockedByLastHeight = ((priceLastHeight - priceLastHeight) > 5) | |
222 | 232 | ||
233 | + | func keyFeesManagerAddressKey () = "fees_manager_address" | |
234 | + | ||
235 | + | ||
236 | + | let neutrinoMainAcc = addressFromStringValue(valueOrErrorMessage(getString(factoryAcc, keyFactoryNeutrinoContractAddressKey()), ((("No config at factory=" + toString(factoryAcc)) + " for key=") + keyFactoryNeutrinoContractAddressKey()))) | |
237 | + | ||
238 | + | let feeManagerAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(neutrinoMainAcc, keyFeesManagerAddressKey()), (keyFeesManagerAddressKey() + " is not specified"))), (keyFeesManagerAddressKey() + " invalid address format")) | |
239 | + | ||
223 | 240 | let keyDefoStakingAddress = "%s%s__commonConfig__defoStakingAddress" | |
224 | 241 | ||
225 | 242 | let keyNeutrinoStakingAddress = "%s%s__commonConfig__neutrinoStakingAddress" | |
243 | 260 | let ucollateral = valueOrElse(getInteger(this, keyUcollateral()), 0) | |
244 | 261 | ||
245 | 262 | let accumulatedFee = valueOrElse(getInteger(this, keyAccumulatedFee()), 0) | |
263 | + | ||
264 | + | let accumulatedProtocolFee = valueOrElse(getInteger(this, keyAccumulatedProtocolFee()), 0) | |
246 | 265 | ||
247 | 266 | let currPoolAmount = getIntegerValue(factoryAcc, keyFactoryAssetCurrentPool(this)) | |
248 | 267 | ||
268 | 287 | else buyFeePercent | |
269 | 288 | ||
270 | 289 | ||
290 | + | func getProtocolFeeConsideringStakingReferral (callerPub58Str) = if ((assetStakingReferralPublicStr == callerPub58Str)) | |
291 | + | then 0 | |
292 | + | else protocolFeePercent | |
293 | + | ||
294 | + | ||
271 | 295 | func getBuyPriceConsideringStakingReferral (changeCoeff,callerPub58Str) = if ((assetStakingReferralPublicStr == callerPub58Str)) | |
272 | 296 | then controlPrice | |
273 | 297 | else getBuyPrice(changeCoeff) | |
283 | 307 | else fraction((priceDecimals + changeCoeff), fromPrice, priceDecimals) | |
284 | 308 | ||
285 | 309 | ||
286 | - | func internalBuyAsset (sellerAddr,sellAmt,sellAssetId,minSellAmt,buy2sellPrice,poolMakersFeePart) = { | |
310 | + | func internalBuyAsset (sellerAddr,sellAmt,sellAssetId,minSellAmt,buy2sellPrice,poolMakersFeePart,protocolFeePart) = { | |
287 | 311 | let defoAssetAmountGross = fraction(sellAmt, buy2sellPrice, priceDecimals) | |
288 | 312 | let stabilityFeeDefoAmount = fraction(poolStabilityFeePart, defoAssetAmountGross, priceDecimals) | |
289 | 313 | let poolMakersFeeDefoAmount = fraction(poolMakersFeePart, defoAssetAmountGross, priceDecimals) | |
290 | - | let defoAssetAmount = ((defoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) | |
314 | + | let protocolFeeDefoAmount = fraction(protocolFeePart, defoAssetAmountGross, priceDecimals) | |
315 | + | let defoAssetAmount = (((defoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) - protocolFeeDefoAmount) | |
291 | 316 | let requiredBasicAssetAmount = fraction(defoAssetAmountGross, priceDecimals, buy2sellPrice) | |
292 | 317 | let change = (sellAmt - requiredBasicAssetAmount) | |
293 | 318 | if (if ((minSellAmt > sellAmt)) | |
294 | 319 | then (toString(sellerAddr) != toString(defoStakingAcc)) | |
295 | 320 | else false) | |
296 | 321 | then throw(((((("impossible to issue new " + defoAssetCode) + ": payment=") + toString(sellAmt)) + "is less then min amount=") + toString(minSellAmt))) | |
297 | - | else $Tuple2([IntegerEntry(keyUcollateral(), (ucollateral + requiredBasicAssetAmount)), StringEntry(keyAccountOperation(height, toString(sellerAddr), "FINISHED"), assetDataSwapOperation(sellAmt, toBase58String(sellAssetId), controlPrice, defoAssetAmount, toBase58String(defoAssetId), defoAssetAmountGross, poolMakersFeeDefoAmount)), Reissue(defoAssetId, (defoAssetAmount + poolMakersFeeDefoAmount), true), ScriptTransfer(sellerAddr, defoAssetAmount, defoAssetId), ScriptTransfer(sellerAddr, change, sellAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount))], change) | |
322 | + | else $Tuple2([IntegerEntry(keyUcollateral(), (ucollateral + requiredBasicAssetAmount)), StringEntry(keyAccountOperation(height, toString(sellerAddr), "FINISHED"), assetDataSwapOperation(sellAmt, toBase58String(sellAssetId), controlPrice, defoAssetAmount, toBase58String(defoAssetId), defoAssetAmountGross, poolMakersFeeDefoAmount, protocolFeeDefoAmount)), Reissue(defoAssetId, ((defoAssetAmount + poolMakersFeeDefoAmount) + protocolFeeDefoAmount), true), ScriptTransfer(sellerAddr, defoAssetAmount, defoAssetId), ScriptTransfer(sellerAddr, change, sellAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), ScriptTransfer(feeManagerAddress, protocolFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount)), IntegerEntry(keyAccumulatedProtocolFee(), (accumulatedProtocolFee + protocolFeeDefoAmount))], change) | |
298 | 323 | } | |
299 | 324 | ||
300 | 325 | ||
309 | 334 | then throw(((("last price finalization has been more then 5 blocks ago: priceLastHeight=" + toString(priceLastHeight)) + " currHeight=") + toString(height))) | |
310 | 335 | else if ((pmtAssetId != baseAssetId)) | |
311 | 336 | then throw(((("Payment asset id doesn't match basic asset: expected=" + toBase58String(baseAssetId)) + " actual=") + toBase58String(pmtAssetId))) | |
312 | - | else internalBuyAsset(i.caller, pmt.amount, pmtAssetId, minBasicBuyAmount, getBuyPriceConsideringStakingReferral(weekendsPriceChangeCoefficient, callerPub58Str), getBuyFeeConsideringStakingReferral(callerPub58Str))._1 | |
337 | + | else internalBuyAsset(i.caller, pmt.amount, pmtAssetId, minBasicBuyAmount, getBuyPriceConsideringStakingReferral(weekendsPriceChangeCoefficient, callerPub58Str), getBuyFeeConsideringStakingReferral(callerPub58Str), getProtocolFeeConsideringStakingReferral(callerPub58Str))._1 | |
313 | 338 | } | |
314 | 339 | ||
315 | 340 | ||
337 | 362 | let change = (pmt.amount - soldDefoAssetAmountGross) | |
338 | 363 | let stabilityFeeDefoAmount = fraction(poolStabilityFeePart, soldDefoAssetAmountGross, priceDecimals) | |
339 | 364 | let poolMakersFeeDefoAmount = fraction(sellFeePercent, soldDefoAssetAmountGross, priceDecimals) | |
340 | - | let soldDefoAssetAmount = ((soldDefoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) | |
365 | + | let protocolFeeDefoAmount = fraction(protocolFeePercent, soldDefoAssetAmountGross, priceDecimals) | |
366 | + | let soldDefoAssetAmount = (((soldDefoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) - protocolFeeDefoAmount) | |
341 | 367 | let baseAssetAmountToSend = fraction(soldDefoAssetAmount, priceDecimals, sellPrice) | |
342 | - | [IntegerEntry(keyUcollateral(), (ucollateral - baseAssetAmountToSend)), StringEntry(keyAccountOperation(height, callerAddress, "FINISHED"), assetDataSwapOperation(pmt.amount, toBase58String(pmtAsset), sellPrice, baseAssetAmountToSend, baseAssetIdStr, soldDefoAssetAmountGross, poolMakersFeeDefoAmount)), Burn(defoAssetId, (soldDefoAssetAmount + stabilityFeeDefoAmount)), ScriptTransfer(i.caller, baseAssetAmountToSend, baseAssetId), ScriptTransfer(i.caller, change, defoAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount))] | |
368 | + | [IntegerEntry(keyUcollateral(), (ucollateral - baseAssetAmountToSend)), StringEntry(keyAccountOperation(height, callerAddress, "FINISHED"), assetDataSwapOperation(pmt.amount, toBase58String(pmtAsset), sellPrice, baseAssetAmountToSend, baseAssetIdStr, soldDefoAssetAmountGross, poolMakersFeeDefoAmount, protocolFeeDefoAmount)), Burn(defoAssetId, (soldDefoAssetAmount + stabilityFeeDefoAmount)), ScriptTransfer(i.caller, baseAssetAmountToSend, baseAssetId), ScriptTransfer(i.caller, change, defoAssetId), ScriptTransfer(feeManagerAddress, protocolFeeDefoAmount, defoAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount)), IntegerEntry(keyAccumulatedProtocolFee(), (accumulatedProtocolFee + protocolFeeDefoAmount))] | |
343 | 369 | } | |
344 | 370 | } | |
345 | 371 | ||
383 | 409 | let lendedAmtByAssetCode = valueOrElse(getInteger(this, lendedAmountByAssetCodeKey), 0) | |
384 | 410 | let sellAssetSellFeePercent = parseIntValue(sellAssetCfg[IdxSellFeePercent]) | |
385 | 411 | let crossFeePercent = fraction((buyFeePercent + sellAssetSellFeePercent), crossExchangeCoefficient, priceDecimals) | |
386 | - | let buyAssetResult = internalBuyAsset(i.caller, pmtAmount, pmtAsset, minSellPmt, buy2sellPrice, crossFeePercent) | |
412 | + | let buyAssetResult = internalBuyAsset(i.caller, pmtAmount, pmtAsset, minSellPmt, buy2sellPrice, crossFeePercent, protocolFeePercent) | |
387 | 413 | ((((buyAssetResult._1 :+ ScriptTransfer(sellAssetAccAddress, usdnDebt, debtAssetId)) :+ ScriptTransfer(sellAssetAccAddress, (pmtAmount - buyAssetResult._2), pmtAsset)) :+ IntegerEntry(lendedAmountByAssetCodeKey, (lendedAmtByAssetCode + usdnDebt))) :+ IntegerEntry(keyTotalLendedAtOtherAccs(), (totalLendedAtOtherAccs + usdnDebt))) | |
388 | 414 | } | |
389 | 415 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func keyAccumulatedFee () = "%s__accumulatedFee" | |
5 | + | ||
6 | + | ||
7 | + | func keyAccumulatedProtocolFee () = "%s__accumulatedProtocolFee" | |
5 | 8 | ||
6 | 9 | ||
7 | 10 | func keyUcollateral () = "%s__ucollateral" | |
8 | 11 | ||
9 | 12 | ||
10 | 13 | func keyTotalLendedAtOtherAccs () = "%s__totalLendedAtOtherAccs" | |
11 | 14 | ||
12 | 15 | ||
13 | 16 | func keyAssetLockedTotal (assetId) = ("%s%s__assetLockedTotal__" + assetId) | |
14 | 17 | ||
15 | 18 | ||
16 | 19 | func keyAccountOperation (unlockHeight,address,status) = ((((("%s%s%d%s__defoAssetOperation__" + address) + "__") + toString(unlockHeight)) + "__") + status) | |
17 | 20 | ||
18 | 21 | ||
19 | 22 | func keyFactory () = "%s__factory" | |
20 | 23 | ||
21 | 24 | ||
22 | 25 | func keyLendedAmountByAssetCode (assetCode) = ("%s%s__lendedBaseAssetAmount__" + assetCode) | |
23 | 26 | ||
24 | 27 | ||
25 | 28 | func keyPrice (assetCode) = ("%s%s__price__" + assetCode) | |
26 | 29 | ||
27 | 30 | ||
28 | 31 | func keyControlLastHeight (assetCode) = ("%s%s__lastHeight__" + assetCode) | |
29 | 32 | ||
30 | 33 | ||
31 | 34 | let IdxOperationAmountIn = 1 | |
32 | 35 | ||
33 | 36 | let IdxOperationAssetIn = 2 | |
34 | 37 | ||
35 | 38 | let IdxOperationPrice = 3 | |
36 | 39 | ||
37 | 40 | let IdxOperationAmountOut = 4 | |
38 | 41 | ||
39 | 42 | let IdxOperationAssetOut = 5 | |
40 | 43 | ||
41 | - | func assetDataSwapOperation (amountIn,assetIn,price,amountOut,assetOut,bruttoAmount,feeAmount) = makeString(["%d%s%d%s%d%d%d", toString(amountIn), assetIn, toString(amountOut), assetOut, toString(price), toString(bruttoAmount), toString(feeAmount)], "__") | |
44 | + | func assetDataSwapOperation (amountIn,assetIn,price,amountOut,assetOut,bruttoAmount,feeAmount,protocolFeeAmount) = makeString(["%d%s%d%s%d%d%d%d", toString(amountIn), assetIn, toString(amountOut), assetOut, toString(price), toString(bruttoAmount), toString(feeAmount), toString(protocolFeeAmount)], "__") | |
42 | 45 | ||
43 | 46 | ||
44 | 47 | func assetDataRebalanceTrace (debtorAssetCode,debtPmt,basePmt,lendedAmtBefore,lendedAmtAfter) = makeString(["%s%s%d%s%d%d%d", debtorAssetCode, toBase58String(value(debtPmt.assetId)), toString(debtPmt.amount), toBase58String(value(basePmt.assetId)), toString(basePmt.amount), toString(lendedAmtBefore), toString(lendedAmtAfter)], "__") | |
45 | 48 | ||
46 | 49 | ||
47 | 50 | func assetReadSwapDataArrayOrFail (accOperationKey) = { | |
48 | 51 | let accOperationDataStr = valueOrErrorMessage(getString(this, accOperationKey), ("There is no request for passed arguments: " + accOperationKey)) | |
49 | 52 | split(accOperationDataStr, "__") | |
50 | 53 | } | |
51 | 54 | ||
52 | 55 | ||
53 | 56 | let nullInt = -1 | |
54 | 57 | ||
55 | 58 | let nullStr = "NULL" | |
56 | 59 | ||
57 | 60 | let factoryAcc = addressFromStringValue(valueOrErrorMessage(getString(this, keyFactory()), ((("No config at this=" + toString(this)) + " for key=") + keyFactory()))) | |
61 | + | ||
62 | + | func keyFactoryNeutrinoContractAddressKey () = "%s%s__commonConfig__neutrinoContractAddress" | |
63 | + | ||
58 | 64 | ||
59 | 65 | func keyFactoryDebtAssetId () = "%s%s__commonConfig__debtAssetId" | |
60 | 66 | ||
61 | 67 | ||
62 | 68 | func keyFactoryDebtAssetEtalonBalance () = "%s%s__commonConfig__debtAssetEtalonBalance" | |
63 | 69 | ||
64 | 70 | ||
65 | 71 | func keyFactoryAssetCfg (assetAddressStr) = (("%s%s%s__defoAsset__" + assetAddressStr) + "__config") | |
66 | 72 | ||
67 | 73 | ||
68 | 74 | func keyFactoryAssetCurrentPool (assetAccAddress) = (("%s%s%s__defoAsset__" + toString(assetAccAddress)) + "__currentPool") | |
69 | 75 | ||
70 | 76 | ||
71 | 77 | func keyFactoryDefoAddressByAssetCode (assetCode) = (("%s%s%s__defoAsset__" + assetCode) + "__addressByAssetCode") | |
72 | 78 | ||
73 | 79 | ||
74 | 80 | func keyFactoryAssetPoolMakers (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__poolMakers") | |
75 | 81 | ||
76 | 82 | ||
77 | 83 | func keyFactoryDefoStakingPacemakerPub () = "%s%s__commonConfig__defoStakingPacemakerPub" | |
78 | 84 | ||
79 | 85 | ||
80 | 86 | func keyFactoryPoolMakerLiquidityRequest (assetAddress,poolMakerAddress,h) = makeString(["%s%s%s%d%s__pool", assetAddress, poolMakerAddress, toString(h), "liquidityRequest"], "__") | |
81 | 87 | ||
82 | 88 | ||
83 | 89 | func keyFactoryPoolMakerUnlockHeight (assetAddress,poolMakerAddress) = makeString(["%s%s%s%s__pool", assetAddress, poolMakerAddress, "unlockHeight"], "__") | |
84 | 90 | ||
85 | 91 | ||
86 | 92 | func factoryReadDebtAssetId () = valueOrErrorMessage(getString(factoryAcc, keyFactoryDebtAssetId()), ((("No config at factory=" + toString(factoryAcc)) + " for key=") + keyFactoryDebtAssetId())) | |
87 | 93 | ||
88 | 94 | ||
89 | 95 | func factoryReadAssetCfgByAddress (assetAddressStr) = split(valueOrErrorMessage(getString(factoryAcc, keyFactoryAssetCfg(assetAddressStr)), ((("No config at factory=" + toString(factoryAcc)) + " for key=") + keyFactoryAssetCfg(assetAddressStr))), "__") | |
90 | 96 | ||
91 | 97 | ||
92 | 98 | func factoryReadAssetCfgByCode (assetCode) = { | |
93 | 99 | let assetAddressStr = valueOrErrorMessage(getString(factoryAcc, keyFactoryDefoAddressByAssetCode(assetCode)), ((("No config at factory=" + toString(factoryAcc)) + " for key=") + keyFactoryDefoAddressByAssetCode(assetCode))) | |
94 | 100 | $Tuple2(assetAddressStr, factoryReadAssetCfgByAddress(assetAddressStr)) | |
95 | 101 | } | |
96 | 102 | ||
97 | 103 | ||
98 | 104 | func factoryReadNextPoolMakerToDistributeFee (assetAddressStr) = addressFromStringValue("3MsbFMstwm3FHPJXmMfTgyaw7zQrpZfkwnx") | |
99 | 105 | ||
100 | 106 | ||
101 | 107 | func factoryReadDefoStakingPacemakerPub () = fromBase58String(valueOrErrorMessage(getString(factoryAcc, keyFactoryDefoStakingPacemakerPub()), ((("No config at factory=" + toString(factoryAcc)) + " for key=") + keyFactoryDefoStakingPacemakerPub()))) | |
102 | 108 | ||
103 | 109 | ||
104 | 110 | let IdxDefoAssetCode = 1 | |
105 | 111 | ||
106 | 112 | let IdxDefoAssetId = 2 | |
107 | 113 | ||
108 | 114 | let IdxDefoAssetStatus = 3 | |
109 | 115 | ||
110 | 116 | let IdxPriceDecimals = 4 | |
111 | 117 | ||
112 | 118 | let IdxBaseAssetId = 5 | |
113 | 119 | ||
114 | 120 | let IdxOverCollateralPercent = 6 | |
115 | 121 | ||
116 | 122 | let IdxMinInitPool = 7 | |
117 | 123 | ||
118 | 124 | let IdxPriceOracleAddress = 8 | |
119 | 125 | ||
120 | 126 | let IdxMinBuyPayment = 9 | |
121 | 127 | ||
122 | 128 | let IdxMinSellPayment = 10 | |
123 | 129 | ||
124 | 130 | let IdxBuyLockInterval = 11 | |
125 | 131 | ||
126 | 132 | let IdxSellLockInterval = 12 | |
127 | 133 | ||
128 | 134 | let IdxBuyFeePercent = 13 | |
129 | 135 | ||
130 | 136 | let IdxSellFeePercent = 14 | |
131 | 137 | ||
132 | 138 | let IdxPoolRedemptionTimeout = 15 | |
133 | 139 | ||
134 | 140 | let IdxWeekendsPriceChangeCoefficient = 16 | |
135 | 141 | ||
136 | 142 | let IdxAssetAccountPublicStr = 17 | |
137 | 143 | ||
138 | 144 | let IdxAssetStakingReferralPublicStr = 18 | |
139 | 145 | ||
140 | 146 | let IdxCrossExchangeCoefficient = 19 | |
141 | 147 | ||
142 | 148 | let IdxStakingMinAmtFromSellCoefficient = 20 | |
143 | 149 | ||
144 | 150 | let IdxPoolStabilityFeePart = 21 | |
145 | 151 | ||
152 | + | let IdxProtocolFeePercent = 22 | |
153 | + | ||
146 | 154 | let thisCfgArray = factoryReadAssetCfgByAddress(toString(this)) | |
147 | 155 | ||
148 | 156 | let defoAssetCode = thisCfgArray[IdxDefoAssetCode] | |
149 | 157 | ||
150 | 158 | let defoAssetIdStr = thisCfgArray[IdxDefoAssetId] | |
151 | 159 | ||
152 | 160 | let defoAssetId = fromBase58String(defoAssetIdStr) | |
153 | 161 | ||
154 | 162 | let priceOracleAcc = addressFromStringValue(thisCfgArray[IdxPriceOracleAddress]) | |
155 | 163 | ||
156 | 164 | let overCollateralPercent = parseIntValue(thisCfgArray[IdxOverCollateralPercent]) | |
157 | 165 | ||
158 | 166 | let baseAssetIdStr = thisCfgArray[IdxBaseAssetId] | |
159 | 167 | ||
160 | 168 | let baseAssetId = fromBase58String(baseAssetIdStr) | |
161 | 169 | ||
162 | 170 | let priceDecimals = parseIntValue(thisCfgArray[IdxPriceDecimals]) | |
163 | 171 | ||
164 | 172 | let minBasicBuyAmount = parseIntValue(thisCfgArray[IdxMinBuyPayment]) | |
165 | 173 | ||
166 | 174 | let minSynthSellAmount = parseIntValue(thisCfgArray[IdxMinSellPayment]) | |
167 | 175 | ||
168 | 176 | let buyLockInterval = parseIntValue(thisCfgArray[IdxBuyLockInterval]) | |
169 | 177 | ||
170 | 178 | let sellLockInterval = parseIntValue(thisCfgArray[IdxSellLockInterval]) | |
171 | 179 | ||
172 | 180 | let buyFeePercent = parseIntValue(thisCfgArray[IdxBuyFeePercent]) | |
173 | 181 | ||
174 | 182 | let sellFeePercent = parseIntValue(thisCfgArray[IdxSellFeePercent]) | |
175 | 183 | ||
176 | 184 | let weekendsPriceChangeCoefficient = parseIntValue(thisCfgArray[IdxWeekendsPriceChangeCoefficient]) | |
177 | 185 | ||
178 | 186 | let assetAccountPublicStr = thisCfgArray[IdxAssetAccountPublicStr] | |
179 | 187 | ||
180 | 188 | let assetStakingReferralPublicStr = thisCfgArray[IdxAssetStakingReferralPublicStr] | |
181 | 189 | ||
182 | 190 | let crossExchangeCoefficient = parseIntValue(thisCfgArray[IdxCrossExchangeCoefficient]) | |
183 | 191 | ||
184 | 192 | let stakingMinAmtFromSellCoefficient = parseIntValue(thisCfgArray[IdxStakingMinAmtFromSellCoefficient]) | |
185 | 193 | ||
186 | 194 | let poolStabilityFeePart = parseIntValue(thisCfgArray[IdxPoolStabilityFeePart]) | |
187 | 195 | ||
196 | + | let protocolFeePercent = parseIntValue(thisCfgArray[IdxProtocolFeePercent]) | |
197 | + | ||
188 | 198 | func keyIsBlocked () = "%s__isBlocked" | |
189 | 199 | ||
190 | 200 | ||
191 | 201 | func keyIsMarketOpened (assetCode) = ("%s%s__isMarketOpened__" + assetCode) | |
192 | 202 | ||
193 | 203 | ||
194 | 204 | let isBlocked = valueOrElse(getBoolean(priceOracleAcc, keyIsBlocked()), false) | |
195 | 205 | ||
196 | 206 | let isMarketOpened = valueOrElse(getBoolean(priceOracleAcc, keyIsMarketOpened(defoAssetCode)), false) | |
197 | 207 | ||
198 | 208 | func controlAccReadPrice (assetCode) = valueOrErrorMessage(getInteger(priceOracleAcc, keyPrice(assetCode)), ((("No price at priceOracle=" + toString(priceOracleAcc)) + " for key=") + keyPrice(assetCode))) | |
199 | 209 | ||
200 | 210 | ||
201 | 211 | func controlAccReadLastHeight (assetCode) = valueOrErrorMessage(getInteger(priceOracleAcc, keyControlLastHeight(assetCode)), ((("No lastHeight at priceOracle=" + toString(priceOracleAcc)) + " for key=") + keyControlLastHeight(assetCode))) | |
202 | 212 | ||
203 | 213 | ||
204 | 214 | func controlAccReadCurrIdxOrFail () = valueOrErrorMessage(getInteger(priceOracleAcc, "currIdx"), ("No currIdx at controlAcc=" + toString(priceOracleAcc))) | |
205 | 215 | ||
206 | 216 | ||
207 | 217 | func controlAccReadIdxHeight (idx) = { | |
208 | 218 | let idxHeightKey = ("idxHeight_" + toString(idx)) | |
209 | 219 | valueOrElse(getInteger(priceOracleAcc, idxHeightKey), 0) | |
210 | 220 | } | |
211 | 221 | ||
212 | 222 | ||
213 | 223 | func controlAccReadPriceByHeight (priceHeight) = { | |
214 | 224 | let priceByHeightKey = ("price_" + toString(priceHeight)) | |
215 | 225 | valueOrErrorMessage(getInteger(priceOracleAcc, priceByHeightKey), ((("No " + priceByHeightKey) + " at controlAcc=") + toString(priceOracleAcc))) | |
216 | 226 | } | |
217 | 227 | ||
218 | 228 | ||
219 | 229 | let priceLastHeight = controlAccReadLastHeight(defoAssetCode) | |
220 | 230 | ||
221 | 231 | let isBlockedByLastHeight = ((priceLastHeight - priceLastHeight) > 5) | |
222 | 232 | ||
233 | + | func keyFeesManagerAddressKey () = "fees_manager_address" | |
234 | + | ||
235 | + | ||
236 | + | let neutrinoMainAcc = addressFromStringValue(valueOrErrorMessage(getString(factoryAcc, keyFactoryNeutrinoContractAddressKey()), ((("No config at factory=" + toString(factoryAcc)) + " for key=") + keyFactoryNeutrinoContractAddressKey()))) | |
237 | + | ||
238 | + | let feeManagerAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(neutrinoMainAcc, keyFeesManagerAddressKey()), (keyFeesManagerAddressKey() + " is not specified"))), (keyFeesManagerAddressKey() + " invalid address format")) | |
239 | + | ||
223 | 240 | let keyDefoStakingAddress = "%s%s__commonConfig__defoStakingAddress" | |
224 | 241 | ||
225 | 242 | let keyNeutrinoStakingAddress = "%s%s__commonConfig__neutrinoStakingAddress" | |
226 | 243 | ||
227 | 244 | func keyDefoStakingAssetBalance (assetId) = ("%s%s__stakingBalance__" + assetId) | |
228 | 245 | ||
229 | 246 | ||
230 | 247 | func keyNeutrinoStakingBalance () = ((("rpd_balance_" + baseAssetIdStr) + "_") + toString(this)) | |
231 | 248 | ||
232 | 249 | ||
233 | 250 | let defoStakingAcc = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(factoryAcc, keyDefoStakingAddress), ((("No config at factoryAcc" + toString(factoryAcc)) + " for key=") + keyDefoStakingAddress))), ("address extraction error for key=" + keyDefoStakingAddress)) | |
234 | 251 | ||
235 | 252 | let neutrinoStakingAcc = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(factoryAcc, keyNeutrinoStakingAddress), ((("No config at factoryAcc" + toString(factoryAcc)) + " for key=") + keyNeutrinoStakingAddress))), ("address extraction error for key=" + keyNeutrinoStakingAddress)) | |
236 | 253 | ||
237 | 254 | func getThisDefoStakingBalance () = valueOrElse(getInteger(defoStakingAcc, keyDefoStakingAssetBalance(defoAssetIdStr)), 0) | |
238 | 255 | ||
239 | 256 | ||
240 | 257 | func getThisNeutrinoStakingBalance () = valueOrElse(getInteger(neutrinoStakingAcc, keyNeutrinoStakingBalance()), 0) | |
241 | 258 | ||
242 | 259 | ||
243 | 260 | let ucollateral = valueOrElse(getInteger(this, keyUcollateral()), 0) | |
244 | 261 | ||
245 | 262 | let accumulatedFee = valueOrElse(getInteger(this, keyAccumulatedFee()), 0) | |
263 | + | ||
264 | + | let accumulatedProtocolFee = valueOrElse(getInteger(this, keyAccumulatedProtocolFee()), 0) | |
246 | 265 | ||
247 | 266 | let currPoolAmount = getIntegerValue(factoryAcc, keyFactoryAssetCurrentPool(this)) | |
248 | 267 | ||
249 | 268 | let debtAssetId = fromBase58String(factoryReadDebtAssetId()) | |
250 | 269 | ||
251 | 270 | let debtAssetEtalonBalance = getIntegerValue(factoryAcc, keyFactoryDebtAssetEtalonBalance()) | |
252 | 271 | ||
253 | 272 | let lendedOrDebtAmount = (debtAssetEtalonBalance - assetBalance(this, debtAssetId)) | |
254 | 273 | ||
255 | 274 | let currentBaseAssetBalance = ((assetBalance(this, baseAssetId) + getThisNeutrinoStakingBalance()) + lendedOrDebtAmount) | |
256 | 275 | ||
257 | 276 | let controlPrice = controlAccReadPrice(thisCfgArray[IdxDefoAssetCode]) | |
258 | 277 | ||
259 | 278 | let emission = (value(assetInfo(defoAssetId)).quantity - assetBalance(this, defoAssetId)) | |
260 | 279 | ||
261 | 280 | func getBuyPrice (changeCoeff) = if (isMarketOpened) | |
262 | 281 | then controlPrice | |
263 | 282 | else fraction((priceDecimals - changeCoeff), controlPrice, priceDecimals) | |
264 | 283 | ||
265 | 284 | ||
266 | 285 | func getBuyFeeConsideringStakingReferral (callerPub58Str) = if ((assetStakingReferralPublicStr == callerPub58Str)) | |
267 | 286 | then 0 | |
268 | 287 | else buyFeePercent | |
269 | 288 | ||
270 | 289 | ||
290 | + | func getProtocolFeeConsideringStakingReferral (callerPub58Str) = if ((assetStakingReferralPublicStr == callerPub58Str)) | |
291 | + | then 0 | |
292 | + | else protocolFeePercent | |
293 | + | ||
294 | + | ||
271 | 295 | func getBuyPriceConsideringStakingReferral (changeCoeff,callerPub58Str) = if ((assetStakingReferralPublicStr == callerPub58Str)) | |
272 | 296 | then controlPrice | |
273 | 297 | else getBuyPrice(changeCoeff) | |
274 | 298 | ||
275 | 299 | ||
276 | 300 | func getSellPrice (changeCoeff) = if (isMarketOpened) | |
277 | 301 | then controlPrice | |
278 | 302 | else fraction((priceDecimals + changeCoeff), controlPrice, priceDecimals) | |
279 | 303 | ||
280 | 304 | ||
281 | 305 | func getSellPriceFrom (fromPrice,changeCoeff) = if (isMarketOpened) | |
282 | 306 | then fromPrice | |
283 | 307 | else fraction((priceDecimals + changeCoeff), fromPrice, priceDecimals) | |
284 | 308 | ||
285 | 309 | ||
286 | - | func internalBuyAsset (sellerAddr,sellAmt,sellAssetId,minSellAmt,buy2sellPrice,poolMakersFeePart) = { | |
310 | + | func internalBuyAsset (sellerAddr,sellAmt,sellAssetId,minSellAmt,buy2sellPrice,poolMakersFeePart,protocolFeePart) = { | |
287 | 311 | let defoAssetAmountGross = fraction(sellAmt, buy2sellPrice, priceDecimals) | |
288 | 312 | let stabilityFeeDefoAmount = fraction(poolStabilityFeePart, defoAssetAmountGross, priceDecimals) | |
289 | 313 | let poolMakersFeeDefoAmount = fraction(poolMakersFeePart, defoAssetAmountGross, priceDecimals) | |
290 | - | let defoAssetAmount = ((defoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) | |
314 | + | let protocolFeeDefoAmount = fraction(protocolFeePart, defoAssetAmountGross, priceDecimals) | |
315 | + | let defoAssetAmount = (((defoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) - protocolFeeDefoAmount) | |
291 | 316 | let requiredBasicAssetAmount = fraction(defoAssetAmountGross, priceDecimals, buy2sellPrice) | |
292 | 317 | let change = (sellAmt - requiredBasicAssetAmount) | |
293 | 318 | if (if ((minSellAmt > sellAmt)) | |
294 | 319 | then (toString(sellerAddr) != toString(defoStakingAcc)) | |
295 | 320 | else false) | |
296 | 321 | then throw(((((("impossible to issue new " + defoAssetCode) + ": payment=") + toString(sellAmt)) + "is less then min amount=") + toString(minSellAmt))) | |
297 | - | else $Tuple2([IntegerEntry(keyUcollateral(), (ucollateral + requiredBasicAssetAmount)), StringEntry(keyAccountOperation(height, toString(sellerAddr), "FINISHED"), assetDataSwapOperation(sellAmt, toBase58String(sellAssetId), controlPrice, defoAssetAmount, toBase58String(defoAssetId), defoAssetAmountGross, poolMakersFeeDefoAmount)), Reissue(defoAssetId, (defoAssetAmount + poolMakersFeeDefoAmount), true), ScriptTransfer(sellerAddr, defoAssetAmount, defoAssetId), ScriptTransfer(sellerAddr, change, sellAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount))], change) | |
322 | + | else $Tuple2([IntegerEntry(keyUcollateral(), (ucollateral + requiredBasicAssetAmount)), StringEntry(keyAccountOperation(height, toString(sellerAddr), "FINISHED"), assetDataSwapOperation(sellAmt, toBase58String(sellAssetId), controlPrice, defoAssetAmount, toBase58String(defoAssetId), defoAssetAmountGross, poolMakersFeeDefoAmount, protocolFeeDefoAmount)), Reissue(defoAssetId, ((defoAssetAmount + poolMakersFeeDefoAmount) + protocolFeeDefoAmount), true), ScriptTransfer(sellerAddr, defoAssetAmount, defoAssetId), ScriptTransfer(sellerAddr, change, sellAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), ScriptTransfer(feeManagerAddress, protocolFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount)), IntegerEntry(keyAccumulatedProtocolFee(), (accumulatedProtocolFee + protocolFeeDefoAmount))], change) | |
298 | 323 | } | |
299 | 324 | ||
300 | 325 | ||
301 | 326 | @Callable(i) | |
302 | 327 | func buyAsset () = { | |
303 | 328 | let pmt = value(i.payments[0]) | |
304 | 329 | let pmtAssetId = value(pmt.assetId) | |
305 | 330 | let callerPub58Str = toBase58String(i.callerPublicKey) | |
306 | 331 | if (isBlocked) | |
307 | 332 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
308 | 333 | else if (isBlockedByLastHeight) | |
309 | 334 | then throw(((("last price finalization has been more then 5 blocks ago: priceLastHeight=" + toString(priceLastHeight)) + " currHeight=") + toString(height))) | |
310 | 335 | else if ((pmtAssetId != baseAssetId)) | |
311 | 336 | then throw(((("Payment asset id doesn't match basic asset: expected=" + toBase58String(baseAssetId)) + " actual=") + toBase58String(pmtAssetId))) | |
312 | - | else internalBuyAsset(i.caller, pmt.amount, pmtAssetId, minBasicBuyAmount, getBuyPriceConsideringStakingReferral(weekendsPriceChangeCoefficient, callerPub58Str), getBuyFeeConsideringStakingReferral(callerPub58Str))._1 | |
337 | + | else internalBuyAsset(i.caller, pmt.amount, pmtAssetId, minBasicBuyAmount, getBuyPriceConsideringStakingReferral(weekendsPriceChangeCoefficient, callerPub58Str), getBuyFeeConsideringStakingReferral(callerPub58Str), getProtocolFeeConsideringStakingReferral(callerPub58Str))._1 | |
313 | 338 | } | |
314 | 339 | ||
315 | 340 | ||
316 | 341 | ||
317 | 342 | @Callable(i) | |
318 | 343 | func sellAsset () = { | |
319 | 344 | let pmt = value(i.payments[0]) | |
320 | 345 | let pmtAsset = value(pmt.assetId) | |
321 | 346 | let callerAddress = toString(i.caller) | |
322 | 347 | let sellPrice = getSellPrice(weekendsPriceChangeCoefficient) | |
323 | 348 | if (isBlocked) | |
324 | 349 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
325 | 350 | else if (isBlockedByLastHeight) | |
326 | 351 | then throw(((("last price finalization has been more then 5 blocks ago: priceLastHeight=" + toString(priceLastHeight)) + " currHeight=") + toString(height))) | |
327 | 352 | else if ((pmtAsset != defoAssetId)) | |
328 | 353 | then throw(((("Invalid payment asset id: expected=" + toBase58String(defoAssetId)) + " actual=") + toBase58String(pmtAsset))) | |
329 | 354 | else if ((minSynthSellAmount > pmt.amount)) | |
330 | 355 | then throw(((("Payment amount less then mininimal allowed: paymentAmount=" + toString(pmt.amount)) + " minAmount=") + toString(minSynthSellAmount))) | |
331 | 356 | else { | |
332 | 357 | let baseAssetAmountNoBalanceLimit = fraction(pmt.amount, priceDecimals, sellPrice) | |
333 | 358 | let baseAssetAmountAvailable = if ((baseAssetAmountNoBalanceLimit > currentBaseAssetBalance)) | |
334 | 359 | then currentBaseAssetBalance | |
335 | 360 | else baseAssetAmountNoBalanceLimit | |
336 | 361 | let soldDefoAssetAmountGross = fraction(baseAssetAmountAvailable, sellPrice, priceDecimals) | |
337 | 362 | let change = (pmt.amount - soldDefoAssetAmountGross) | |
338 | 363 | let stabilityFeeDefoAmount = fraction(poolStabilityFeePart, soldDefoAssetAmountGross, priceDecimals) | |
339 | 364 | let poolMakersFeeDefoAmount = fraction(sellFeePercent, soldDefoAssetAmountGross, priceDecimals) | |
340 | - | let soldDefoAssetAmount = ((soldDefoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) | |
365 | + | let protocolFeeDefoAmount = fraction(protocolFeePercent, soldDefoAssetAmountGross, priceDecimals) | |
366 | + | let soldDefoAssetAmount = (((soldDefoAssetAmountGross - stabilityFeeDefoAmount) - poolMakersFeeDefoAmount) - protocolFeeDefoAmount) | |
341 | 367 | let baseAssetAmountToSend = fraction(soldDefoAssetAmount, priceDecimals, sellPrice) | |
342 | - | [IntegerEntry(keyUcollateral(), (ucollateral - baseAssetAmountToSend)), StringEntry(keyAccountOperation(height, callerAddress, "FINISHED"), assetDataSwapOperation(pmt.amount, toBase58String(pmtAsset), sellPrice, baseAssetAmountToSend, baseAssetIdStr, soldDefoAssetAmountGross, poolMakersFeeDefoAmount)), Burn(defoAssetId, (soldDefoAssetAmount + stabilityFeeDefoAmount)), ScriptTransfer(i.caller, baseAssetAmountToSend, baseAssetId), ScriptTransfer(i.caller, change, defoAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount))] | |
368 | + | [IntegerEntry(keyUcollateral(), (ucollateral - baseAssetAmountToSend)), StringEntry(keyAccountOperation(height, callerAddress, "FINISHED"), assetDataSwapOperation(pmt.amount, toBase58String(pmtAsset), sellPrice, baseAssetAmountToSend, baseAssetIdStr, soldDefoAssetAmountGross, poolMakersFeeDefoAmount, protocolFeeDefoAmount)), Burn(defoAssetId, (soldDefoAssetAmount + stabilityFeeDefoAmount)), ScriptTransfer(i.caller, baseAssetAmountToSend, baseAssetId), ScriptTransfer(i.caller, change, defoAssetId), ScriptTransfer(feeManagerAddress, protocolFeeDefoAmount, defoAssetId), ScriptTransfer(factoryReadNextPoolMakerToDistributeFee(toString(this)), poolMakersFeeDefoAmount, defoAssetId), IntegerEntry(keyAccumulatedFee(), (accumulatedFee + poolMakersFeeDefoAmount)), IntegerEntry(keyAccumulatedProtocolFee(), (accumulatedProtocolFee + protocolFeeDefoAmount))] | |
343 | 369 | } | |
344 | 370 | } | |
345 | 371 | ||
346 | 372 | ||
347 | 373 | ||
348 | 374 | @Callable(i) | |
349 | 375 | func crossExchange (buyAssetCodeConfirm,sellAssetCodeConfirm) = { | |
350 | 376 | let pmt = value(i.payments[0]) | |
351 | 377 | let pmtAsset = value(pmt.assetId) | |
352 | 378 | let pmtAssetStr = toBase58String(pmtAsset) | |
353 | 379 | let pmtAmount = pmt.amount | |
354 | 380 | let callerAddress = toString(i.caller) | |
355 | 381 | let buyAssetCfg = thisCfgArray | |
356 | 382 | let sellAssetTuple = factoryReadAssetCfgByCode(sellAssetCodeConfirm) | |
357 | 383 | let sellAssetCfg = sellAssetTuple._2 | |
358 | 384 | let sellAssetAccAddress = valueOrErrorMessage(addressFromString(sellAssetTuple._1), ("couldn't parse address from string for assetCode=" + sellAssetCodeConfirm)) | |
359 | 385 | let minSellPmt = valueOrErrorMessage(parseInt(sellAssetCfg[IdxMinSellPayment]), ("minSellPmt parsing error: rawVal=" + sellAssetCfg[IdxMinSellPayment])) | |
360 | 386 | let sellPriceLastHeight = controlAccReadLastHeight(sellAssetCodeConfirm) | |
361 | 387 | let isSellBlockedByLastHeight = ((sellPriceLastHeight - sellPriceLastHeight) > 5) | |
362 | 388 | if (isBlocked) | |
363 | 389 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
364 | 390 | else if ((thisCfgArray[IdxDefoAssetCode] != buyAssetCodeConfirm)) | |
365 | 391 | then throw(((("buyAsset confirmation failed: buyAssetIdConfirm=" + thisCfgArray[IdxDefoAssetCode]) + " BUT buyAssetId=") + buyAssetCodeConfirm)) | |
366 | 392 | else if ((sellAssetCfg[IdxDefoAssetId] != pmtAssetStr)) | |
367 | 393 | then throw(((("sellAsset confirmation failed: sellAssetIdConfirm=" + sellAssetCfg[IdxDefoAssetId]) + "BUT pmtAsset=") + pmtAssetStr)) | |
368 | 394 | else if ((thisCfgArray[IdxDefoAssetStatus] != "ISSUED")) | |
369 | 395 | then throw(((("toAsset has not been issued yet: buyAssetId=" + buyAssetCodeConfirm) + " BUT status=") + thisCfgArray[IdxDefoAssetStatus])) | |
370 | 396 | else if ((sellAssetCfg[IdxDefoAssetStatus] != "ISSUED")) | |
371 | 397 | then throw(((("fromAssetCfg has not been issued yet: sellAssetId=" + pmtAssetStr) + " BUT status=") + sellAssetCfg[IdxDefoAssetStatus])) | |
372 | 398 | else if (isBlockedByLastHeight) | |
373 | 399 | then throw(((((("buy last price finalization has been more then 5 blocks ago: priceLastHeight=" + toString(priceLastHeight)) + " currHeight=") + toString(height)) + " buyCode=") + buyAssetCodeConfirm)) | |
374 | 400 | else if (isSellBlockedByLastHeight) | |
375 | 401 | then throw(((((("sell last price finalization has been more then 5 blocks ago: priceLastHeight=" + toString(priceLastHeight)) + " currHeight=") + toString(height)) + " sellCode=") + sellAssetCodeConfirm)) | |
376 | 402 | else { | |
377 | 403 | let buyAssetUsdPrice = getBuyPrice((weekendsPriceChangeCoefficient / 2)) | |
378 | 404 | let sellAssetUsdPrice = getSellPriceFrom(controlAccReadPrice(sellAssetCodeConfirm), (weekendsPriceChangeCoefficient / 2)) | |
379 | 405 | let buy2sellPrice = fraction(buyAssetUsdPrice, priceDecimals, sellAssetUsdPrice) | |
380 | 406 | let usdnDebt = fraction(pmtAmount, priceDecimals, sellAssetUsdPrice) | |
381 | 407 | let totalLendedAtOtherAccs = valueOrElse(getInteger(this, keyTotalLendedAtOtherAccs()), 0) | |
382 | 408 | let lendedAmountByAssetCodeKey = keyLendedAmountByAssetCode(sellAssetCodeConfirm) | |
383 | 409 | let lendedAmtByAssetCode = valueOrElse(getInteger(this, lendedAmountByAssetCodeKey), 0) | |
384 | 410 | let sellAssetSellFeePercent = parseIntValue(sellAssetCfg[IdxSellFeePercent]) | |
385 | 411 | let crossFeePercent = fraction((buyFeePercent + sellAssetSellFeePercent), crossExchangeCoefficient, priceDecimals) | |
386 | - | let buyAssetResult = internalBuyAsset(i.caller, pmtAmount, pmtAsset, minSellPmt, buy2sellPrice, crossFeePercent) | |
412 | + | let buyAssetResult = internalBuyAsset(i.caller, pmtAmount, pmtAsset, minSellPmt, buy2sellPrice, crossFeePercent, protocolFeePercent) | |
387 | 413 | ((((buyAssetResult._1 :+ ScriptTransfer(sellAssetAccAddress, usdnDebt, debtAssetId)) :+ ScriptTransfer(sellAssetAccAddress, (pmtAmount - buyAssetResult._2), pmtAsset)) :+ IntegerEntry(lendedAmountByAssetCodeKey, (lendedAmtByAssetCode + usdnDebt))) :+ IntegerEntry(keyTotalLendedAtOtherAccs(), (totalLendedAtOtherAccs + usdnDebt))) | |
388 | 414 | } | |
389 | 415 | } | |
390 | 416 | ||
391 | 417 | ||
392 | 418 | ||
393 | 419 | @Callable(i) | |
394 | 420 | func rebalanceDebts () = { | |
395 | 421 | let debtPmt0 = value(i.payments[0]) | |
396 | 422 | let debtPmtAsset0 = value(debtPmt0.assetId) | |
397 | 423 | let basePmt1 = value(i.payments[1]) | |
398 | 424 | let basePmtAsset1 = value(basePmt1.assetId) | |
399 | 425 | let debtorAddress = toString(i.caller) | |
400 | 426 | let debtorAssetCfg = factoryReadAssetCfgByAddress(debtorAddress) | |
401 | 427 | let debtorAssetCode = debtorAssetCfg[IdxDefoAssetCode] | |
402 | 428 | let lendedAmountByAssetCodeKey = keyLendedAmountByAssetCode(debtorAssetCode) | |
403 | 429 | let lendedAmt = valueOrErrorMessage(getInteger(this, lendedAmountByAssetCodeKey), ("No debts for " + debtorAssetCode)) | |
404 | 430 | if (isBlocked) | |
405 | 431 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
406 | 432 | else if ((debtAssetId != debtPmtAsset0)) | |
407 | 433 | then throw(((("invalid debt asset id in the first paymet: expected=" + toBase58String(debtAssetId)) + " actual=") + toBase58String(debtPmtAsset0))) | |
408 | 434 | else if ((baseAssetId != basePmtAsset1)) | |
409 | 435 | then throw(((("invalid base asset id in the second payment: expected=" + toBase58String(baseAssetId)) + " actual=") + toBase58String(basePmtAsset1))) | |
410 | 436 | else if ((debtPmt0.amount != basePmt1.amount)) | |
411 | 437 | then throw("first payment amount doesn't match to the second payment amount") | |
412 | 438 | else if ((0 >= lendedAmt)) | |
413 | 439 | then throw(("lendedAmt is less then zero: lendedAmt=" + toString(lendedAmt))) | |
414 | 440 | else if (((1 * priceDecimals) >= debtPmt0.amount)) | |
415 | 441 | then throw(("attached payment must be greater then 100: pmt0.amount=" + toString(debtPmt0.amount))) | |
416 | 442 | else if ((debtPmt0.amount > lendedAmt)) | |
417 | 443 | then throw(((("attached payment is grater than required: pmtAmount=" + toString(debtPmt0.amount)) + " lendedAmt=") + toString(lendedAmt))) | |
418 | 444 | else { | |
419 | 445 | let totalLendedAtOtherAccs = valueOrElse(getInteger(this, keyTotalLendedAtOtherAccs()), 0) | |
420 | 446 | let lendedAmtAfter = (lendedAmt - debtPmt0.amount) | |
421 | 447 | [IntegerEntry(lendedAmountByAssetCodeKey, lendedAmtAfter), IntegerEntry(keyTotalLendedAtOtherAccs(), (totalLendedAtOtherAccs - debtPmt0.amount)), StringEntry(("%s%s__rebalanceTrace__" + toBase58String(i.transactionId)), assetDataRebalanceTrace(debtorAssetCode, debtPmt0, basePmt1, lendedAmt, lendedAmtAfter))] | |
422 | 448 | } | |
423 | 449 | } | |
424 | 450 | ||
425 | 451 | ||
426 | 452 | ||
427 | 453 | @Callable(i) | |
428 | 454 | func fulfillRedeemRequest (poolMakerAddress) = { | |
429 | 455 | let thisAddressStr = toString(this) | |
430 | 456 | let poolMakerUnlockHeightKey = keyFactoryPoolMakerUnlockHeight(thisAddressStr, poolMakerAddress) | |
431 | 457 | let poolMakerUnlockHeight = valueOrElse(getInteger(factoryAcc, poolMakerUnlockHeightKey), 0) | |
432 | 458 | if ((0 >= poolMakerUnlockHeight)) | |
433 | 459 | then throw("All liquidity request fulfilled") | |
434 | 460 | else { | |
435 | 461 | let poolMakerLiquidityRequestKey = keyFactoryPoolMakerLiquidityRequest(thisAddressStr, poolMakerAddress, poolMakerUnlockHeight) | |
436 | 462 | let poolMakerLiquidityRequestAmount = valueOrErrorMessage(getInteger(factoryAcc, poolMakerLiquidityRequestKey), "Empty poolMakerLiquidityRequestKey at factory acc") | |
437 | 463 | if (isDefined(getInteger(this, poolMakerLiquidityRequestKey))) | |
438 | 464 | then throw("Liquidity request has been already fulfilled") | |
439 | 465 | else [IntegerEntry(poolMakerLiquidityRequestKey, poolMakerLiquidityRequestAmount), ScriptTransfer(factoryAcc, poolMakerLiquidityRequestAmount, baseAssetId)] | |
440 | 466 | } | |
441 | 467 | } | |
442 | 468 | ||
443 | 469 | ||
444 | 470 | @Verifier(tx) | |
445 | 471 | func verify () = match tx { | |
446 | 472 | case inv: InvokeScriptTransaction => | |
447 | 473 | if ((inv.fee > (900 * 1000))) | |
448 | 474 | then throw(("fee amount is greater than max allowed: " + toString(inv.fee))) | |
449 | 475 | else if (isDefined(inv.feeAssetId)) | |
450 | 476 | then throw("only Waves is allowed as feeAssetId") | |
451 | 477 | else if ((inv.function == "rebalanceDebts")) | |
452 | 478 | then { | |
453 | 479 | let invDappAddress = toString(addressFromRecipient(inv.dApp)) | |
454 | 480 | if ((factoryReadAssetCfgByAddress(invDappAddress)[IdxDefoAssetStatus] != "ISSUED")) | |
455 | 481 | then throw("only defo dapp is allowed") | |
456 | 482 | else if ((invDappAddress == toString(this))) | |
457 | 483 | then throw("impossible to call self rebealnceDebt") | |
458 | 484 | else true | |
459 | 485 | } | |
460 | 486 | else if (if (if ((inv.function == "lockNeutrino")) | |
461 | 487 | then true | |
462 | 488 | else (inv.function == "lockNeutrinoSP")) | |
463 | 489 | then true | |
464 | 490 | else (inv.function == "unlockNeutrino")) | |
465 | 491 | then if ((toString(neutrinoStakingAcc) != toString(addressFromRecipient(inv.dApp)))) | |
466 | 492 | then throw("invalid neutrino staking dapp address") | |
467 | 493 | else sigVerify(tx.bodyBytes, tx.proofs[0], factoryReadDefoStakingPacemakerPub()) | |
468 | 494 | else throw("Not allowed invocation method calls") | |
469 | 495 | case _ => | |
470 | 496 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
471 | 497 | } | |
472 | 498 |
github/deemru/w8io/169f3d6 91.52 ms ◑