-
Notifications
You must be signed in to change notification settings - Fork 3
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
Centralization concerns for artist as admin have the power to propose and apporve artist address. #522
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-1996
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
c4-submissions
added a commit
that referenced
this issue
Nov 8, 2023
141345 marked the issue as duplicate of #584 |
141345 marked the issue as not a duplicate |
141345 marked the issue as primary issue |
This was referenced Nov 18, 2023
a2rocket (sponsor) disputed |
this is the intended design as an artist may lose access to his wallet. |
141345 marked the issue as sufficient quality report |
alex-ppg marked the issue as duplicate of #1996 |
alex-ppg marked the issue as unsatisfactory: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-1996
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L394
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L408
Vulnerability details
Impact
Implementing access control to limit certain functions to trusted admin/protocol addresses makes sense. However, it becomes problematic when functions meant for individual users(artists) can also be controlled by the protocol admin.
In the current setup, artists propose their payment addresses (primary and secondary) and percentages, and then the admin approves the address and percentage that has been set by the artist. This approval is required for the artist to get royalties sent.
However,
proposePrimaryAddressesAndPercentages()
andproposeSecondaryAddressesAndPercentages()
, have a modifierArtistOrAdminRequire
which gives power/liberty to the admin to also propose addresses for the artist. I believe this to be problematic for artists, while it is acceptable for the admin to influence certain functions of the protocol, it is not acceptable for the admin to have the sole power of proposing addresses for artists(users) and approving them.This makes it possible for the admin to decide to disapprove a proposed address by a user(artist), propose addresses of choice, and approve it immediately, which creates trust issues between the artist and protocol admin, thereby eliminating a core benefit of smart contract which is to eliminate trust concerns for users(artist). Admin might be a trusted entity to the protocol but not to the artist(user).
Also, the design pattern is flawed, first artist have to propose addresses and percentage before admins approves it. This process can be simplified by giving artist the liberty to set primary/secondary addresses and percentages, all that should be added are sanity checks for the percentages(min and max value for each percentage should be maintained while being set by artist). In a separate submission, I highlighted the risk of pushing payment to artist, so artist should be allowed to pull out funds when they have it.
Proof of Concept
ArtistOrAdminRequired
modifier allows the admin to influence artist's payment address.Tools Used
Manual review
Recommended Mitigation Steps
Update the modifier to allow only the collection artist to set primary and secondary addresses.
Add sanity checks to the percentage setting(max and min acceptable value) and remove the need for admin to call acceptAddressesAndPercentages()
Assessed type
Access Control
The text was updated successfully, but these errors were encountered: