Closed snobbee closed 5 months ago
I found the following snippets in your repository.
I have created the following workflow as a basis for how the discussion and coding will be derived.
The key functionalities around Reward buckets are located within those files:
Given the complexity of updating the 'AddLiquidityToRewardBucket' function and the potential for errors, I suggest breaking down Step 2 into smaller, more manageable subtasks. This could include creating the 'DistributionSchedule' struct, adding the 'DistributionSchedules' field to the 'RewardBucket' struct, and updating the 'EndBlocker' function separately. Additionally, to address the concern about negative duration, we should ensure that the check for negative duration is robust and fails gracefully. This could be done by returning a specific error message when the duration is negative, and handling this error appropriately in the calling code. Finally, to ensure thorough testing, we should consider using test-driven development. This would involve writing the tests for the new functionality before implementing it, which can help ensure that all edge cases are covered.
Currently, the Sifchain codebase includes a feature for non-Rowan yield rewards, where users can add non-Rowan liquidity to a reward bucket. The system then automatically distributes the entire liquidity in the bucket to the corresponding liquidity pool. This is a valuable functionality, but it could be further enhanced for better flexibility and utility.
Feature Request: I propose adding an optional duration parameter to this existing functionality. When this duration is set, any new liquidity added to the reward bucket should not be distributed immediately in its entirety. Instead, it would be more beneficial if the distribution of this new liquidity is spread out over the specified duration. This means the liquidity would be distributed in smaller, incremental portions throughout the duration period, rather than all at once.
Benefits:
I believe this enhancement will add significant value to the Sifchain platform, offering greater control and flexibility to users in the management of non-Rowan liquidity rewards.