Closed code423n4 closed 1 year ago
same root as https://github.com/code-423n4/2023-07-lens-findings/issues/97, maybe combine
This haven't been tested yet, this modules contracts are out of scope, specified in the provided documentation. We kept them in the repo for context, so wardens can understand how the flows work with proper examples.
We appreciate the finding.
donosonaumczuk marked the issue as sponsor disputed
Picodes marked the issue as unsatisfactory: Out of scope
Lines of code
https://github.com/code-423n4/2023-07-lens/blob/main/contracts/modules/act/seadrop/SeaDropMintPublicationAction.sol#L251
Vulnerability details
Impact
At the end of processPublicationAction, if
expectedFees
is greater than 0, _distributeFees will be called to distribute fees to referrers and treasury. TheprocessActionParams.referrerProfileIds
array stores the ProfileIds of all referrers, which are set by the caller. If the array is empty, the fee originally belonging to referrers should not be deducted from feesToDistribute, and allfeesToDistribute
should be distributed to treasury.Proof of Concept
The flow of executing SeaDropMintPublicationAction via LensHub.act is as follows:
Let's look at the code snippet of
_distributeFees
:It can be seen from L229 that
referrersCut
is the fee to be distributed toprocessActionParams.referrerProfileIds
. IfreferrersCut
is 0, there is no problem. Its value is determined bycollectionData.referrersFeeBps
, which is assigned in initialization. Here, we are discussing the case wherereferrersCut
is greater than 0.If
processActionParams.referrerProfileIds
is an empty array, it means that allfeesToDistribute
should be distributed to treasury. However, L251 did not check this case, then directly deductedreferrersCut
.Tools Used
Manual Review
Recommended Mitigation Steps
Assessed type
Other