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

Allocator reserve #231

Closed
wants to merge 9 commits into from
Closed

Allocator reserve #231

wants to merge 9 commits into from

Conversation

dimpar
Copy link
Member

@dimpar dimpar commented Feb 9, 2024

WIP

Source: https://github.com/decoupleco/stBTC

Depends on: #213

This PR brings Allocator and Reserve contracts to Acre repository. Contracts were implemented by the Acre partner "Sense".

TODO:

  • fix Slither checks
  • migrate unit and integration tests
  • identify and add missing tests

xERC4626 adds support for rewards (yield) distribution gradually over
the rewards cycle length.
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.
These contracts are mostly copy & pasted from the third party partner
handling strategies for Acre. As of this commit most of the
modifications were done around replacing Solmate libs with OpenZeppelin,
formatting and functions reorder. No changes in logic.
@dimpar dimpar requested a review from nkuba February 9, 2024 11:43
@nkuba
Copy link
Member

nkuba commented Mar 18, 2024

We're not introducing this feature.

@nkuba nkuba closed this Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants