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

Kread Code Review of Contract Code #8195

Closed
aj-agoric opened this issue Aug 15, 2023 · 4 comments
Closed

Kread Code Review of Contract Code #8195

aj-agoric opened this issue Aug 15, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@aj-agoric
Copy link

aj-agoric commented Aug 15, 2023

What is the Problem Being Solved?

To support go-live of a Reference Partner's Kread dapp as outlined in the Partner Go Live Checklist
Task: Code review the contract code which will be deployed to chain.
Purpose: Audit to raise confidence that contract implements desired behavior, is upgradable, properly uses durability & virtualization, doesn’t have bugs like infinite loops.
Instructions: OpCo engineers to arrange review with partner via Slack.

Description of the Design

Security Considerations

Scaling Considerations

Test Plan

Upgrade Considerations

@aj-agoric aj-agoric added the enhancement New feature or request label Aug 15, 2023
@aj-agoric aj-agoric changed the title Memory Footprint Review PLACEHOLDER: Memory Footprint Review Aug 16, 2023
@aj-agoric aj-agoric changed the title PLACEHOLDER: Memory Footprint Review PLACEHOLDER: Code Review of Contract Code Aug 22, 2023
@aj-agoric aj-agoric changed the title PLACEHOLDER: Code Review of Contract Code Code Review of Contract Code Aug 22, 2023
@aj-agoric aj-agoric added this to the Kread Launch milestone Sep 7, 2023
@dckc
Copy link
Member

dckc commented Sep 15, 2023

minting

based on 5651c94

sequenceDiagram
  actor player
   note right of player: smartWallet

  participant zoe
  participant kread

    player->>kread: makeMintCharacterInvitation()
    kread-->>player: inv1
    player->>zoe: offer(inv1, { want: { name: 'Fred' } })
    zoe-->>kread: handle(seat1, { want: { name: 'Fred' } })
    kread-->>kread: random character attributes
    kread-->>vstorage: updateMetrics('character', ...)
    kread-->>zoe: zcfMint(character)
    zoe-->>player: { payouts: character }

Loading

minting and offer-safety

offer safety of character minting looks a lot like #2349 - that is: it would probably need amount patterns (#2230)

@aj-agoric aj-agoric changed the title Code Review of Contract Code Kread Code Review of Contract Code Sep 18, 2023
@dckc
Copy link
Member

dckc commented Sep 22, 2023

fix: get paymentBrand from Money issuer
Rather than a separate term for the paymentBrand, use the brands
provided by Zoe derived from issuers provided to startInstance().
This ensures that the contract is doing business in the same
brand for which Zoe is providing offer safety.
agoric-labs/KREAd@c38ea00

@dckc
Copy link
Member

dckc commented Sep 23, 2023

Several of us spent most of the last few days working closely with the Kryha on the contract. I'm satisfied that it poses at most acceptable risks to the chain.

for reference: https://github.com/Kryha/KREAd , currently 875f5de

@dckc dckc closed this as completed Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants