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