Copy your own portfolio to keep earning royalties
The protocol allows a user to copy their own portfolio and receive royalty shares for it, and repeat this to reduce fees. An attacker could create many wallets and bypass the frontend to lower fees to zero.
Submitted by jayjonah8
Impact
In NestedFactory.sol going through the create() function which leads to the sendFeesWithRoyalties() => addShares() function, Im not seeing any checks preventing someone from copying their own portfolio and receiving royalty shares for it and simply repeating the process over and over again.
Proof of Concept
FeeSplitter.solL152FeeSplitter.solL220NestedFactory.solL103NestedAsset.solL69NestedFactory.solL103NestedFactory.solL491
Tools Used
Manual code review
Recommended Mitigation Steps
A require statement should be added not allowing users to copy their own portfolios.
maximebrugel (Nested) disagreed with severity:
Indeed, a user can copy his own portfolio to reduce the fees, however a require statement won’t fix this issue…
This problem cannot be corrected but only mitigated, since the user can use two different wallets. Currently the front-end doesn’t allow to duplicate a portfolio with the same address.
I don’t consider this a “High Risk” since the assets are not really stolen. Maybe “Med Risk” ? This is by design an issue and we tolerate that users can do this (with multiple wallets).
I’m reading that the vulnerability actually lowers fees to zero for a dedicated attacker, since creating a arbitrarily large number of wallets and bypassing the frontend is easy. In theory leaking protocol value would be a severity 2, but since this is effectively disabling a core feature of the protocol (fees), the severity 3 is sustained.
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 contract does not check whether the copier is the original portfolio owner, allowing self-copying to earn royalties.
Impact
An attacker could reduce fees to zero by creating many wallets and bypassing the frontend, effectively disabling a core protocol feature.
What the attacker needed
Multiple wallets; bypass frontend restrictions
The fix
The issue cannot be fully fixed, only mitigated, because a user can use multiple wallets; the frontend already prevents duplicating with the same address.
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.
A portfolio is a collection of investments. The system pays royalties to the person who created a portfolio when others copy it. The bug is that you can copy your own portfolio, so you pay yourself the royalty and reduce the fees you owe the platform.
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.