Basis points constant BPS_MAX is used as minimal fee amount requirement
Aave Lens contest
MediumCode4rena
Every publicly disclosed report for Aave Lens contest and what kind of bugs they were.
Newest first. Only what Aave Lens contest chose to make public.
Aave Lens contest
MediumThe profile creation function in the LensHub contract can be frontrun by other whitelisted profile creators, who can observe pending transactions and claim a desired handle first. An attacker could then demand a ransom from the original creator for that handle.
Aave Lens contest
MediumThe collect modules unconditionally attempt to transfer the treasury fee, even when it is zero. If the fee currency is an ERC20 token that reverts on zero-value transfers, all collect operations fail, making the collect functionality unavailable.
Aave Lens contest
MediumThe fee collect modules allow a user to specify any profile as the referrer, so a collector can use a second profile they control to receive part of the fee back. This lets users effectively get a discount on collection fees, leaking value from the protocol.
Aave Lens contest
MediumThe FeeFollowModule contract allows the Hub to transfer funds from any address specified as the follower, and because the Hub is an upgradeable proxy, a malicious admin could upgrade it to a contract that calls processFollow with an arbitrary follower, draining that user's approved allowance. An attacker with admin access could steal up to the allowance limit from any user who has approved the module.
Aave Lens contest
MediumA reentrancy bug in the comment creation function allows a malicious reference module to overwrite the content of a comment after it is created, so the emitted event shows one content URI while the stored comment has another. An attacker could use this to make their profile link to malicious content, tricking light clients and other users.
Aave Lens contest
MediumIf the zero address is whitelisted as a collect module and then set on a post, all collect and mirror attempts revert with PublicationDoesNotExist, and getPubType incorrectly returns Mirror. An attacker with governance privileges could cause this, but the report notes it requires a bad actor in governance.
Aave Lens contest
MediumThe follow function checked only whether a handle existed, not whether it belonged to the intended profile. An attacker could follow a deleted profile if a new profile reused the same handle.
Aave Lens contest
MediumThe LensHub contract's transfer function lacks the whenNotPaused modifier that other external functions have, so governance cannot stop profile NFT transfers during an emergency. An attacker could continue transferring profile NFTs even when the protocol is paused.
Aave Lens contest
MediumThe ApprovalFollowModule contract stores approvals keyed by the current owner and profile ID, but does not clear them when the profile NFT is transferred. If the NFT is later transferred back to the original owner, old approvals remain active, potentially allowing previous approved addresses to act unexpectedly.
Aave Lens contest
MediumA whitelisted profile creator can mint unlimited profiles and transfer the NFTs to other users, bypassing the intended restriction that only whitelisted accounts should create profiles. This makes the whitelist ineffective for limiting profile creation.
Aave Lens contest
MediumCreating profiles through the protocol's createProfile function costs nothing, so a whitelisted profile creator can register many desirable handles without needing them, intending to resell them later. This prevents legitimate high-profile users from obtaining their preferred handles.
Aave Lens contest
MediumWhen a Mirror publication with a referral fee is collected, the contract looks up the referrer's profile owner; if that profile has been burned, the lookup reverts and the collect fails. An attacker could not exploit this for gain, but users are unable to collect from Mirrors published by burned profiles.
Aave Lens contest
Medium