tx · 7he1ggiUFVYdSUwdM6v4HwCLgo1SoT7ys8KRGUpcE2pq

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.03500000 Waves

2022.06.28 15:04 [2116262] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "7he1ggiUFVYdSUwdM6v4HwCLgo1SoT7ys8KRGUpcE2pq", "fee": 3500000, "feeAssetId": null, "timestamp": 1656417854022, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "3vTXrWZ33BD8oLFfAMr152re73118ZwfYrFgztux6hYUrpZ5Tc7jCdsgsLtHReqi151y3UZM6dhvpAzgwqArGt4Z" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgAAABTAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAdTQ0FMRTE4AAAAAAAAAAASAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAOUE9PTFdFSUdIVE1VTFQFAAAABU1VTFQ4AAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAACW9uZUJpZ0ludAkAATYAAAABAAAAAAAAAAABAQAAAAlhc0FueUxpc3QAAAABAAAAA3ZhbAQAAAAHJG1hdGNoMAUAAAADdmFsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAlMaXN0W0FueV0EAAAACnZhbEFueUx5c3QFAAAAByRtYXRjaDAFAAAACnZhbEFueUx5c3QJAAACAAAAAQIAAAAbZmFpbCB0byBjYXN0IGludG8gTGlzdFtBbnldAQAAAAVhc0ludAAAAAEAAAADdmFsBAAAAAckbW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FAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXkGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAARbWlncmF0b3JQdWJsaWNLZXkgYM0T", "height": 2116262, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BecFheBjTurW9FBz7e27FvvcgqBYioLXz3SfBGcWkVah Next: CQ5nnArRDFZ6uTT2V3jvpeBzLt84peT4XGhas1RDEW4Z Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
8484
8585
8686 func keyFactoryAddress () = "%s%s__config__factoryAddress"
87-
88-
89-func keyVotingEmissionContract () = "%s__votingEmissionContract"
9087
9188
9289 let IdxFactoryCfgStakingDapp = 1
239236
240237 let boostingContract = getBoostingAddressOrFail(factoryCfg)
241238
242-func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
243-
244-
245-func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
246-
247-
248-func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
249-
250-
251-func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
252-
253-
254-func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
255-
256-
257-func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
258-
259-
260-func containsNode (listName,id) = {
261- let headOrUnit = getString(this, keyListHead(listName))
262- let prevOrUnit = getString(this, keyListPrev(listName, id))
263- let nextOrUnit = getString(this, keyListNext(listName, id))
264- if (if ((id == valueOrElse(headOrUnit, "")))
265- then true
266- else (prevOrUnit != unit))
267- then true
268- else (nextOrUnit != unit)
269- }
270-
271-
272-func insertNodeActions (listName,id) = {
273- let headOrUnit = getString(this, keyListHead(listName))
274- let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
275- let checkNode = if (!(containsNode(listName, id)))
276- then true
277- else throw("Node exists")
278- if ((checkNode == checkNode))
279- then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
280- then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
281- else nil)) ++ [StringEntry(keyListHead(listName), id)])
282- else throw("Strict value is not equal to itself.")
283- }
284-
285-
286-func deleteNodeActions (listName,id) = {
287- let headOrUnit = getString(this, keyListHead(listName))
288- let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
289- let prevOrUnit = getString(this, keyListPrev(listName, id))
290- let nextOrUnit = getString(this, keyListNext(listName, id))
291- ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
292- then (nextOrUnit != unit)
293- else false)
294- then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
295- else if ((nextOrUnit != unit))
296- then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
297- else if ((prevOrUnit != unit))
298- then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
299- else if ((id == valueOrElse(headOrUnit, "")))
300- then [DeleteEntry(keyListHead(listName))]
301- else throw(((("invalid node: " + listName) + ".") + id))))
302- }
303-
304-
305239 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
306240 then (stakedByUser > zeroBigInt)
307241 else false)
343277 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh)))
344278 let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
345279 let wxPerLpIntegralLastUpdHeightNew = height
346- let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
280+ let debug = makeString([toString(wxPerLpIntegralNew), "dh=", toString(dh), "wxPerLpX3=", toString(wxPerLpX3), "stakedTotal=", toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), "poolWeight=", toString(poolWeight)], "::")
347281 $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
348282 }
349283
350284
351285 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
352- let $t01430214424 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
353- let wxPerLpIntegralNew = $t01430214424._1
354- let poolIntegralSTATE = $t01430214424._2
355- let poolDEBUG = $t01430214424._3
286+ let $t01150611628 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
287+ let wxPerLpIntegralNew = $t01150611628._1
288+ let poolIntegralSTATE = $t01150611628._2
289+ let poolDEBUG = $t01150611628._3
356290 let MULT3 = 1000
357291 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
358292 let stakedByUser = readStaked(stakedByUserKEY)
366300 let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11)))
367301 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
368302 let wxPerLpIntegralUserLastUpdHeightNew = height
369- let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
303+ let debug = makeString(["wxToClaimUser", toString(wxToClaimUser), "wxPerLpInteg", toString(wxPerLpIntegralUserLastUpdHeightOrZero), "this.getString", toString(value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))), "wxPerLpIntegralNew", toString(wxPerLpIntegralNew), "wxToClaimUserNew", toString(wxToClaimUserNew), "wxPerLpIntegralUserLast", toString(wxPerLpIntegralUserLast), toString(stakedByUser), "poolDEBUG=", poolDEBUG, "height=", toString(height)], "::")
370304 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
371305 }
372306
401335 }
402336
403337
404-let permissionDeniedError = throw("Permission denied")
405-
406-func mustThis (i) = if ((i.caller == this))
407- then true
408- else permissionDeniedError
409-
410-
411-func mustManager (i) = match managerPublicKeyOrUnit() {
412- case pk: ByteVector =>
413- if ((i.callerPublicKey == pk))
414- then true
415- else permissionDeniedError
416- case _: Unit =>
417- if ((i.caller == this))
418- then true
419- else permissionDeniedError
420- case _ =>
421- throw("Match error")
422-}
338+func mustManager (i) = {
339+ let pd = throw("Permission denied")
340+ match managerPublicKeyOrUnit() {
341+ case pk: ByteVector =>
342+ if ((i.callerPublicKey == pk))
343+ then true
344+ else pd
345+ case _: Unit =>
346+ if ((i.caller == this))
347+ then true
348+ else pd
349+ case _ =>
350+ throw("Match error")
351+ }
352+ }
423353
424354
425355 @Callable(i)
427357 let checkCaller = mustManager(i)
428358 if ((checkCaller == checkCaller))
429359 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
430- else throw("Strict value is not equal to itself.")
431- }
432-
433-
434-
435-@Callable(i)
436-func constructorV2 (votingEmissionContract) = {
437- let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
438- then true
439- else "invalid voting emission contract address"]
440- if ((cheks == cheks))
441- then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)]
442360 else throw("Strict value is not equal to itself.")
443361 }
444362
496414 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
497415 let stakedByUser = readStaked(stakedByUserKEY)
498416 let stakedTotal = readStaked(stakedTotalKEY)
499- let $t01901519132 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
500- let wxToClaimUserNew = $t01901519132._1
501- let integralSTATE = $t01901519132._2
502- let debug = $t01901519132._3
503- let listName = getUsersListName(lpAssetIdStr)
504- let listActions = if (containsNode(listName, userAddressStr))
505- then nil
506- else insertNodeActions(listName, userAddressStr)
507- (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
417+ let $t01617716294 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
418+ let wxToClaimUserNew = $t01617716294._1
419+ let integralSTATE = $t01617716294._2
420+ let debug = $t01617716294._3
421+ ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
508422 }
509423
510424
524438 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
525439 let stakedByUser = readStaked(stakedByUserKEY)
526440 let stakedTotal = readStaked(stakedTotalKEY)
527- let $t02046720585 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
528- let wxToClaimUserNew = $t02046720585._1
529- let integralSTATE = $t02046720585._2
530- let debug = $t02046720585._3
531- let listName = getUsersListName(lpAssetIdStr)
532- let listActions = if (containsNode(listName, userAddressStr))
533- then deleteNodeActions(listName, userAddressStr)
534- else nil
441+ let $t01743117549 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
442+ let wxToClaimUserNew = $t01743117549._1
443+ let integralSTATE = $t01743117549._2
444+ let debug = $t01743117549._3
535445 if ((amount > stakedByUser))
536446 then throw("passed amount is less then available")
537- else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
447+ else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
538448 }
539449
540450
541451
542452 @Callable(i)
543453 func claimWx (lpAssetIdStr) = {
454+ let userAddress = i.caller
544455 let userAddressStr = toString(i.caller)
545- let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
546- $Tuple2(nil, result)
547- }
548-
549-
550-
551-@Callable(i)
552-func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = {
553- let checkCaller = mustThis(i)
554- if ((checkCaller == checkCaller))
555- then {
556- let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address")
557- let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
558- let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
559- let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
560- let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
561- let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
562- let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
563- let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
564- let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
565- let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
566- let $t02232722439 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
567- let wxToClaimUserNew = $t02232722439._1
568- let integralSTATE = $t02232722439._2
569- let debug = $t02232722439._3
570- let availableToClaim = (wxToClaimUserNew - claimedByUser)
571- if ((zeroBigInt >= availableToClaim))
572- then throw("nothing to claim")
573- else {
574- let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
575- let minRewardPart = availableToClaim
576- let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
577- let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
578- let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
579- if ((emitBoost == emitBoost))
580- then {
581- let claimedByUserValue = (claimedByUser + availableToClaim)
582- let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
583- let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
584- let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
456+ let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
457+ let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
458+ let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
459+ let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
460+ let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
461+ let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
462+ let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
463+ let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
464+ let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
465+ let $t01878718899 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
466+ let wxToClaimUserNew = $t01878718899._1
467+ let integralSTATE = $t01878718899._2
468+ let debug = $t01878718899._3
469+ let availableToClaim = (wxToClaimUserNew - claimedByUser)
470+ if ((zeroBigInt >= availableToClaim))
471+ then throw("nothing to claim")
472+ else {
473+ let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
474+ let minRewardPart = availableToClaim
475+ let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
476+ let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
477+ let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
478+ if ((emitBoost == emitBoost))
479+ then {
480+ let claimedByUserValue = (claimedByUser + availableToClaim)
481+ let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
482+ let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
483+ let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
585484 [StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)]
586- }
587- else throw("Strict value is not equal to itself.")
588485 }
486+ else throw("Strict value is not equal to itself.")
589487 }
590- else throw("Strict value is not equal to itself.")
591488 }
592489
593490
609506 else (height - emissionStartBlock)
610507 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
611508 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
612- let $t02503925151 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
613- let wxToClaimUserNew = $t02503925151._1
614- let integralSTATE = $t02503925151._2
615- let debug = $t02503925151._3
509+ let $t02149921611 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
510+ let wxToClaimUserNew = $t02149921611._1
511+ let integralSTATE = $t02149921611._2
512+ let debug = $t02149921611._3
616513 let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
617514 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
618515 let wxAmountBoostTotal = asInt(boostInvResult[0])
620517 let minRewardPart = availableToClaim
621518 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
622519 let totalReward = (minRewardPart + boostRewardPart)
623- $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOST::") + boostDebug)], SEP))
624- }
625-
626-
627-
628-@Callable(i)
629-func usersListTraversal (lpAssetId) = {
630- let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
631- then true
632- else mustManager(i)
633- if ((checkCaller == checkCaller))
634- then {
635- let listName = getUsersListName(lpAssetId)
636- let userOrUnit = getString(keyNextUser(lpAssetId))
637- let headOrUnit = getString(keyListHead(listName))
638- match userOrUnit {
639- case _: Unit =>
640- match headOrUnit {
641- case _: Unit =>
642- $Tuple2(nil, false)
643- case head: String =>
644- $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true)
645- case _ =>
646- throw("Match error")
647- }
648- case userAddress: String =>
649- let claimedByUser = getIntOrZero(this, keyClaimedByUser(lpAssetId, userAddress))
650- let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
651- let $t02671526818 = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)
652- let wxToClaimUserNew = $t02671526818._1
653- let integralSTATE = $t02671526818._2
654- let debug = $t02671526818._3
655- let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
656- let r = if ((availableToClaim > zeroBigInt))
657- then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil)
658- else unit
659- if ((r == r))
660- then {
661- let nextUserOrUnit = getString(keyListNext(listName, userAddress))
662- match nextUserOrUnit {
663- case _: Unit =>
664- $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false)
665- case nextUser: String =>
666- $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true)
667- case _ =>
668- throw("Match error")
669- }
670- }
671- else throw("Strict value is not equal to itself.")
672- case _ =>
673- throw("Match error")
674- }
675- }
676- else throw("Strict value is not equal to itself.")
520+ $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOSTDEBUG::") + boostDebug)], SEP))
677521 }
678522
679523
682526 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
683527 then throw("permissions denied")
684528 else {
685- let $t02750327613 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
686- let wxPerLpIntegralNew = $t02750327613._1
687- let poolIntegralSTATE = $t02750327613._2
688- let poolDEBUG = $t02750327613._3
529+ let $t02252422634 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
530+ let wxPerLpIntegralNew = $t02252422634._1
531+ let poolIntegralSTATE = $t02252422634._2
532+ let poolDEBUG = $t02252422634._3
689533 poolIntegralSTATE
690534 }
691535
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# 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 = "__"
1313
1414 let POOLWEIGHTMULT = MULT8
1515
1616 let zeroBigInt = toBigInt(0)
1717
1818 let oneBigInt = toBigInt(1)
1919
2020 func asAnyList (val) = match val {
2121 case valAnyLyst: List[Any] =>
2222 valAnyLyst
2323 case _ =>
2424 throw("fail to cast into List[Any]")
2525 }
2626
2727
2828 func asInt (val) = match val {
2929 case valInt: Int =>
3030 valInt
3131 case _ =>
3232 throw("fail to cast into Int")
3333 }
3434
3535
3636 func asString (val) = match val {
3737 case valStr: String =>
3838 valStr
3939 case _ =>
4040 throw("fail to cast into Int")
4141 }
4242
4343
4444 func asByteVector (val) = match val {
4545 case valBin: ByteVector =>
4646 valBin
4747 case _ =>
4848 throw("fail to cast into Int")
4949 }
5050
5151
5252 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
5353
5454
5555 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
5656
5757
5858 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
5959
6060
6161 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
6262
6363
6464 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
6565
6666
6767 func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0")))
6868
6969
7070 func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) {
7171 case s: String =>
7272 value(parseBigInt(s))
7373 case _: Unit =>
7474 defaultVal
7575 case _ =>
7676 throw("Match error")
7777 }
7878
7979
8080 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
8181
8282
8383 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
8484
8585
8686 func keyFactoryAddress () = "%s%s__config__factoryAddress"
87-
88-
89-func keyVotingEmissionContract () = "%s__votingEmissionContract"
9087
9188
9289 let IdxFactoryCfgStakingDapp = 1
9390
9491 let IdxFactoryCfgBoostingDapp = 2
9592
9693 let IdxFactoryCfgIdoDapp = 3
9794
9895 let IdxFactoryCfgTeamDapp = 4
9996
10097 let IdxFactoryCfgEmissionDapp = 5
10198
10299 let IdxFactoryCfgRestDapp = 6
103100
104101 let IdxFactoryCfgSlippageDapp = 7
105102
106103 func keyFactoryCfg () = "%s__factoryConfig"
107104
108105
109106 func keyManagerPublicKey () = "%s__managerPublicKey"
110107
111108
112109 func keyMigratorPublicKey () = "%s__migratorPublicKey"
113110
114111
115112 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
116113
117114
118115 func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr"
119116
120117
121118 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
122119
123120
124121 func keyFactoryLpList () = "%s__lpTokensList"
125122
126123
127124 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
128125
129126
130127 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
131128
132129
133130 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
134131
135132
136133 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
137134
138135
139136 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
140137
141138
142139 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
143140
144141
145142 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
146143
147144
148145 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
149146
150147
151148 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
152149
153150
154151 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
155152
156153
157154 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
158155
159156
160157 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
161158
162159
163160 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
164161
165162
166163 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
167164
168165
169166 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
170167
171168
172169 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
173170
174171
175172 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
176173
177174
178175 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP)
179176
180177
181178 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
182179
183180
184181 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
185182
186183
187184 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
188185
189186
190187 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
191188
192189
193190 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
194191
195192
196193 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
197194
198195
199196 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
200197
201198
202199 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
203200
204201
205202 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
206203
207204
208205 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
209206
210207
211208 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
212209
213210
214211 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
215212
216213
217214 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
218215
219216
220217 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
221218
222219
223220 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
224221
225222
226223 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
227224
228225
229226 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
230227
231228
232229 let factoryAddress = getStringOrFail(this, keyFactoryAddress())
233230
234231 let factoryContract = addressFromStringValue(factoryAddress)
235232
236233 let factoryCfg = readFactoryCfgOrFail(factoryContract)
237234
238235 let emissionContract = getEmissionAddressOrFail(factoryCfg)
239236
240237 let boostingContract = getBoostingAddressOrFail(factoryCfg)
241238
242-func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
243-
244-
245-func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
246-
247-
248-func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
249-
250-
251-func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
252-
253-
254-func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
255-
256-
257-func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
258-
259-
260-func containsNode (listName,id) = {
261- let headOrUnit = getString(this, keyListHead(listName))
262- let prevOrUnit = getString(this, keyListPrev(listName, id))
263- let nextOrUnit = getString(this, keyListNext(listName, id))
264- if (if ((id == valueOrElse(headOrUnit, "")))
265- then true
266- else (prevOrUnit != unit))
267- then true
268- else (nextOrUnit != unit)
269- }
270-
271-
272-func insertNodeActions (listName,id) = {
273- let headOrUnit = getString(this, keyListHead(listName))
274- let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
275- let checkNode = if (!(containsNode(listName, id)))
276- then true
277- else throw("Node exists")
278- if ((checkNode == checkNode))
279- then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
280- then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
281- else nil)) ++ [StringEntry(keyListHead(listName), id)])
282- else throw("Strict value is not equal to itself.")
283- }
284-
285-
286-func deleteNodeActions (listName,id) = {
287- let headOrUnit = getString(this, keyListHead(listName))
288- let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
289- let prevOrUnit = getString(this, keyListPrev(listName, id))
290- let nextOrUnit = getString(this, keyListNext(listName, id))
291- ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
292- then (nextOrUnit != unit)
293- else false)
294- then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
295- else if ((nextOrUnit != unit))
296- then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
297- else if ((prevOrUnit != unit))
298- then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
299- else if ((id == valueOrElse(headOrUnit, "")))
300- then [DeleteEntry(keyListHead(listName))]
301- else throw(((("invalid node: " + listName) + ".") + id))))
302- }
303-
304-
305239 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
306240 then (stakedByUser > zeroBigInt)
307241 else false)
308242 then zeroBigInt
309243 else if ((stakedByUser == zeroBigInt))
310244 then wxPerLpIntegralNew
311245 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
312246 then (stakedByUser > zeroBigInt)
313247 else false)
314248 then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
315249 else throw("calcWxPerLpIntegralUserLast: unexpected state")
316250
317251
318252 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
319253 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
320254 let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
321255 let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
322256 then oneBigInt
323257 else stakedTotal
324258 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
325259 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
326260 let MULT3 = 1000
327261 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
328262 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
329263 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
330264 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
331265 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
332266 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
333267 let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY)
334268 let wxPerLpOrZeroX3 = 0
335269 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
336270 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
337271 then toBigInt(wxPerLpOrZeroX3)
338272 else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
339273 let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
340274 let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
341275 then oneBigInt
342276 else stakedTotalNew
343277 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh)))
344278 let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
345279 let wxPerLpIntegralLastUpdHeightNew = height
346- let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
280+ let debug = makeString([toString(wxPerLpIntegralNew), "dh=", toString(dh), "wxPerLpX3=", toString(wxPerLpX3), "stakedTotal=", toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), "poolWeight=", toString(poolWeight)], "::")
347281 $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
348282 }
349283
350284
351285 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
352- let $t01430214424 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
353- let wxPerLpIntegralNew = $t01430214424._1
354- let poolIntegralSTATE = $t01430214424._2
355- let poolDEBUG = $t01430214424._3
286+ let $t01150611628 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
287+ let wxPerLpIntegralNew = $t01150611628._1
288+ let poolIntegralSTATE = $t01150611628._2
289+ let poolDEBUG = $t01150611628._3
356290 let MULT3 = 1000
357291 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
358292 let stakedByUser = readStaked(stakedByUserKEY)
359293 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
360294 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
361295 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
362296 let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY)
363297 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
364298 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
365299 let MULT11 = (MULT8 * MULT3)
366300 let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11)))
367301 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
368302 let wxPerLpIntegralUserLastUpdHeightNew = height
369- let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
303+ let debug = makeString(["wxToClaimUser", toString(wxToClaimUser), "wxPerLpInteg", toString(wxPerLpIntegralUserLastUpdHeightOrZero), "this.getString", toString(value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))), "wxPerLpIntegralNew", toString(wxPerLpIntegralNew), "wxToClaimUserNew", toString(wxToClaimUserNew), "wxPerLpIntegralUserLast", toString(wxPerLpIntegralUserLast), toString(stakedByUser), "poolDEBUG=", poolDEBUG, "height=", toString(height)], "::")
370304 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
371305 }
372306
373307
374308 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
375309 case s: String =>
376310 fromBase58String(s)
377311 case _: Unit =>
378312 unit
379313 case _ =>
380314 throw("Match error")
381315 }
382316
383317
384318 func migratorPublicKeyOrUnit () = match getString(keyMigratorPublicKey()) {
385319 case s: String =>
386320 fromBase58String(s)
387321 case _: Unit =>
388322 unit
389323 case _ =>
390324 throw("Match error")
391325 }
392326
393327
394328 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
395329 case s: String =>
396330 fromBase58String(s)
397331 case _: Unit =>
398332 unit
399333 case _ =>
400334 throw("Match error")
401335 }
402336
403337
404-let permissionDeniedError = throw("Permission denied")
405-
406-func mustThis (i) = if ((i.caller == this))
407- then true
408- else permissionDeniedError
409-
410-
411-func mustManager (i) = match managerPublicKeyOrUnit() {
412- case pk: ByteVector =>
413- if ((i.callerPublicKey == pk))
414- then true
415- else permissionDeniedError
416- case _: Unit =>
417- if ((i.caller == this))
418- then true
419- else permissionDeniedError
420- case _ =>
421- throw("Match error")
422-}
338+func mustManager (i) = {
339+ let pd = throw("Permission denied")
340+ match managerPublicKeyOrUnit() {
341+ case pk: ByteVector =>
342+ if ((i.callerPublicKey == pk))
343+ then true
344+ else pd
345+ case _: Unit =>
346+ if ((i.caller == this))
347+ then true
348+ else pd
349+ case _ =>
350+ throw("Match error")
351+ }
352+ }
423353
424354
425355 @Callable(i)
426356 func constructor (factoryAddressStr) = {
427357 let checkCaller = mustManager(i)
428358 if ((checkCaller == checkCaller))
429359 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
430- else throw("Strict value is not equal to itself.")
431- }
432-
433-
434-
435-@Callable(i)
436-func constructorV2 (votingEmissionContract) = {
437- let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
438- then true
439- else "invalid voting emission contract address"]
440- if ((cheks == cheks))
441- then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)]
442360 else throw("Strict value is not equal to itself.")
443361 }
444362
445363
446364
447365 @Callable(i)
448366 func setManager (pendingManagerPublicKey) = {
449367 let checkCaller = mustManager(i)
450368 if ((checkCaller == checkCaller))
451369 then {
452370 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
453371 if ((checkManagerPublicKey == checkManagerPublicKey))
454372 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
455373 else throw("Strict value is not equal to itself.")
456374 }
457375 else throw("Strict value is not equal to itself.")
458376 }
459377
460378
461379
462380 @Callable(i)
463381 func confirmManager () = {
464382 let pm = pendingManagerPublicKeyOrUnit()
465383 let hasPM = if (isDefined(pm))
466384 then true
467385 else throw("No pending manager")
468386 if ((hasPM == hasPM))
469387 then {
470388 let checkPM = if ((i.callerPublicKey == value(pm)))
471389 then true
472390 else throw("You are not pending manager")
473391 if ((checkPM == checkPM))
474392 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
475393 else throw("Strict value is not equal to itself.")
476394 }
477395 else throw("Strict value is not equal to itself.")
478396 }
479397
480398
481399
482400 @Callable(i)
483401 func stake () = if ((size(i.payments) != 1))
484402 then throw("invalid payment - exact one payment must be attached")
485403 else {
486404 let pmt = i.payments[0]
487405 let lpAssetId = value(pmt.assetId)
488406 let lpAssetIdStr = toBase58String(lpAssetId)
489407 let amount = pmt.amount
490408 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
491409 let callerStr = toString(i.caller)
492410 let userAddressStr = if ((callerStr == poolAddressStr))
493411 then toString(i.originCaller)
494412 else callerStr
495413 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
496414 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
497415 let stakedByUser = readStaked(stakedByUserKEY)
498416 let stakedTotal = readStaked(stakedTotalKEY)
499- let $t01901519132 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
500- let wxToClaimUserNew = $t01901519132._1
501- let integralSTATE = $t01901519132._2
502- let debug = $t01901519132._3
503- let listName = getUsersListName(lpAssetIdStr)
504- let listActions = if (containsNode(listName, userAddressStr))
505- then nil
506- else insertNodeActions(listName, userAddressStr)
507- (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
417+ let $t01617716294 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
418+ let wxToClaimUserNew = $t01617716294._1
419+ let integralSTATE = $t01617716294._2
420+ let debug = $t01617716294._3
421+ ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
508422 }
509423
510424
511425
512426 @Callable(i)
513427 func unstake (lpAssetIdStr,amount) = {
514428 let lpAssetId = fromBase58String(lpAssetIdStr)
515429 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
516430 let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr)
517431 let callerStr = toString(i.caller)
518432 let userAddressStr = if (if ((callerStr == poolAddressStr))
519433 then true
520434 else (callerStr == poolAddon))
521435 then toString(i.originCaller)
522436 else callerStr
523437 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
524438 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
525439 let stakedByUser = readStaked(stakedByUserKEY)
526440 let stakedTotal = readStaked(stakedTotalKEY)
527- let $t02046720585 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
528- let wxToClaimUserNew = $t02046720585._1
529- let integralSTATE = $t02046720585._2
530- let debug = $t02046720585._3
531- let listName = getUsersListName(lpAssetIdStr)
532- let listActions = if (containsNode(listName, userAddressStr))
533- then deleteNodeActions(listName, userAddressStr)
534- else nil
441+ let $t01743117549 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
442+ let wxToClaimUserNew = $t01743117549._1
443+ let integralSTATE = $t01743117549._2
444+ let debug = $t01743117549._3
535445 if ((amount > stakedByUser))
536446 then throw("passed amount is less then available")
537- else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
447+ else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
538448 }
539449
540450
541451
542452 @Callable(i)
543453 func claimWx (lpAssetIdStr) = {
454+ let userAddress = i.caller
544455 let userAddressStr = toString(i.caller)
545- let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
546- $Tuple2(nil, result)
547- }
548-
549-
550-
551-@Callable(i)
552-func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = {
553- let checkCaller = mustThis(i)
554- if ((checkCaller == checkCaller))
555- then {
556- let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address")
557- let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
558- let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
559- let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
560- let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
561- let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
562- let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
563- let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
564- let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
565- let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
566- let $t02232722439 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
567- let wxToClaimUserNew = $t02232722439._1
568- let integralSTATE = $t02232722439._2
569- let debug = $t02232722439._3
570- let availableToClaim = (wxToClaimUserNew - claimedByUser)
571- if ((zeroBigInt >= availableToClaim))
572- then throw("nothing to claim")
573- else {
574- let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
575- let minRewardPart = availableToClaim
576- let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
577- let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
578- let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
579- if ((emitBoost == emitBoost))
580- then {
581- let claimedByUserValue = (claimedByUser + availableToClaim)
582- let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
583- let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
584- let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
456+ let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
457+ let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
458+ let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
459+ let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
460+ let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
461+ let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY))
462+ let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY))
463+ let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY))
464+ let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
465+ let $t01878718899 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
466+ let wxToClaimUserNew = $t01878718899._1
467+ let integralSTATE = $t01878718899._2
468+ let debug = $t01878718899._3
469+ let availableToClaim = (wxToClaimUserNew - claimedByUser)
470+ if ((zeroBigInt >= availableToClaim))
471+ then throw("nothing to claim")
472+ else {
473+ let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
474+ let minRewardPart = availableToClaim
475+ let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
476+ let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
477+ let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
478+ if ((emitBoost == emitBoost))
479+ then {
480+ let claimedByUserValue = (claimedByUser + availableToClaim)
481+ let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
482+ let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
483+ let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
585484 [StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)]
586- }
587- else throw("Strict value is not equal to itself.")
588485 }
486+ else throw("Strict value is not equal to itself.")
589487 }
590- else throw("Strict value is not equal to itself.")
591488 }
592489
593490
594491
595492 @Callable(i)
596493 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
597494 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
598495 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
599496 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
600497 let stakedByUser = readStaked(stakedByUserKEY)
601498 let stakedTotal = readStaked(stakedTotalKEY)
602499 let claimedByUser = getIntOrZero(this, claimedByUserKEY)
603500 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
604501 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
605502 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
606503 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
607504 let passedBlocks = if ((emissionStartBlock > height))
608505 then 0
609506 else (height - emissionStartBlock)
610507 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
611508 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
612- let $t02503925151 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
613- let wxToClaimUserNew = $t02503925151._1
614- let integralSTATE = $t02503925151._2
615- let debug = $t02503925151._3
509+ let $t02149921611 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
510+ let wxToClaimUserNew = $t02149921611._1
511+ let integralSTATE = $t02149921611._2
512+ let debug = $t02149921611._3
616513 let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
617514 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
618515 let wxAmountBoostTotal = asInt(boostInvResult[0])
619516 let boostDebug = asString(boostInvResult[1])
620517 let minRewardPart = availableToClaim
621518 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
622519 let totalReward = (minRewardPart + boostRewardPart)
623- $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOST::") + boostDebug)], SEP))
624- }
625-
626-
627-
628-@Callable(i)
629-func usersListTraversal (lpAssetId) = {
630- let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
631- then true
632- else mustManager(i)
633- if ((checkCaller == checkCaller))
634- then {
635- let listName = getUsersListName(lpAssetId)
636- let userOrUnit = getString(keyNextUser(lpAssetId))
637- let headOrUnit = getString(keyListHead(listName))
638- match userOrUnit {
639- case _: Unit =>
640- match headOrUnit {
641- case _: Unit =>
642- $Tuple2(nil, false)
643- case head: String =>
644- $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true)
645- case _ =>
646- throw("Match error")
647- }
648- case userAddress: String =>
649- let claimedByUser = getIntOrZero(this, keyClaimedByUser(lpAssetId, userAddress))
650- let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
651- let $t02671526818 = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)
652- let wxToClaimUserNew = $t02671526818._1
653- let integralSTATE = $t02671526818._2
654- let debug = $t02671526818._3
655- let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser))
656- let r = if ((availableToClaim > zeroBigInt))
657- then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil)
658- else unit
659- if ((r == r))
660- then {
661- let nextUserOrUnit = getString(keyListNext(listName, userAddress))
662- match nextUserOrUnit {
663- case _: Unit =>
664- $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false)
665- case nextUser: String =>
666- $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true)
667- case _ =>
668- throw("Match error")
669- }
670- }
671- else throw("Strict value is not equal to itself.")
672- case _ =>
673- throw("Match error")
674- }
675- }
676- else throw("Strict value is not equal to itself.")
520+ $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOSTDEBUG::") + boostDebug)], SEP))
677521 }
678522
679523
680524
681525 @Callable(i)
682526 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
683527 then throw("permissions denied")
684528 else {
685- let $t02750327613 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
686- let wxPerLpIntegralNew = $t02750327613._1
687- let poolIntegralSTATE = $t02750327613._2
688- let poolDEBUG = $t02750327613._3
529+ let $t02252422634 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
530+ let wxPerLpIntegralNew = $t02252422634._1
531+ let poolIntegralSTATE = $t02252422634._2
532+ let poolDEBUG = $t02252422634._3
689533 poolIntegralSTATE
690534 }
691535
692536
693537 @Verifier(tx)
694538 func verify () = {
695539 let targetPublicKey = match managerPublicKeyOrUnit() {
696540 case pk: ByteVector =>
697541 pk
698542 case _: Unit =>
699543 tx.senderPublicKey
700544 case _ =>
701545 throw("Match error")
702546 }
703547 let migratorPublicKey = match migratorPublicKeyOrUnit() {
704548 case pk: ByteVector =>
705549 pk
706550 case _: Unit =>
707551 tx.senderPublicKey
708552 case _ =>
709553 throw("Match error")
710554 }
711555 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
712556 then true
713557 else sigVerify(tx.bodyBytes, tx.proofs[0], migratorPublicKey)
714558 }
715559

github/deemru/w8io/169f3d6 
87.56 ms