Users can bypass Player royalties on EIP2981 compatible markets by selling clubs as a whole
The FootiumPlayer contract implements EIP2981 royalties, but the FootiumClub contract does not. This allows users to sell players by selling the entire club, bypassing the royalty fee that would otherwise be paid on player sales.
Source: https://github.com/sherlock-audit/2023-04-footium-judging/issues/293
Found by
0x52, 0xRobocop
Summary
Players have a royalty built in but clubs do not. This allows bulk sale of players via clubs to bypass the fee when selling players.
Vulnerability Detail
contract FootiumPlayer is
ERC721Upgradeable,
AccessControlUpgradeable,
ERC2981Upgradeable,
PausableUpgradeable,
ReentrancyGuardUpgradeable,
OwnableUpgradeable
{
FootiumPlayer implements the EIP2981 standard which creates fees when buy/selling the players.
contract FootiumClub is
ERC721Upgradeable,
AccessControlUpgradeable,
PausableUpgradeable,
ReentrancyGuardUpgradeable,
OwnableUpgradeable
{
FootiumClub on the other hand never implements this standard. This allows users to sell players by selling their club to avoid any kind of fee on player sales.
Impact
Users can bypass fees on player sales by selling club instead
Code Snippet
Tool used
Manual Review
Recommendation
Implement EIP2981 on clubs as well
Discussion
thangtranth
Escalate for 10 USDC.
I believe this issue is invalid because when reading the codebase, it seems to be the design choice of the Footium protocol to not charge new owner of the club the royalty fee for player transfer. The reason is in theory, the players still remain in the same club and are not transferred to other club. Transfer royalty is only applicable when a player NFT is transferred from one club to another, not when a club NFT is sold to a new owner. It is consistent with how other football works.
Furthermore, there is no documentation that states or implies that buying a club NFT requires paying transfer royalty for every player NFT in the club. This leads me and many other Watsons to believe that this is not an issue.
The EIP2981 is not enforced, therefore if a user want to bypass the player royalties, there are many ways to do it so selling club as a whole is not necessary. For example listing in a NFT marketplace that does not support EIP2981, so no royalty is charged.
sherlock-admin
Escalate for 10 USDC.
I believe this issue is invalid because when reading the codebase, it seems to be the design choice of the Footium protocol to not charge new owner of the club the royalty fee for player transfer. The reason is in theory, the players still remain in the same club and are not transferred to other club. Transfer royalty is only applicable when a player NFT is transferred from one club to another, not when a club NFT is sold to a new owner. It is consistent with how other football works.
Furthermore, there is no documentation that states or implies that buying a club NFT requires paying transfer royalty for every player NFT in the club. This leads me and many other Watsons to believe that this is not an issue.
The EIP2981 is not enforced, therefore if a user want to bypass the player royalties, there are many ways to do it so selling club as a whole is not necessary. For example listing in a NFT marketplace that does not support EIP2981, so no royalty is charged.
You've created a valid escalation for 10 USDC!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
0xRobocop
Escalate for 10 USDC
This escalation is to contra-argument the escalation made by Watson thangtranth.
While it is correct that the issue over-estimated the "Users can bypass Player royalties", and that this can be done in an easier way with a marketplace that does not enforce royalties via EIP2981 as mentioned in the watson's escalation.
There exists an inconsistency in that players NFTs implement the EIP2981 whereas that club NFTs do not, so marketplaces that do respect the EIP-2981 won't pay the royalties for the club NFTs, and this can be seen as a loss of "yield" for the developers of the footium protocol.
The argument that this seemed to be the intended behavior (not charging royalties for clubs) is subjective, as it could have easily been missed by the developers. And given that the sponsor confirmed the issue, it seems that this was the case.
sherlock-admin
Escalate for 10 USDC
This escalation is to contra-argument the escalation made by Watson thangtranth.
While it is correct that the issue over-estimated the "Users can bypass Player royalties", and that this can be done in an easier way with a marketplace that does not enforce royalties via EIP2981 as mentioned in the watson's escalation.
There exists an inconsistency in that players NFTs implement the EIP2981 whereas that club NFTs do not, so marketplaces that do respect the EIP-2981 won't pay the royalties for the club NFTs, and this can be seen as a loss of "yield" for the developers of the footium protocol.
The argument that this seemed to be the intended behavior (not charging royalties for clubs) is subjective, as it could have easily been missed by the developers. And given that the sponsor confirmed the issue, it seems that this was the case.
You've created a valid escalation for 10 USDC!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
logiclogue
To clarify here from the protocol designer, it's correct that we don't intend for clubs to pay for the royalties for all players on transfer. Instead, we anticipate that the club will subjectively be valued in terms of the players that belong to the club. As a result, clubs should implement the EIP2981 standard so that on club sale royalties will be paid back to the protocol developers
ctf-sec
0xRobocop escalation is valid, a valid medium for this submission
hrishibhat
Escalation accepted
Valid medium Given that the clubs should implement eip2981 to pay the protocol royalties on sale, considering this issue a valid medium
sherlock-admin
Escalation accepted
Valid medium Given that the clubs should implement eip2981 to pay the protocol royalties on sale, considering this issue a valid medium
This issue's escalations have been accepted!
Contestants' payouts and scores will be updated according to the changes made on this issue.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the FootiumClub contract was not designed to implement the EIP2981 royalty standard, unlike the FootiumPlayer contract, leading to an inconsistency.
Impact
Users can bypass fees on player sales by selling the club instead, which may reduce royalty income for the protocol.
What the attacker needed
A club NFT containing players; a marketplace that supports EIP2981
The fix
Implement EIP2981 on the FootiumClub contract as well, so that royalties are paid on club sales.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Some digital items, like player cards in a game, are set up to pay a small fee to the game creators every time they are sold. This is called a royalty. The club cards, which can contain many player cards, do not have this fee. So someone could sell a whole club instead of selling the players one by one, and avoid paying the fee.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.