tx · 8eiEqTQeRiZvYGfAvy3xgZfWWzsvDfiU6dLUXYxoAjsh 3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV: -0.02800000 Waves 2023.01.11 15:47 [2400311] smart account 3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV > SELF 0.00000000 Waves
{ "type": 13, "id": "8eiEqTQeRiZvYGfAvy3xgZfWWzsvDfiU6dLUXYxoAjsh", "fee": 2800000, "feeAssetId": null, "timestamp": 1673441272260, "version": 1, "sender": "3N98Ngyaszw66EakvWRCiZ771ja2RDgNaxV", "senderPublicKey": "F4oaTkX67vt2MEsXLJJ8a7gaURGjW7x8fkvGfdEiH5oy", "proofs": [ "3nnY2ozwZqNk2HvmYYPhXnUojLpffVrzto31LmDdehB4z36nLaJWSQChCGH3hCvKFfJsJSbtcX9oLPM1DXwPF4pg" ], "script": "base64:BgInCAISAwoBCBIAEgcKBQgICAgIEgASBAoCCAgSABIECgIICBIDCgEIQQAJc2VwYXJhdG9yAgJfXwASc2hhcmVBc3NldERlY2ltYWxzAAgAC3dhdmVzU3RyaW5nAgVXQVZFUwAHc2NhbGUxOACAgJC7utat8A0ADXNjYWxlMThCaWdJbnQJALYCAQUHc2NhbGUxOAEHd3JhcEVycgEDbXNnCQC5CQIJAMwIAgIWbHBfc3Rha2luZ19wb29scy5yaWRlOgkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnARJlcnJLZXlJc05vdERlZmluZWQCB2FkZHJlc3MDa2V5CQEHd3JhcEVycgEJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuCQDMCAIFA2tleQkAzAgCAg8gaXMgbm90IGRlZmluZWQFA25pbAIAAQxnZXRTdHJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkcmVzcwUDa2V5CQESZXJyS2V5SXNOb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dmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXlrCMaT", "chainId": 84, "height": 2400311, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GHCAn7JynJZEEaSwhguPyhVcaegkiEotn52o4cXeDtuM Next: Az8odyb8MUp3kWgvgvKHUXhrupyURcN5pobvRTvAvmz1 Diff:
Old | New | Differences | |
---|---|---|---|
537 | 537 | let lockPart = fraction(stakingReward, lockFraction, lockFractionMultiplier) | |
538 | 538 | let convertPart = (stakingReward - lockPart) | |
539 | 539 | let r = invoke(boostingContract, "userMaxDurationREADONLY", [toString(this)], nil) | |
540 | - | let lock = match r { | |
541 | - | case _ => | |
542 | - | if (if (if ($isInstanceOf($match0._1, "String")) | |
543 | - | then $isInstanceOf($match0._2, "Int") | |
544 | - | else false) | |
545 | - | then $isInstanceOf($match0, "(String, Int)") | |
546 | - | else false) | |
547 | - | then { | |
548 | - | let function = $match0._1 | |
549 | - | let duration = $match0._2 | |
550 | - | if ((lockPart > 0)) | |
551 | - | then invoke(boostingContract, function, [duration], [AttachedPayment(wxAssetId, lockPart)]) | |
552 | - | else unit | |
553 | - | } | |
554 | - | else throwErr("invalid lock params") | |
555 | - | } | |
540 | + | let lock = if ((lockPart > 0)) | |
541 | + | then match r { | |
542 | + | case _ => | |
543 | + | if (if (if ($isInstanceOf($match0._1, "String")) | |
544 | + | then $isInstanceOf($match0._2, "Int") | |
545 | + | else false) | |
546 | + | then $isInstanceOf($match0, "(String, Int)") | |
547 | + | else false) | |
548 | + | then { | |
549 | + | let function = $match0._1 | |
550 | + | let duration = $match0._2 | |
551 | + | if ((lockPart > 0)) | |
552 | + | then invoke(boostingContract, function, [duration], [AttachedPayment(wxAssetId, lockPart)]) | |
553 | + | else unit | |
554 | + | } | |
555 | + | else throwErr("invalid lock params") | |
556 | + | } | |
557 | + | else unit | |
556 | 558 | if ((lock == lock)) | |
557 | 559 | then { | |
558 | - | let convertedAmount = { | |
559 | - | let inAssetId = wxAssetId | |
560 | - | let minimumToReceive = 0 | |
561 | - | let outAssetIdStr = assetIdToString(usdnAssetId) | |
562 | - | let targetAddress = "" | |
563 | - | valueOrErrorMessage({ | |
564 | - | let @ = invoke(swapContract, "swap", [minimumToReceive, outAssetIdStr, targetAddress], [AttachedPayment(inAssetId, convertPart)]) | |
565 | - | if ($isInstanceOf(@, "Int")) | |
566 | - | then @ | |
567 | - | else unit | |
568 | - | }, wrapErr("invalid swap result")) | |
569 | - | } | |
560 | + | let convertedAmount = if ((convertPart > 0)) | |
561 | + | then { | |
562 | + | let inAssetId = wxAssetId | |
563 | + | let minimumToReceive = 0 | |
564 | + | let outAssetIdStr = assetIdToString(usdnAssetId) | |
565 | + | let targetAddress = "" | |
566 | + | valueOrErrorMessage({ | |
567 | + | let @ = invoke(swapContract, "swap", [minimumToReceive, outAssetIdStr, targetAddress], [AttachedPayment(inAssetId, convertPart)]) | |
568 | + | if ($isInstanceOf(@, "Int")) | |
569 | + | then @ | |
570 | + | else unit | |
571 | + | }, wrapErr("invalid swap result")) | |
572 | + | } | |
573 | + | else 0 | |
570 | 574 | if ((convertedAmount == convertedAmount)) | |
571 | 575 | then { | |
572 | - | let lpAssetAmount = { | |
573 | - | let minOutAmount = 0 | |
574 | - | let autoStake = true | |
575 | - | valueOrErrorMessage({ | |
576 | - | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(usdnAssetId, convertedAmount)]) | |
577 | - | if ($isInstanceOf(@, "Int")) | |
578 | - | then @ | |
579 | - | else unit | |
580 | - | }, wrapErr("invalid putOneTknV2 result")) | |
581 | - | } | |
576 | + | let lpAssetAmount = if ((convertedAmount > 0)) | |
577 | + | then { | |
578 | + | let minOutAmount = 0 | |
579 | + | let autoStake = true | |
580 | + | valueOrErrorMessage({ | |
581 | + | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(usdnAssetId, convertedAmount)]) | |
582 | + | if ($isInstanceOf(@, "Int")) | |
583 | + | then @ | |
584 | + | else unit | |
585 | + | }, wrapErr("invalid putOneTknV2 result")) | |
586 | + | } | |
587 | + | else 0 | |
582 | 588 | if ((lpAssetAmount == lpAssetAmount)) | |
583 | 589 | then lpAssetAmount | |
584 | 590 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let shareAssetDecimals = 8 | |
7 | 7 | ||
8 | 8 | let wavesString = "WAVES" | |
9 | 9 | ||
10 | 10 | let scale18 = 1000000000000000000 | |
11 | 11 | ||
12 | 12 | let scale18BigInt = toBigInt(scale18) | |
13 | 13 | ||
14 | 14 | func wrapErr (msg) = makeString(["lp_staking_pools.ride:", msg], " ") | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func throwErr (msg) = throw(wrapErr(msg)) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func errKeyIsNotDefined (address,key) = wrapErr(makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), errKeyIsNotDefined(address, key)) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), errKeyIsNotDefined(address, key)) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func parseAssetId (input) = if ((input == wavesString)) | |
30 | 30 | then unit | |
31 | 31 | else fromBase58String(input) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func assetIdToString (input) = if ((input == unit)) | |
35 | 35 | then wavesString | |
36 | 36 | else toBase58String(value(input)) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func ensurePositive (v) = if ((v >= 0)) | |
40 | 40 | then v | |
41 | 41 | else throwErr("value should be positive") | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyFactoryContract () = makeString(["%s", "factoryContract"], separator) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyLpStakingContract () = makeString(["%s", "lpStakingContract"], separator) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyStakingContract () = makeString(["%s", "stakingContract"], separator) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyBoostingContract () = makeString(["%s", "boostingContract"], separator) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func keySwapContract () = makeString(["%s", "swapContract"], separator) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], separator) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyUsdnAssetId () = makeString(["%s", "usdnAssetId"], separator) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func keyWxAssetId () = makeString(["%s", "wxAssetId"], separator) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyShutdown () = makeString(["%s", "shutdown"], separator) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func keyMinDelay () = makeString(["%s", "minDelay"], separator) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func keyLockFraction () = makeString(["%s", "lockFraction"], separator) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func keyShareAssetId (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "shareAssetId"], separator) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func keyBaseAssetId (shareAssetId) = makeString(["%s%s", assetIdToString(shareAssetId), "baseAssetId"], separator) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func keyPeriod (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "period"], separator) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func keyPeriodStartHeight (baseAssetId,period) = makeString(["%s%s%d", assetIdToString(baseAssetId), "periodStartHeight", toString(period)], separator) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func keyBaseAssetAmountToConvert (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "baseAssetAmountToConvert"], separator) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyShareAssetAmountToConvert (baseAssetId) = makeString(["%s%s", assetIdToString(baseAssetId), "shareAssetAmountToConvert"], separator) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyUserBaseAssetAmountToConvert (baseAssetId,userAddress) = makeString(["%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "baseAssetAmountToConvert"], separator) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyUserBaseAssetAmountToConvertPeriod (baseAssetId,userAddress) = makeString(["%s%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "baseAssetAmountToConvert", "period"], separator) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyUserShareAssetAmountToConvert (baseAssetId,userAddress) = makeString(["%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "shareAssetAmountToConvert"], separator) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyUserShareAssetAmountToConvertPeriod (baseAssetId,userAddress) = makeString(["%s%s%s%s", assetIdToString(baseAssetId), toString(userAddress), "shareAssetAmountToConvert", "period"], separator) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keyPricePeriod (baseAssetId,period) = makeString(["%s%s%d", assetIdToString(baseAssetId), "price", toString(period)], separator) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func keyPriceHistory (baseAssetId) = makeString(["%s%s%s%d%d", assetIdToString(baseAssetId), "price", "history", toString(lastBlock.height), toString(lastBlock.timestamp)], separator) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func keyPricePeriodPut (baseAssetId,period) = makeString(["%s%s%d%s", assetIdToString(baseAssetId), "price", toString(period), "put"], separator) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func keyPricePutHistory (baseAssetId) = makeString(["%s%s%s%s%d%d", assetIdToString(baseAssetId), "price", "history", "put", toString(lastBlock.height), toString(lastBlock.timestamp)], separator) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyPricePeriodGet (baseAssetId,period) = makeString(["%s%s%d%s", assetIdToString(baseAssetId), "price", toString(period), "get"], separator) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyPriceGetHistory (baseAssetId) = makeString(["%s%s%s%s%d%d", assetIdToString(baseAssetId), "price", "history", "get", toString(lastBlock.height), toString(lastBlock.timestamp)], separator) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyHistoryEntry (baseAssetId,operation,period,userAddress,txId) = makeString(["%s%s%s%s", "history", operation, toString(userAddress), toBase58String(txId), toString(height)], separator) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
135 | 135 | case s: String => | |
136 | 136 | fromBase58String(s) | |
137 | 137 | case _: Unit => | |
138 | 138 | unit | |
139 | 139 | case _ => | |
140 | 140 | throw("Match error") | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
145 | 145 | case s: String => | |
146 | 146 | fromBase58String(s) | |
147 | 147 | case _: Unit => | |
148 | 148 | unit | |
149 | 149 | case _ => | |
150 | 150 | throw("Match error") | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | let permissionDeniedError = throw("Permission denied") | |
155 | 155 | ||
156 | 156 | func mustThis (i) = if ((i.caller == this)) | |
157 | 157 | then true | |
158 | 158 | else permissionDeniedError | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
162 | 162 | case pk: ByteVector => | |
163 | 163 | if ((i.callerPublicKey == pk)) | |
164 | 164 | then true | |
165 | 165 | else permissionDeniedError | |
166 | 166 | case _: Unit => | |
167 | 167 | mustThis(i) | |
168 | 168 | case _ => | |
169 | 169 | throw("Match error") | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | let shutdown = valueOrElse(getBoolean(keyShutdown()), false) | |
174 | 174 | ||
175 | 175 | func shutdownCheck (i) = if (if (!(shutdown)) | |
176 | 176 | then true | |
177 | 177 | else mustManager(i)) | |
178 | 178 | then true | |
179 | 179 | else throw("operation is disabled") | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract())) | |
183 | 183 | ||
184 | 184 | let lpStakingContract = addressFromStringValue(getStrOrFail(this, keyLpStakingContract())) | |
185 | 185 | ||
186 | 186 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract())) | |
187 | 187 | ||
188 | 188 | let boostingContract = addressFromStringValue(getStrOrFail(this, keyBoostingContract())) | |
189 | 189 | ||
190 | 190 | let swapContract = addressFromStringValue(getStrOrFail(this, keySwapContract())) | |
191 | 191 | ||
192 | 192 | let assetsStoreContract = addressFromStringValue(getStrOrFail(this, keyAssetsStoreContract())) | |
193 | 193 | ||
194 | 194 | let usdnAssetId = parseAssetId(getStrOrFail(this, keyUsdnAssetId())) | |
195 | 195 | ||
196 | 196 | let wxAssetId = parseAssetId(getStrOrFail(this, keyWxAssetId())) | |
197 | 197 | ||
198 | 198 | let minDelayDefault = 1440 | |
199 | 199 | ||
200 | 200 | let minDelay = valueOrElse(getInteger(this, keyMinDelay()), minDelayDefault) | |
201 | 201 | ||
202 | 202 | let lockFractionMultiplier = 100000000 | |
203 | 203 | ||
204 | 204 | let lockFractionDefault = fraction(1, lockFractionMultiplier, 2) | |
205 | 205 | ||
206 | 206 | let lockFraction = valueOrElse(getInteger(this, keyLockFraction()), lockFractionDefault) | |
207 | 207 | ||
208 | 208 | func getPoolInfo (amountAssetId) = { | |
209 | 209 | let amountAssetIdStr = assetIdToString(amountAssetId) | |
210 | 210 | let priceAssetIdStr = assetIdToString(usdnAssetId) | |
211 | 211 | let poolInfoOption = { | |
212 | 212 | let @ = invoke(factoryContract, "poolInfoREADONLY", [amountAssetIdStr, priceAssetIdStr], nil) | |
213 | 213 | if ($isInstanceOf(@, "(Address, ByteVector)")) | |
214 | 214 | then @ | |
215 | 215 | else unit | |
216 | 216 | } | |
217 | 217 | poolInfoOption | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func calcPrice (lpAssetId,shareAssetId) = { | |
222 | 222 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), "failed to get share asset info") | |
223 | 223 | let shareAssetEmission = shareAssetInfo.quantity | |
224 | 224 | let stakedAmount = ensurePositive(valueOrErrorMessage({ | |
225 | 225 | let @ = invoke(stakingContract, "stakedByUserREADONLY", [assetIdToString(lpAssetId), toString(this)], nil) | |
226 | 226 | if ($isInstanceOf(@, "Int")) | |
227 | 227 | then @ | |
228 | 228 | else unit | |
229 | 229 | }, wrapErr("invalid stakedByUserREADONLY result"))) | |
230 | 230 | let price = if ((shareAssetEmission == 0)) | |
231 | 231 | then scale18BigInt | |
232 | 232 | else fraction(toBigInt(stakedAmount), scale18BigInt, toBigInt(shareAssetEmission), FLOOR) | |
233 | 233 | price | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | @Callable(i) | |
238 | 238 | func setManager (pendingManagerPublicKey) = { | |
239 | 239 | let checkCaller = mustManager(i) | |
240 | 240 | if ((checkCaller == checkCaller)) | |
241 | 241 | then { | |
242 | 242 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
243 | 243 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
244 | 244 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
245 | 245 | else throw("Strict value is not equal to itself.") | |
246 | 246 | } | |
247 | 247 | else throw("Strict value is not equal to itself.") | |
248 | 248 | } | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | ||
252 | 252 | @Callable(i) | |
253 | 253 | func confirmManager () = { | |
254 | 254 | let pm = pendingManagerPublicKeyOrUnit() | |
255 | 255 | let hasPM = if (isDefined(pm)) | |
256 | 256 | then true | |
257 | 257 | else throwErr("no pending manager") | |
258 | 258 | if ((hasPM == hasPM)) | |
259 | 259 | then { | |
260 | 260 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
261 | 261 | then true | |
262 | 262 | else throwErr("you are not pending manager") | |
263 | 263 | if ((checkPM == checkPM)) | |
264 | 264 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
265 | 265 | else throw("Strict value is not equal to itself.") | |
266 | 266 | } | |
267 | 267 | else throw("Strict value is not equal to itself.") | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | ||
272 | 272 | @Callable(i) | |
273 | 273 | func create (baseAssetIdStr,shareAssetIdStr,shareAssetName,shareAssetDescription,shareAssetLogo) = { | |
274 | 274 | let shareAssetLabel = "LP_STAKING_POOLS" | |
275 | 275 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
276 | 276 | let checks = [mustManager(i), if (isDefined(getPoolInfo(baseAssetId))) | |
277 | 277 | then true | |
278 | 278 | else throwErr("invalid base asset")] | |
279 | 279 | if ((checks == checks)) | |
280 | 280 | then { | |
281 | 281 | let commonState = [IntegerEntry(keyPeriod(baseAssetId), 0)] | |
282 | 282 | if ((shareAssetIdStr == "")) | |
283 | 283 | then { | |
284 | 284 | let shareAssetIssueAmount = 1 | |
285 | 285 | let shareAssetIssueAction = Issue(shareAssetName, shareAssetDescription, shareAssetIssueAmount, shareAssetDecimals, true) | |
286 | 286 | let calculatedShareAssetId = calculateAssetId(shareAssetIssueAction) | |
287 | 287 | let shareAssetBurnAction = Burn(calculatedShareAssetId, shareAssetIssueAmount) | |
288 | 288 | let calculatedShareAssetIdStr = toBase58String(calculatedShareAssetId) | |
289 | 289 | let createOrUpdate = invoke(assetsStoreContract, "createOrUpdate", [calculatedShareAssetIdStr, shareAssetLogo, false], nil) | |
290 | 290 | if ((createOrUpdate == createOrUpdate)) | |
291 | 291 | then { | |
292 | 292 | let addLabel = invoke(assetsStoreContract, "addLabel", [calculatedShareAssetIdStr, shareAssetLabel], nil) | |
293 | 293 | if ((addLabel == addLabel)) | |
294 | 294 | then $Tuple2((commonState ++ [shareAssetIssueAction, shareAssetBurnAction, StringEntry(keyShareAssetId(baseAssetId), calculatedShareAssetIdStr), StringEntry(keyBaseAssetId(calculatedShareAssetId), baseAssetIdStr)]), calculatedShareAssetIdStr) | |
295 | 295 | else throw("Strict value is not equal to itself.") | |
296 | 296 | } | |
297 | 297 | else throw("Strict value is not equal to itself.") | |
298 | 298 | } | |
299 | 299 | else { | |
300 | 300 | let shareAssetId = fromBase58String(shareAssetIdStr) | |
301 | 301 | let shareAssetInfo = valueOrErrorMessage(assetInfo(shareAssetId), wrapErr("invalid share asset id")) | |
302 | 302 | let checkIssuer = if ((shareAssetInfo.issuer == lpStakingContract)) | |
303 | 303 | then true | |
304 | 304 | else throwErr("invalid share asset id issuer") | |
305 | 305 | if ((checkIssuer == checkIssuer)) | |
306 | 306 | then $Tuple2((commonState ++ [StringEntry(keyShareAssetId(baseAssetId), shareAssetIdStr), StringEntry(keyShareAssetId(shareAssetId), baseAssetIdStr)]), shareAssetIdStr) | |
307 | 307 | else throw("Strict value is not equal to itself.") | |
308 | 308 | } | |
309 | 309 | } | |
310 | 310 | else throw("Strict value is not equal to itself.") | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | ||
315 | 315 | @Callable(i) | |
316 | 316 | func put () = { | |
317 | 317 | let pmt = if ((size(i.payments) == 1)) | |
318 | 318 | then i.payments[0] | |
319 | 319 | else throwErr("exactly 1 payment is expected") | |
320 | 320 | let baseAssetId = pmt.assetId | |
321 | 321 | let userAddress = i.caller | |
322 | 322 | let checks = [shutdownCheck(i), if (isDefined(getString(keyShareAssetId(baseAssetId)))) | |
323 | 323 | then true | |
324 | 324 | else throwErr("invalid asset")] | |
325 | 325 | if ((checks == checks)) | |
326 | 326 | then { | |
327 | 327 | let $t01131211415 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
328 | 328 | let poolAddress = $t01131211415._1 | |
329 | 329 | let lpAssetId = $t01131211415._2 | |
330 | 330 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
331 | 331 | let userBaseAssetAmountToConvertPeriodOption = getInteger(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
332 | 332 | let claimShareAssetInvocation = if ((userBaseAssetAmountToConvertPeriodOption == unit)) | |
333 | 333 | then unit | |
334 | 334 | else { | |
335 | 335 | let userBaseAssetAmountToConvertPeriod = value(userBaseAssetAmountToConvertPeriodOption) | |
336 | 336 | if ((userBaseAssetAmountToConvertPeriod == period)) | |
337 | 337 | then unit | |
338 | 338 | else invoke(this, "claimShareAsset", [assetIdToString(baseAssetId), toString(userAddress)], nil) | |
339 | 339 | } | |
340 | 340 | if ((claimShareAssetInvocation == claimShareAssetInvocation)) | |
341 | 341 | then { | |
342 | 342 | let baseAssetAmountToConvert = valueOrElse(getInteger(keyBaseAssetAmountToConvert(baseAssetId)), 0) | |
343 | 343 | let userBaseAssetAmountToConvert = valueOrElse(getInteger(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), 0) | |
344 | 344 | $Tuple2([IntegerEntry(keyBaseAssetAmountToConvert(baseAssetId), (baseAssetAmountToConvert + pmt.amount)), IntegerEntry(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress), (userBaseAssetAmountToConvert + pmt.amount)), IntegerEntry(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress), period), IntegerEntry(keyHistoryEntry(baseAssetId, "put", period, userAddress, i.transactionId), pmt.amount)], unit) | |
345 | 345 | } | |
346 | 346 | else throw("Strict value is not equal to itself.") | |
347 | 347 | } | |
348 | 348 | else throw("Strict value is not equal to itself.") | |
349 | 349 | } | |
350 | 350 | ||
351 | 351 | ||
352 | 352 | ||
353 | 353 | @Callable(i) | |
354 | 354 | func claimShareAsset (baseAssetIdStr,userAddressStr) = { | |
355 | 355 | let checks = [shutdownCheck(i)] | |
356 | 356 | if ((checks == checks)) | |
357 | 357 | then { | |
358 | 358 | let userAddress = if ((userAddressStr == "")) | |
359 | 359 | then i.caller | |
360 | 360 | else { | |
361 | 361 | let checkCaller = mustThis(i) | |
362 | 362 | if ((checkCaller == checkCaller)) | |
363 | 363 | then valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address")) | |
364 | 364 | else throw("Strict value is not equal to itself.") | |
365 | 365 | } | |
366 | 366 | if ((userAddress == userAddress)) | |
367 | 367 | then { | |
368 | 368 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
369 | 369 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
370 | 370 | if ((shareAssetId == shareAssetId)) | |
371 | 371 | then { | |
372 | 372 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
373 | 373 | if ((period == period)) | |
374 | 374 | then { | |
375 | 375 | let userBaseAssetAmountToConvert = valueOrElse(getInteger(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress)), 0) | |
376 | 376 | let checkAmountToConvert = if ((userBaseAssetAmountToConvert > 0)) | |
377 | 377 | then true | |
378 | 378 | else throwErr("nothing to claim") | |
379 | 379 | if ((checkAmountToConvert == checkAmountToConvert)) | |
380 | 380 | then { | |
381 | 381 | let userBaseAssetAmountToConvertPeriod = valueOrErrorMessage(getInteger(keyUserBaseAssetAmountToConvertPeriod(baseAssetId, userAddress)), wrapErr("failed to get period")) | |
382 | 382 | let checkPeriod = if ((period > userBaseAssetAmountToConvertPeriod)) | |
383 | 383 | then true | |
384 | 384 | else throwErr("invalid period") | |
385 | 385 | if ((checkPeriod == checkPeriod)) | |
386 | 386 | then { | |
387 | 387 | let price = toBigInt(valueOrErrorMessage(getBinary(keyPricePeriodPut(baseAssetId, userBaseAssetAmountToConvertPeriod)), wrapErr("failed to get price"))) | |
388 | 388 | let shareAssetAmount = toInt(fraction(toBigInt(userBaseAssetAmountToConvert), scale18BigInt, price)) | |
389 | 389 | $Tuple2([IntegerEntry(keyUserBaseAssetAmountToConvert(baseAssetId, userAddress), 0), ScriptTransfer(userAddress, shareAssetAmount, shareAssetId), IntegerEntry(keyHistoryEntry(baseAssetId, "claimShareAsset", period, userAddress, i.transactionId), shareAssetAmount)], unit) | |
390 | 390 | } | |
391 | 391 | else throw("Strict value is not equal to itself.") | |
392 | 392 | } | |
393 | 393 | else throw("Strict value is not equal to itself.") | |
394 | 394 | } | |
395 | 395 | else throw("Strict value is not equal to itself.") | |
396 | 396 | } | |
397 | 397 | else throw("Strict value is not equal to itself.") | |
398 | 398 | } | |
399 | 399 | else throw("Strict value is not equal to itself.") | |
400 | 400 | } | |
401 | 401 | else throw("Strict value is not equal to itself.") | |
402 | 402 | } | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | ||
406 | 406 | @Callable(i) | |
407 | 407 | func get () = { | |
408 | 408 | let checks = [shutdownCheck(i)] | |
409 | 409 | if ((checks == checks)) | |
410 | 410 | then { | |
411 | 411 | let pmt = if ((size(i.payments) == 1)) | |
412 | 412 | then i.payments[0] | |
413 | 413 | else throwErr("exactly 1 payment is expected") | |
414 | 414 | let shareAssetId = pmt.assetId | |
415 | 415 | let baseAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyBaseAssetId(shareAssetId)), wrapErr("invalid share asset id")))) | |
416 | 416 | if ((baseAssetId == baseAssetId)) | |
417 | 417 | then { | |
418 | 418 | let userAddress = i.caller | |
419 | 419 | let $t01511615219 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
420 | 420 | let poolAddress = $t01511615219._1 | |
421 | 421 | let lpAssetId = $t01511615219._2 | |
422 | 422 | let period = value(getInteger(keyPeriod(baseAssetId))) | |
423 | 423 | let userShareAssetAmountToConvertPeriodOption = getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)) | |
424 | 424 | let claimBaseAssetInvocation = if ((userShareAssetAmountToConvertPeriodOption == unit)) | |
425 | 425 | then unit | |
426 | 426 | else { | |
427 | 427 | let userShareAssetAmountToConvertPeriod = value(userShareAssetAmountToConvertPeriodOption) | |
428 | 428 | if ((userShareAssetAmountToConvertPeriod == period)) | |
429 | 429 | then unit | |
430 | 430 | else invoke(this, "claimBaseAsset", [userAddress], nil) | |
431 | 431 | } | |
432 | 432 | if ((claimBaseAssetInvocation == claimBaseAssetInvocation)) | |
433 | 433 | then { | |
434 | 434 | let shareAssetAmountToConvert = valueOrElse(getInteger(keyShareAssetAmountToConvert(baseAssetId)), 0) | |
435 | 435 | let userShareAssetAmountToConvert = valueOrElse(getInteger(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), 0) | |
436 | 436 | $Tuple2([IntegerEntry(keyShareAssetAmountToConvert(baseAssetId), (shareAssetAmountToConvert + pmt.amount)), IntegerEntry(keyUserShareAssetAmountToConvert(baseAssetId, userAddress), (userShareAssetAmountToConvert + pmt.amount)), IntegerEntry(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress), period), IntegerEntry(keyHistoryEntry(baseAssetId, "get", period, userAddress, i.transactionId), pmt.amount)], unit) | |
437 | 437 | } | |
438 | 438 | else throw("Strict value is not equal to itself.") | |
439 | 439 | } | |
440 | 440 | else throw("Strict value is not equal to itself.") | |
441 | 441 | } | |
442 | 442 | else throw("Strict value is not equal to itself.") | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | ||
447 | 447 | @Callable(i) | |
448 | 448 | func claimBaseAsset (baseAssetIdStr,userAddressStr) = { | |
449 | 449 | let checks = [shutdownCheck(i)] | |
450 | 450 | if ((checks == checks)) | |
451 | 451 | then { | |
452 | 452 | let userAddress = if ((userAddressStr == "")) | |
453 | 453 | then i.caller | |
454 | 454 | else { | |
455 | 455 | let checkCaller = mustThis(i) | |
456 | 456 | if ((checkCaller == checkCaller)) | |
457 | 457 | then valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address")) | |
458 | 458 | else throw("Strict value is not equal to itself.") | |
459 | 459 | } | |
460 | 460 | if ((userAddress == userAddress)) | |
461 | 461 | then { | |
462 | 462 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
463 | 463 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
464 | 464 | if ((shareAssetId == shareAssetId)) | |
465 | 465 | then { | |
466 | 466 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
467 | 467 | if ((period == period)) | |
468 | 468 | then { | |
469 | 469 | let userShareAssetAmountToConvert = valueOrElse(getInteger(keyUserShareAssetAmountToConvert(baseAssetId, userAddress)), 0) | |
470 | 470 | let checkAmountToConvert = if ((userShareAssetAmountToConvert > 0)) | |
471 | 471 | then true | |
472 | 472 | else throwErr("nothing to claim") | |
473 | 473 | if ((checkAmountToConvert == checkAmountToConvert)) | |
474 | 474 | then { | |
475 | 475 | let userShareAssetAmountToConvertPeriod = valueOrErrorMessage(getInteger(keyUserShareAssetAmountToConvertPeriod(baseAssetId, userAddress)), wrapErr("failed to get period")) | |
476 | 476 | let checkPeriod = if ((period > userShareAssetAmountToConvertPeriod)) | |
477 | 477 | then true | |
478 | 478 | else throwErr("invalid period") | |
479 | 479 | if ((checkPeriod == checkPeriod)) | |
480 | 480 | then { | |
481 | 481 | let price = toBigInt(valueOrErrorMessage(getBinary(keyPricePeriodGet(baseAssetId, userShareAssetAmountToConvertPeriod)), wrapErr("failed to get price"))) | |
482 | 482 | let baseAssetAmount = toInt(fraction(toBigInt(userShareAssetAmountToConvert), price, scale18BigInt)) | |
483 | 483 | $Tuple2([IntegerEntry(keyUserShareAssetAmountToConvert(baseAssetId, userAddress), 0), ScriptTransfer(userAddress, baseAssetAmount, baseAssetId), IntegerEntry(keyHistoryEntry(baseAssetId, "claimBaseAsset", period, userAddress, i.transactionId), baseAssetAmount)], unit) | |
484 | 484 | } | |
485 | 485 | else throw("Strict value is not equal to itself.") | |
486 | 486 | } | |
487 | 487 | else throw("Strict value is not equal to itself.") | |
488 | 488 | } | |
489 | 489 | else throw("Strict value is not equal to itself.") | |
490 | 490 | } | |
491 | 491 | else throw("Strict value is not equal to itself.") | |
492 | 492 | } | |
493 | 493 | else throw("Strict value is not equal to itself.") | |
494 | 494 | } | |
495 | 495 | else throw("Strict value is not equal to itself.") | |
496 | 496 | } | |
497 | 497 | ||
498 | 498 | ||
499 | 499 | ||
500 | 500 | @Callable(i) | |
501 | 501 | func finalize (baseAssetIdStr) = { | |
502 | 502 | let checks = [shutdownCheck(i)] | |
503 | 503 | if ((checks == checks)) | |
504 | 504 | then { | |
505 | 505 | let baseAssetId = parseAssetId(baseAssetIdStr) | |
506 | 506 | let shareAssetId = value(parseAssetId(valueOrErrorMessage(getString(keyShareAssetId(baseAssetId)), wrapErr("invalid base asset id")))) | |
507 | 507 | if ((shareAssetId == shareAssetId)) | |
508 | 508 | then { | |
509 | 509 | let period = valueOrErrorMessage(getInteger(keyPeriod(baseAssetId)), wrapErr("invalid period")) | |
510 | 510 | if ((period == period)) | |
511 | 511 | then { | |
512 | 512 | let periodStartHeightOption = getInteger(keyPeriodStartHeight(baseAssetId, period)) | |
513 | 513 | let checkDelay = if ((periodStartHeightOption == unit)) | |
514 | 514 | then unit | |
515 | 515 | else { | |
516 | 516 | let delay = (height - value(periodStartHeightOption)) | |
517 | 517 | let blocksToWait = min([0, (minDelay - delay)]) | |
518 | 518 | if ((blocksToWait == 0)) | |
519 | 519 | then unit | |
520 | 520 | else throwErr(makeString(["finalization will be possible in ", toString(blocksToWait), " blocks"], "")) | |
521 | 521 | } | |
522 | 522 | if ((checkDelay == checkDelay)) | |
523 | 523 | then { | |
524 | 524 | let $t01916119377 = valueOrErrorMessage(getPoolInfo(baseAssetId), wrapErr("invalid asset")) | |
525 | 525 | let poolAddress = $t01916119377._1 | |
526 | 526 | let lpAssetId = $t01916119377._2 | |
527 | 527 | let stakingReward = valueOrErrorMessage({ | |
528 | 528 | let @ = invoke(stakingContract, "claimWx", [assetIdToString(lpAssetId)], nil) | |
529 | 529 | if ($isInstanceOf(@, "Int")) | |
530 | 530 | then @ | |
531 | 531 | else unit | |
532 | 532 | }, wrapErr("invalid claimWx result")) | |
533 | 533 | if ((stakingReward == stakingReward)) | |
534 | 534 | then { | |
535 | 535 | let useStakingReward = if ((stakingReward > 0)) | |
536 | 536 | then { | |
537 | 537 | let lockPart = fraction(stakingReward, lockFraction, lockFractionMultiplier) | |
538 | 538 | let convertPart = (stakingReward - lockPart) | |
539 | 539 | let r = invoke(boostingContract, "userMaxDurationREADONLY", [toString(this)], nil) | |
540 | - | let lock = match r { | |
541 | - | case _ => | |
542 | - | if (if (if ($isInstanceOf($match0._1, "String")) | |
543 | - | then $isInstanceOf($match0._2, "Int") | |
544 | - | else false) | |
545 | - | then $isInstanceOf($match0, "(String, Int)") | |
546 | - | else false) | |
547 | - | then { | |
548 | - | let function = $match0._1 | |
549 | - | let duration = $match0._2 | |
550 | - | if ((lockPart > 0)) | |
551 | - | then invoke(boostingContract, function, [duration], [AttachedPayment(wxAssetId, lockPart)]) | |
552 | - | else unit | |
553 | - | } | |
554 | - | else throwErr("invalid lock params") | |
555 | - | } | |
540 | + | let lock = if ((lockPart > 0)) | |
541 | + | then match r { | |
542 | + | case _ => | |
543 | + | if (if (if ($isInstanceOf($match0._1, "String")) | |
544 | + | then $isInstanceOf($match0._2, "Int") | |
545 | + | else false) | |
546 | + | then $isInstanceOf($match0, "(String, Int)") | |
547 | + | else false) | |
548 | + | then { | |
549 | + | let function = $match0._1 | |
550 | + | let duration = $match0._2 | |
551 | + | if ((lockPart > 0)) | |
552 | + | then invoke(boostingContract, function, [duration], [AttachedPayment(wxAssetId, lockPart)]) | |
553 | + | else unit | |
554 | + | } | |
555 | + | else throwErr("invalid lock params") | |
556 | + | } | |
557 | + | else unit | |
556 | 558 | if ((lock == lock)) | |
557 | 559 | then { | |
558 | - | let convertedAmount = { | |
559 | - | let inAssetId = wxAssetId | |
560 | - | let minimumToReceive = 0 | |
561 | - | let outAssetIdStr = assetIdToString(usdnAssetId) | |
562 | - | let targetAddress = "" | |
563 | - | valueOrErrorMessage({ | |
564 | - | let @ = invoke(swapContract, "swap", [minimumToReceive, outAssetIdStr, targetAddress], [AttachedPayment(inAssetId, convertPart)]) | |
565 | - | if ($isInstanceOf(@, "Int")) | |
566 | - | then @ | |
567 | - | else unit | |
568 | - | }, wrapErr("invalid swap result")) | |
569 | - | } | |
560 | + | let convertedAmount = if ((convertPart > 0)) | |
561 | + | then { | |
562 | + | let inAssetId = wxAssetId | |
563 | + | let minimumToReceive = 0 | |
564 | + | let outAssetIdStr = assetIdToString(usdnAssetId) | |
565 | + | let targetAddress = "" | |
566 | + | valueOrErrorMessage({ | |
567 | + | let @ = invoke(swapContract, "swap", [minimumToReceive, outAssetIdStr, targetAddress], [AttachedPayment(inAssetId, convertPart)]) | |
568 | + | if ($isInstanceOf(@, "Int")) | |
569 | + | then @ | |
570 | + | else unit | |
571 | + | }, wrapErr("invalid swap result")) | |
572 | + | } | |
573 | + | else 0 | |
570 | 574 | if ((convertedAmount == convertedAmount)) | |
571 | 575 | then { | |
572 | - | let lpAssetAmount = { | |
573 | - | let minOutAmount = 0 | |
574 | - | let autoStake = true | |
575 | - | valueOrErrorMessage({ | |
576 | - | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(usdnAssetId, convertedAmount)]) | |
577 | - | if ($isInstanceOf(@, "Int")) | |
578 | - | then @ | |
579 | - | else unit | |
580 | - | }, wrapErr("invalid putOneTknV2 result")) | |
581 | - | } | |
576 | + | let lpAssetAmount = if ((convertedAmount > 0)) | |
577 | + | then { | |
578 | + | let minOutAmount = 0 | |
579 | + | let autoStake = true | |
580 | + | valueOrErrorMessage({ | |
581 | + | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(usdnAssetId, convertedAmount)]) | |
582 | + | if ($isInstanceOf(@, "Int")) | |
583 | + | then @ | |
584 | + | else unit | |
585 | + | }, wrapErr("invalid putOneTknV2 result")) | |
586 | + | } | |
587 | + | else 0 | |
582 | 588 | if ((lpAssetAmount == lpAssetAmount)) | |
583 | 589 | then lpAssetAmount | |
584 | 590 | else throw("Strict value is not equal to itself.") | |
585 | 591 | } | |
586 | 592 | else throw("Strict value is not equal to itself.") | |
587 | 593 | } | |
588 | 594 | else throw("Strict value is not equal to itself.") | |
589 | 595 | } | |
590 | 596 | else unit | |
591 | 597 | if ((useStakingReward == useStakingReward)) | |
592 | 598 | then { | |
593 | 599 | let shareAssetAmountToConvert = valueOrElse(getInteger(keyShareAssetAmountToConvert(baseAssetId)), 0) | |
594 | 600 | let getActions = if ((shareAssetAmountToConvert > 0)) | |
595 | 601 | then { | |
596 | 602 | let price = calcPrice(lpAssetId, shareAssetId) | |
597 | 603 | if ((price == price)) | |
598 | 604 | then { | |
599 | 605 | let unstakeAmount = toInt(fraction(toBigInt(shareAssetAmountToConvert), price, scale18BigInt, FLOOR)) | |
600 | 606 | let baseAssetAmount = { | |
601 | 607 | let outAssetId = baseAssetId | |
602 | 608 | let minOutAmount = 0 | |
603 | 609 | valueOrErrorMessage({ | |
604 | 610 | let @ = invoke(poolAddress, "unstakeAndGetOneTknV2", [unstakeAmount, assetIdToString(outAssetId), minOutAmount], nil) | |
605 | 611 | if ($isInstanceOf(@, "Int")) | |
606 | 612 | then @ | |
607 | 613 | else unit | |
608 | 614 | }, wrapErr("invalid unstakeAndGetOneTknV2 result")) | |
609 | 615 | } | |
610 | 616 | if ((baseAssetAmount == baseAssetAmount)) | |
611 | 617 | then { | |
612 | 618 | let shareAssetBurnActions = [Burn(shareAssetId, shareAssetAmountToConvert)] | |
613 | 619 | let priceGet = fraction(toBigInt(baseAssetAmount), scale18BigInt, toBigInt(shareAssetAmountToConvert), FLOOR) | |
614 | 620 | let priceGetUpdateActions = [BinaryEntry(keyPricePeriodGet(baseAssetId, period), toBytes(priceGet)), StringEntry(keyPriceGetHistory(baseAssetId), toString(priceGet))] | |
615 | 621 | (shareAssetBurnActions ++ priceGetUpdateActions) | |
616 | 622 | } | |
617 | 623 | else throw("Strict value is not equal to itself.") | |
618 | 624 | } | |
619 | 625 | else throw("Strict value is not equal to itself.") | |
620 | 626 | } | |
621 | 627 | else nil | |
622 | 628 | let baseAssetAmountToConvert = valueOrElse(getInteger(keyBaseAssetAmountToConvert(baseAssetId)), 0) | |
623 | 629 | let putActions = if ((baseAssetAmountToConvert > 0)) | |
624 | 630 | then { | |
625 | 631 | let lpAssetAmount = { | |
626 | 632 | let minOutAmount = 0 | |
627 | 633 | let autoStake = true | |
628 | 634 | valueOrErrorMessage({ | |
629 | 635 | let @ = invoke(poolAddress, "putOneTknV2", [minOutAmount, autoStake], [AttachedPayment(baseAssetId, baseAssetAmountToConvert)]) | |
630 | 636 | if ($isInstanceOf(@, "Int")) | |
631 | 637 | then @ | |
632 | 638 | else unit | |
633 | 639 | }, wrapErr("invalid putOneTknV2 result")) | |
634 | 640 | } | |
635 | 641 | if ((lpAssetAmount == lpAssetAmount)) | |
636 | 642 | then { | |
637 | 643 | let price = calcPrice(lpAssetId, shareAssetId) | |
638 | 644 | if ((price == price)) | |
639 | 645 | then { | |
640 | 646 | let shareAssetAmount = toInt(fraction(toBigInt(lpAssetAmount), scale18BigInt, price, FLOOR)) | |
641 | 647 | let isReissuable = true | |
642 | 648 | let shareAssetReissueActions = [Reissue(shareAssetId, shareAssetAmount, isReissuable)] | |
643 | 649 | let pricePut = fraction(toBigInt(baseAssetAmountToConvert), scale18BigInt, toBigInt(shareAssetAmount)) | |
644 | 650 | let pricePutUpdateActions = [BinaryEntry(keyPricePeriodPut(baseAssetId, period), toBytes(pricePut)), StringEntry(keyPricePutHistory(baseAssetId), toString(pricePut))] | |
645 | 651 | (shareAssetReissueActions ++ pricePutUpdateActions) | |
646 | 652 | } | |
647 | 653 | else throw("Strict value is not equal to itself.") | |
648 | 654 | } | |
649 | 655 | else throw("Strict value is not equal to itself.") | |
650 | 656 | } | |
651 | 657 | else nil | |
652 | 658 | let newPeriod = (period + 1) | |
653 | 659 | let lastPrice = calcPrice(lpAssetId, shareAssetId) | |
654 | 660 | let actions = (([IntegerEntry(keyPeriod(baseAssetId), newPeriod), IntegerEntry(keyPeriodStartHeight(baseAssetId, newPeriod), height), IntegerEntry(keyShareAssetAmountToConvert(baseAssetId), 0), IntegerEntry(keyBaseAssetAmountToConvert(baseAssetId), 0), BinaryEntry(keyPricePeriod(baseAssetId, period), toBytes(lastPrice)), StringEntry(keyPriceHistory(baseAssetId), toString(lastPrice))] ++ putActions) ++ getActions) | |
655 | 661 | $Tuple2(actions, toBytes(lastPrice)) | |
656 | 662 | } | |
657 | 663 | else throw("Strict value is not equal to itself.") | |
658 | 664 | } | |
659 | 665 | else throw("Strict value is not equal to itself.") | |
660 | 666 | } | |
661 | 667 | else throw("Strict value is not equal to itself.") | |
662 | 668 | } | |
663 | 669 | else throw("Strict value is not equal to itself.") | |
664 | 670 | } | |
665 | 671 | else throw("Strict value is not equal to itself.") | |
666 | 672 | } | |
667 | 673 | else throw("Strict value is not equal to itself.") | |
668 | 674 | } | |
669 | 675 | ||
670 | 676 | ||
671 | 677 | @Verifier(tx) | |
672 | 678 | func verify () = { | |
673 | 679 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
674 | 680 | case pk: ByteVector => | |
675 | 681 | pk | |
676 | 682 | case _: Unit => | |
677 | 683 | tx.senderPublicKey | |
678 | 684 | case _ => | |
679 | 685 | throw("Match error") | |
680 | 686 | } | |
681 | 687 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
682 | 688 | } | |
683 | 689 |
github/deemru/w8io/fabc49c 63.98 ms ◑