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

Support for xERC4626 #213

Closed
wants to merge 8 commits into from
Closed

Support for xERC4626 #213

wants to merge 8 commits into from

Conversation

dimpar
Copy link
Member

@dimpar dimpar commented Feb 1, 2024

Removing fee collection in stBTC. Bridge and referral fees are collected in TBTCDepositor contract. If additional fees will need to be collected by Acre, then there should be another contract upstream that will trigger a depositor flow with fee collection for treasury.

xERC4626 adds support for rewards (yield) distribution gradually over the rewards cycle length period.

xERC4626 adds support for rewards (yield) distribution gradually over
the rewards cycle length.
@dimpar dimpar requested a review from nkuba February 1, 2024 15:00
@dimpar dimpar self-assigned this Feb 1, 2024
Upcomming `allocator` contract will hold rewards/yield, not stBTC. This
PR fixes and changes current tests to reflect that. Additionally,
xECR4626 overrides totalAsset() function which uses storedTotalAsset
params and replaces totalAssets param. This is why a simple mint to
stBTC contract won't work to simulate earned yield.
It was decided to remove fees from stBTC contract. Fees will be
collected upstream in TBTCDepositor contract or other contract that will
trigger deposit flow inside of stBTC contract.
Adjusting tests after fee concept is scratched from the tests scenarios.
For now we can initialize the rewards cycle lenth during the deployment
process. We should revisit if 7 days is a good number for rewards cycle.
@dimpar dimpar added the 🔗 Solidity Solidity contracts label Feb 8, 2024
@dimpar dimpar changed the title Drafting support for xERC4626 Support for xERC4626 Feb 8, 2024
@dimpar dimpar marked this pull request as ready for review February 8, 2024 16:04
@dimpar dimpar requested a review from r-czajkowski February 8, 2024 16:04
@dimpar dimpar mentioned this pull request Feb 9, 2024
3 tasks
@dimpar
Copy link
Member Author

dimpar commented Feb 12, 2024

Splitting this PR into 2 targeted PRs: #235 (fee removal) and #241 (support for xERC4626)

@dimpar dimpar closed this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔗 Solidity Solidity contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant