1

Regarding plutus-apps Auction use-case plutus-use-cases/src/Plutus/Contracts/Auction.hs , both auctionSeller and auctionBuyer need to specify the same exact params, or else each buyer could change the auction deadline! What exactly stops the buyer contract from doing so?

1 Answer 1

1

In a way, you are (but aren't) correct since auctionSeller and auctionBuyer could be used to arbitrarily declare params. However, these functions don't run on-chain, they are client-side code for preparing the structure to be submitted for placing a bid.

The on-chain validation is in the "auctionTransition" function which accepts the bid, or payout. Both these inputs don't even accept a deadline or token type value so it isn't possible for them to change the state in that way. Otherwise, the token and deadline are immutable, so they cannot be changed.

2
  • Well as you said it is off-chain. If you feed it incorrect information, all you do is allow yourself to build an order which will be denied by the on-chain component, or disallow yourself from building otherwise correct information. Jan 14 at 3:30
  • Welcome to Cardano SE! As a new user be sure to take the Tour.
    – gRebel
    Jan 14 at 4:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.