tx · HVoxBJz4wP62UuToXH3PDuMN2vgfcisuLwzWy5n5Vzf 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp: -0.01400000 Waves 2021.12.16 19:22 [1837045] smart account 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp > SELF 0.00000000 Waves
{ "type": 13, "id": "HVoxBJz4wP62UuToXH3PDuMN2vgfcisuLwzWy5n5Vzf", "fee": 1400000, "feeAssetId": null, "timestamp": 1639671750575, "version": 1, "sender": "3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp", "senderPublicKey": "86RHVxKovtU7yKnepY8wKsd8niDxGAsiwuA1XA1DNqrS", "proofs": [ "447Qz4GPNLypMdxSZeKm5hmWkvAKehEJxb3DU9VyMuKPSyTCnF8DVXdabsqdnPQESxdUntUMG3dnEFa6wAhHtKND" ], "script": "base64:AAIFAAAAAAAAAD4IAhIDCgEIEgMKAQgSBAoCCAgSAwoBCBIHCgUBAQEICBIAEgMKAQgSBAoCCAESBAoCCAESBAoCCAESAwoBCAAAAFQAAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAAB1NDQUxFMTgAAAAAAAAAABIAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAA5QT09MV0VJR0hUTVVMVAUAAAAFTVVMVDgAAAAACnplcm9CaWdJbnQJAAE2AAAAAQAAAAAAAAAAAAAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAEAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAAIAAAAAEGlkeFBvb2xMUEFzc2V0SWQAAAAAAAAAAAMAAAAADWlkeEFtdEFzc2V0SWQAAAAAAAAAAAQAAAAAD2lkeFByaWNlQXNzZXRJZAAAAAAAAAAABQAAAAAOaWR4QW10QXNzZXREY20AAAAAAAAAAAYAAAAAEGlkeFByaWNlQXNzZXREY20AAAAAAAAAAAcAAAAADmlkeElBbXRBc3NldElkAAA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AA/wAAAAEBQAAAAxib29zdGluZ0RhcHACAAAAE2d3eFVzZXJJbmZvUkVBRE9OTFkJAARMAAAAAgUAAAALdXNlckFkZHJlc3MFAAAAA25pbAUAAAADbmlsAwkAAAEAAAACBQAAAAFAAgAAAAlMaXN0W0FueV0FAAAAAUAJAAACAAAAAQIAAAAeQ291bGRuJ3QgY2FzdCBBbnkgdG8gTGlzdFtBbnldBAAAAAlnd3hBbW91bnQKAAAAAAFACQABkQAAAAIFAAAAD2d3eFVzZXJJbmZvTElTVAAAAAAAAAAAAAMJAAABAAAAAgUAAAABQAIAAAADSW50BQAAAAFACQAAAgAAAAECAAAAGENvdWxkbid0IGNhc3QgQW55IHRvIEludAkABRQAAAACBQAAAANuaWwJAAS5AAAAAgkABEwAAAACAgAAAAIlZAkABEwAAAACCQABpAAAAAEFAAAACWd3eEFtb3VudAUAAAADbmlsBQAAAANTRVAAAAAA1C8aig==", "chainId": 84, "height": 1837045, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6xLAqyPd79dCCuRwDkENhSLPJTFUxUAN54Eo1QEe2GWe Next: 6Z5wHDjCVNAxK8Vt1D83warf5GpCoSznW7wiqQCxuvMN Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | + | ||
14 | + | let POOLWEIGHTMULT = MULT8 | |
13 | 15 | ||
14 | 16 | let zeroBigInt = toBigInt(0) | |
15 | 17 | ||
45 | 47 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
46 | 48 | ||
47 | 49 | ||
50 | + | func asAnyList (val) = match val { | |
51 | + | case valAnyLyst: List[Any] => | |
52 | + | valAnyLyst | |
53 | + | case _ => | |
54 | + | throw("fail to cast into List[Any]") | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | func asInt (val) = match val { | |
59 | + | case valInt: Int => | |
60 | + | valInt | |
61 | + | case _ => | |
62 | + | throw("fail to cast into Int") | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func asString (val) = match val { | |
67 | + | case valStr: String => | |
68 | + | valStr | |
69 | + | case _ => | |
70 | + | throw("fail to cast into String") | |
71 | + | } | |
72 | + | ||
73 | + | ||
48 | 74 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
75 | + | ||
76 | + | ||
77 | + | let IdxFactoryCfgStakingDapp = 1 | |
78 | + | ||
79 | + | let IdxFactoryCfgBoostingDapp = 2 | |
80 | + | ||
81 | + | let IdxFactoryCfgIdoDapp = 3 | |
82 | + | ||
83 | + | let IdxFactoryCfgTeamDapp = 4 | |
84 | + | ||
85 | + | let IdxFactoryCfgEmissionDapp = 5 | |
86 | + | ||
87 | + | let IdxFactoryCfgRestDapp = 6 | |
88 | + | ||
89 | + | let IdxFactoryCfgSlippageDapp = 7 | |
90 | + | ||
91 | + | let IdxFactoryCfgGwxRewardDapp = 8 | |
92 | + | ||
93 | + | func keyFactoryCfg () = "%s__factoryConfig" | |
94 | + | ||
95 | + | ||
96 | + | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyFactoryLpList () = "%s__lpTokensList" | |
49 | 100 | ||
50 | 101 | ||
51 | 102 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
52 | 103 | ||
53 | 104 | ||
54 | - | func keyFactoryLpList () = "%s__lpTokensList" | |
55 | - | ||
56 | - | ||
57 | - | func keyFactoryCfg () = "%s__factoryConfig" | |
105 | + | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
58 | 106 | ||
59 | 107 | ||
60 | 108 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress())) | |
63 | 111 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
64 | 112 | ||
65 | 113 | ||
66 | - | func readFactoryCfgOrFail () = split(getStringByAddressOrFail(readFactoryAddressOrFail(), keyFactoryCfg()), SEP) | |
114 | + | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
115 | + | ||
116 | + | ||
117 | + | func getBoostingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgBoostingDapp]) | |
118 | + | ||
119 | + | ||
120 | + | func getEmissionAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgEmissionDapp]) | |
121 | + | ||
122 | + | ||
123 | + | func getStakingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgStakingDapp]) | |
124 | + | ||
125 | + | ||
126 | + | func getGwxRewardAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgGwxRewardDapp]) | |
127 | + | ||
128 | + | ||
129 | + | func keyBoostCfg () = "%s__config" | |
130 | + | ||
131 | + | ||
132 | + | func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
133 | + | ||
134 | + | ||
135 | + | func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
136 | + | ||
137 | + | ||
138 | + | func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount" | |
139 | + | ||
140 | + | ||
141 | + | func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
142 | + | ||
143 | + | ||
144 | + | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
145 | + | ||
146 | + | ||
147 | + | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
148 | + | ||
149 | + | ||
150 | + | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
151 | + | ||
152 | + | ||
153 | + | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
154 | + | ||
155 | + | ||
156 | + | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
157 | + | ||
158 | + | ||
159 | + | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
160 | + | ||
161 | + | ||
162 | + | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
163 | + | ||
164 | + | ||
165 | + | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
166 | + | ||
167 | + | ||
168 | + | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
169 | + | ||
170 | + | ||
171 | + | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
172 | + | ||
173 | + | ||
174 | + | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
175 | + | ||
176 | + | ||
177 | + | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
178 | + | ||
179 | + | ||
180 | + | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
181 | + | ||
182 | + | ||
183 | + | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
184 | + | ||
185 | + | ||
186 | + | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
67 | 187 | ||
68 | 188 | ||
69 | 189 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
72 | 192 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
73 | 193 | ||
74 | 194 | ||
75 | - | func | |
195 | + | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
76 | 196 | ||
77 | 197 | ||
78 | - | func | |
198 | + | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
79 | 199 | ||
80 | 200 | ||
81 | - | func internalCurrentRewardRate (stakingContract,lpAssetId) = { | |
82 | - | let wxEmissionPerBlock = 0 | |
83 | - | let maxFactor = (1 * MULT8) | |
84 | - | let totalLpStaked = getIntOrZero(stakingContract, keyStakedTotal(lpAssetId)) | |
85 | - | [wxEmissionPerBlock, maxFactor, totalLpStaked] | |
201 | + | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
202 | + | ||
203 | + | ||
204 | + | func readStaked (stakingDapp,key) = valueOrElse(getInteger(stakingDapp, key), 0) | |
205 | + | ||
206 | + | ||
207 | + | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
208 | + | ||
209 | + | ||
210 | + | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
211 | + | ||
212 | + | ||
213 | + | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
214 | + | ||
215 | + | ||
216 | + | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
217 | + | ||
218 | + | ||
219 | + | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
220 | + | ||
221 | + | ||
222 | + | let factoryDapp = readFactoryAddressOrFail() | |
223 | + | ||
224 | + | let factoryCfg = readFactoryCfgOrFail(factoryDapp) | |
225 | + | ||
226 | + | let emissionDapp = getEmissionAddressOrFail(factoryCfg) | |
227 | + | ||
228 | + | let stakingDapp = getStakingAddressOrFail(factoryCfg) | |
229 | + | ||
230 | + | let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg) | |
231 | + | ||
232 | + | let boostingDapp = getBoostingAddressOrFail(factoryCfg) | |
233 | + | ||
234 | + | func internalCurrentRewardRate (lpAssetId) = { | |
235 | + | let poolAddressStr = getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
236 | + | let poolWeightMult = MULT8 | |
237 | + | let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr)) | |
238 | + | let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) | |
239 | + | let wxEmissionPerBlockMax = getIntOrFail(emissionDapp, keyEmissionRatePerBlockMaxCurrent()) | |
240 | + | let boostMaxCoeff = 3 | |
241 | + | let poolWxEmissionPerBlock = (fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) / boostMaxCoeff) | |
242 | + | let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult) | |
243 | + | let maxFactor = (boostMaxCoeff * MULT8) | |
244 | + | let totalLpStaked = getIntOrZero(stakingDapp, keyStakedTotal(lpAssetId)) | |
245 | + | [poolWxEmissionPerBlock, maxFactor, totalLpStaked] | |
246 | + | } | |
247 | + | ||
248 | + | ||
249 | + | func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = { | |
250 | + | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
251 | + | let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8) | |
252 | + | [gWxAmountStart] | |
86 | 253 | } | |
87 | 254 | ||
88 | 255 | ||
95 | 262 | ||
96 | 263 | @Callable(i) | |
97 | 264 | func currentRewardRateREADONLY (lpAssetId) = { | |
98 | - | let factoryCfgArray = readFactoryCfgOrFail() | |
99 | - | let stakingContract = getStakingAddressOrFail(factoryCfgArray) | |
100 | - | let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId) | |
265 | + | let rewardData = internalCurrentRewardRate(lpAssetId) | |
101 | 266 | let wxEmissionPerBlock = rewardData[0] | |
102 | 267 | let maxFactor = rewardData[1] | |
103 | 268 | let totalLpStaked = rewardData[2] | |
108 | 273 | ||
109 | 274 | @Callable(i) | |
110 | 275 | func currentUserRewardRateREADONLY (lpAssetId,userAddress) = { | |
111 | - | let factoryCfgArray = readFactoryCfgOrFail() | |
112 | - | let stakingContract = getStakingAddressOrFail(factoryCfgArray) | |
113 | - | let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId) | |
276 | + | let rewardData = internalCurrentRewardRate(lpAssetId) | |
114 | 277 | let wxEmissionPerBlock = rewardData[0] | |
115 | 278 | let maxFactor = rewardData[1] | |
116 | 279 | let totalLpStaked = rewardData[2] | |
117 | - | let lpStakedByUser = getIntOrZero(stakingContract, keyStakedByUser(userAddress, lpAssetId)) | |
118 | - | let boostingPower = (1 * MULT8) | |
119 | - | $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP)) | |
280 | + | let lpStakedByUser = getIntOrZero(stakingDapp, keyStakedByUser(userAddress, lpAssetId)) | |
281 | + | let userClaimInfo = split(asString(invoke(stakingDapp, "claimWxREADONLY", [lpAssetId, userAddress], nil)), SEP) | |
282 | + | let minRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[5]), "couldn't parse minRewardPart") | |
283 | + | let boostRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[6]), "couldn't parse boostRewardPart") | |
284 | + | let debug = userClaimInfo[7] | |
285 | + | let boostingPower = if ((boostRewardPart == 0)) | |
286 | + | then (1 * MULT8) | |
287 | + | else fraction((minRewardPart + boostRewardPart), MULT8, minRewardPart) | |
288 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%s", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower), debug], SEP)) | |
120 | 289 | } | |
121 | 290 | ||
122 | 291 | ||
126 | 295 | let lpList = readLpList() | |
127 | 296 | let prefix = "%s%d%d%d%s" | |
128 | 297 | func claimedRewardByLpAggregator (resultStr,nextLp) = { | |
129 | - | let rand = ((toInt(fromBase58String(nextLp)) % 100000) + (toInt(toBytes(userAddress)) % 100000)) | |
130 | - | let absRand = if ((0 > rand)) | |
131 | - | then -(rand) | |
132 | - | else rand | |
133 | - | let val = (((absRand % 100) * MULT8) + (absRand * (MULT8 / 100000))) | |
134 | - | let minRewardClaimed = 0 | |
135 | - | let boostRewardClaimed = 0 | |
298 | + | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(nextLp, userAddress) | |
299 | + | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(nextLp, userAddress) | |
300 | + | let minRewardClaimed = valueOrElse(getInteger(stakingDapp, claimedByUserMinRewardKEY), 0) | |
301 | + | let boostRewardClaimed = valueOrElse(getInteger(stakingDapp, claimedByUserBoostRewardKEY), 0) | |
136 | 302 | let gFeeClaimed = 0 | |
137 | 303 | makeString([(prefix + resultStr), nextLp, toString(minRewardClaimed), toString(boostRewardClaimed), toString(gFeeClaimed), "end"], SEP) | |
138 | 304 | } | |
158 | 324 | ||
159 | 325 | @Callable(i) | |
160 | 326 | func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = { | |
161 | - | let boost = if ((userAddressOpt != "")) | |
162 | - | then (3 * MULT8) | |
163 | - | else (1 * MULT8) | |
164 | - | let monthes18 = fraction(toBigInt(deltaLockPeriodInBlocks), MULT18, toBigInt((30 * 1440))) | |
165 | - | let coeff18 = (pow(monthes18, SCALE18, toBigInt(2), 0, SCALE18, HALFUP) / toBigInt(100)) | |
166 | - | let gWxAmount = fraction(toBigInt(deltaWxAmount), coeff18, MULT18) | |
167 | - | $Tuple2(nil, makeString(["%d%d", toString(toInt(gWxAmount)), toString(boost)], SEP)) | |
327 | + | let mathDapp = gwxRewardDapp | |
328 | + | let EMPTYSTR = "empty" | |
329 | + | let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4]) | |
330 | + | let lpAssetIdStr = if ((lpAssetIdOpt == "")) | |
331 | + | then EMPTYSTR | |
332 | + | else lpAssetIdOpt | |
333 | + | let userAddressStr = if ((userAddressOpt == "")) | |
334 | + | then EMPTYSTR | |
335 | + | else userAddressOpt | |
336 | + | let userNumStr = valueOrElse(getString(boostingDapp, keyUser2NumMapping(userAddressOpt)), EMPTYSTR) | |
337 | + | let userAmount = valueOrElse(getInteger(boostingDapp, keyLockParamUserAmount(userNumStr)), 0) | |
338 | + | let lockStart = valueOrElse(getInteger(boostingDapp, keyLockParamStartBlock(userNumStr)), height) | |
339 | + | let lockDuration = valueOrElse(getInteger(boostingDapp, keyLockParamDuration(userNumStr)), 0) | |
340 | + | let lockEnd = (lockStart + lockDuration) | |
341 | + | let remainingDuration = max([(lockEnd - height), 0]) | |
342 | + | let userAmountNew = (userAmount + deltaWxAmount) | |
343 | + | let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks]) | |
344 | + | let userCurrgWxAmount = asInt(asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddressStr], nil))[0]) | |
345 | + | let gWxAmountStartNew = calcGwxAmountStartREADONLY(userAmountNew, lockDurationNew, maxLockDurationInBlocks)[0] | |
346 | + | let gWxParamsResultList = asAnyList(invoke(mathDapp, "calcGwxParamsREADONLY", [gWxAmountStartNew, height, lockDurationNew], nil)) | |
347 | + | let gWxAmountDiff = (gWxAmountStartNew - userCurrgWxAmount) | |
348 | + | let k = asInt(gWxParamsResultList[0]) | |
349 | + | let b = asInt(gWxParamsResultList[1]) | |
350 | + | let period = toString(asInt(gWxParamsResultList[2])) | |
351 | + | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
352 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
353 | + | let userMaxBoostIntNew = ((gWxAmountStartNew * lockDurationNew) / 2) | |
354 | + | let totalMaxBoostInt = getIntOrZero(boostingDapp, totalMaxBoostIntegralKEY) | |
355 | + | let totalCachedGwx = valueOrElse(getInteger(boostingDapp, totalCachedGwxKEY), 0) | |
356 | + | let MULT3 = 1000 | |
357 | + | let wxEmissionPerBlockX3 = (getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) * MULT3) | |
358 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
359 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
360 | + | let stakedByUser = readStaked(stakingDapp, stakedByUserKEY) | |
361 | + | let stakedTotal = readStaked(stakingDapp, stakedTotalKEY) | |
362 | + | let stakedByUserNew = (stakedByUser + deltaLpAmount) | |
363 | + | let stakedTotalNew = (stakedTotal + deltaLpAmount) | |
364 | + | let poolWeight = if ((lpAssetIdStr != EMPTYSTR)) | |
365 | + | then { | |
366 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryDapp, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
367 | + | getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr)) | |
368 | + | } | |
369 | + | else 0 | |
370 | + | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
371 | + | let wxPerLpX3 = if ((stakedTotalNew != 0)) | |
372 | + | then fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotalNew) | |
373 | + | else 0 | |
374 | + | let userWxPerBlockX3 = fraction(wxPerLpX3, stakedByUserNew, MULT8) | |
375 | + | let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * 2) | |
376 | + | let tmpUserBoostPerBlockX3 = fraction(gWxAmountStartNew, boostEmissionPerBlockX3, (totalCachedGwx + gWxAmountDiff)) | |
377 | + | let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * 2)]) | |
378 | + | let boostCoeff = if ((userWxPerBlockX3 == 0)) | |
379 | + | then (1 * MULT8) | |
380 | + | else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3) | |
381 | + | let debug = makeString([("lpAssetIdStr=" + lpAssetIdStr), ("userAddressStr=" + userAddressStr), ("userNumStr=" + userNumStr), ("userAmount=" + toString(userAmount)), ("userAmountNew=" + toString(userAmountNew)), ("lockDurationNew=" + toString(lockDurationNew)), ("gWxAmountStart=" + toString(gWxAmountStartNew)), ("tmpUserBoostPerBlockX3=" + toString(tmpUserBoostPerBlockX3)), ("stakedByUserNew=" + toString(stakedByUserNew)), ("stakedTotalNew=" + toString(stakedTotalNew)), ("poolWeight=" + toString(poolWeight)), ("wxPerLpX3=" + toString(wxPerLpX3)), ("poolWxEmissionPerBlockX3=" + toString(poolWxEmissionPerBlockX3)), ("userWxPerBlockX3=" + toString(userWxPerBlockX3)), ("gWxAmountDiff=" + toString(gWxAmountDiff)), ("totalCachedGwx=" + toString(totalCachedGwx)), ("userCurrgWxAmount=" + toString(userCurrgWxAmount))], "::") | |
382 | + | $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(boostCoeff), debug], SEP)) | |
168 | 383 | } | |
169 | 384 | ||
170 | 385 | ||
173 | 388 | func wxEmissionStatsREADONLY () = { | |
174 | 389 | let ONEMULT = toString(MULT8) | |
175 | 390 | let ONE = "1" | |
176 | - | let totalWxReleased = 0 | |
177 | - | let totalWxLocked = 0 | |
178 | - | let locksDurationSumInBlocks = 0 | |
179 | - | let locksCount = 0 | |
391 | + | let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) | |
392 | + | let emissionStartBlock = getIntOrFail(emissionDapp, keyEmissionStartBlock()) | |
393 | + | let passedBlocks = if ((emissionStartBlock > height)) | |
394 | + | then 0 | |
395 | + | else (height - emissionStartBlock) | |
396 | + | let teamEmDuration = (1440 * 365) | |
397 | + | let teamEmMax = (201000000 * MULT8) | |
398 | + | let teamEm = if ((passedBlocks > teamEmDuration)) | |
399 | + | then teamEmMax | |
400 | + | else fraction(teamEmMax, passedBlocks, teamEmDuration) | |
401 | + | let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm) | |
402 | + | let totalWxLocked = getIntOrZero(boostingDapp, keyBoostingLockParamTotalAmount()) | |
403 | + | let locksDurationSumInBlocks = getIntOrZero(boostingDapp, keyBoostingStatsLocksDurationSumInBlocks()) | |
404 | + | let locksCount = getIntOrZero(boostingDapp, keyBoostingStatsLocksCount()) | |
180 | 405 | $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP)) | |
181 | 406 | } | |
182 | 407 | ||
184 | 409 | ||
185 | 410 | @Callable(i) | |
186 | 411 | func poolStatsREADONLY (lpAsset) = { | |
187 | - | let factoryAddress = readFactoryAddressOrFail() | |
188 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
412 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
189 | 413 | let cfg = { | |
190 | 414 | let @ = invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
191 | 415 | if ($isInstanceOf(@, "List[Any]")) | |
266 | 490 | then @ | |
267 | 491 | else throw("Couldn't cast Any to Int") | |
268 | 492 | } | |
269 | - | let poolWeight = getIntegerValue( | |
493 | + | let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress))) | |
270 | 494 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight)], SEP)) | |
271 | 495 | } | |
272 | 496 | ||
274 | 498 | ||
275 | 499 | @Callable(i) | |
276 | 500 | func poolEvaluatePutByAmountAssetREADONLY (lpAsset,inAmAssetAmt) = { | |
277 | - | let factoryAddress = readFactoryAddressOrFail() | |
278 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
501 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
279 | 502 | let cfg = { | |
280 | 503 | let @ = invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
281 | 504 | if ($isInstanceOf(@, "List[Any]")) | |
373 | 596 | else throw("Couldn't cast Any to Int") | |
374 | 597 | } | |
375 | 598 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
376 | - | let $ | |
599 | + | let $t02222922582 = match res { | |
377 | 600 | case _ => | |
378 | 601 | if (if ($isInstanceOf($match0._1, "Int")) | |
379 | 602 | then if ($isInstanceOf($match0._3, "Int")) | |
394 | 617 | } | |
395 | 618 | else throw("Couldn't cast types") | |
396 | 619 | } | |
397 | - | let calcLpAmt = $ | |
398 | - | let curPriceCalc = $ | |
399 | - | let amBalance = $ | |
400 | - | let prBalance = $ | |
401 | - | let lpEmission = $ | |
620 | + | let calcLpAmt = $t02222922582._1 | |
621 | + | let curPriceCalc = $t02222922582._2 | |
622 | + | let amBalance = $t02222922582._3 | |
623 | + | let prBalance = $t02222922582._4 | |
624 | + | let lpEmission = $t02222922582._5 | |
402 | 625 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP)) | |
403 | 626 | } | |
404 | 627 | ||
406 | 629 | ||
407 | 630 | @Callable(i) | |
408 | 631 | func poolEvaluatePutByPriceAssetREADONLY (lpAsset,inPrAssetAmt) = { | |
409 | - | let factoryAddress = readFactoryAddressOrFail() | |
410 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
632 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
411 | 633 | let cfg = { | |
412 | 634 | let @ = invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
413 | 635 | if ($isInstanceOf(@, "List[Any]")) | |
505 | 727 | else throw("Couldn't cast Any to Int") | |
506 | 728 | } | |
507 | 729 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
508 | - | let $ | |
730 | + | let $t02523225585 = match res { | |
509 | 731 | case _ => | |
510 | 732 | if (if ($isInstanceOf($match0._1, "Int")) | |
511 | 733 | then if ($isInstanceOf($match0._3, "Int")) | |
526 | 748 | } | |
527 | 749 | else throw("Couldn't cast types") | |
528 | 750 | } | |
529 | - | let calcLpAmt = $ | |
530 | - | let curPriceCalc = $ | |
531 | - | let amBalance = $ | |
532 | - | let prBalance = $ | |
533 | - | let lpEmission = $ | |
751 | + | let calcLpAmt = $t02523225585._1 | |
752 | + | let curPriceCalc = $t02523225585._2 | |
753 | + | let amBalance = $t02523225585._3 | |
754 | + | let prBalance = $t02523225585._4 | |
755 | + | let lpEmission = $t02523225585._5 | |
534 | 756 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP)) | |
535 | 757 | } | |
536 | 758 | ||
538 | 760 | ||
539 | 761 | @Callable(i) | |
540 | 762 | func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
541 | - | let factoryAddress = readFactoryAddressOrFail() | |
542 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId))) | |
763 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId))) | |
543 | 764 | let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil) | |
544 | - | let $ | |
765 | + | let $t02628026697 = match res { | |
545 | 766 | case _ => | |
546 | 767 | if (if ($isInstanceOf($match0._1, "Int")) | |
547 | 768 | then if ($isInstanceOf($match0._2, "Int")) | |
568 | 789 | } | |
569 | 790 | else throw("Couldn't cast types") | |
570 | 791 | } | |
571 | - | let outAmAmt = $ | |
572 | - | let outPrAmt = $ | |
573 | - | let amBalance = $ | |
574 | - | let prBalance = $ | |
575 | - | let lpEmission = $ | |
576 | - | let curPrice = $ | |
577 | - | let poolStatus = $ | |
792 | + | let outAmAmt = $t02628026697._1 | |
793 | + | let outPrAmt = $t02628026697._2 | |
794 | + | let amBalance = $t02628026697._3 | |
795 | + | let prBalance = $t02628026697._4 | |
796 | + | let lpEmission = $t02628026697._5 | |
797 | + | let curPrice = $t02628026697._6 | |
798 | + | let poolStatus = $t02628026697._7 | |
578 | 799 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP)) | |
800 | + | } | |
801 | + | ||
802 | + | ||
803 | + | ||
804 | + | @Callable(i) | |
805 | + | func gwxUserInfoREADONLY (userAddress) = { | |
806 | + | let gwxUserInfoLIST = { | |
807 | + | let @ = invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddress], nil) | |
808 | + | if ($isInstanceOf(@, "List[Any]")) | |
809 | + | then @ | |
810 | + | else throw("Couldn't cast Any to List[Any]") | |
811 | + | } | |
812 | + | let gwxAmount = { | |
813 | + | let @ = gwxUserInfoLIST[0] | |
814 | + | if ($isInstanceOf(@, "Int")) | |
815 | + | then @ | |
816 | + | else throw("Couldn't cast Any to Int") | |
817 | + | } | |
818 | + | $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP)) | |
579 | 819 | } | |
580 | 820 | ||
581 | 821 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | + | ||
14 | + | let POOLWEIGHTMULT = MULT8 | |
13 | 15 | ||
14 | 16 | let zeroBigInt = toBigInt(0) | |
15 | 17 | ||
16 | 18 | let idxPoolAddress = 1 | |
17 | 19 | ||
18 | 20 | let idxPoolStatus = 2 | |
19 | 21 | ||
20 | 22 | let idxPoolLPAssetId = 3 | |
21 | 23 | ||
22 | 24 | let idxAmtAssetId = 4 | |
23 | 25 | ||
24 | 26 | let idxPriceAssetId = 5 | |
25 | 27 | ||
26 | 28 | let idxAmtAssetDcm = 6 | |
27 | 29 | ||
28 | 30 | let idxPriceAssetDcm = 7 | |
29 | 31 | ||
30 | 32 | let idxIAmtAssetId = 8 | |
31 | 33 | ||
32 | 34 | let idxIPriceAssetId = 9 | |
33 | 35 | ||
34 | 36 | let idxLPAssetDcm = 10 | |
35 | 37 | ||
36 | 38 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
37 | 39 | ||
38 | 40 | ||
39 | 41 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
43 | 45 | ||
44 | 46 | ||
45 | 47 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
46 | 48 | ||
47 | 49 | ||
50 | + | func asAnyList (val) = match val { | |
51 | + | case valAnyLyst: List[Any] => | |
52 | + | valAnyLyst | |
53 | + | case _ => | |
54 | + | throw("fail to cast into List[Any]") | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | func asInt (val) = match val { | |
59 | + | case valInt: Int => | |
60 | + | valInt | |
61 | + | case _ => | |
62 | + | throw("fail to cast into Int") | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func asString (val) = match val { | |
67 | + | case valStr: String => | |
68 | + | valStr | |
69 | + | case _ => | |
70 | + | throw("fail to cast into String") | |
71 | + | } | |
72 | + | ||
73 | + | ||
48 | 74 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
75 | + | ||
76 | + | ||
77 | + | let IdxFactoryCfgStakingDapp = 1 | |
78 | + | ||
79 | + | let IdxFactoryCfgBoostingDapp = 2 | |
80 | + | ||
81 | + | let IdxFactoryCfgIdoDapp = 3 | |
82 | + | ||
83 | + | let IdxFactoryCfgTeamDapp = 4 | |
84 | + | ||
85 | + | let IdxFactoryCfgEmissionDapp = 5 | |
86 | + | ||
87 | + | let IdxFactoryCfgRestDapp = 6 | |
88 | + | ||
89 | + | let IdxFactoryCfgSlippageDapp = 7 | |
90 | + | ||
91 | + | let IdxFactoryCfgGwxRewardDapp = 8 | |
92 | + | ||
93 | + | func keyFactoryCfg () = "%s__factoryConfig" | |
94 | + | ||
95 | + | ||
96 | + | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyFactoryLpList () = "%s__lpTokensList" | |
49 | 100 | ||
50 | 101 | ||
51 | 102 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
52 | 103 | ||
53 | 104 | ||
54 | - | func keyFactoryLpList () = "%s__lpTokensList" | |
55 | - | ||
56 | - | ||
57 | - | func keyFactoryCfg () = "%s__factoryConfig" | |
105 | + | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
58 | 106 | ||
59 | 107 | ||
60 | 108 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress())) | |
61 | 109 | ||
62 | 110 | ||
63 | 111 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
64 | 112 | ||
65 | 113 | ||
66 | - | func readFactoryCfgOrFail () = split(getStringByAddressOrFail(readFactoryAddressOrFail(), keyFactoryCfg()), SEP) | |
114 | + | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
115 | + | ||
116 | + | ||
117 | + | func getBoostingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgBoostingDapp]) | |
118 | + | ||
119 | + | ||
120 | + | func getEmissionAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgEmissionDapp]) | |
121 | + | ||
122 | + | ||
123 | + | func getStakingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgStakingDapp]) | |
124 | + | ||
125 | + | ||
126 | + | func getGwxRewardAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgGwxRewardDapp]) | |
127 | + | ||
128 | + | ||
129 | + | func keyBoostCfg () = "%s__config" | |
130 | + | ||
131 | + | ||
132 | + | func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
133 | + | ||
134 | + | ||
135 | + | func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
136 | + | ||
137 | + | ||
138 | + | func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount" | |
139 | + | ||
140 | + | ||
141 | + | func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
142 | + | ||
143 | + | ||
144 | + | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
145 | + | ||
146 | + | ||
147 | + | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
148 | + | ||
149 | + | ||
150 | + | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
151 | + | ||
152 | + | ||
153 | + | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
154 | + | ||
155 | + | ||
156 | + | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
157 | + | ||
158 | + | ||
159 | + | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
160 | + | ||
161 | + | ||
162 | + | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
163 | + | ||
164 | + | ||
165 | + | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
166 | + | ||
167 | + | ||
168 | + | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
169 | + | ||
170 | + | ||
171 | + | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
172 | + | ||
173 | + | ||
174 | + | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
175 | + | ||
176 | + | ||
177 | + | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
178 | + | ||
179 | + | ||
180 | + | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
181 | + | ||
182 | + | ||
183 | + | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
184 | + | ||
185 | + | ||
186 | + | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
67 | 187 | ||
68 | 188 | ||
69 | 189 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
70 | 190 | ||
71 | 191 | ||
72 | 192 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
73 | 193 | ||
74 | 194 | ||
75 | - | func | |
195 | + | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
76 | 196 | ||
77 | 197 | ||
78 | - | func | |
198 | + | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
79 | 199 | ||
80 | 200 | ||
81 | - | func internalCurrentRewardRate (stakingContract,lpAssetId) = { | |
82 | - | let wxEmissionPerBlock = 0 | |
83 | - | let maxFactor = (1 * MULT8) | |
84 | - | let totalLpStaked = getIntOrZero(stakingContract, keyStakedTotal(lpAssetId)) | |
85 | - | [wxEmissionPerBlock, maxFactor, totalLpStaked] | |
201 | + | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
202 | + | ||
203 | + | ||
204 | + | func readStaked (stakingDapp,key) = valueOrElse(getInteger(stakingDapp, key), 0) | |
205 | + | ||
206 | + | ||
207 | + | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
208 | + | ||
209 | + | ||
210 | + | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
211 | + | ||
212 | + | ||
213 | + | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
214 | + | ||
215 | + | ||
216 | + | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
217 | + | ||
218 | + | ||
219 | + | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
220 | + | ||
221 | + | ||
222 | + | let factoryDapp = readFactoryAddressOrFail() | |
223 | + | ||
224 | + | let factoryCfg = readFactoryCfgOrFail(factoryDapp) | |
225 | + | ||
226 | + | let emissionDapp = getEmissionAddressOrFail(factoryCfg) | |
227 | + | ||
228 | + | let stakingDapp = getStakingAddressOrFail(factoryCfg) | |
229 | + | ||
230 | + | let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg) | |
231 | + | ||
232 | + | let boostingDapp = getBoostingAddressOrFail(factoryCfg) | |
233 | + | ||
234 | + | func internalCurrentRewardRate (lpAssetId) = { | |
235 | + | let poolAddressStr = getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
236 | + | let poolWeightMult = MULT8 | |
237 | + | let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr)) | |
238 | + | let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) | |
239 | + | let wxEmissionPerBlockMax = getIntOrFail(emissionDapp, keyEmissionRatePerBlockMaxCurrent()) | |
240 | + | let boostMaxCoeff = 3 | |
241 | + | let poolWxEmissionPerBlock = (fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) / boostMaxCoeff) | |
242 | + | let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult) | |
243 | + | let maxFactor = (boostMaxCoeff * MULT8) | |
244 | + | let totalLpStaked = getIntOrZero(stakingDapp, keyStakedTotal(lpAssetId)) | |
245 | + | [poolWxEmissionPerBlock, maxFactor, totalLpStaked] | |
246 | + | } | |
247 | + | ||
248 | + | ||
249 | + | func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = { | |
250 | + | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
251 | + | let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8) | |
252 | + | [gWxAmountStart] | |
86 | 253 | } | |
87 | 254 | ||
88 | 255 | ||
89 | 256 | @Callable(i) | |
90 | 257 | func constructor (factoryAddress) = if ((i.caller != this)) | |
91 | 258 | then throw("not authorized") | |
92 | 259 | else [StringEntry(keyFactoryAddress(), factoryAddress)] | |
93 | 260 | ||
94 | 261 | ||
95 | 262 | ||
96 | 263 | @Callable(i) | |
97 | 264 | func currentRewardRateREADONLY (lpAssetId) = { | |
98 | - | let factoryCfgArray = readFactoryCfgOrFail() | |
99 | - | let stakingContract = getStakingAddressOrFail(factoryCfgArray) | |
100 | - | let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId) | |
265 | + | let rewardData = internalCurrentRewardRate(lpAssetId) | |
101 | 266 | let wxEmissionPerBlock = rewardData[0] | |
102 | 267 | let maxFactor = rewardData[1] | |
103 | 268 | let totalLpStaked = rewardData[2] | |
104 | 269 | $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked)], SEP)) | |
105 | 270 | } | |
106 | 271 | ||
107 | 272 | ||
108 | 273 | ||
109 | 274 | @Callable(i) | |
110 | 275 | func currentUserRewardRateREADONLY (lpAssetId,userAddress) = { | |
111 | - | let factoryCfgArray = readFactoryCfgOrFail() | |
112 | - | let stakingContract = getStakingAddressOrFail(factoryCfgArray) | |
113 | - | let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId) | |
276 | + | let rewardData = internalCurrentRewardRate(lpAssetId) | |
114 | 277 | let wxEmissionPerBlock = rewardData[0] | |
115 | 278 | let maxFactor = rewardData[1] | |
116 | 279 | let totalLpStaked = rewardData[2] | |
117 | - | let lpStakedByUser = getIntOrZero(stakingContract, keyStakedByUser(userAddress, lpAssetId)) | |
118 | - | let boostingPower = (1 * MULT8) | |
119 | - | $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP)) | |
280 | + | let lpStakedByUser = getIntOrZero(stakingDapp, keyStakedByUser(userAddress, lpAssetId)) | |
281 | + | let userClaimInfo = split(asString(invoke(stakingDapp, "claimWxREADONLY", [lpAssetId, userAddress], nil)), SEP) | |
282 | + | let minRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[5]), "couldn't parse minRewardPart") | |
283 | + | let boostRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[6]), "couldn't parse boostRewardPart") | |
284 | + | let debug = userClaimInfo[7] | |
285 | + | let boostingPower = if ((boostRewardPart == 0)) | |
286 | + | then (1 * MULT8) | |
287 | + | else fraction((minRewardPart + boostRewardPart), MULT8, minRewardPart) | |
288 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%s", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower), debug], SEP)) | |
120 | 289 | } | |
121 | 290 | ||
122 | 291 | ||
123 | 292 | ||
124 | 293 | @Callable(i) | |
125 | 294 | func claimedRewardREADONLY (userAddress) = { | |
126 | 295 | let lpList = readLpList() | |
127 | 296 | let prefix = "%s%d%d%d%s" | |
128 | 297 | func claimedRewardByLpAggregator (resultStr,nextLp) = { | |
129 | - | let rand = ((toInt(fromBase58String(nextLp)) % 100000) + (toInt(toBytes(userAddress)) % 100000)) | |
130 | - | let absRand = if ((0 > rand)) | |
131 | - | then -(rand) | |
132 | - | else rand | |
133 | - | let val = (((absRand % 100) * MULT8) + (absRand * (MULT8 / 100000))) | |
134 | - | let minRewardClaimed = 0 | |
135 | - | let boostRewardClaimed = 0 | |
298 | + | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(nextLp, userAddress) | |
299 | + | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(nextLp, userAddress) | |
300 | + | let minRewardClaimed = valueOrElse(getInteger(stakingDapp, claimedByUserMinRewardKEY), 0) | |
301 | + | let boostRewardClaimed = valueOrElse(getInteger(stakingDapp, claimedByUserBoostRewardKEY), 0) | |
136 | 302 | let gFeeClaimed = 0 | |
137 | 303 | makeString([(prefix + resultStr), nextLp, toString(minRewardClaimed), toString(boostRewardClaimed), toString(gFeeClaimed), "end"], SEP) | |
138 | 304 | } | |
139 | 305 | ||
140 | 306 | let result = { | |
141 | 307 | let $l = lpList | |
142 | 308 | let $s = size($l) | |
143 | 309 | let $acc0 = "%s" | |
144 | 310 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
145 | 311 | then $a | |
146 | 312 | else claimedRewardByLpAggregator($a, $l[$i]) | |
147 | 313 | ||
148 | 314 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
149 | 315 | then $a | |
150 | 316 | else throw("List size exceeds 10") | |
151 | 317 | ||
152 | 318 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
153 | 319 | } | |
154 | 320 | $Tuple2(nil, ((result + SEP) + userAddress)) | |
155 | 321 | } | |
156 | 322 | ||
157 | 323 | ||
158 | 324 | ||
159 | 325 | @Callable(i) | |
160 | 326 | func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = { | |
161 | - | let boost = if ((userAddressOpt != "")) | |
162 | - | then (3 * MULT8) | |
163 | - | else (1 * MULT8) | |
164 | - | let monthes18 = fraction(toBigInt(deltaLockPeriodInBlocks), MULT18, toBigInt((30 * 1440))) | |
165 | - | let coeff18 = (pow(monthes18, SCALE18, toBigInt(2), 0, SCALE18, HALFUP) / toBigInt(100)) | |
166 | - | let gWxAmount = fraction(toBigInt(deltaWxAmount), coeff18, MULT18) | |
167 | - | $Tuple2(nil, makeString(["%d%d", toString(toInt(gWxAmount)), toString(boost)], SEP)) | |
327 | + | let mathDapp = gwxRewardDapp | |
328 | + | let EMPTYSTR = "empty" | |
329 | + | let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4]) | |
330 | + | let lpAssetIdStr = if ((lpAssetIdOpt == "")) | |
331 | + | then EMPTYSTR | |
332 | + | else lpAssetIdOpt | |
333 | + | let userAddressStr = if ((userAddressOpt == "")) | |
334 | + | then EMPTYSTR | |
335 | + | else userAddressOpt | |
336 | + | let userNumStr = valueOrElse(getString(boostingDapp, keyUser2NumMapping(userAddressOpt)), EMPTYSTR) | |
337 | + | let userAmount = valueOrElse(getInteger(boostingDapp, keyLockParamUserAmount(userNumStr)), 0) | |
338 | + | let lockStart = valueOrElse(getInteger(boostingDapp, keyLockParamStartBlock(userNumStr)), height) | |
339 | + | let lockDuration = valueOrElse(getInteger(boostingDapp, keyLockParamDuration(userNumStr)), 0) | |
340 | + | let lockEnd = (lockStart + lockDuration) | |
341 | + | let remainingDuration = max([(lockEnd - height), 0]) | |
342 | + | let userAmountNew = (userAmount + deltaWxAmount) | |
343 | + | let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks]) | |
344 | + | let userCurrgWxAmount = asInt(asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddressStr], nil))[0]) | |
345 | + | let gWxAmountStartNew = calcGwxAmountStartREADONLY(userAmountNew, lockDurationNew, maxLockDurationInBlocks)[0] | |
346 | + | let gWxParamsResultList = asAnyList(invoke(mathDapp, "calcGwxParamsREADONLY", [gWxAmountStartNew, height, lockDurationNew], nil)) | |
347 | + | let gWxAmountDiff = (gWxAmountStartNew - userCurrgWxAmount) | |
348 | + | let k = asInt(gWxParamsResultList[0]) | |
349 | + | let b = asInt(gWxParamsResultList[1]) | |
350 | + | let period = toString(asInt(gWxParamsResultList[2])) | |
351 | + | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
352 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
353 | + | let userMaxBoostIntNew = ((gWxAmountStartNew * lockDurationNew) / 2) | |
354 | + | let totalMaxBoostInt = getIntOrZero(boostingDapp, totalMaxBoostIntegralKEY) | |
355 | + | let totalCachedGwx = valueOrElse(getInteger(boostingDapp, totalCachedGwxKEY), 0) | |
356 | + | let MULT3 = 1000 | |
357 | + | let wxEmissionPerBlockX3 = (getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) * MULT3) | |
358 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
359 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
360 | + | let stakedByUser = readStaked(stakingDapp, stakedByUserKEY) | |
361 | + | let stakedTotal = readStaked(stakingDapp, stakedTotalKEY) | |
362 | + | let stakedByUserNew = (stakedByUser + deltaLpAmount) | |
363 | + | let stakedTotalNew = (stakedTotal + deltaLpAmount) | |
364 | + | let poolWeight = if ((lpAssetIdStr != EMPTYSTR)) | |
365 | + | then { | |
366 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryDapp, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
367 | + | getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr)) | |
368 | + | } | |
369 | + | else 0 | |
370 | + | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
371 | + | let wxPerLpX3 = if ((stakedTotalNew != 0)) | |
372 | + | then fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotalNew) | |
373 | + | else 0 | |
374 | + | let userWxPerBlockX3 = fraction(wxPerLpX3, stakedByUserNew, MULT8) | |
375 | + | let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * 2) | |
376 | + | let tmpUserBoostPerBlockX3 = fraction(gWxAmountStartNew, boostEmissionPerBlockX3, (totalCachedGwx + gWxAmountDiff)) | |
377 | + | let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * 2)]) | |
378 | + | let boostCoeff = if ((userWxPerBlockX3 == 0)) | |
379 | + | then (1 * MULT8) | |
380 | + | else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3) | |
381 | + | let debug = makeString([("lpAssetIdStr=" + lpAssetIdStr), ("userAddressStr=" + userAddressStr), ("userNumStr=" + userNumStr), ("userAmount=" + toString(userAmount)), ("userAmountNew=" + toString(userAmountNew)), ("lockDurationNew=" + toString(lockDurationNew)), ("gWxAmountStart=" + toString(gWxAmountStartNew)), ("tmpUserBoostPerBlockX3=" + toString(tmpUserBoostPerBlockX3)), ("stakedByUserNew=" + toString(stakedByUserNew)), ("stakedTotalNew=" + toString(stakedTotalNew)), ("poolWeight=" + toString(poolWeight)), ("wxPerLpX3=" + toString(wxPerLpX3)), ("poolWxEmissionPerBlockX3=" + toString(poolWxEmissionPerBlockX3)), ("userWxPerBlockX3=" + toString(userWxPerBlockX3)), ("gWxAmountDiff=" + toString(gWxAmountDiff)), ("totalCachedGwx=" + toString(totalCachedGwx)), ("userCurrgWxAmount=" + toString(userCurrgWxAmount))], "::") | |
382 | + | $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(boostCoeff), debug], SEP)) | |
168 | 383 | } | |
169 | 384 | ||
170 | 385 | ||
171 | 386 | ||
172 | 387 | @Callable(i) | |
173 | 388 | func wxEmissionStatsREADONLY () = { | |
174 | 389 | let ONEMULT = toString(MULT8) | |
175 | 390 | let ONE = "1" | |
176 | - | let totalWxReleased = 0 | |
177 | - | let totalWxLocked = 0 | |
178 | - | let locksDurationSumInBlocks = 0 | |
179 | - | let locksCount = 0 | |
391 | + | let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) | |
392 | + | let emissionStartBlock = getIntOrFail(emissionDapp, keyEmissionStartBlock()) | |
393 | + | let passedBlocks = if ((emissionStartBlock > height)) | |
394 | + | then 0 | |
395 | + | else (height - emissionStartBlock) | |
396 | + | let teamEmDuration = (1440 * 365) | |
397 | + | let teamEmMax = (201000000 * MULT8) | |
398 | + | let teamEm = if ((passedBlocks > teamEmDuration)) | |
399 | + | then teamEmMax | |
400 | + | else fraction(teamEmMax, passedBlocks, teamEmDuration) | |
401 | + | let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm) | |
402 | + | let totalWxLocked = getIntOrZero(boostingDapp, keyBoostingLockParamTotalAmount()) | |
403 | + | let locksDurationSumInBlocks = getIntOrZero(boostingDapp, keyBoostingStatsLocksDurationSumInBlocks()) | |
404 | + | let locksCount = getIntOrZero(boostingDapp, keyBoostingStatsLocksCount()) | |
180 | 405 | $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP)) | |
181 | 406 | } | |
182 | 407 | ||
183 | 408 | ||
184 | 409 | ||
185 | 410 | @Callable(i) | |
186 | 411 | func poolStatsREADONLY (lpAsset) = { | |
187 | - | let factoryAddress = readFactoryAddressOrFail() | |
188 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
412 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
189 | 413 | let cfg = { | |
190 | 414 | let @ = invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
191 | 415 | if ($isInstanceOf(@, "List[Any]")) | |
192 | 416 | then @ | |
193 | 417 | else throw("Couldn't cast Any to List[Any]") | |
194 | 418 | } | |
195 | 419 | let lpAssetId = fromBase58String({ | |
196 | 420 | let @ = cfg[idxPoolLPAssetId] | |
197 | 421 | if ($isInstanceOf(@, "String")) | |
198 | 422 | then @ | |
199 | 423 | else throw("Couldn't cast Any to String") | |
200 | 424 | }) | |
201 | 425 | let amtAssetId = { | |
202 | 426 | let @ = cfg[idxAmtAssetId] | |
203 | 427 | if ($isInstanceOf(@, "String")) | |
204 | 428 | then @ | |
205 | 429 | else throw("Couldn't cast Any to String") | |
206 | 430 | } | |
207 | 431 | let priceAssetId = { | |
208 | 432 | let @ = cfg[idxPriceAssetId] | |
209 | 433 | if ($isInstanceOf(@, "String")) | |
210 | 434 | then @ | |
211 | 435 | else throw("Couldn't cast Any to String") | |
212 | 436 | } | |
213 | 437 | let iAmtAssetId = { | |
214 | 438 | let @ = cfg[idxIAmtAssetId] | |
215 | 439 | if ($isInstanceOf(@, "String")) | |
216 | 440 | then @ | |
217 | 441 | else throw("Couldn't cast Any to String") | |
218 | 442 | } | |
219 | 443 | let iPriceAssetId = { | |
220 | 444 | let @ = cfg[idxIPriceAssetId] | |
221 | 445 | if ($isInstanceOf(@, "String")) | |
222 | 446 | then @ | |
223 | 447 | else throw("Couldn't cast Any to String") | |
224 | 448 | } | |
225 | 449 | let amtAssetDcm = parseIntValue({ | |
226 | 450 | let @ = cfg[idxAmtAssetDcm] | |
227 | 451 | if ($isInstanceOf(@, "String")) | |
228 | 452 | then @ | |
229 | 453 | else throw("Couldn't cast Any to String") | |
230 | 454 | }) | |
231 | 455 | let priceAssetDcm = parseIntValue({ | |
232 | 456 | let @ = cfg[idxPriceAssetDcm] | |
233 | 457 | if ($isInstanceOf(@, "String")) | |
234 | 458 | then @ | |
235 | 459 | else throw("Couldn't cast Any to String") | |
236 | 460 | }) | |
237 | 461 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
238 | 462 | let accAmtAssetBalance = { | |
239 | 463 | let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil) | |
240 | 464 | if ($isInstanceOf(@, "Int")) | |
241 | 465 | then @ | |
242 | 466 | else throw("Couldn't cast Any to Int") | |
243 | 467 | } | |
244 | 468 | let accPriceAssetBalance = { | |
245 | 469 | let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil) | |
246 | 470 | if ($isInstanceOf(@, "Int")) | |
247 | 471 | then @ | |
248 | 472 | else throw("Couldn't cast Any to Int") | |
249 | 473 | } | |
250 | 474 | let pricesList = { | |
251 | 475 | let @ = invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil) | |
252 | 476 | if ($isInstanceOf(@, "List[Any]")) | |
253 | 477 | then @ | |
254 | 478 | else throw("Couldn't cast Any to List[Any]") | |
255 | 479 | } | |
256 | 480 | let curPrice = 0 | |
257 | 481 | let lpAmtAssetShare = { | |
258 | 482 | let @ = invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil) | |
259 | 483 | if ($isInstanceOf(@, "Int")) | |
260 | 484 | then @ | |
261 | 485 | else throw("Couldn't cast Any to Int") | |
262 | 486 | } | |
263 | 487 | let lpPriceAssetShare = { | |
264 | 488 | let @ = invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil) | |
265 | 489 | if ($isInstanceOf(@, "Int")) | |
266 | 490 | then @ | |
267 | 491 | else throw("Couldn't cast Any to Int") | |
268 | 492 | } | |
269 | - | let poolWeight = getIntegerValue( | |
493 | + | let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress))) | |
270 | 494 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight)], SEP)) | |
271 | 495 | } | |
272 | 496 | ||
273 | 497 | ||
274 | 498 | ||
275 | 499 | @Callable(i) | |
276 | 500 | func poolEvaluatePutByAmountAssetREADONLY (lpAsset,inAmAssetAmt) = { | |
277 | - | let factoryAddress = readFactoryAddressOrFail() | |
278 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
501 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
279 | 502 | let cfg = { | |
280 | 503 | let @ = invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
281 | 504 | if ($isInstanceOf(@, "List[Any]")) | |
282 | 505 | then @ | |
283 | 506 | else throw("Couldn't cast Any to List[Any]") | |
284 | 507 | } | |
285 | 508 | let lpAssetId = fromBase58String({ | |
286 | 509 | let @ = cfg[idxPoolLPAssetId] | |
287 | 510 | if ($isInstanceOf(@, "String")) | |
288 | 511 | then @ | |
289 | 512 | else throw("Couldn't cast Any to String") | |
290 | 513 | }) | |
291 | 514 | let amAssetIdStr = { | |
292 | 515 | let @ = cfg[idxAmtAssetId] | |
293 | 516 | if ($isInstanceOf(@, "String")) | |
294 | 517 | then @ | |
295 | 518 | else throw("Couldn't cast Any to String") | |
296 | 519 | } | |
297 | 520 | let amAssetId = fromBase58String(amAssetIdStr) | |
298 | 521 | let prAssetIdStr = { | |
299 | 522 | let @ = cfg[idxPriceAssetId] | |
300 | 523 | if ($isInstanceOf(@, "String")) | |
301 | 524 | then @ | |
302 | 525 | else throw("Couldn't cast Any to String") | |
303 | 526 | } | |
304 | 527 | let prAssetId = fromBase58String(prAssetIdStr) | |
305 | 528 | let amtAssetDcm = parseIntValue({ | |
306 | 529 | let @ = cfg[idxAmtAssetDcm] | |
307 | 530 | if ($isInstanceOf(@, "String")) | |
308 | 531 | then @ | |
309 | 532 | else throw("Couldn't cast Any to String") | |
310 | 533 | }) | |
311 | 534 | let priceAssetDcm = parseIntValue({ | |
312 | 535 | let @ = cfg[idxPriceAssetDcm] | |
313 | 536 | if ($isInstanceOf(@, "String")) | |
314 | 537 | then @ | |
315 | 538 | else throw("Couldn't cast Any to String") | |
316 | 539 | }) | |
317 | 540 | let poolStatus = { | |
318 | 541 | let @ = cfg[idxPoolStatus] | |
319 | 542 | if ($isInstanceOf(@, "String")) | |
320 | 543 | then @ | |
321 | 544 | else throw("Couldn't cast Any to String") | |
322 | 545 | } | |
323 | 546 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
324 | 547 | let accAmtAssetBalance = { | |
325 | 548 | let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil) | |
326 | 549 | if ($isInstanceOf(@, "Int")) | |
327 | 550 | then @ | |
328 | 551 | else throw("Couldn't cast Any to Int") | |
329 | 552 | } | |
330 | 553 | let accPriceAssetBalance = { | |
331 | 554 | let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil) | |
332 | 555 | if ($isInstanceOf(@, "Int")) | |
333 | 556 | then @ | |
334 | 557 | else throw("Couldn't cast Any to Int") | |
335 | 558 | } | |
336 | 559 | let amtAssetAmtX18 = parseBigIntValue({ | |
337 | 560 | let @ = invoke(poolAddress, "toX18WrapperREADONLY", [accAmtAssetBalance, amtAssetDcm], nil) | |
338 | 561 | if ($isInstanceOf(@, "String")) | |
339 | 562 | then @ | |
340 | 563 | else throw("Couldn't cast Any to String") | |
341 | 564 | }) | |
342 | 565 | let priceAssetAmtX18 = parseBigIntValue({ | |
343 | 566 | let @ = invoke(poolAddress, "toX18WrapperREADONLY", [accPriceAssetBalance, priceAssetDcm], nil) | |
344 | 567 | if ($isInstanceOf(@, "String")) | |
345 | 568 | then @ | |
346 | 569 | else throw("Couldn't cast Any to String") | |
347 | 570 | }) | |
348 | 571 | let curPriceX18 = if ((poolLPBalance == 0)) | |
349 | 572 | then zeroBigInt | |
350 | 573 | else parseBigIntValue({ | |
351 | 574 | let @ = invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(priceAssetAmtX18), toString(amtAssetAmtX18)], nil) | |
352 | 575 | if ($isInstanceOf(@, "String")) | |
353 | 576 | then @ | |
354 | 577 | else throw("Couldn't cast Any to String") | |
355 | 578 | }) | |
356 | 579 | let curPrice = { | |
357 | 580 | let @ = invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil) | |
358 | 581 | if ($isInstanceOf(@, "Int")) | |
359 | 582 | then @ | |
360 | 583 | else throw("Couldn't cast Any to Int") | |
361 | 584 | } | |
362 | 585 | let inAmAssetAmtX18 = parseBigIntValue({ | |
363 | 586 | let @ = invoke(poolAddress, "toX18WrapperREADONLY", [inAmAssetAmt, amtAssetDcm], nil) | |
364 | 587 | if ($isInstanceOf(@, "String")) | |
365 | 588 | then @ | |
366 | 589 | else throw("Couldn't cast Any to String") | |
367 | 590 | }) | |
368 | 591 | let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18) | |
369 | 592 | let inPrAssetAmt = { | |
370 | 593 | let @ = invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil) | |
371 | 594 | if ($isInstanceOf(@, "Int")) | |
372 | 595 | then @ | |
373 | 596 | else throw("Couldn't cast Any to Int") | |
374 | 597 | } | |
375 | 598 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
376 | - | let $ | |
599 | + | let $t02222922582 = match res { | |
377 | 600 | case _ => | |
378 | 601 | if (if ($isInstanceOf($match0._1, "Int")) | |
379 | 602 | then if ($isInstanceOf($match0._3, "Int")) | |
380 | 603 | then if ($isInstanceOf($match0._4, "Int")) | |
381 | 604 | then if ($isInstanceOf($match0._5, "Int")) | |
382 | 605 | then $isInstanceOf($match0._6, "Int") | |
383 | 606 | else false | |
384 | 607 | else false | |
385 | 608 | else false | |
386 | 609 | else false) | |
387 | 610 | then { | |
388 | 611 | let calcLpAmt = $match0._1 | |
389 | 612 | let curPriceCalc = $match0._3 | |
390 | 613 | let amBalance = $match0._4 | |
391 | 614 | let prBalance = $match0._5 | |
392 | 615 | let lpEmission = $match0._6 | |
393 | 616 | $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission) | |
394 | 617 | } | |
395 | 618 | else throw("Couldn't cast types") | |
396 | 619 | } | |
397 | - | let calcLpAmt = $ | |
398 | - | let curPriceCalc = $ | |
399 | - | let amBalance = $ | |
400 | - | let prBalance = $ | |
401 | - | let lpEmission = $ | |
620 | + | let calcLpAmt = $t02222922582._1 | |
621 | + | let curPriceCalc = $t02222922582._2 | |
622 | + | let amBalance = $t02222922582._3 | |
623 | + | let prBalance = $t02222922582._4 | |
624 | + | let lpEmission = $t02222922582._5 | |
402 | 625 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP)) | |
403 | 626 | } | |
404 | 627 | ||
405 | 628 | ||
406 | 629 | ||
407 | 630 | @Callable(i) | |
408 | 631 | func poolEvaluatePutByPriceAssetREADONLY (lpAsset,inPrAssetAmt) = { | |
409 | - | let factoryAddress = readFactoryAddressOrFail() | |
410 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
632 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
411 | 633 | let cfg = { | |
412 | 634 | let @ = invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
413 | 635 | if ($isInstanceOf(@, "List[Any]")) | |
414 | 636 | then @ | |
415 | 637 | else throw("Couldn't cast Any to List[Any]") | |
416 | 638 | } | |
417 | 639 | let lpAssetId = fromBase58String({ | |
418 | 640 | let @ = cfg[idxPoolLPAssetId] | |
419 | 641 | if ($isInstanceOf(@, "String")) | |
420 | 642 | then @ | |
421 | 643 | else throw("Couldn't cast Any to String") | |
422 | 644 | }) | |
423 | 645 | let amAssetIdStr = { | |
424 | 646 | let @ = cfg[idxAmtAssetId] | |
425 | 647 | if ($isInstanceOf(@, "String")) | |
426 | 648 | then @ | |
427 | 649 | else throw("Couldn't cast Any to String") | |
428 | 650 | } | |
429 | 651 | let amAssetId = fromBase58String(amAssetIdStr) | |
430 | 652 | let prAssetIdStr = { | |
431 | 653 | let @ = cfg[idxPriceAssetId] | |
432 | 654 | if ($isInstanceOf(@, "String")) | |
433 | 655 | then @ | |
434 | 656 | else throw("Couldn't cast Any to String") | |
435 | 657 | } | |
436 | 658 | let prAssetId = fromBase58String(prAssetIdStr) | |
437 | 659 | let amtAssetDcm = parseIntValue({ | |
438 | 660 | let @ = cfg[idxAmtAssetDcm] | |
439 | 661 | if ($isInstanceOf(@, "String")) | |
440 | 662 | then @ | |
441 | 663 | else throw("Couldn't cast Any to String") | |
442 | 664 | }) | |
443 | 665 | let priceAssetDcm = parseIntValue({ | |
444 | 666 | let @ = cfg[idxPriceAssetDcm] | |
445 | 667 | if ($isInstanceOf(@, "String")) | |
446 | 668 | then @ | |
447 | 669 | else throw("Couldn't cast Any to String") | |
448 | 670 | }) | |
449 | 671 | let poolStatus = { | |
450 | 672 | let @ = cfg[idxPoolStatus] | |
451 | 673 | if ($isInstanceOf(@, "String")) | |
452 | 674 | then @ | |
453 | 675 | else throw("Couldn't cast Any to String") | |
454 | 676 | } | |
455 | 677 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
456 | 678 | let amBalanceRaw = { | |
457 | 679 | let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil) | |
458 | 680 | if ($isInstanceOf(@, "Int")) | |
459 | 681 | then @ | |
460 | 682 | else throw("Couldn't cast Any to Int") | |
461 | 683 | } | |
462 | 684 | let prBalanceRaw = { | |
463 | 685 | let @ = invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil) | |
464 | 686 | if ($isInstanceOf(@, "Int")) | |
465 | 687 | then @ | |
466 | 688 | else throw("Couldn't cast Any to Int") | |
467 | 689 | } | |
468 | 690 | let amBalanceRawX18 = parseBigIntValue({ | |
469 | 691 | let @ = invoke(poolAddress, "toX18WrapperREADONLY", [amBalanceRaw, amtAssetDcm], nil) | |
470 | 692 | if ($isInstanceOf(@, "String")) | |
471 | 693 | then @ | |
472 | 694 | else throw("Couldn't cast Any to String") | |
473 | 695 | }) | |
474 | 696 | let prBalanceRawX18 = parseBigIntValue({ | |
475 | 697 | let @ = invoke(poolAddress, "toX18WrapperREADONLY", [prBalanceRaw, priceAssetDcm], nil) | |
476 | 698 | if ($isInstanceOf(@, "String")) | |
477 | 699 | then @ | |
478 | 700 | else throw("Couldn't cast Any to String") | |
479 | 701 | }) | |
480 | 702 | let curPriceX18 = if ((poolLPBalance == 0)) | |
481 | 703 | then zeroBigInt | |
482 | 704 | else parseBigIntValue({ | |
483 | 705 | let @ = invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(prBalanceRawX18), toString(amBalanceRawX18)], nil) | |
484 | 706 | if ($isInstanceOf(@, "String")) | |
485 | 707 | then @ | |
486 | 708 | else throw("Couldn't cast Any to String") | |
487 | 709 | }) | |
488 | 710 | let curPrice = { | |
489 | 711 | let @ = invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil) | |
490 | 712 | if ($isInstanceOf(@, "Int")) | |
491 | 713 | then @ | |
492 | 714 | else throw("Couldn't cast Any to Int") | |
493 | 715 | } | |
494 | 716 | let inPrAssetAmtX18 = parseBigIntValue({ | |
495 | 717 | let @ = invoke(poolAddress, "toX18WrapperREADONLY", [inPrAssetAmt, priceAssetDcm], nil) | |
496 | 718 | if ($isInstanceOf(@, "String")) | |
497 | 719 | then @ | |
498 | 720 | else throw("Couldn't cast Any to String") | |
499 | 721 | }) | |
500 | 722 | let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18) | |
501 | 723 | let inAmAssetAmt = { | |
502 | 724 | let @ = invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil) | |
503 | 725 | if ($isInstanceOf(@, "Int")) | |
504 | 726 | then @ | |
505 | 727 | else throw("Couldn't cast Any to Int") | |
506 | 728 | } | |
507 | 729 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
508 | - | let $ | |
730 | + | let $t02523225585 = match res { | |
509 | 731 | case _ => | |
510 | 732 | if (if ($isInstanceOf($match0._1, "Int")) | |
511 | 733 | then if ($isInstanceOf($match0._3, "Int")) | |
512 | 734 | then if ($isInstanceOf($match0._4, "Int")) | |
513 | 735 | then if ($isInstanceOf($match0._5, "Int")) | |
514 | 736 | then $isInstanceOf($match0._6, "Int") | |
515 | 737 | else false | |
516 | 738 | else false | |
517 | 739 | else false | |
518 | 740 | else false) | |
519 | 741 | then { | |
520 | 742 | let calcLpAmt = $match0._1 | |
521 | 743 | let curPriceCalc = $match0._3 | |
522 | 744 | let amBalance = $match0._4 | |
523 | 745 | let prBalance = $match0._5 | |
524 | 746 | let lpEmission = $match0._6 | |
525 | 747 | $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission) | |
526 | 748 | } | |
527 | 749 | else throw("Couldn't cast types") | |
528 | 750 | } | |
529 | - | let calcLpAmt = $ | |
530 | - | let curPriceCalc = $ | |
531 | - | let amBalance = $ | |
532 | - | let prBalance = $ | |
533 | - | let lpEmission = $ | |
751 | + | let calcLpAmt = $t02523225585._1 | |
752 | + | let curPriceCalc = $t02523225585._2 | |
753 | + | let amBalance = $t02523225585._3 | |
754 | + | let prBalance = $t02523225585._4 | |
755 | + | let lpEmission = $t02523225585._5 | |
534 | 756 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP)) | |
535 | 757 | } | |
536 | 758 | ||
537 | 759 | ||
538 | 760 | ||
539 | 761 | @Callable(i) | |
540 | 762 | func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
541 | - | let factoryAddress = readFactoryAddressOrFail() | |
542 | - | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId))) | |
763 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId))) | |
543 | 764 | let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil) | |
544 | - | let $ | |
765 | + | let $t02628026697 = match res { | |
545 | 766 | case _ => | |
546 | 767 | if (if ($isInstanceOf($match0._1, "Int")) | |
547 | 768 | then if ($isInstanceOf($match0._2, "Int")) | |
548 | 769 | then if ($isInstanceOf($match0._5, "Int")) | |
549 | 770 | then if ($isInstanceOf($match0._6, "Int")) | |
550 | 771 | then if ($isInstanceOf($match0._7, "Int")) | |
551 | 772 | then if ($isInstanceOf($match0._8, "String")) | |
552 | 773 | then $isInstanceOf($match0._9, "String") | |
553 | 774 | else false | |
554 | 775 | else false | |
555 | 776 | else false | |
556 | 777 | else false | |
557 | 778 | else false | |
558 | 779 | else false) | |
559 | 780 | then { | |
560 | 781 | let outAmAmt = $match0._1 | |
561 | 782 | let outPrAmt = $match0._2 | |
562 | 783 | let amBalance = $match0._5 | |
563 | 784 | let prBalance = $match0._6 | |
564 | 785 | let lpEmission = $match0._7 | |
565 | 786 | let curPrice = $match0._8 | |
566 | 787 | let poolStatus = $match0._9 | |
567 | 788 | $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus) | |
568 | 789 | } | |
569 | 790 | else throw("Couldn't cast types") | |
570 | 791 | } | |
571 | - | let outAmAmt = $ | |
572 | - | let outPrAmt = $ | |
573 | - | let amBalance = $ | |
574 | - | let prBalance = $ | |
575 | - | let lpEmission = $ | |
576 | - | let curPrice = $ | |
577 | - | let poolStatus = $ | |
792 | + | let outAmAmt = $t02628026697._1 | |
793 | + | let outPrAmt = $t02628026697._2 | |
794 | + | let amBalance = $t02628026697._3 | |
795 | + | let prBalance = $t02628026697._4 | |
796 | + | let lpEmission = $t02628026697._5 | |
797 | + | let curPrice = $t02628026697._6 | |
798 | + | let poolStatus = $t02628026697._7 | |
578 | 799 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP)) | |
800 | + | } | |
801 | + | ||
802 | + | ||
803 | + | ||
804 | + | @Callable(i) | |
805 | + | func gwxUserInfoREADONLY (userAddress) = { | |
806 | + | let gwxUserInfoLIST = { | |
807 | + | let @ = invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddress], nil) | |
808 | + | if ($isInstanceOf(@, "List[Any]")) | |
809 | + | then @ | |
810 | + | else throw("Couldn't cast Any to List[Any]") | |
811 | + | } | |
812 | + | let gwxAmount = { | |
813 | + | let @ = gwxUserInfoLIST[0] | |
814 | + | if ($isInstanceOf(@, "Int")) | |
815 | + | then @ | |
816 | + | else throw("Couldn't cast Any to Int") | |
817 | + | } | |
818 | + | $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP)) | |
579 | 819 | } | |
580 | 820 | ||
581 | 821 |
github/deemru/w8io/169f3d6 111.25 ms ◑