tx · 9MqbrqgMMp8aMDgXAZuv5wYQrBUcLtSd7CJFELKmgLHw 3N3UHNYQ8xwe2WWLKgXX628JyUtF6kYK4wS: -0.01400000 Waves 2020.11.03 11:19 [1248868] smart account 3N3UHNYQ8xwe2WWLKgXX628JyUtF6kYK4wS > SELF 0.00000000 Waves
{ "type": 13, "id": "9MqbrqgMMp8aMDgXAZuv5wYQrBUcLtSd7CJFELKmgLHw", "fee": 1400000, "feeAssetId": null, "timestamp": 1604391607883, "version": 1, "sender": "3N3UHNYQ8xwe2WWLKgXX628JyUtF6kYK4wS", "senderPublicKey": "Hxyif8HnnHh34SZ7PZewDcNUgrZfHNJsQvLNCcPbCW27", "proofs": [ "2FK6ZFN14CSMmJRrNzLMwnTSEArj1i673a2X8RF87ZGheLWjwGDghCzcshd9PHTFeQ4ehoPzTFVZGMSnDJNpoeXF" ], "script": "base64:AAIEAAAAAAAAADwIAhIKCggICAEIAQEICBIRCg8ICAEIAQgBAQEBAQEBAQESAwoBCBIDCgEIEgQKAggBEgQKAggIEgMKAQgAAABpAQAAABZjb252ZXJ0SnNvbkFycmF5VG9MaXN0AAAAAgAAAAlqc29uQXJyYXkAAAALc3BsaXRTeW1ib2wJAAS1AAAAAgUAAAAJanNvbkFycmF5BQAAAAtzcGxpdFN5bWJvbAEAAAAYZ2V0U3RyaW5nQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkCAAAAAAEAAAAMZ2V0Qm9vbEJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5BwAAAAADU0VQAgAAAAJfXwAAAAAMa2V5QXNzZXRDb2RlAAAAAAAAAAABAAAAAAprZXlBc3NldElkAAAAAAAAAAACAAAAAA5rZXlBc3NldFN0YXR1cwAAAAAAAAAAAw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ZWlnaHRLZXkAAAAAAAAAAAAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAANY2FsbGVyQWRkcmVzcwUAAAAZcmVnaXN0ZXJlZEFtb3VudDRXaXRoZHJhdwUAAAAPbmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAA0KOyRQ==", "chainId": 84, "height": 1248868, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CP3B6voJ9BFaP5Jh1n1vU3yEQotepaAo51KovJSysVj Next: BJ2NSLraw4CeByAZVxmSexduE9mV6FN3WSKoPD6RD7M9 Diff:
Old | New | Differences | |
---|---|---|---|
81 | 81 | func getAssetConfigKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__config") | |
82 | 82 | ||
83 | 83 | ||
84 | - | func getAssetPriceKey (assetCode) = ("%s%s__ | |
84 | + | func getAssetPriceKey (assetCode) = ("%s%s__price__" + assetCode) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getAssetInitHeightKey (assetAddress) = (("%s%s%s__defoAsset__" + assetAddress) + "__initHeight") |
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 | - | func getAssetPriceKey (assetCode) = ("%s%s__ | |
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 = (priceWithOvercollateralRate * assetEmission) | |
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 | throw(((((((("{" + "allowedAmountToRedeem: ") + toString(allowedAmountToRedeem)) + ", assetCode: ") + assetCode) + ", poolMaker: ") + poolMakerAddress) + "}")) | |
471 | 471 | } | |
472 | 472 | ||
473 | 473 | ||
474 | 474 | ||
475 | 475 | @Callable(i) | |
476 | 476 | func withdraw (assetCode) = { | |
477 | 477 | let callerAddress = toString(i.caller) | |
478 | 478 | let assetAddressStr = getAssetAddressByCodeOrFail(assetCode) | |
479 | 479 | let assetAddress = addressFromStringValue(assetAddressStr) | |
480 | 480 | let poolMakerLockedAmountKey = getPoolMakerLockedAmountKey(assetAddressStr, callerAddress) | |
481 | 481 | let registeredAmount4Withdraw = valueOrElse(getInteger(this, poolMakerLockedAmountKey), 0) | |
482 | 482 | let poolMakerUnlockHeightKey = getPoolMakerUnlockHeightKey(assetAddressStr, callerAddress) | |
483 | 483 | let withdrawHeight = valueOrElse(getInteger(this, poolMakerUnlockHeightKey), 0) | |
484 | 484 | let poolTotalLockedAmountKey = getPoolTotalLockedAmountKey(assetAddressStr) | |
485 | 485 | let poolTotalLocked = valueOrElse(getInteger(this, poolTotalLockedAmountKey), 0) | |
486 | 486 | let poolMakerLiquidityRequestKey = getPoolMakerLiquidityRequestKey(assetAddressStr, callerAddress, withdrawHeight) | |
487 | 487 | if ((getBoolByKey(isInitializedKey) == false)) | |
488 | 488 | then throw("Contract is not yet ready.") | |
489 | 489 | else if (!(isDefined(getInteger(assetAddress, poolMakerLiquidityRequestKey)))) | |
490 | 490 | then throw("Need to transfer liquidity from asset account first") | |
491 | 491 | else if ((0 >= registeredAmount4Withdraw)) | |
492 | 492 | then throw((("Cannot find pool maker by address " + callerAddress) + " or no locked amount.")) | |
493 | 493 | else if ((height > withdrawHeight)) | |
494 | 494 | then throw((("Please wait " + toString(withdrawHeight)) + " before withdraw.")) | |
495 | 495 | else [IntegerEntry(poolMakerLockedAmountKey, 0), IntegerEntry(poolTotalLockedAmountKey, (poolTotalLocked - registeredAmount4Withdraw)), IntegerEntry(poolMakerUnlockHeightKey, 0), ScriptTransfer(addressFromStringValue(callerAddress), registeredAmount4Withdraw, neutrinoAssetId)] | |
496 | 496 | } | |
497 | 497 | ||
498 | 498 |
github/deemru/w8io/169f3d6 86.10 ms ◑