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

Strategy partial sale for fixed price #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lukasz-glen
Copy link

Some marketplaces, Rarible for instance, allow partial sales. I mean, if an offer is a sale of 5 items, you can buy 3 out of 5.
This PR delivers a strategy that do the same here. An offer is active until cancelled or the amount is in the offer is fully used.
When using a part of the offer, the price is not always divisible and rounding is required. Therefore the strategy checks this condition

askPrice * bidAmount <= bidPrice * askAmount

A little change in the LooksRare core contracts is required. Luckily it enables another strategies, for instance a dutch auction with large number of items to be bought one by one.

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.

None yet

1 participant