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

Payout NFT standard #199

Closed
wants to merge 5 commits into from
Closed

Payout NFT standard #199

wants to merge 5 commits into from

Conversation

thor314
Copy link
Contributor

@thor314 thor314 commented May 3, 2021

No description provided.

@mattlockyer
Copy link
Contributor

max_len_payout is to stop NFT transfer before Market receives something it can't use correct?

Otherwise looks fine to me.

@thor314
Copy link
Contributor Author

thor314 commented May 13, 2021

max_len_payout is to stop NFT transfer before Market receives something it can't use correct?

Otherwise looks fine to me.

max_len_payout prevents the pathological situation where, if the market did NOT inform the NFT contract how many people it was willing to pay out, the following could occur; suppose for this example, the market will pay out at most 10 people.

  1. The market asks the NFT contract for who to pay, and tells the NFT contract to transfer the token to Bob
  2. The NFT contract transfers the token to Bob and gives the market a list of 12 people to pay out
  3. The market refuses to pay out those 12 people, as the market will run out of gas;

The people who should have gotten paid didn't get paid, and Bob gets ownership of the token.

We also don't want to live in a world where all markets are forced to support exactly 10 payouts, some might like to go higher. So to support both of these, max_payout_len solves both issues without risking annoying situations like the one above.

@mattlockyer
Copy link
Contributor

@mikedotexe @evgenykuzyakov this looks good to me. I like how max_len_payout helps to avoid NFT <> Market inconsistencies ahead of internal_transfer actually moving the NFT.

@thor314
Copy link
Contributor Author

thor314 commented May 18, 2021

adjusted the view method. It should probably include the max_len_payout parameter as well.

Copy link
Contributor

@mattlockyer mattlockyer left a comment

Choose a reason for hiding this comment

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

This looks great. I have it working across multiple projects now. We should clean up the language (if any edits are needed for clarity) and merge into nomicon ASAP.

@mikedotexe mikedotexe changed the title Payout NFT standard rough draft Payout NFT standard Jun 22, 2021
@mikedotexe mikedotexe mentioned this pull request Jun 22, 2021
@mikedotexe
Copy link
Contributor

Moved to #224

@mikedotexe mikedotexe closed this Jun 22, 2021
@thor314 thor314 mentioned this pull request Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants