Introduces StableYield contract for minting and distributing reward per app per period#167
Draft
Introduces StableYield contract for minting and distributing reward per app per period#167
StableYield contract for minting and distributing reward per app per period#167Conversation
Co-authored-by: David Núñez <david@nucypher.com> Co-authored-by: Michalina <michalina.cienciala@akena.co>
…m governance contracts Co-authored-by: Michalina <michalina.cienciala@akena.co>
Co-authored-by: Michalina <michalina.cienciala@akena.co>
…er app per period
cygnusv
reviewed
Apr 5, 2024
contracts/reward/StableYield.sol
Outdated
| import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | ||
| import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; | ||
|
|
||
| /// @title Stable yield contract |
Contributor
There was a problem hiding this comment.
Suggested change
| /// @title Stable yield contract | |
| /// @title StableYield contract |
contracts/reward/StableYield.sol
Outdated
| view | ||
| returns (uint96 reward) | ||
| { | ||
| uint96 authrorizedOverall = tokenStaking.getAuthorizedOverall( |
Contributor
There was a problem hiding this comment.
Suggested change
| uint96 authrorizedOverall = tokenStaking.getAuthorizedOverall( | |
| uint96 authorizedOverall = tokenStaking.getAuthorizedOverall( |
contracts/reward/StableYield.sol
Outdated
| distributor.functionCall(data); | ||
| } | ||
|
|
||
| function caclulateReward(address application, uint256 stableYield) |
Contributor
There was a problem hiding this comment.
Suggested change
| function caclulateReward(address application, uint256 stableYield) | |
| function caculateReward(address application, uint256 stableYield) |
| } | ||
|
|
||
| function sendToDistributor(address distributor, uint96 reward) internal { | ||
| token.mint(distributor, reward); |
Contributor
There was a problem hiding this comment.
Given the criticality of minting tokens, what do you think if we add a manual approval step (e.g., from the council multisig)?
Contributor
Author
There was a problem hiding this comment.
I was hoping to have mintAndPush as permissionless method. Can you elaborate how this will work with council? in which moment? Like sort of queue?
Co-authored-by: David Núñez <david@nucypher.com>
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.
StableYieldcontract helps to automatize reward distribution. This level allows periodic minting and sending reward to distributor which can be Merkle tree or application itself (TACo app)