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

Add and enforce maxPrice parameter when minting tokens #183

Open
Ramarti opened this issue Jul 10, 2024 · 0 comments
Open

Add and enforce maxPrice parameter when minting tokens #183

Ramarti opened this issue Jul 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Ramarti
Copy link

Ramarti commented Jul 10, 2024

Description and context

As reported by Trust sec, mintLicense() could be frontrun by the seller changing the licensing terms to a higher price than the buyer is expecting.

Suggested solution

Adding a maxPrice parameter as user input in mintLicenseTokens, similar to how AMMs allows the user to set slippage limits to protect against fluctuations in price.

To be able to enforce it, ERC20 transfers must happen at the LicensingModule level, Royalty Policies must return the price instead.

Definition of done

Scenario tested, code merged and deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant