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

fix: fix bug which breaks rights conservation and offer safety guarantees #3858

Merged
merged 5 commits into from
Sep 21, 2021

Conversation

katelynsills
Copy link
Contributor

This PR rewrites zcfMint.mintGains and zcfMint.burnLosses so that neither use staged allocations and neither use the typical reallocate path. Instead, the code is simplified such that the updated allocations are calculated, then a special reallocate only for zcfMint methods (reallocateForZCFMint) is called. reallocateInternal is deleted and its contents moved into reallocate proper.

Closes #3848

@katelynsills katelynsills added the Zoe package: Zoe label Sep 20, 2021
@katelynsills katelynsills self-assigned this Sep 20, 2021
Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

packages/zoe/src/contractFacet/zcfSeat.js Outdated Show resolved Hide resolved
packages/zoe/src/contractFacet/zcfZygote.js Show resolved Hide resolved
packages/zoe/src/contractFacet/zcfZygote.js Outdated Show resolved Hide resolved
packages/zoe/src/contractFacet/zcfZygote.js Show resolved Hide resolved
@katelynsills katelynsills enabled auto-merge (squash) September 21, 2021 01:17
@katelynsills katelynsills merged commit b67bfcb into master Sep 21, 2021
@katelynsills katelynsills deleted the 3848-zcfMint-rights-conservation branch September 21, 2021 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Zoe package: Zoe
Projects
None yet
2 participants