tx · FTsegQgfsrr57qLagsc6t8DsPuCDH4RA2yU6TEK3Z8Nm

3MxpZZ46oGH5idG2rXfcUDwFotSELDEtyQu:  -0.01000000 Waves

2021.11.16 12:00 [1793390] smart account 3MxpZZ46oGH5idG2rXfcUDwFotSELDEtyQu > SELF 0.00000000 Waves

{ "type": 13, "id": "FTsegQgfsrr57qLagsc6t8DsPuCDH4RA2yU6TEK3Z8Nm", "fee": 1000000, "feeAssetId": null, "timestamp": 1637053259104, "version": 1, "sender": "3MxpZZ46oGH5idG2rXfcUDwFotSELDEtyQu", "senderPublicKey": "HLjebBrq1Pdi1gabeao41GqBhEf9kyjY2P4k6dbNW8XC", "proofs": [ "qyKbB7eTaRaAwMQV3vfu5WmXeTqJtncKsoJw6J87MNNJ6Z3xqU59CBh88RB43FewRCGGnfSgr8CpNKpMm4rJozL" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSBAoCCAgSAwoBCBIHCgUBAQEICBIAEgMKAQgAAAAyAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAdTQ0FMRTE4AAAAAAAAAAASAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAEAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAAIAAAAAEGlkeFBvb2xMUEFzc2V0SWQAAAAAAAAAAAMAAAAADWlkeEFtdEFzc2V0SWQAAAAAAAAAAAQAAAAAD2lkeFByaWNlQXNzZXRJZAAAAAAAAAAABQAAAAAOaWR4QW10QXNzZXREY20AAAAAAAAAAAYAAAAAEGlkeFByaWNlQXNzZXREY20AAAAAAAAAAAcAAAAADmlkeElBbXRBc3NldElkAAAAAAAAAAAIAAAAABBpZHhJUHJpY2VBc3NldElkAAAAAAAAAAAJAAAAAA1pZHhMUEFzc2V0RGNtAAAAAAAAAAAKAQAAAA9nZXRT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AAAAIY3VyUHJpY2UJAARMAAAAAgkAAaQAAAABBQAAAA9scEFtdEFzc2V0U2hhcmUJAARMAAAAAgkAAaQAAAABBQAAABFscFByaWNlQXNzZXRTaGFyZQkABEwAAAACCQABpAAAAAEFAAAACnBvb2xXZWlnaHQFAAAAA25pbAUAAAADU0VQAAAAAMhxnR0=", "chainId": 84, "height": 1793390, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CYPhwj3imUdgjDn3DnXuLt3WcMxuJjbfKFbBQJV8yrFK Next: GwSzNjwHBQzmPJpoeDLMgM9Da5UZDQQ179sTMzpLdPdS Diff:
OldNewDifferences
1010 let MULT18 = toBigInt(1000000000000000000)
1111
1212 let SEP = "__"
13+
14+let idxPoolAddress = 1
15+
16+let idxPoolStatus = 2
17+
18+let idxPoolLPAssetId = 3
19+
20+let idxAmtAssetId = 4
21+
22+let idxPriceAssetId = 5
23+
24+let idxAmtAssetDcm = 6
25+
26+let idxPriceAssetDcm = 7
27+
28+let idxIAmtAssetId = 8
29+
30+let idxIPriceAssetId = 9
31+
32+let idxLPAssetDcm = 10
1333
1434 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
1535
2646 func keyFactoryAddress () = "%s%s__config__factoryAddress"
2747
2848
49+let IdxFactoryCfgStakingDapp = 1
50+
51+let IdxFactoryCfgBoostingDapp = 2
52+
53+let IdxFactoryCfgIdoDapp = 3
54+
55+let IdxFactoryCfgTeamDapp = 4
56+
57+let IdxFactoryCfgEmissionDapp = 5
58+
59+let IdxFactoryCfgRestDapp = 6
60+
61+let IdxFactoryCfgSlippageDapp = 7
62+
63+func keyFactoryCfg () = "%s__factoryConfig"
64+
65+
2966 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
3067
3168
3269 func keyFactoryLpList () = "%s__lpTokensList"
3370
3471
35-func keyFactoryCfg () = "%s__factoryConfig"
72+func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
73+
74+
75+func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
3676
3777
3878 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress()))
4181 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
4282
4383
44-func readFactoryCfgOrFail () = split(getStringByAddressOrFail(readFactoryAddressOrFail(), keyFactoryCfg()), SEP)
84+func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
85+
86+
87+func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
88+
89+
90+func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
91+
92+
93+func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
94+
95+
96+func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
97+
98+
99+func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
100+
101+
102+func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount"
103+
104+
105+func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount"
45106
46107
47108 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
50111 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
51112
52113
53-func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[1])
114+func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
54115
55116
56-func internalCurrentRewardRate (stakingContract,lpAssetId) = {
57- let wxEmissionPerBlock = 0
58- let maxFactor = (1 * MULT8)
117+func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
118+
119+
120+func keyEmissionStartBlock () = "%s%s__emission__startBlock"
121+
122+
123+func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
124+
125+
126+func keyEmissionEndBlock () = "%s%s__emission__endBlock"
127+
128+
129+func internalCurrentRewardRate (factoryContract,stakingContract,emissionContract,lpAssetId) = {
130+ let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
131+ let poolWeightMult = MULT8
132+ let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
133+ let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
134+ let wxEmissionPerBlockMax = getIntOrFail(emissionContract, keyEmissionRatePerBlockMaxCurrent())
135+ let poolWxEmissionPerBlock = fraction(wxEmissionPerBlock, poolWeight, poolWeightMult)
136+ let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult)
137+ let maxFactor = fraction(poolWxEmissionPerBlockMax, poolWxEmissionPerBlock, MULT8)
59138 let totalLpStaked = getIntOrZero(stakingContract, keyStakedTotal(lpAssetId))
60-[wxEmissionPerBlock, maxFactor, totalLpStaked]
139+[poolWxEmissionPerBlock, maxFactor, totalLpStaked]
61140 }
62141
63142
70149
71150 @Callable(i)
72151 func currentRewardRateREADONLY (lpAssetId) = {
73- let factoryCfgArray = readFactoryCfgOrFail()
74- let stakingContract = getStakingAddressOrFail(factoryCfgArray)
75- let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId)
152+ let factoryContract = readFactoryAddressOrFail()
153+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
154+ let stakingContract = getStakingAddressOrFail(factoryCfg)
155+ let emissionContract = getEmissionAddressOrFail(factoryCfg)
156+ let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId)
76157 let wxEmissionPerBlock = rewardData[0]
77158 let maxFactor = rewardData[1]
78159 let totalLpStaked = rewardData[2]
83164
84165 @Callable(i)
85166 func currentUserRewardRateREADONLY (lpAssetId,userAddress) = {
86- let factoryCfgArray = readFactoryCfgOrFail()
87- let stakingContract = getStakingAddressOrFail(factoryCfgArray)
88- let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId)
167+ let factoryContract = readFactoryAddressOrFail()
168+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
169+ let stakingContract = getStakingAddressOrFail(factoryCfg)
170+ let emissionContract = getEmissionAddressOrFail(factoryCfg)
171+ let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId)
89172 let wxEmissionPerBlock = rewardData[0]
90173 let maxFactor = rewardData[1]
91174 let totalLpStaked = rewardData[2]
92175 let lpStakedByUser = getIntOrZero(stakingContract, keyStakedByUser(userAddress, lpAssetId))
93176 let boostingPower = (1 * MULT8)
94- $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP))
177+ $Tuple2(nil, makeString(["%d%d%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP))
95178 }
96179
97180
148231 func wxEmissionStatsREADONLY () = {
149232 let ONEMULT = toString(MULT8)
150233 let ONE = "1"
151- let totalWxReleased = 0
152- let totalWxLocked = 0
153- let locksDurationSumInBlocks = 0
154- let locksCount = 0
234+ let factoryContract = readFactoryAddressOrFail()
235+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
236+ let boostingContract = getBoostingAddressOrFail(factoryCfg)
237+ let emissionContract = getEmissionAddressOrFail(factoryCfg)
238+ let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
239+ let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
240+ let passedBlocks = if ((emissionStartBlock > height))
241+ then 0
242+ else (height - emissionStartBlock)
243+ let totalWxReleased = (wxEmissionPerBlock * passedBlocks)
244+ let totalWxLocked = getIntOrZero(boostingContract, keyBoostingLockParamTotalAmount())
245+ let locksDurationSumInBlocks = getIntOrZero(boostingContract, keyBoostingStatsLocksDurationSumInBlocks())
246+ let locksCount = getIntOrZero(boostingContract, keyBoostingStatsLocksCount())
155247 $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP))
248+ }
249+
250+
251+
252+@Callable(i)
253+func lpStatsREADONLY (lpAsset) = {
254+ let factoryAddress = readFactoryAddressOrFail()
255+ let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
256+ let cfg = if ($isInstanceOf(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil), "List[Any]"))
257+ then invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil)
258+ else throw("Couldn't cast Any to List[Any]")
259+ let lpAssetId = fromBase58String(if ($isInstanceOf(cfg[idxPoolLPAssetId], "String"))
260+ then cfg[idxPoolLPAssetId]
261+ else throw("Couldn't cast Any to String"))
262+ let amtAssetId = if ($isInstanceOf(cfg[idxAmtAssetId], "String"))
263+ then cfg[idxAmtAssetId]
264+ else throw("Couldn't cast Any to String")
265+ let priceAssetId = if ($isInstanceOf(cfg[idxPriceAssetId], "String"))
266+ then cfg[idxPriceAssetId]
267+ else throw("Couldn't cast Any to String")
268+ let iAmtAssetId = if ($isInstanceOf(cfg[idxIAmtAssetId], "String"))
269+ then cfg[idxIAmtAssetId]
270+ else throw("Couldn't cast Any to String")
271+ let iPriceAssetId = if ($isInstanceOf(cfg[idxIPriceAssetId], "String"))
272+ then cfg[idxIPriceAssetId]
273+ else throw("Couldn't cast Any to String")
274+ let amtAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxAmtAssetDcm], "String"))
275+ then cfg[idxAmtAssetDcm]
276+ else throw("Couldn't cast Any to String"))
277+ let priceAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxPriceAssetDcm], "String"))
278+ then cfg[idxPriceAssetDcm]
279+ else throw("Couldn't cast Any to String"))
280+ let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
281+ let accAmtAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil), "Int"))
282+ then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil)
283+ else throw("Couldn't cast Any to Int")
284+ let accPriceAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil), "Int"))
285+ then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil)
286+ else throw("Couldn't cast Any to Int")
287+ let pricesList = if ($isInstanceOf(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil), "List[Any]"))
288+ then invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil)
289+ else throw("Couldn't cast Any to List[Any]")
290+ let curPrice = 0
291+ let lpAmtAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil), "Int"))
292+ then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil)
293+ else throw("Couldn't cast Any to Int")
294+ let lpPriceAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil), "Int"))
295+ then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil)
296+ else throw("Couldn't cast Any to Int")
297+ let poolWeight = getIntegerValue(factoryAddress, keyFactoryPoolWeight(toString(poolAddress)))
298+ $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))
156299 }
157300
158301
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
77
88 let SCALE18 = 18
99
1010 let MULT18 = toBigInt(1000000000000000000)
1111
1212 let SEP = "__"
13+
14+let idxPoolAddress = 1
15+
16+let idxPoolStatus = 2
17+
18+let idxPoolLPAssetId = 3
19+
20+let idxAmtAssetId = 4
21+
22+let idxPriceAssetId = 5
23+
24+let idxAmtAssetDcm = 6
25+
26+let idxPriceAssetDcm = 7
27+
28+let idxIAmtAssetId = 8
29+
30+let idxIPriceAssetId = 9
31+
32+let idxLPAssetDcm = 10
1333
1434 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
1535
1636
1737 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
1838
1939
2040 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
2141
2242
2343 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
2444
2545
2646 func keyFactoryAddress () = "%s%s__config__factoryAddress"
2747
2848
49+let IdxFactoryCfgStakingDapp = 1
50+
51+let IdxFactoryCfgBoostingDapp = 2
52+
53+let IdxFactoryCfgIdoDapp = 3
54+
55+let IdxFactoryCfgTeamDapp = 4
56+
57+let IdxFactoryCfgEmissionDapp = 5
58+
59+let IdxFactoryCfgRestDapp = 6
60+
61+let IdxFactoryCfgSlippageDapp = 7
62+
63+func keyFactoryCfg () = "%s__factoryConfig"
64+
65+
2966 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
3067
3168
3269 func keyFactoryLpList () = "%s__lpTokensList"
3370
3471
35-func keyFactoryCfg () = "%s__factoryConfig"
72+func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
73+
74+
75+func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
3676
3777
3878 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress()))
3979
4080
4181 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
4282
4383
44-func readFactoryCfgOrFail () = split(getStringByAddressOrFail(readFactoryAddressOrFail(), keyFactoryCfg()), SEP)
84+func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
85+
86+
87+func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
88+
89+
90+func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
91+
92+
93+func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
94+
95+
96+func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
97+
98+
99+func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
100+
101+
102+func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount"
103+
104+
105+func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount"
45106
46107
47108 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
48109
49110
50111 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
51112
52113
53-func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[1])
114+func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
54115
55116
56-func internalCurrentRewardRate (stakingContract,lpAssetId) = {
57- let wxEmissionPerBlock = 0
58- let maxFactor = (1 * MULT8)
117+func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
118+
119+
120+func keyEmissionStartBlock () = "%s%s__emission__startBlock"
121+
122+
123+func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
124+
125+
126+func keyEmissionEndBlock () = "%s%s__emission__endBlock"
127+
128+
129+func internalCurrentRewardRate (factoryContract,stakingContract,emissionContract,lpAssetId) = {
130+ let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
131+ let poolWeightMult = MULT8
132+ let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
133+ let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
134+ let wxEmissionPerBlockMax = getIntOrFail(emissionContract, keyEmissionRatePerBlockMaxCurrent())
135+ let poolWxEmissionPerBlock = fraction(wxEmissionPerBlock, poolWeight, poolWeightMult)
136+ let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult)
137+ let maxFactor = fraction(poolWxEmissionPerBlockMax, poolWxEmissionPerBlock, MULT8)
59138 let totalLpStaked = getIntOrZero(stakingContract, keyStakedTotal(lpAssetId))
60-[wxEmissionPerBlock, maxFactor, totalLpStaked]
139+[poolWxEmissionPerBlock, maxFactor, totalLpStaked]
61140 }
62141
63142
64143 @Callable(i)
65144 func constructor (factoryAddress) = if ((i.caller != this))
66145 then throw("not authorized")
67146 else [StringEntry(keyFactoryAddress(), factoryAddress)]
68147
69148
70149
71150 @Callable(i)
72151 func currentRewardRateREADONLY (lpAssetId) = {
73- let factoryCfgArray = readFactoryCfgOrFail()
74- let stakingContract = getStakingAddressOrFail(factoryCfgArray)
75- let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId)
152+ let factoryContract = readFactoryAddressOrFail()
153+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
154+ let stakingContract = getStakingAddressOrFail(factoryCfg)
155+ let emissionContract = getEmissionAddressOrFail(factoryCfg)
156+ let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId)
76157 let wxEmissionPerBlock = rewardData[0]
77158 let maxFactor = rewardData[1]
78159 let totalLpStaked = rewardData[2]
79160 $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked)], SEP))
80161 }
81162
82163
83164
84165 @Callable(i)
85166 func currentUserRewardRateREADONLY (lpAssetId,userAddress) = {
86- let factoryCfgArray = readFactoryCfgOrFail()
87- let stakingContract = getStakingAddressOrFail(factoryCfgArray)
88- let rewardData = internalCurrentRewardRate(stakingContract, lpAssetId)
167+ let factoryContract = readFactoryAddressOrFail()
168+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
169+ let stakingContract = getStakingAddressOrFail(factoryCfg)
170+ let emissionContract = getEmissionAddressOrFail(factoryCfg)
171+ let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId)
89172 let wxEmissionPerBlock = rewardData[0]
90173 let maxFactor = rewardData[1]
91174 let totalLpStaked = rewardData[2]
92175 let lpStakedByUser = getIntOrZero(stakingContract, keyStakedByUser(userAddress, lpAssetId))
93176 let boostingPower = (1 * MULT8)
94- $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP))
177+ $Tuple2(nil, makeString(["%d%d%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP))
95178 }
96179
97180
98181
99182 @Callable(i)
100183 func claimedRewardREADONLY (userAddress) = {
101184 let lpList = readLpList()
102185 let prefix = "%s%d%d%d%s"
103186 func claimedRewardByLpAggregator (resultStr,nextLp) = {
104187 let rand = ((toInt(fromBase58String(nextLp)) % 100000) + (toInt(toBytes(userAddress)) % 100000))
105188 let absRand = if ((0 > rand))
106189 then -(rand)
107190 else rand
108191 let val = (((absRand % 100) * MULT8) + (absRand * (MULT8 / 100000)))
109192 let minRewardClaimed = 0
110193 let boostRewardClaimed = 0
111194 let gFeeClaimed = 0
112195 makeString([(prefix + resultStr), nextLp, toString(minRewardClaimed), toString(boostRewardClaimed), toString(gFeeClaimed), "end"], SEP)
113196 }
114197
115198 let result = {
116199 let $l = lpList
117200 let $s = size($l)
118201 let $acc0 = "%s"
119202 func 1 ($a,$i) = if (($i >= $s))
120203 then $a
121204 else claimedRewardByLpAggregator($a, $l[$i])
122205
123206 func 2 ($a,$i) = if (($i >= $s))
124207 then $a
125208 else throw("List size exceeds 10")
126209
127210 2(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
128211 }
129212 $Tuple2(nil, ((result + SEP) + userAddress))
130213 }
131214
132215
133216
134217 @Callable(i)
135218 func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
136219 let boost = if ((userAddressOpt != ""))
137220 then (3 * MULT8)
138221 else (1 * MULT8)
139222 let monthes18 = fraction(toBigInt(deltaLockPeriodInBlocks), MULT18, toBigInt((30 * 1440)))
140223 let coeff18 = (pow(monthes18, SCALE18, toBigInt(2), 0, SCALE18, HALFUP) / toBigInt(1000))
141224 let gWxAmount = fraction(toBigInt(deltaWxAmount), coeff18, MULT18)
142225 $Tuple2(nil, makeString(["%d%d", toString(toInt(gWxAmount)), toString(boost)], SEP))
143226 }
144227
145228
146229
147230 @Callable(i)
148231 func wxEmissionStatsREADONLY () = {
149232 let ONEMULT = toString(MULT8)
150233 let ONE = "1"
151- let totalWxReleased = 0
152- let totalWxLocked = 0
153- let locksDurationSumInBlocks = 0
154- let locksCount = 0
234+ let factoryContract = readFactoryAddressOrFail()
235+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
236+ let boostingContract = getBoostingAddressOrFail(factoryCfg)
237+ let emissionContract = getEmissionAddressOrFail(factoryCfg)
238+ let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
239+ let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
240+ let passedBlocks = if ((emissionStartBlock > height))
241+ then 0
242+ else (height - emissionStartBlock)
243+ let totalWxReleased = (wxEmissionPerBlock * passedBlocks)
244+ let totalWxLocked = getIntOrZero(boostingContract, keyBoostingLockParamTotalAmount())
245+ let locksDurationSumInBlocks = getIntOrZero(boostingContract, keyBoostingStatsLocksDurationSumInBlocks())
246+ let locksCount = getIntOrZero(boostingContract, keyBoostingStatsLocksCount())
155247 $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP))
248+ }
249+
250+
251+
252+@Callable(i)
253+func lpStatsREADONLY (lpAsset) = {
254+ let factoryAddress = readFactoryAddressOrFail()
255+ let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
256+ let cfg = if ($isInstanceOf(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil), "List[Any]"))
257+ then invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil)
258+ else throw("Couldn't cast Any to List[Any]")
259+ let lpAssetId = fromBase58String(if ($isInstanceOf(cfg[idxPoolLPAssetId], "String"))
260+ then cfg[idxPoolLPAssetId]
261+ else throw("Couldn't cast Any to String"))
262+ let amtAssetId = if ($isInstanceOf(cfg[idxAmtAssetId], "String"))
263+ then cfg[idxAmtAssetId]
264+ else throw("Couldn't cast Any to String")
265+ let priceAssetId = if ($isInstanceOf(cfg[idxPriceAssetId], "String"))
266+ then cfg[idxPriceAssetId]
267+ else throw("Couldn't cast Any to String")
268+ let iAmtAssetId = if ($isInstanceOf(cfg[idxIAmtAssetId], "String"))
269+ then cfg[idxIAmtAssetId]
270+ else throw("Couldn't cast Any to String")
271+ let iPriceAssetId = if ($isInstanceOf(cfg[idxIPriceAssetId], "String"))
272+ then cfg[idxIPriceAssetId]
273+ else throw("Couldn't cast Any to String")
274+ let amtAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxAmtAssetDcm], "String"))
275+ then cfg[idxAmtAssetDcm]
276+ else throw("Couldn't cast Any to String"))
277+ let priceAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxPriceAssetDcm], "String"))
278+ then cfg[idxPriceAssetDcm]
279+ else throw("Couldn't cast Any to String"))
280+ let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
281+ let accAmtAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil), "Int"))
282+ then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil)
283+ else throw("Couldn't cast Any to Int")
284+ let accPriceAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil), "Int"))
285+ then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil)
286+ else throw("Couldn't cast Any to Int")
287+ let pricesList = if ($isInstanceOf(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil), "List[Any]"))
288+ then invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil)
289+ else throw("Couldn't cast Any to List[Any]")
290+ let curPrice = 0
291+ let lpAmtAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil), "Int"))
292+ then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil)
293+ else throw("Couldn't cast Any to Int")
294+ let lpPriceAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil), "Int"))
295+ then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil)
296+ else throw("Couldn't cast Any to Int")
297+ let poolWeight = getIntegerValue(factoryAddress, keyFactoryPoolWeight(toString(poolAddress)))
298+ $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))
156299 }
157300
158301

github/deemru/w8io/026f985 
49.72 ms