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

Add Multiples for Zoe offers #5540

Open
8 tasks
Chris-Hibbert opened this issue Jun 8, 2022 · 1 comment
Open
8 tasks

Add Multiples for Zoe offers #5540

Chris-Hibbert opened this issue Jun 8, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request Zoe package: Zoe

Comments

@Chris-Hibbert
Copy link
Contributor

Chris-Hibbert commented Jun 8, 2022

What is the Problem Being Solved?

@erights wrote a draft implementation of multiples, which resolves our old desire for divisible contracts. It needs to be carried across the goal line.

Description of the Design

remaining tasks:

  • Make the PR be green on CI. Tests are currently failing, but we haven't investigated why.
  • make it opt-in.
    • Current idea is to include an extra option to makeInvitation()
    • One alternative is to make it require an explicit opt-in by the contract, though there's no proposed mechanism
  • review whether there are interactions between offers with and without multiples specified. (Hypothese: no, since unspecified=1).
  • Verify that zoeHelpers don't need to be updated.
  • update agoric.com/Documentation with at least a hint of this feature.
  • update isOfferSafe jsDoc

Do we need a flag on Zoe to disable use until we decide it should be available? [Proposed answer: No global flag is necessary.]

Security Considerations

Offer safety is paramount.

Test Plan

  • Add tests, including at least a trivial contract making use of the feature.
  • Test for interactions between offers that specify multiples of atomic units that aren't multiples of each other.
    (I'm thinking of a simpleExchange between "up to 5 copies of three items", and "up to 7 copies of two items", and whether isOfferSafe is going to be confused when the contract propose to reallocate 10 items.)
@Chris-Hibbert Chris-Hibbert added enhancement New feature or request Zoe package: Zoe labels Jun 8, 2022
@Chris-Hibbert Chris-Hibbert self-assigned this Jun 8, 2022
@dckc
Copy link
Member

dckc commented Jun 15, 2022

Doing this in Mainnet 1.1 requires a Zoe upgrade, yes? I guess I'll mark this as blocked by it... or at least: by Zoe durability (#4383), which is the closest thing I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Zoe package: Zoe
Projects
None yet
Development

No branches or pull requests

3 participants