tx · AZfJwranHSXKucjoToZXrfqpxi7VyY46kqZXSp8sFwUu

3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy:  -0.03700000 Waves

2022.09.13 21:27 [2227684] smart account 3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy > SELF 0.00000000 Waves

{ "type": 13, "id": "AZfJwranHSXKucjoToZXrfqpxi7VyY46kqZXSp8sFwUu", "fee": 3700000, "feeAssetId": null, "timestamp": 1663093680047, "version": 2, "chainId": 84, "sender": "3N4QWZXfZqNf284CJVbtxzCerqARoALxJEy", "senderPublicKey": "GzEvTfwa3251fRwyTL99QzUmkDGBdn4cNr2mR6XQ1UmR", "proofs": [ "2NM3wKR838sqVTAfoiNCU84grKVL2i28wfpjDGpEd91PX4j4TeTUjyA3mmGBgTSqipJys4msfnZ43eCXycxmQ3yL" ], "script": "base64:BgIeCAISAwoBCBIAEgMKAQESABIAEgASAwoBCBIDCgEINAANa190b3RhbFN1cHBseQINa190b3RhbFN1cHBseQAPa19yZXdhcmRCYWxhbmNlAg9rX3Jld2FyZEJhbGFuY2UAEGtfbGFzdFVwZGF0ZVRpbWUCEGtfbGFzdFVwZGF0ZVRpbWUAFmtfcmV3YXJkUGVyVG9rZW5TdG9yZWQCFmtfcmV3YXJkUGVyVG9rZW5TdG9yZWQADGtfcmV3YXJkUmF0ZQIMa19yZXdhcmRSYXRlAA5rX3BlcmlvZEZpbmlzaAIOa19wZXJpb2RGaW5pc2gACWtfYmFsYW5jZQIJa19iYWxhbmNlABRrX3VzZXJSZXdhcmRQZXJUb2tlbgIUa191c2VyUmV3YXJkUGVyVG9rZW4ADGtfdXNlclJld2FyZAIMa191c2VyUmV3YXJkAA1rX2luaXRpYWxpemVkAg1rX2luaXRpYWxpemVkABRrX2Nvb3JkaW5hdG9yQWRkcmVzcwIUa19jb29yZGluYXRvckFkZHJlc3MAEmtfZ292ZXJuYW5jZV9hc3NldAILa19nb3ZfYXNzZXQADWtfcXVvdGVfYXNzZXQCDWtfcXVvdGV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{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_totalSupply = "k_totalSupply"
141141 let actualTimeInterval = if ((0 > timeInterval))
142142 then 0
143143 else timeInterval
144- let diff = (divd(rewardRate(), (totalSupply() + _balanceDelta)) * actualTimeInterval)
144+ let diff = divd((rewardRate() * actualTimeInterval), (totalSupply() + _balanceDelta))
145145 (rewardPerTokenStored() + diff)
146146 }
147147
281281 }
282282
283283
284+
285+@Callable(i)
286+func computeReward (_staker) = {
287+ let stakerEarned = updateReward(_staker, 0)._3
288+ $Tuple2(nil, stakerEarned)
289+ }
290+
291+
284292 @Verifier(tx)
285293 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
286294
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_totalSupply = "k_totalSupply"
55
66 let k_rewardBalance = "k_rewardBalance"
77
88 let k_lastUpdateTime = "k_lastUpdateTime"
99
1010 let k_rewardPerTokenStored = "k_rewardPerTokenStored"
1111
1212 let k_rewardRate = "k_rewardRate"
1313
1414 let k_periodFinish = "k_periodFinish"
1515
1616 let k_balance = "k_balance"
1717
1818 let k_userRewardPerToken = "k_userRewardPerToken"
1919
2020 let k_userReward = "k_userReward"
2121
2222 let k_initialized = "k_initialized"
2323
2424 let k_coordinatorAddress = "k_coordinatorAddress"
2525
2626 let k_governance_asset = "k_gov_asset"
2727
2828 let k_quote_asset = "k_quote_asset"
2929
3030 let k_admin_public_key = "k_admin_public_key"
3131
3232 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
3333
3434
3535 func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key))
3636
3737
3838 func governanceAsset () = fromBase58String(getStringValue(coordinator(), k_governance_asset))
3939
4040
4141 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
4242
4343
4444 let DECIMAL_UNIT = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
4545
4646 let DURATION = ((60 * 60) * 24)
4747
4848 let NO_ADDRESS = ""
4949
5050 let NO_STAKER = 0
5151
5252 func usdnFromDecimals (_amount) = (_amount / 100)
5353
5454
5555 func usdnToDecimals (_amount) = (_amount * 100)
5656
5757
5858 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
5959
6060
6161 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
6262
6363
6464 func abs (_x) = if ((_x > 0))
6565 then _x
6666 else -(_x)
6767
6868
6969 func minv (_x,_y) = if ((_x > _y))
7070 then _y
7171 else _x
7272
7373
7474 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
7575
7676
7777 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
7878
7979
8080 func int0 (k) = valueOrElse(getInteger(this, k), 0)
8181
8282
8383 func totalSupply () = int0(k_totalSupply)
8484
8585
8686 func rewardPerTokenStored () = int0(k_rewardPerTokenStored)
8787
8888
8989 func lastUpdateTime () = int0(k_lastUpdateTime)
9090
9191
9292 func rewardRate () = int0(k_rewardRate)
9393
9494
9595 func periodFinish () = int0(k_periodFinish)
9696
9797
9898 func rewardBalance () = int0(k_rewardBalance)
9999
100100
101101 func rewards (_staker) = int0(toCompositeKey(k_userReward, _staker))
102102
103103
104104 func userRewardPerTokenPaid (_staker) = int0(toCompositeKey(k_userRewardPerToken, _staker))
105105
106106
107107 func balanceOf (_staker) = int0(toCompositeKey(k_balance, _staker))
108108
109109
110110 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
111111
112112
113113 func updateRewardBalance (_delta) = [IntegerEntry(k_rewardBalance, (rewardBalance() + _delta))]
114114
115115
116116 func updateRewardRate (_rewardRate) = [IntegerEntry(k_rewardRate, _rewardRate)]
117117
118118
119119 func updateTime (_lastUpdateTime,_periodFinish) = [IntegerEntry(k_lastUpdateTime, _lastUpdateTime), IntegerEntry(k_periodFinish, _periodFinish)]
120120
121121
122122 func updateRewardPerTokenStored (_rewardPerTokenStored) = [IntegerEntry(k_rewardPerTokenStored, _rewardPerTokenStored)]
123123
124124
125125 func updateUserRewards (_staker,_reward,_userRewardPerToken) = [IntegerEntry(toCompositeKey(k_userReward, _staker), _reward), IntegerEntry(toCompositeKey(k_userRewardPerToken, _staker), _userRewardPerToken)]
126126
127127
128128 func updateBalance (_staker,_delta) = [IntegerEntry(toCompositeKey(k_balance, _staker), (balanceOf(_staker) + _delta)), IntegerEntry(k_totalSupply, (totalSupply() + _delta))]
129129
130130
131131 func currentTimestampSec () = (lastBlock.timestamp / 1000)
132132
133133
134134 func lastTimeRewardApplicable () = minv(currentTimestampSec(), periodFinish())
135135
136136
137137 func rewardPerToken (_balanceDelta) = if (((totalSupply() + _balanceDelta) == 0))
138138 then rewardPerTokenStored()
139139 else {
140140 let timeInterval = (lastTimeRewardApplicable() - lastUpdateTime())
141141 let actualTimeInterval = if ((0 > timeInterval))
142142 then 0
143143 else timeInterval
144- let diff = (divd(rewardRate(), (totalSupply() + _balanceDelta)) * actualTimeInterval)
144+ let diff = divd((rewardRate() * actualTimeInterval), (totalSupply() + _balanceDelta))
145145 (rewardPerTokenStored() + diff)
146146 }
147147
148148
149149 func earned (_staker,_balanceDelta) = {
150150 let rewardDelta = (rewardPerToken(_balanceDelta) - userRewardPerTokenPaid(_staker))
151151 (muld((balanceOf(_staker) + _balanceDelta), rewardDelta) + rewards(_staker))
152152 }
153153
154154
155155 func updateReward (_staker,_balanceDelta) = {
156156 let newRewardPerTokenStored = rewardPerToken(_balanceDelta)
157157 let newLastUpdateTime = currentTimestampSec()
158158 let $t048425034 = if ((_staker != ""))
159159 then $Tuple2(earned(_staker, _balanceDelta), newRewardPerTokenStored)
160160 else $Tuple2(0, 0)
161161 let stakerEarned = $t048425034._1
162162 let stakerRewardPerTokenPaid = $t048425034._2
163163 $Tuple4(newRewardPerTokenStored, newLastUpdateTime, stakerEarned, stakerRewardPerTokenPaid)
164164 }
165165
166166
167167 @Callable(i)
168168 func initialize (_coordinator) = if (initialized())
169169 then throw("Already initialized")
170170 else [StringEntry(k_coordinatorAddress, _coordinator), BooleanEntry(k_initialized, true)]
171171
172172
173173
174174 @Callable(i)
175175 func stake () = {
176176 let _staker = toString(i.caller)
177177 let _amount = i.payments[0].amount
178178 if (if ((i.payments[0].assetId != governanceAsset()))
179179 then true
180180 else !(initialized()))
181181 then throw("Invalid call to stake")
182182 else {
183183 let $t056905855 = updateReward(_staker, 0)
184184 let newRewardPerTokenStored = $t056905855._1
185185 let newLastUpdateTime = $t056905855._2
186186 let stakerEarned = $t056905855._3
187187 let stakerRewardPerTokenPaid = $t056905855._4
188188 (((updateUserRewards(_staker, stakerEarned, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateBalance(_staker, _amount))
189189 }
190190 }
191191
192192
193193
194194 @Callable(i)
195195 func unStake (_amount) = {
196196 let _staker = toString(i.caller)
197197 if (if (if ((_amount > balanceOf(_staker)))
198198 then true
199199 else (i.payments != nil))
200200 then true
201201 else !(initialized()))
202202 then throw("Invalid unStake parameters")
203203 else {
204204 let $t063866551 = updateReward(_staker, 0)
205205 let newRewardPerTokenStored = $t063866551._1
206206 let newLastUpdateTime = $t063866551._2
207207 let stakerEarned = $t063866551._3
208208 let stakerRewardPerTokenPaid = $t063866551._4
209209 ((((updateUserRewards(_staker, stakerEarned, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateBalance(_staker, -(_amount))) ++ [ScriptTransfer(i.caller, _amount, governanceAsset())])
210210 }
211211 }
212212
213213
214214
215215 @Callable(i)
216216 func withdrawRewards () = {
217217 let _staker = toString(i.caller)
218218 let $t070277172 = updateReward(_staker, 0)
219219 let newRewardPerTokenStored = $t070277172._1
220220 let newLastUpdateTime = $t070277172._2
221221 let stakerEarned = $t070277172._3
222222 let stakerRewardPerTokenPaid = $t070277172._4
223223 if (if ((0 >= stakerEarned))
224224 then true
225225 else !(initialized()))
226226 then throw("No reward")
227227 else ((((updateUserRewards(_staker, 0, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateRewardBalance(-(stakerEarned))) ++ [ScriptTransfer(i.caller, usdnFromDecimals(stakerEarned), quoteAsset())])
228228 }
229229
230230
231231
232232 @Callable(i)
233233 func addRewards () = if (if ((i.payments[0].assetId != quoteAsset()))
234234 then true
235235 else !(initialized()))
236236 then throw("Invalid addRewards params")
237237 else {
238238 let _reward = usdnToDecimals(i.payments[0].amount)
239239 let newRewardPerTokenStored = updateReward(NO_ADDRESS, NO_STAKER)._1
240240 let timestamp = currentTimestampSec()
241241 let newRewardRate = if ((timestamp > periodFinish()))
242242 then (_reward / DURATION)
243243 else {
244244 let remainingTime = (periodFinish() - timestamp)
245245 let leftover = (rewardRate() * remainingTime)
246246 ((_reward + leftover) / DURATION)
247247 }
248248 (((updateRewardRate(newRewardRate) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateRewardBalance(_reward)) ++ updateTime(timestamp, (timestamp + DURATION)))
249249 }
250250
251251
252252
253253 @Callable(i)
254254 func ackRewards () = {
255255 let currentBalance = usdnToDecimals(assetBalance(this, quoteAsset()))
256256 let _rewardBalance = rewardBalance()
257257 let rewardDelta = (currentBalance - _rewardBalance)
258258 if ((0 >= rewardDelta))
259259 then throw("Invalid ackRewards params")
260260 else {
261261 let _reward = rewardDelta
262262 let newRewardPerTokenStored = updateReward(NO_ADDRESS, NO_STAKER)._1
263263 let timestamp = currentTimestampSec()
264264 let newRewardRate = if ((timestamp > periodFinish()))
265265 then (_reward / DURATION)
266266 else {
267267 let remainingTime = (periodFinish() - timestamp)
268268 let leftover = (rewardRate() * remainingTime)
269269 ((_reward + leftover) / DURATION)
270270 }
271271 (((updateRewardRate(newRewardRate) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateRewardBalance(_reward)) ++ updateTime(timestamp, (timestamp + DURATION)))
272272 }
273273 }
274274
275275
276276
277277 @Callable(i)
278278 func view_reward (_staker) = {
279279 let stakerEarned = updateReward(_staker, 0)._3
280280 throw(toString(usdnFromDecimals(stakerEarned)))
281281 }
282282
283283
284+
285+@Callable(i)
286+func computeReward (_staker) = {
287+ let stakerEarned = updateReward(_staker, 0)._3
288+ $Tuple2(nil, stakerEarned)
289+ }
290+
291+
284292 @Verifier(tx)
285293 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
286294

github/deemru/w8io/026f985 
47.64 ms