tx · BXmzQLJEoX1U8VPzWWnYf71S7ofsbwVvC63LH5wfuG7u 3N3UHNYQ8xwe2WWLKgXX628JyUtF6kYK4wS: -0.01400000 Waves 2020.11.03 13:20 [1248989] smart account 3N3UHNYQ8xwe2WWLKgXX628JyUtF6kYK4wS > SELF 0.00000000 Waves
{ "type": 13, "id": "BXmzQLJEoX1U8VPzWWnYf71S7ofsbwVvC63LH5wfuG7u", "fee": 1400000, "feeAssetId": null, "timestamp": 1604398848416, "version": 1, "sender": "3N3UHNYQ8xwe2WWLKgXX628JyUtF6kYK4wS", "senderPublicKey": "Hxyif8HnnHh34SZ7PZewDcNUgrZfHNJsQvLNCcPbCW27", "proofs": [ "5SfFNXPkvKGjL9Jyzx3Z5GWugtzKjYuCZGTYBAMP5Tm8aoDr6Vu6zyc8mG8ASyr2ohW5SXg1V1ffMNqg9YB6Q8Ry" ], "script": "base64:AAIEAAAAAAAAAD0IAhIKCggICAEIAQEICBIRCg8ICAEIAQgBAQEBAQEBAQESAwoBCBIDCgEIEgQKAggBEgQKAggIEgQKAggIAAAAaQEAAAAWY29udmVydEpzb25BcnJheVRvTGlzdAAAAAIAAAAJanNvbkFycmF5AAAAC3NwbGl0U3ltYm9sCQAEtQAAAAIFAAAACWpzb25BcnJheQUAAAALc3BsaXRTeW1ib2wBAAAAGGdldFN0cmluZ0J5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQcAAAAAA1NFUAIAAAACX18AAAAADGtleUFzc2V0Q29kZQAAAAAAAAAAAQAAAAAKa2V5QXNzZXRJZAAAAAAAAAAAAgAAAAAOa2V5QXNzZXRTdGF0dXMAAAAAAAAAAAMAAAAAF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YWxMb2NrZWQFAAAAGXJlZ2lzdGVyZWRBbW91bnQ0V2l0aGRyYXcJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAGHBvb2xNYWtlclVubG9ja0hlaWdodEtleQAAAAAAAAAAAAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAABBwb29sTWFrZXJBZGRyZXNzBQAAABlyZWdpc3RlcmVkQW1vdW50NFdpdGhkcmF3BQAAAA9uZXV0cmlub0Fzc2V0SWQFAAAAA25pbAAAAAAookL3", "chainId": 84, "height": 1248989, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DTGk32BBivkGKQFqVUq6XgxmZeQdfNtG6Bp3RviDtDzo Next: 7vKjHAJwjLZqV8nCqm1nxqjLTUqeMDfMnFTMViWq9Z8H Diff:
Old | New | Differences | |
---|---|---|---|
474 | 474 | ||
475 | 475 | ||
476 | 476 | @Callable(i) | |
477 | - | func withdraw (assetCode) = { | |
478 | - | let callerAddress = toString(i.caller) | |
477 | + | func withdraw (assetCode,poolMakerAddress) = { | |
479 | 478 | let assetAddressStr = getAssetAddressByCodeOrFail(assetCode) | |
480 | 479 | let assetAddress = addressFromStringValue(assetAddressStr) | |
481 | - | let poolMakerLockedAmountKey = getPoolMakerLockedAmountKey(assetAddressStr, | |
480 | + | let poolMakerLockedAmountKey = getPoolMakerLockedAmountKey(assetAddressStr, poolMakerAddress) | |
482 | 481 | let registeredAmount4Withdraw = valueOrElse(getInteger(this, poolMakerLockedAmountKey), 0) | |
483 | - | let poolMakerUnlockHeightKey = getPoolMakerUnlockHeightKey(assetAddressStr, | |
482 | + | let poolMakerUnlockHeightKey = getPoolMakerUnlockHeightKey(assetAddressStr, poolMakerAddress) | |
484 | 483 | let withdrawHeight = valueOrElse(getInteger(this, poolMakerUnlockHeightKey), 0) | |
485 | 484 | let poolTotalLockedAmountKey = getPoolTotalLockedAmountKey(assetAddressStr) | |
486 | 485 | let poolTotalLocked = valueOrElse(getInteger(this, poolTotalLockedAmountKey), 0) | |
487 | - | let poolMakerLiquidityRequestKey = getPoolMakerLiquidityRequestKey(assetAddressStr, | |
486 | + | let poolMakerLiquidityRequestKey = getPoolMakerLiquidityRequestKey(assetAddressStr, poolMakerAddress, withdrawHeight) | |
488 | 487 | if ((getBoolByKey(isInitializedKey) == false)) | |
489 | 488 | then throw("Contract is not yet ready.") | |
490 | 489 | else if (!(isDefined(getInteger(assetAddress, poolMakerLiquidityRequestKey)))) | |
491 | 490 | then throw("Need to transfer liquidity from asset account first") | |
492 | 491 | else if ((0 >= registeredAmount4Withdraw)) | |
493 | - | then throw((("Cannot find pool maker by address " + | |
492 | + | then throw((("Cannot find pool maker by address " + poolMakerAddress) + " or no locked amount.")) | |
494 | 493 | else if ((height > withdrawHeight)) | |
495 | 494 | then throw((("Please wait " + toString(withdrawHeight)) + " before withdraw.")) | |
496 | - | else [IntegerEntry(poolMakerLockedAmountKey, 0), IntegerEntry(poolTotalLockedAmountKey, (poolTotalLocked - registeredAmount4Withdraw)), IntegerEntry(poolMakerUnlockHeightKey, 0), ScriptTransfer(addressFromStringValue( | |
495 | + | else [IntegerEntry(poolMakerLockedAmountKey, 0), IntegerEntry(poolTotalLockedAmountKey, (poolTotalLocked - registeredAmount4Withdraw)), IntegerEntry(poolMakerUnlockHeightKey, 0), ScriptTransfer(addressFromStringValue(poolMakerAddress), registeredAmount4Withdraw, neutrinoAssetId)] | |
497 | 496 | } | |
498 | 497 | ||
499 | 498 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func convertJsonArrayToList (jsonArray,splitSymbol) = split(jsonArray, splitSymbol) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "") | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | let SEP = "__" | |
14 | 14 | ||
15 | 15 | let keyAssetCode = 1 | |
16 | 16 | ||
17 | 17 | let keyAssetId = 2 | |
18 | 18 | ||
19 | 19 | let keyAssetStatus = 3 | |
20 | 20 | ||
21 | 21 | let keyAssetPriceDecimals = 4 | |
22 | 22 | ||
23 | 23 | let keyAssetBakingAsset = 5 | |
24 | 24 | ||
25 | 25 | let keyOvercollateralPercentage = 6 | |
26 | 26 | ||
27 | 27 | let keyMinPool = 7 | |
28 | 28 | ||
29 | 29 | let keyPriceOracleAddress = 8 | |
30 | 30 | ||
31 | 31 | let keyMinBuyPayment = 9 | |
32 | 32 | ||
33 | 33 | let keyMinSellPayment = 10 | |
34 | 34 | ||
35 | 35 | let keyBuyLockInterval = 11 | |
36 | 36 | ||
37 | 37 | let keySellLockInterval = 12 | |
38 | 38 | ||
39 | 39 | let keyBuyFee = 13 | |
40 | 40 | ||
41 | 41 | let keySellFee = 14 | |
42 | 42 | ||
43 | 43 | let keyPoolRedemptionTimeout = 15 | |
44 | 44 | ||
45 | 45 | let keyWeekendsPriceChangeCoefficient = 16 | |
46 | 46 | ||
47 | 47 | let adminPublicKey = "G1Ebu5AMHaTJFEbZNkZQcJFUQ9KfiYUwupyLG857DcFr" | |
48 | 48 | ||
49 | 49 | let neutrinoContractAddressKey = "%s%s__commonConfig__neutrinoContractAddress" | |
50 | 50 | ||
51 | 51 | let neutrinoStakingAddressKey = "%s%s__commonConfig__neutrinoStakingAddress" | |
52 | 52 | ||
53 | 53 | let minimunPoolFundingAmountKey = "%s%s__commonConfig__minimumPoolFundingAmount" | |
54 | 54 | ||
55 | 55 | let isInitializedKey = "%s%s__commonConfig__initialized" | |
56 | 56 | ||
57 | 57 | let currentAssetIndexKey = "%s%s__commonConfig__predefinedAssetsActiveIndex" | |
58 | 58 | ||
59 | 59 | let assetsAddressListKey = "%s%s__commonConfig__predefinedAssetsList" | |
60 | 60 | ||
61 | 61 | let debtTokenIdKey = "%s%s__commonConfig__debtAssetId" | |
62 | 62 | ||
63 | 63 | let debtTokenEtalonBalanceKey = "%s%s__commonConfig__debtAssetEtalonBalance" | |
64 | 64 | ||
65 | 65 | let defoStakingAddressKey = "%s%s__commonConfig__defoStakingAddress" | |
66 | 66 | ||
67 | 67 | let defoStakingPacemakerPubKey = "%s%s__commonConfig__defoStakingPacemakerPub" | |
68 | 68 | ||
69 | 69 | let minPoolInvestAmountKey = "%s%s__commonConfig__minPoolInvestAmount" | |
70 | 70 | ||
71 | 71 | let neutrinoAssetIdKey = "neutrino_asset_id" | |
72 | 72 | ||
73 | 73 | let nsbtAssetIdKey = "bond_asset_id" | |
74 | 74 | ||
75 | 75 | let neutrinoRpdKey = "rpd_contract" | |
76 | 76 | ||
77 | 77 | let defoAssetIdKey = "%s__defoAssetId" | |
78 | 78 | ||
79 | 79 | let setAssetScriptTxIdKey = "%s__assetScriptTxId" | |
80 | 80 | ||
81 | 81 | func getAssetConfigKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__config") | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getAssetPriceKey (assetCode) = ("%s%s__price__" + assetCode) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getAssetInitHeightKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__initHeight") | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getAssetActivateHeightKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__activateHeight") | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getAssetCurrrentPoolAmountKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__currentPool") | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getAssetMaxPoolAmountKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__maxPool") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getAssetMetaKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__meta") | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getAssetPoolMakersKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__poolMakers") | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getAssetAddressByCodeKey (assetCode) = (("%s%s%s__defoAsset__" + assetCode) + "__addressByAssetCode") | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getAssetAddressByAssetIdKey (assetId) = (("%s%s%s__defoAsset__" + assetId) + "__addressByAssetId") | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getPoolMakerParticipationAmountKey (assetAddress,poolMakerAddress) = makeString(["%s%s%s%s__pool", assetAddress, poolMakerAddress, "amount"], SEP) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getPoolMakerParticipationMaxAmountKey (assetAddress,poolMakerAddress) = makeString(["%s%s%s%s__pool", assetAddress, poolMakerAddress, "maxAmount"], SEP) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getPoolMakerLockedAmountKey (assetAddress,poolMakerAddress) = makeString(["%s%s%s%s__pool", assetAddress, poolMakerAddress, "lockedAmount"], SEP) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getPoolMakerUnlockHeightKey (assetAddress,poolMakerAddress) = makeString(["%s%s%s%s__pool", assetAddress, poolMakerAddress, "unlockHeight"], SEP) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getPoolMakerLiquidityRequestKey (assetAddress,poolMakerAddress,h) = makeString(["%s%s%s%d%s__pool", assetAddress, poolMakerAddress, toString(h), "liquidityRequest"], SEP) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getPoolTotalLockedAmountKey (assetAddress) = makeString(["%s%s%s__pool", assetAddress, "totalLockedAmount"], SEP) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getAssetConfigArray (assetAddress) = convertJsonArrayToList(valueOrErrorMessage(getStringByAddressAndKey(this, getAssetConfigKey(assetAddress)), (("No DEFO Asset " + assetAddress) + "config present")), "__") | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | let multiplicator = 1000000 | |
133 | 133 | ||
134 | 134 | let neutrinoContract = addressFromStringValue(valueOrErrorMessage(getString(this, neutrinoContractAddressKey), "No neutrino contract specified.")) | |
135 | 135 | ||
136 | 136 | let neutrinoAssetIdStr = valueOrErrorMessage(getString(neutrinoContract, neutrinoAssetIdKey), "No USDN asset id found.") | |
137 | 137 | ||
138 | 138 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdStr) | |
139 | 139 | ||
140 | 140 | let nsbtAssetId = fromBase58String(valueOrErrorMessage(getString(neutrinoContract, nsbtAssetIdKey), "No NSBT asset id found")) | |
141 | 141 | ||
142 | 142 | let minimumPoolFunding = valueOrErrorMessage(getInteger(this, minimunPoolFundingAmountKey), "Minimum pool funding amount is not specified.") | |
143 | 143 | ||
144 | 144 | let minPoolInvestAmount = valueOrElse(getInteger(this, minPoolInvestAmountKey), (10 * multiplicator)) | |
145 | 145 | ||
146 | 146 | let ASSEtPROPOSED = "PROPOSED" | |
147 | 147 | ||
148 | 148 | let ASSEtREADY = "READY" | |
149 | 149 | ||
150 | 150 | let ASSEtISSUED = "ISSUED" | |
151 | 151 | ||
152 | 152 | let assetStatus = $Tuple3(ASSEtPROPOSED, ASSEtREADY, ASSEtISSUED) | |
153 | 153 | ||
154 | 154 | let predefinedAssetContracts = valueOrErrorMessage(getString(this, assetsAddressListKey), "No pool of predeployed asset contracts found.") | |
155 | 155 | ||
156 | 156 | let predefinedAssetsList = convertJsonArrayToList(predefinedAssetContracts, ",") | |
157 | 157 | ||
158 | 158 | let currentAssetIndex = valueOrElse(getInteger(this, currentAssetIndexKey), 0) | |
159 | 159 | ||
160 | 160 | let debtToken = fromBase58String(valueOrErrorMessage(getString(this, debtTokenIdKey), "No debt token found")) | |
161 | 161 | ||
162 | 162 | let debtTokenReissueAmount = valueOrElse(getInteger(this, debtTokenEtalonBalanceKey), 0) | |
163 | 163 | ||
164 | 164 | let neutrinoRpdContract = addressFromStringValue(getStringValue(neutrinoContract, neutrinoRpdKey)) | |
165 | 165 | ||
166 | 166 | func getNeutrinoRpdBalance (userAddress) = { | |
167 | 167 | let userNeutrinoRpdBalance = makeString(["rpd_balance", neutrinoAssetIdStr, userAddress], "_") | |
168 | 168 | valueOrElse(getInteger(neutrinoRpdContract, userNeutrinoRpdBalance), 0) | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func getAssetAddressByCode (assetSymbol) = valueOrElse(getString(this, getAssetAddressByCodeKey(assetSymbol)), "") | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func getAssetAddressByCodeOrFail (assetSymbol) = valueOrErrorMessage(getString(this, getAssetAddressByCodeKey(assetSymbol)), (("Cannot find asset address by " + assetSymbol) + " code")) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func getAssetCode (assetConfig) = assetConfig[keyAssetCode] | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func getAssetID (assetConfig) = assetConfig[keyAssetId] | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func getAssetStatus (assetConfig) = assetConfig[keyAssetStatus] | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func getAssetPriceDecimals (assetConfig) = parseIntValue(assetConfig[keyAssetPriceDecimals]) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func getAssetBakingAssetId (assetConfig) = assetConfig[keyAssetBakingAsset] | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func getAssetOverCollateralPercent (assetConfig) = parseIntValue(assetConfig[keyOvercollateralPercentage]) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func getAssetMinRequiredPoolAmount (assetConfig) = parseIntValue(assetConfig[keyMinPool]) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func getAssetPriceOracleAddress (assetConfig) = assetConfig[keyPriceOracleAddress] | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func getMinBuyPaymentPerAsset (assetConfig) = parseIntValue(assetConfig[keyMinBuyPayment]) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func getMinSellPaymentPerAsset (assetConfig) = parseIntValue(assetConfig[keyMinSellPayment]) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func getBuyLockIntervalPerAsset (assetConfig) = parseIntValue(assetConfig[keyBuyLockInterval]) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func getSellLockIntervalPerAsset (assetConfig) = parseIntValue(assetConfig[keySellLockInterval]) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func getBuyFeePerAsset (assetConfig) = parseIntValue(assetConfig[keyBuyFee]) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func getSellFeePerAsset (assetConfig) = parseIntValue(assetConfig[keySellFee]) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func getRedemptionTimeoutBlocks (assetConfig) = parseIntValue(assetConfig[keyPoolRedemptionTimeout]) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func getWeekendsPriceChangeCoefficient (assetConfig) = parseIntValue(assetConfig[keyWeekendsPriceChangeCoefficient]) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func getAssetPoolMakers (assetAddress) = valueOrElse(getString(this, getAssetPoolMakersKey(assetAddress)), "") | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func getAssetInitHeight (assetAddress) = valueOrElse(getInteger(this, getAssetInitHeightKey(assetAddress)), 0) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func getAssetActivateHeight (assetAddress) = valueOrElse(getInteger(this, getAssetActivateHeightKey(assetAddress)), 0) | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func getAssetCurrentPoolAmount (assetAddress) = valueOrElse(getInteger(this, getAssetCurrrentPoolAmountKey(assetAddress)), 0) | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func getAssetMaxPoolAmount (assetAddress) = valueOrElse(getInteger(this, getAssetMaxPoolAmountKey(assetAddress)), 0) | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func getAssetMeta (assetAddress) = valueOrElse(getString(this, getAssetMetaKey(assetAddress)), "") | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func getPoolMakerParticipationAmount (assetAddress,poolMakerAddress) = valueOrElse(getInteger(this, getPoolMakerParticipationAmountKey(assetAddress, poolMakerAddress)), 0) | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func getPoolMakerParticipationMaxAmount (assetAddress,poolMakerAddress) = valueOrElse(getInteger(this, getPoolMakerParticipationMaxAmountKey(assetAddress, poolMakerAddress)), 0) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func getPoolMakerLockedAmount (assetAddress,poolMakerAddress) = valueOrElse(getInteger(this, getPoolMakerLockedAmountKey(assetAddress, poolMakerAddress)), 0) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func getPoolMakerUnlockHeight (assetAddress,poolMakerAddress) = valueOrElse(getInteger(this, getPoolMakerUnlockHeightKey(assetAddress, poolMakerAddress)), 0) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func getAssetPrice (priceOracleAddress,assetCode) = valueOrErrorMessage(getInteger(priceOracleAddress, getAssetPriceKey(assetCode)), "No Asset price found") | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func getPoolTotalLockedAmount (assetAddress) = valueOrElse(getInteger(this, getPoolTotalLockedAmountKey(assetAddress)), 0) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func composeAssetConfigurationString (assetCode,assetId,assetStatus,priceDecimals,backingAssetId,overCollateralPercent,minPool,priceOracleAddress,minBuyPayment,minSellPayment,buyLockInterval,sellLockInterval,buyFee,sellFee,poolRedemptionTimeout,weekendsPriceChangeCoefficient) = makeString(["%s%s%s%d%s%d%d%s%d%d%d%d%d%d%d", assetCode, assetId, assetStatus, toString(priceDecimals), backingAssetId, toString(overCollateralPercent), toString(minPool), priceOracleAddress, toString(minBuyPayment), toString(minSellPayment), toString(buyLockInterval), toString(sellLockInterval), toString(buyFee), toString(sellFee), toString(poolRedemptionTimeout), toString(weekendsPriceChangeCoefficient)], "__") | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func updateAssetCfgStatus (newStatus,assetConfigurationList) = { | |
266 | 266 | let aCode = getAssetCode(assetConfigurationList) | |
267 | 267 | let aID = getAssetID(assetConfigurationList) | |
268 | 268 | let aPriceDecimals = getAssetPriceDecimals(assetConfigurationList) | |
269 | 269 | let aBakingAssetId = getAssetBakingAssetId(assetConfigurationList) | |
270 | 270 | let aOverCollateralPercent = getAssetOverCollateralPercent(assetConfigurationList) | |
271 | 271 | let aMinRequiredPool = getAssetMinRequiredPoolAmount(assetConfigurationList) | |
272 | 272 | let aPriceOracleAddress = getAssetPriceOracleAddress(assetConfigurationList) | |
273 | 273 | let aMinBuyPayment = getMinBuyPaymentPerAsset(assetConfigurationList) | |
274 | 274 | let aMinSellPayment = getMinSellPaymentPerAsset(assetConfigurationList) | |
275 | 275 | let aBuyLockInterval = getBuyLockIntervalPerAsset(assetConfigurationList) | |
276 | 276 | let aSellLockInterval = getSellLockIntervalPerAsset(assetConfigurationList) | |
277 | 277 | let aBuyFee = getBuyFeePerAsset(assetConfigurationList) | |
278 | 278 | let aSellFee = getSellFeePerAsset(assetConfigurationList) | |
279 | 279 | let aRedemptionTimeoutBlocks = getRedemptionTimeoutBlocks(assetConfigurationList) | |
280 | 280 | let weekendsPriceChangeCoefficient = getWeekendsPriceChangeCoefficient(assetConfigurationList) | |
281 | 281 | composeAssetConfigurationString(aCode, aID, newStatus, aPriceDecimals, aBakingAssetId, aOverCollateralPercent, aMinRequiredPool, aPriceOracleAddress, aMinBuyPayment, aMinSellPayment, aBuyLockInterval, aSellLockInterval, aBuyFee, aSellFee, aRedemptionTimeoutBlocks, weekendsPriceChangeCoefficient) | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | func calcAllowedAmountToRedeem (assetCode,poolMakerAddress) = { | |
286 | 286 | let assetAddressStr = getAssetAddressByCodeOrFail(assetCode) | |
287 | 287 | let assetAddress = addressFromStringValue(assetAddressStr) | |
288 | 288 | let assetConfigurationList = getAssetConfigArray(assetAddressStr) | |
289 | 289 | let assetIdStr = getAssetID(assetConfigurationList) | |
290 | 290 | let assetId = fromBase58String(assetIdStr) | |
291 | 291 | let poolActualSize = valueOrElse(getInteger(this, getAssetCurrrentPoolAmountKey(assetAddressStr)), 0) | |
292 | 292 | let poolMaxSize = valueOrElse(getInteger(this, getAssetMaxPoolAmountKey(assetAddressStr)), 0) | |
293 | 293 | let poolTotalLockedAmountKey = getPoolTotalLockedAmountKey(assetAddressStr) | |
294 | 294 | let poolTotalLocked = valueOrElse(getInteger(this, poolTotalLockedAmountKey), 0) | |
295 | 295 | let assetUsdnStakedAmount = getNeutrinoRpdBalance(assetAddressStr) | |
296 | 296 | let assetUsdnBalanceAmount = assetBalance(assetAddress, neutrinoAssetId) | |
297 | 297 | let assetTotalUsdnAmount = ((assetUsdnStakedAmount + assetUsdnBalanceAmount) - poolTotalLocked) | |
298 | 298 | let ucollateral = (assetTotalUsdnAmount - poolActualSize) | |
299 | 299 | let defoAssetBalance = assetBalance(assetAddress, assetId) | |
300 | 300 | let assetEmissionDirty = valueOrErrorMessage(assetInfo(assetId), ("Cannot find asset by id " + assetIdStr)).quantity | |
301 | 301 | let assetEmission = (assetEmissionDirty - defoAssetBalance) | |
302 | 302 | let priceOracleAddress = addressFromStringValue(getAssetPriceOracleAddress(assetConfigurationList)) | |
303 | 303 | let currentPrice = getAssetPrice(priceOracleAddress, assetCode) | |
304 | 304 | let priceWithOvercollateralRate = (((multiplicator + getAssetOverCollateralPercent(assetConfigurationList)) * currentPrice) / multiplicator) | |
305 | 305 | let usdnNeededToCoverEmission = fraction(priceWithOvercollateralRate, assetEmission, multiplicator) | |
306 | 306 | let poolMakerMaxAmount = getPoolMakerParticipationMaxAmount(assetAddressStr, poolMakerAddress) | |
307 | 307 | let poolMakerParticipationAmountKey = getPoolMakerParticipationAmountKey(assetAddressStr, poolMakerAddress) | |
308 | 308 | let poolMakerActualAmount = valueOrElse(getInteger(this, poolMakerParticipationAmountKey), 0) | |
309 | 309 | let poolMakerLockedAmount = getPoolMakerLockedAmount(assetAddressStr, poolMakerAddress) | |
310 | 310 | let surplus = (ucollateral - usdnNeededToCoverEmission) | |
311 | 311 | let percentViaActual = fraction(poolMakerActualAmount, multiplicator, poolActualSize) | |
312 | 312 | let percentViaMax = fraction(poolMakerMaxAmount, multiplicator, poolMaxSize) | |
313 | 313 | let frozenPart = if ((surplus >= 0)) | |
314 | 314 | then 0 | |
315 | 315 | else max([percentViaActual, percentViaMax]) | |
316 | 316 | let allowedAmountToRedeem = fraction((multiplicator - frozenPart), poolMakerActualAmount, multiplicator) | |
317 | 317 | let withdrawHeight = (height + getRedemptionTimeoutBlocks(assetConfigurationList)) | |
318 | 318 | $Tuple8(assetAddressStr, allowedAmountToRedeem, poolTotalLocked, poolActualSize, poolMakerActualAmount, withdrawHeight, poolMakerLockedAmount, makeString([assetAddressStr, assetIdStr, poolMakerAddress, toString(assetUsdnStakedAmount), toString(assetUsdnBalanceAmount), toString(assetTotalUsdnAmount), toString(poolActualSize), toString(poolMaxSize), toString(ucollateral), toString(assetEmission), toString(currentPrice), toString(priceWithOvercollateralRate), toString(poolMakerMaxAmount), toString(poolMakerActualAmount), toString(poolMakerLockedAmount), toString(surplus), toString(percentViaActual), toString(percentViaMax), toString(frozenPart), toString(allowedAmountToRedeem)], SEP)) | |
319 | 319 | } | |
320 | 320 | ||
321 | 321 | ||
322 | 322 | @Callable(i) | |
323 | 323 | func init (neutrinoContractAddress,neutrinoStakingAddress,minimunPoolFundingAmount,predefinedAssetList,currentAssetIndex,debtEthalonBalance,defoStakingAddress,defoStakingPacemakerPub) = if ((toBase58String(i.callerPublicKey) != adminPublicKey)) | |
324 | 324 | then throw("Only Admin can perform contract operation.") | |
325 | 325 | else if ((getBoolByKey(isInitializedKey) == true)) | |
326 | 326 | then throw("Contract was already initialized.") | |
327 | 327 | else { | |
328 | 328 | let issueDebt = Issue("DEFO_DEBT", "DEFO Debt Token.", 1, 6, true) | |
329 | 329 | let debtTokenId = calculateAssetId(issueDebt) | |
330 | 330 | [StringEntry(neutrinoContractAddressKey, neutrinoContractAddress), StringEntry(neutrinoStakingAddressKey, neutrinoStakingAddress), IntegerEntry(minimunPoolFundingAmountKey, minimunPoolFundingAmount), StringEntry(assetsAddressListKey, predefinedAssetList), IntegerEntry(currentAssetIndexKey, currentAssetIndex), IntegerEntry(debtTokenEtalonBalanceKey, debtEthalonBalance), StringEntry(debtTokenIdKey, toBase58String(debtTokenId)), StringEntry(defoStakingAddressKey, defoStakingAddress), StringEntry(defoStakingPacemakerPubKey, defoStakingPacemakerPub), BooleanEntry(isInitializedKey, true), issueDebt, Burn(debtTokenId, 1)] | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | ||
335 | 335 | @Callable(i) | |
336 | 336 | func proposeAsset (assetCode,meta,minPool,priceOracleAddress,overCollateralPercent,backingAssetId,priceDecimals,minBuyPayment,minSellPayment,buyLockInterval,sellLockInterval,buyFee,sellFee,poolRedemptionTimeout,weekendsPriceChangeCoefficient) = if ((toBase58String(i.callerPublicKey) != adminPublicKey)) | |
337 | 337 | then throw("Only Admin can perform contract operation.") | |
338 | 338 | else if ((getBoolByKey(isInitializedKey) == false)) | |
339 | 339 | then throw("Contract is not yet ready.") | |
340 | 340 | else if ((fromBase58String(backingAssetId) != neutrinoAssetId)) | |
341 | 341 | then throw("Baking asset id could be USDN only.") | |
342 | 342 | else if ((getAssetAddressByCode(assetCode) != "")) | |
343 | 343 | then throw((("Asset with passed code " + assetCode) + " has already been proposed.")) | |
344 | 344 | else if ((minimumPoolFunding > minPool)) | |
345 | 345 | then throw(("Minimum pool amount should be greater or equals to " + toString(minimumPoolFunding))) | |
346 | 346 | else if (if (if (if (if (if (if (if ((0 > overCollateralPercent)) | |
347 | 347 | then true | |
348 | 348 | else (0 > priceDecimals)) | |
349 | 349 | then true | |
350 | 350 | else (0 > minBuyPayment)) | |
351 | 351 | then true | |
352 | 352 | else (0 > minSellPayment)) | |
353 | 353 | then true | |
354 | 354 | else (0 > buyLockInterval)) | |
355 | 355 | then true | |
356 | 356 | else (0 > sellLockInterval)) | |
357 | 357 | then true | |
358 | 358 | else (0 > buyFee)) | |
359 | 359 | then true | |
360 | 360 | else (0 > sellFee)) | |
361 | 361 | then throw("One of the passed parameters is invalid.") | |
362 | 362 | else { | |
363 | 363 | let priceOracleAddressValid = valueOrErrorMessage(addressFromStringValue(priceOracleAddress), "Passed Price Oracle Address is not valid.") | |
364 | 364 | let assetAddress = predefinedAssetsList[currentAssetIndex] | |
365 | 365 | let defoAssetId = valueOrErrorMessage(getString(valueOrErrorMessage(addressFromString(assetAddress), ""), defoAssetIdKey), "No defo asset ID found.") | |
366 | 366 | [StringEntry(getAssetConfigKey(assetAddress), composeAssetConfigurationString(assetCode, defoAssetId, assetStatus._1, priceDecimals, backingAssetId, overCollateralPercent, minPool, priceOracleAddress, minBuyPayment, minSellPayment, buyLockInterval, sellLockInterval, buyFee, sellFee, poolRedemptionTimeout, weekendsPriceChangeCoefficient)), StringEntry(getAssetAddressByCodeKey(assetCode), assetAddress), StringEntry(getAssetMetaKey(assetAddress), meta), IntegerEntry(getAssetInitHeightKey(assetAddress), height), IntegerEntry(currentAssetIndexKey, (currentAssetIndex + 1)), StringEntry(getAssetAddressByAssetIdKey(defoAssetId), assetAddress)] | |
367 | 367 | } | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | ||
371 | 371 | @Callable(i) | |
372 | 372 | func fundLiquidityPool (assetCode) = { | |
373 | 373 | let assetAddressStr = getAssetAddressByCodeOrFail(assetCode) | |
374 | 374 | let assetConfigurationList = getAssetConfigArray(assetAddressStr) | |
375 | 375 | let attachedPayment = value(i.payments[0]) | |
376 | 376 | let poolMakerAddress = toString(i.caller) | |
377 | 377 | if ((getBoolByKey(isInitializedKey) == false)) | |
378 | 378 | then throw("Contract is not yet ready.") | |
379 | 379 | else if ((attachedPayment.assetId != neutrinoAssetId)) | |
380 | 380 | then throw("Liquidity pool could be funded with USDN only.") | |
381 | 381 | else if ((minPoolInvestAmount > attachedPayment.amount)) | |
382 | 382 | then throw(("Attached payment amount is less tha min allowed: " + toString(minPoolInvestAmount))) | |
383 | 383 | else { | |
384 | 384 | let newCurrentPoolAmount = (attachedPayment.amount + getAssetCurrentPoolAmount(assetAddressStr)) | |
385 | 385 | let maxPoolAmount = getAssetMaxPoolAmount(assetAddressStr) | |
386 | 386 | let currentPoolMakerBalance = getPoolMakerParticipationAmount(assetAddressStr, poolMakerAddress) | |
387 | 387 | let maxPoolMakerBalance = getPoolMakerParticipationMaxAmount(assetAddressStr, poolMakerAddress) | |
388 | 388 | let currentAssetStatus = getAssetStatus(assetConfigurationList) | |
389 | 389 | let newAssetStatus = if (if ((currentAssetStatus == ASSEtPROPOSED)) | |
390 | 390 | then (newCurrentPoolAmount >= getAssetMinRequiredPoolAmount(assetConfigurationList)) | |
391 | 391 | else false) | |
392 | 392 | then ASSEtREADY | |
393 | 393 | else currentAssetStatus | |
394 | 394 | let newPoolMakerBalance = (currentPoolMakerBalance + attachedPayment.amount) | |
395 | 395 | let immediateTransferIfIssued = if ((currentAssetStatus == ASSEtISSUED)) | |
396 | 396 | then [ScriptTransfer(addressFromStringValue(assetAddressStr), attachedPayment.amount, neutrinoAssetId)] | |
397 | 397 | else nil | |
398 | 398 | ([IntegerEntry(getPoolMakerParticipationAmountKey(assetAddressStr, poolMakerAddress), newPoolMakerBalance), IntegerEntry(getPoolMakerParticipationMaxAmountKey(assetAddressStr, poolMakerAddress), max([newPoolMakerBalance, maxPoolMakerBalance])), IntegerEntry(getAssetCurrrentPoolAmountKey(assetAddressStr), newCurrentPoolAmount), IntegerEntry(getAssetMaxPoolAmountKey(assetAddressStr), max([maxPoolAmount, newCurrentPoolAmount])), StringEntry(getAssetConfigKey(assetAddressStr), updateAssetCfgStatus(newAssetStatus, assetConfigurationList))] ++ immediateTransferIfIssued) | |
399 | 399 | } | |
400 | 400 | } | |
401 | 401 | ||
402 | 402 | ||
403 | 403 | ||
404 | 404 | @Callable(i) | |
405 | 405 | func activateAsset (assetCode) = { | |
406 | 406 | let assetAddress = getAssetAddressByCode(assetCode) | |
407 | 407 | let assetConfigurationList = getAssetConfigArray(assetAddress) | |
408 | 408 | let assetCurrentPoolAmount = getAssetCurrentPoolAmount(assetAddress) | |
409 | 409 | let aCurrentStatus = getAssetStatus(assetConfigurationList) | |
410 | 410 | if ((toBase58String(i.callerPublicKey) != adminPublicKey)) | |
411 | 411 | then throw("Only Admin can perform contract operation.") | |
412 | 412 | else if ((getBoolByKey(isInitializedKey) == false)) | |
413 | 413 | then throw("Contract is not yet ready.") | |
414 | 414 | else if ((aCurrentStatus != assetStatus._2)) | |
415 | 415 | then throw((("Asset is not in READY status. Current status is " + aCurrentStatus) + ".")) | |
416 | 416 | else if ((assetAddress == "")) | |
417 | 417 | then throw((("Cannot find asset " + assetCode) + ".")) | |
418 | 418 | else if ((minimumPoolFunding > assetCurrentPoolAmount)) | |
419 | 419 | then throw((((("Cannot issue asset as liquidity pool amount (" + toString(assetCurrentPoolAmount)) + ") is less than required (") + toString(minimumPoolFunding)) + ")")) | |
420 | 420 | else { | |
421 | 421 | let issueDebt = Reissue(debtToken, debtTokenReissueAmount, true) | |
422 | 422 | [IntegerEntry(getAssetActivateHeightKey(assetAddress), height), StringEntry(getAssetConfigKey(assetAddress), updateAssetCfgStatus(assetStatus._3, assetConfigurationList)), issueDebt, ScriptTransfer(addressFromStringValue(assetAddress), assetCurrentPoolAmount, neutrinoAssetId), ScriptTransfer(addressFromStringValue(assetAddress), debtTokenReissueAmount, debtToken)] | |
423 | 423 | } | |
424 | 424 | } | |
425 | 425 | ||
426 | 426 | ||
427 | 427 | ||
428 | 428 | @Callable(i) | |
429 | 429 | func redeemFromPool (assetCode,amount) = { | |
430 | 430 | let callerAddress = toString(i.caller) | |
431 | 431 | let redeemTuple = calcAllowedAmountToRedeem(assetCode, callerAddress) | |
432 | 432 | let assetAddressStr = redeemTuple._1 | |
433 | 433 | let allowedAmountToRedeem = redeemTuple._2 | |
434 | 434 | let poolTotalLocked = redeemTuple._3 | |
435 | 435 | let poolActualSize = redeemTuple._4 | |
436 | 436 | let poolMakerActualAmount = redeemTuple._5 | |
437 | 437 | let withdrawHeight = redeemTuple._6 | |
438 | 438 | let poolMakerLockedAmount = redeemTuple._7 | |
439 | 439 | let traceData = redeemTuple._8 | |
440 | 440 | let poolMakerLiquidityRequestKey = getPoolMakerLiquidityRequestKey(assetAddressStr, callerAddress, withdrawHeight) | |
441 | 441 | if ((getBoolByKey(isInitializedKey) == false)) | |
442 | 442 | then throw("Contract is not yet ready.") | |
443 | 443 | else if (if (if ((0 > amount)) | |
444 | 444 | then true | |
445 | 445 | else (0 >= poolMakerActualAmount)) | |
446 | 446 | then true | |
447 | 447 | else (amount > allowedAmountToRedeem)) | |
448 | 448 | then throw((("Cannot find pool maker by address " + callerAddress) + " or amount passed is not correct.")) | |
449 | 449 | else if (((1 * multiplicator) > amount)) | |
450 | 450 | then throw("Redeem amount is less then min allowed") | |
451 | 451 | else if ((poolMakerLockedAmount > 0)) | |
452 | 452 | then throw("Pool maker already has initiated redemption that is not withdrawn yet.") | |
453 | 453 | else if (isDefined(getInteger(this, poolMakerLiquidityRequestKey))) | |
454 | 454 | then throw((("Pool maker has already initiated redemption for " + toString(height)) + " height")) | |
455 | 455 | else [IntegerEntry(getPoolTotalLockedAmountKey(assetAddressStr), (poolTotalLocked + amount)), IntegerEntry(getAssetCurrrentPoolAmountKey(assetAddressStr), (poolActualSize - amount)), IntegerEntry(getPoolMakerParticipationAmountKey(assetAddressStr, callerAddress), (poolMakerActualAmount - amount)), IntegerEntry(poolMakerLiquidityRequestKey, amount), IntegerEntry(getPoolMakerLockedAmountKey(assetAddressStr, callerAddress), amount), IntegerEntry(getPoolMakerUnlockHeightKey(assetAddressStr, callerAddress), withdrawHeight), StringEntry("%s%s_trace_redeemFromPool", traceData)] | |
456 | 456 | } | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | ||
460 | 460 | @Callable(i) | |
461 | 461 | func getMaxAllowedAmountToRedeem (assetCode,poolMakerAddress) = { | |
462 | 462 | let redeemTuple = calcAllowedAmountToRedeem(assetCode, poolMakerAddress) | |
463 | 463 | let assetAddressStr = redeemTuple._1 | |
464 | 464 | let allowedAmountToRedeem = redeemTuple._2 | |
465 | 465 | let poolTotalLocked = redeemTuple._3 | |
466 | 466 | let poolActualSize = redeemTuple._4 | |
467 | 467 | let poolMakerActualAmount = redeemTuple._5 | |
468 | 468 | let withdrawHeight = redeemTuple._6 | |
469 | 469 | let poolMakerLockedAmount = redeemTuple._7 | |
470 | 470 | let traceData = redeemTuple._8 | |
471 | 471 | throw(((((((((("{" + "allowedAmountToRedeem: ") + toString(allowedAmountToRedeem)) + ", assetCode: ") + assetCode) + ", poolMaker: ") + poolMakerAddress) + ", trace: ") + traceData) + "}")) | |
472 | 472 | } | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | ||
476 | 476 | @Callable(i) | |
477 | - | func withdraw (assetCode) = { | |
478 | - | let callerAddress = toString(i.caller) | |
477 | + | func withdraw (assetCode,poolMakerAddress) = { | |
479 | 478 | let assetAddressStr = getAssetAddressByCodeOrFail(assetCode) | |
480 | 479 | let assetAddress = addressFromStringValue(assetAddressStr) | |
481 | - | let poolMakerLockedAmountKey = getPoolMakerLockedAmountKey(assetAddressStr, | |
480 | + | let poolMakerLockedAmountKey = getPoolMakerLockedAmountKey(assetAddressStr, poolMakerAddress) | |
482 | 481 | let registeredAmount4Withdraw = valueOrElse(getInteger(this, poolMakerLockedAmountKey), 0) | |
483 | - | let poolMakerUnlockHeightKey = getPoolMakerUnlockHeightKey(assetAddressStr, | |
482 | + | let poolMakerUnlockHeightKey = getPoolMakerUnlockHeightKey(assetAddressStr, poolMakerAddress) | |
484 | 483 | let withdrawHeight = valueOrElse(getInteger(this, poolMakerUnlockHeightKey), 0) | |
485 | 484 | let poolTotalLockedAmountKey = getPoolTotalLockedAmountKey(assetAddressStr) | |
486 | 485 | let poolTotalLocked = valueOrElse(getInteger(this, poolTotalLockedAmountKey), 0) | |
487 | - | let poolMakerLiquidityRequestKey = getPoolMakerLiquidityRequestKey(assetAddressStr, | |
486 | + | let poolMakerLiquidityRequestKey = getPoolMakerLiquidityRequestKey(assetAddressStr, poolMakerAddress, withdrawHeight) | |
488 | 487 | if ((getBoolByKey(isInitializedKey) == false)) | |
489 | 488 | then throw("Contract is not yet ready.") | |
490 | 489 | else if (!(isDefined(getInteger(assetAddress, poolMakerLiquidityRequestKey)))) | |
491 | 490 | then throw("Need to transfer liquidity from asset account first") | |
492 | 491 | else if ((0 >= registeredAmount4Withdraw)) | |
493 | - | then throw((("Cannot find pool maker by address " + | |
492 | + | then throw((("Cannot find pool maker by address " + poolMakerAddress) + " or no locked amount.")) | |
494 | 493 | else if ((height > withdrawHeight)) | |
495 | 494 | then throw((("Please wait " + toString(withdrawHeight)) + " before withdraw.")) | |
496 | - | else [IntegerEntry(poolMakerLockedAmountKey, 0), IntegerEntry(poolTotalLockedAmountKey, (poolTotalLocked - registeredAmount4Withdraw)), IntegerEntry(poolMakerUnlockHeightKey, 0), ScriptTransfer(addressFromStringValue( | |
495 | + | else [IntegerEntry(poolMakerLockedAmountKey, 0), IntegerEntry(poolTotalLockedAmountKey, (poolTotalLocked - registeredAmount4Withdraw)), IntegerEntry(poolMakerUnlockHeightKey, 0), ScriptTransfer(addressFromStringValue(poolMakerAddress), registeredAmount4Withdraw, neutrinoAssetId)] | |
497 | 496 | } | |
498 | 497 | ||
499 | 498 |
github/deemru/w8io/169f3d6 155.72 ms ◑