Multiple rewards Liquidity Mining#377
Open
swamp-thing-sovryn wants to merge 13 commits intoDistributedCollective:developmentfrom
Open
Multiple rewards Liquidity Mining#377swamp-thing-sovryn wants to merge 13 commits intoDistributedCollective:developmentfrom
swamp-thing-sovryn wants to merge 13 commits intoDistributedCollective:developmentfrom
Conversation
…ards feat: new liquidity mining that rewards in multiple tokens
Slither fixes on LM
…eposited-to-V2 feat:allow lending with LM V2 during migration period
…ests ci: increased nodejs memory so it can run the tests properly on node 14.x
| address _migrator, | ||
| IERC20 _SOV | ||
| ) external onlyAuthorized { | ||
| /// @dev Non-idempotent function. Must be called just once. |
Collaborator
Author
There was a problem hiding this comment.
@py-ro we should add a check to prevent initialize to be called twice ... in the previous version this check was put in place
require(address(SOV) == address(0), "Already initialized");
contracts/farm/LiquidityMiningV2.sol
Outdated
| function initialize( | ||
| address _wrapper, | ||
| address _migrator, | ||
| IERC20 _SOV |
Collaborator
Author
There was a problem hiding this comment.
this parameter is never used I guess ... let's double check just to be sure
contracts/farm/LiquidityMiningV1.sol
Outdated
Comment on lines
+110
to
+111
| function finishMigrationGracePeriod() external onlyAuthorized onlyBeforeMigrationGracePeriodFinished { | ||
| require(migrationGracePeriodState == MigrationGracePeriodStates.Started, "Migration hasn't started yet"); |
Collaborator
Author
There was a problem hiding this comment.
The require introduces a harder contraint making the onlyBeforeMigrationGracePeriodFinished worthless ... as suggested by Haku we might create a new modifier onlyMigrationGracePerioidStarted that checks the same condition as the require
fix: LM contracts initialize only once
Contributor
|
this could be useful in the future, hence leaving it open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multiple rewards Liquidity Mining
Goal
A new liquidity mining contract will be deployed that will let users to get multiple tokens in exchange of staking LP Tokens as opposed to the current version which only rewards
SOV:Implementation
Upgrading the original
LiquidityMining.solcontract would have been extremely complex the storage layout would require lots of changes. In order to make users experience smoother and not to make them to actively move their funds to the new contract and pay for the migration trnasaction fees, the following plan is proposed:LiquidityMiningV2.LiquidityMiningcontract with a new version that contains a new set of capabilities:a. Allows admins to stop some operations (see
3)b. Exposes a new interface to extract some data from it's state
stopMiningLiquidityMining.solcontract will be locked the users will not be able to neither withdraw or claim rewards.LiquidityMiningV2that will:a. Copy the original pools and rewards configurations into the new liquidity mining contract
b. Move the remaining
SOVandLP Tokensstored inLiquidityMiningV1Deployment steps
LiquidityMiningimplementation byLiquidityMiningV1LiquidityMiningV2LMV1toLMV2MigratorasLiquidityMiningV2andLiquidityMiningV1adminLiquidityMiningV1deposits