-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduces StableYield
contract for minting and distributing reward per app per period
#167
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: David Núñez <[email protected]> Co-authored-by: Michalina <[email protected]>
…m governance contracts Co-authored-by: Michalina <[email protected]>
Co-authored-by: Michalina <[email protected]>
…er app per period
contracts/reward/StableYield.sol
Outdated
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | ||
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; | ||
|
||
/// @title Stable yield contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// @title Stable yield contract | |
/// @title StableYield contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
contracts/reward/StableYield.sol
Outdated
view | ||
returns (uint96 reward) | ||
{ | ||
uint96 authrorizedOverall = tokenStaking.getAuthorizedOverall( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint96 authrorizedOverall = tokenStaking.getAuthorizedOverall( | |
uint96 authorizedOverall = tokenStaking.getAuthorizedOverall( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
contracts/reward/StableYield.sol
Outdated
distributor.functionCall(data); | ||
} | ||
|
||
function caclulateReward(address application, uint256 stableYield) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function caclulateReward(address application, uint256 stableYield) | |
function caculateReward(address application, uint256 stableYield) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
} | ||
|
||
function sendToDistributor(address distributor, uint96 reward) internal { | ||
token.mint(distributor, reward); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the criticality of minting tokens, what do you think if we add a manual approval step (e.g., from the council multisig)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
StableYield
contract 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)