This repository was archived by the owner on Dec 23, 2024. It is now read-only.
Open
Conversation
added 7 commits
January 25, 2022 17:21
| require(call.expiry > block.timestamp, "INVALID_CALL"); | ||
|
|
||
| // Ensure the specified strike matches the call strike | ||
| require(call.strike == _strike, "MUST_MATCH_STRIKE"); |
There was a problem hiding this comment.
why even pass strike if they have to match? 🤔
Contributor
Author
There was a problem hiding this comment.
its to prevent a buyer from getting rugged on a strike price they didn't intend to purchase the option for
there'd be a race condition upon a pending buy where the seller could cancel the call and create a new one with the same premium but higher strike price
There was a problem hiding this comment.
this should be moved above any of the external calls. Currently the seller could re-enter and cancel after receiving premium :)
Contributor
Author
There was a problem hiding this comment.
wow lol ty for catching that!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Module Proposal
Description
This module enables users to create ETH covered call options on NFTs.
Motivation and Context
https://twitter.com/will__price/status/1473036686691082248?s=21
How has this been tested?
Relevant tests have been included via Foundry.
Checklist: