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

CIP-0069 | single argument Scripts #774

Conversation

MicroProofs
Copy link
Contributor

Not sure if we should discuss here or in #769

The goal is to add additional clarity to this CIP or determine if another CIP is better suited to 2 major use cases

  1. Having a spend script share the same script hash as a mint, withdrawing, observing, or certifying script without using a argument check workaround currently used in Opshin and Aiken
  2. Giving smart contract creators the ability to handle the no datum case with spend contracts.


- Use Case 3: Allow dApp protocols to have a claim or withdraw mechanism (similar to Ethereum for tokens sent to a contract without call) for claiming tokens sent without a datum.

I'd be remiss if I didn't mention CIP-0112 which has been expanded to improve native script capabilities to provide an alternative solution for use case 1 and 2. But for use case 3, CIP-0112 does not enable a "claim or withdraw mechanism" for contracts.
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@@ -30,10 +32,24 @@ As it stands the scripts being made on cardano often suffer this problem, and th

- Use Case 3 (taken from Minswap's Dex V1): NFT is minted for the same reason as above. It allows a minting policy to later mint LP tokens with that unique id token name.

We see a similar pattern repeating over and over again as witnessed by dapp developers and auditors alike. By allowing the multi-purpose policies (spending and any other) we increase the security of Cardano by giving us more confidence and allowing to design protocols that have their architecture driven by Cardano's features, not limited by Cardano's language.
We see a similar pattern repeating over and over again as witnessed by dapp developers and auditors alike. By allowing the multi-purpose scripts (spending and any other) we increase the security of Cardano by giving us more confidence and allowing to design protocols that have their architecture driven by Cardano's features, not limited by Cardano's language.
Copy link
Contributor

Choose a reason for hiding this comment

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

Soley this reason is enough justification for this CIP. As in the case of the withdraw-zero trick and CIP 112, it is simply not healthy for the most critical and widely used design patterns throughout the ecosystem to rely on what is essentially an obscure implementation detail / black magic trick. Given the importance of this design pattern, and its demonstrable utility (on mainnet across a huge number of protocols in the ecosystem in production) it is of great importance that this is granted more official support and formalization.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would, however, remove the part about the "recent Nami bug" since AFAIK CIP are supposed to be timeless and this might lose context in the future. Maybe replace with a brief line about how a bug in nami caused UTxOs without datums to be sent to a script and thus mistakenly locked forever.

@rphair rphair changed the title Cip 69 further specification with No Datum Spends CIP-0069 | add No Datum Spends Mar 5, 2024
@rphair rphair added the Category: Plutus Proposals belonging to the 'Plutus' category. label Mar 5, 2024
@rphair
Copy link
Collaborator

rphair commented Mar 5, 2024

@MicroProofs I've added this to today's CIP editors' meeting agenda (https://hackmd.io/@cip-editors/83) with a note to also introduce #769. As always it would be great if you can come & explain what these are & how the issue & solution are related.

@rphair rphair added the Update Adds content or significantly reworks an existing proposal label Mar 15, 2024
@MicroProofs MicroProofs changed the title CIP-0069 | add No Datum Spends CIP-0069 | single argument Scripts Apr 19, 2024
@MicroProofs MicroProofs closed this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Plutus Proposals belonging to the 'Plutus' category. Update Adds content or significantly reworks an existing proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants