When creating a new edition, the payment made is designated as the publishing fee for the first tokenId, rather than the edition creation fee as initially perceived.
Vulnerability Detail
When someone wants to create a new edition, they call TitlesCore::createEdition.
At L87 of TitlesCore::createEdition, it invokes _publish().
function _publish(Edition edition_, WorkPayload memory work_, address referrer_)
internal
returns (uint256 tokenId)
{
// Publish the new Work in the Edition
// wake-disable-next-line reentrancy
tokenId = edition_.publish(
work_.creator.target,
work_.maxSupply,
work_.opensAt,
work_.closesAt,
work_.attributions,
work_.strategy,
work_.metadata
);
// Collect the creation fee
// wake-disable-next-line reentrancy
138 feeManager.collectCreationFee{value: msg.value}(edition_, tokenId, msg.sender);
// Create the fee route for the new Work
// wake-disable-next-line reentrancy
Target memory feeReceiver = feeManager.createRoute(
edition_, tokenId, _attributionTargets(work_.attributions), referrer_
);
// Set the royalty target for the new Work
// wake-disable-next-line reentrancy
edition_.setRoyaltyTarget(tokenId, feeReceiver.target);
}
At L138 of TitlesCore::_publish, it calls feeManager::collectCreationFee.
At feeManager::collectCreationFee, the edition creator(feePayer_) is charged getCreationFee() as the creation fee.
function getCreationFee() public view returns (Fee memory fee) {
return Fee({asset: ETH_ADDRESS, amount: protocolCreationFee});
}
However, feeManager::getCreationFee() is only 0.0001 ether(protocolCreationFee), which is designated for publishing the first tokenId, not for creating a new edition. Therefore, there is no additional fee for creating a new edition. Consequently, individuals seeking to publish their works are encouraged to create their own edition, as the publishing fee aligns with the edition creation fee, offering numerous privileges to the creator.
Impact
Individuals wishing to publish their works are encouraged to create their own edition.
0x486776
medium
No actual edition creation fee exists.
Summary
When creating a new edition, the payment made is designated as the publishing fee for the first
tokenId
, rather than the edition creation fee as initially perceived.Vulnerability Detail
When someone wants to create a new edition, they call
TitlesCore::createEdition
.At
L87
ofTitlesCore::createEdition
, it invokes_publish()
.At
L138
ofTitlesCore::_publish
, it callsfeeManager::collectCreationFee
.At
feeManager::collectCreationFee
, the edition creator(feePayer_
) is chargedgetCreationFee()
as the creation fee.However,
feeManager::getCreationFee()
is only0.0001 ether
(protocolCreationFee
), which is designated for publishing the firsttokenId
, not for creating a new edition. Therefore, there is no additional fee for creating a new edition. Consequently, individuals seeking to publish their works are encouraged to create their own edition, as the publishing fee aligns with the edition creation fee, offering numerous privileges to the creator.Impact
Individuals wishing to publish their works are encouraged to create their own edition.
Code Snippet
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/TitlesCore.sol#L72-L96
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/TitlesCore.sol#L120-L149
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/fees/FeeManager.sol#L166-L175
https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/fees/FeeManager.sol#L225-L227
Tool used
Manual Review
Recommendation
There should be a mechanism in place for the actual edition creation fee.