Skip to content

Deal with min-utxo-value on marketplace validator #28

@samuelWilliams99

Description

@samuelWilliams99

Currently, a buy transaction simply spends the utxo at the validator, and sends everything back to the caller. This means, in a buy transaction, the price the buyer pays is actually always 1.4 ada less than the stated price, and the 1.4 ada the lister provides when putting their nft on the market is lost.

There are a few actions here:

  • Do nothing, given the value is so small, we can impose a simple minimum price for nfts, such that people cannot "buy" listed tokens for free.
    • Pros: quite easy
    • Cons: non obvious user behaviour
  • Add the minutxovalue to the price used onchain, then modify frontend to subtract this from the displayed price
    • Pros: fully offchain fix
    • Cons: non obvious disconnect between market and onchain
  • Modify the marketplace validator to hold the lister, or current owner in the datum. It can then check for a utxo back to this address when bought that includes the full value of the spent utxo without the nft in question.
    • Pros: the "correct™" solution, returns the minutxovalue to its owner
    • Cons: onchain changes, would make changing price a more confusing transaction, as you need to send min ada to yourself

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions