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

PSM anchorBrand term not derived from Zoe offer-safe issuers #8371

Open
dckc opened this issue Sep 22, 2023 · 0 comments
Open

PSM anchorBrand term not derived from Zoe offer-safe issuers #8371

dckc opened this issue Sep 22, 2023 · 0 comments
Labels
bug Something isn't working Inter-protocol Overarching Inter Protocol Zoe package: Zoe

Comments

@dckc
Copy link
Member

dckc commented Sep 22, 2023

Is this a bug? Perhaps more of a best practices violation?

Describe the bug

The PSM contract uses an anchorBrand rather than using the brands Zoe provides based on the issuers given to startInstance(). Zoe provides offer safety only for registered issuers (either via startInstance or saveIssuer).

To Reproduce

This is hypothesized, not observed

  1. Instantiate the contract with anchorBrand: b1 but don't provide any corresponding issuers in startInstance()
  2. Client make an offer based on anchorBrand from terms.
  3. offer fails due to unregistered brand

Expected behavior

Clients should only make offers using getTerms().brands

Platform Environment

  • what OS are you using? what version of Node.js?
  • is there anything special/unusual about your platform?
  • what version of the Agoric-SDK are you using? (run git describe --tags --always)

const { anchorBrand, anchorPerMinted } = zcf.getTerms();

Additional context

Discovered while reviewing KREAd
#8195 (comment)

cc @turadg

@dckc dckc added bug Something isn't working Zoe package: Zoe Inter-protocol Overarching Inter Protocol labels Sep 22, 2023
@Chris-Hibbert Chris-Hibbert changed the title PSM anchorBrand term not derived from from Zoe offer-safe issuers PSM anchorBrand term not derived from Zoe offer-safe issuers Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Inter-protocol Overarching Inter Protocol Zoe package: Zoe
Projects
None yet
Development

No branches or pull requests

1 participant