Skip to content
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

Holding $BREAD as a pre-requisite for projects recieving yield #86

Open
4 tasks done
RonTuretzky opened this issue Sep 9, 2024 · 0 comments
Open
4 tasks done
Assignees

Comments

@RonTuretzky
Copy link
Collaborator

RonTuretzky commented Sep 9, 2024

  • A minimum bread holding balance (minimumProjectBalance) variable should be added to the contract (and the initializer/ json configs)
  • A setter function should be added with access control
  • If a project does not hold the minimum amount in their address, the transfer of voted yield should not occur
  • A test should be added to confirm this behavior
sequenceDiagram 
YieldDistributor ->> YieldDistributor : distributeYield() 
loop For each project in the projects array 
YieldDistributor ->> YieldDistributor : uint256 projectBalance = BREAD.balanceOf(projects[i]) 
alt  if balance below min
YieldDistributor ->> YieldDistributor :  BREAD.transfer(projects[i], _votedSplit); 
end 
YieldDistributor ->> YieldDistributor : calculate `_votedSplit` for `projects[i]`
YieldDistributor ->> Project : BREAD.transfer(projects[i], _votedSplit + _baseSplit);
end

Loading

Note: The expected behavior should be that if the project does not hold the minimum amount of $BREAD in their account, the transfer will not execute. Other projects should still receive their expected amount, without augmenting their yield allocation. The yield will stay in the contract, and will increase their yield allocation in the upcoming month (in the event the project does not hold $BREAD in the next cycle as well). This allows for a "soft-penalty", as this distributes the project's yield to the other projects in the next cycle, but still allows the project to receive part of that yield and simplifies the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Frozen
Development

No branches or pull requests

2 participants