Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
326 stars 206 forks source link

factor out makePeg / retain / redeem in pegasus contract? #4152

Open dckc opened 2 years ago

dckc commented 2 years ago

What is the Problem Being Solved?

The #3986 refactor improves things, but the "fits on one slide of a page" pegasus contract from a Jun 2019 presentation by @erights is still somewhat obscured among all the other functionality in pegasus.js.

Description of the Design

factor out the retain and redeem functions a la the Jun 2019 slide.

Security Considerations

I expect this to facilitate audits.

Test Plan

Perhaps somewhat orthogonal, but it would be convenient if test-peg.js would enumerate the features each in its own test. For example: the feature of doing IBC sends using Zoe offers.

Tartuffo commented 2 years ago

@dckc This does not have an area label that is covered by our weekly tech / planning meetings. Can you assign the proper label? We cover: agd, agoric-cosmos, amm, core economy, cosmic-swingset, endo, getrun, governance, installation-bundling, metering, run-protocol, staking, swingset, swingset-runner, token economy, wallet, zoe contract. Or, if this is accurately labeled by an area label we should be covering in one of our weekly meetings, please LMK.

dckc commented 2 years ago

The pegasus label should be added to... um... the Zoe/ERTP meeting? or cosmic-swingset? I'm not sure. @michaelfig ?

Tartuffo commented 2 years ago

@dckc Okay, for now I added the pegasus label for the Zoe/ERTP meeting ZH board. @michaelfig LMK if you think it be reviewed in cosmic-swingset instead.