Skip to content

Code4rena

Phi

Every publicly disclosed report for Phi and what kind of bugs they were.

disclosed reports
15
most reported class
Business logic
bug classes found
5
first disclosure
2024
Find Phi on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Phi chose to make public.

Smart contracts

Signature replay in createArt allows to impersonate artist and steal royalties

The createArt function did not bind the signature to the transaction submitter or the CreateConfig parameters, so an attacker could front-run a legitimate createArt transaction and reuse the signature with their own config to become the royalties recipient. This allowed the attacker to steal royalties and impersonate the artist.

Phi

High
Smart contracts

Reentrancy in creating Creds allows an attacker to steal all Ether from the Cred contract

The Cred contract's createCred function lacks a reentrancy guard, allowing an attacker to reenter during a refund and overwrite the bonding curve of a cred before its ID counter is incremented. By using a cheap curve to buy shares and then overwriting it with an expensive curve, the attacker can sell shares at a higher price and drain almost all Ether from the contract.

Phi

High
Business logic

Contract PhiNFT1155 can’t be paused

The PhiNFT1155 contract inherits from PausableUpgradeable but does not apply the paused check to NFT transfer functions, so transfers still succeed while the contract is paused. An attacker could transfer NFTs even when the owner has paused the contract.

Phi

Medium
Business logic

Cred creator could cause stuck funds

The cred creator can update the sell share royalty to up to 50%, which means users who later sell their shares must pay that fee to the creator. This can trap users or force them to lose a large portion of their funds.

Phi

Medium
Business logic

Refunds sent to incorrect addresses in certain cases

The refund logic in the PhiFactory and Claimable contracts sends excess funds to the contract itself instead of the user when claims are made through batchClaim, claim, or directly via the Claimable contract. This results in users losing their overpayment, and in some cases the funds become locked in the contract.

Phi

Medium
Business logic

Incorrect fee handling prevents protocol from updating fees

The fee setter functions in the Phi protocol incorrectly limit fees to 10,000 wei, while the intended fees are 0.00005 ETH (50,000,000,000 wei). This prevents the protocol from updating its mint and art creation fees to the documented values.

Phi

Medium
DoS

shareBalance bloating eventually blocks curator rewards distribution

The contract's share balance map keeps entries for curators who have sold all their shares, so the map grows without bound. Once enough distinct addresses have traded a cred, enumerating the map during reward distribution exceeds the block gas limit, blocking distribution and freezing rewards.

Phi

High
Business logic

Forced endTime extension in updateArtSettings() allows attacker to mint more tokens

The updateArtSettings function forces artists to set endTime to at least the current block timestamp when updating settings after a minting event, which reopens minting. An attacker with a valid Merkle proof can then backrun the artist's transaction and mint additional tokens up to maxSupply.

Phi

High
Business logic

Attacker can DOS user from selling shares of a credId

The contract lets anyone buy shares on behalf of another curator, and each such purchase resets that curator's ten-minute share lock timer. An attacker could repeatedly buy a single share for a victim to keep delaying their sale, and the price could move against the victim during the delay.

Phi

Medium
Access control

Lack of data validation when users are claiming their art allows malicious user to bypass signature/merkle hash to provide unapproved ref_ , artId_ and imageURI

The merkleClaim function in PhiFactory.sol only verifies the minter address against the merkle root, leaving the referral address, art ID, and image URI unchecked. An attacker could set their own referral address to steal referral fees, claim a different art ID than approved, or set an arbitrary image URI for the NFT.

Phi

Medium