-
Notifications
You must be signed in to change notification settings - Fork 320
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
refactor: delegated fees #253
Merged
Merged
Conversation
This file contains 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
fubuloubu
requested review from
Grandthrax,
a user,
storming0x,
orbxball and
poolpitako
March 22, 2021 20:35
fubuloubu
force-pushed
the
refactor/delegated-fees
branch
from
March 23, 2021 14:59
4a6e498
to
e8f7208
Compare
storming0x
reviewed
Mar 23, 2021
Thinking if the comment here also needs to document this? yearn-vaults/contracts/BaseStrategy.sol Line 217 in ba980d1
|
storming0x
reviewed
Mar 23, 2021
storming0x
approved these changes
Mar 23, 2021
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.
LGTM on latest changes, all comments addressed
orbxball
pushed a commit
to orbxball/yearn-vaults
that referenced
this pull request
Aug 8, 2021
* refactor: add delegated assets to the accounting of mgmt fees * refactor: some trailing whitespace * test: show that delegated assets pay no mgmt fee * refactor: add `min` guard to avoid improper computation from breaking * docs: add note about use of `BaseStrategy.delegatedAssets()`
sambacha
pushed a commit
to sambacha/yearn-vaults
that referenced
this pull request
Sep 7, 2021
* refactor: add delegated assets to the accounting of mgmt fees * refactor: some trailing whitespace * test: show that delegated assets pay no mgmt fee * refactor: add `min` guard to avoid improper computation from breaking * docs: add note about use of `BaseStrategy.delegatedAssets()`
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.
This PR changes how fees are assessed such that
BaseStrategy.delegatedAssets
is pro-rated into the fee assessment. If a strategy delegates all of it's assets, there should be no fees earned by that strategy to either governance or the strategist themselves, and that portion of the assets loaned out shall earn no management fees either.If only a portion is delegated (e.g. debt-based strategies where some of the funds are used to borrow against), that portion should be calculated such that the exact funds used to borrow are marked as delegated (e.g. Maker strategy w/ 200% debt ratio, then half the funds should be marked "delegated"). This is important to ensure than the degree of work is properly accounted for in how a strategy operates.
Strategists will need to be aware of properly reporting
delegatedAssets
and ensure it is strictly less than or equal to the total debt, or else the calculations will revert or be processed improperly.