Smart contracts
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.
Smart contracts
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.
Business logic
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.
Business logic
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.
Business logic
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.
Business logic
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.
DoS
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.
Business logic
The updateArtSettings function lets artists change soulbound status, royalties, and URI at any time without restrictions. This could trap users who bought transferable NFTs, force unexpected high royalties on resale, or redirect users to malicious links.
Crypto
The signatureClaim function in PhiFactory does not validate the chain ID included in the signed data, allowing a signature obtained on one chain to be reused on another. An attacker could claim valuable art rewards on a different chain without proper authorisation.
Business logic
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.
Business logic
The claim function forwards a fixed mintFee as msg.value to an external call without checking the user's actual msg.value, so if the fee was lowered the user overpays without refund, and if the contract holds ETH a user can pay nothing and have the contract cover the fee.
Access control
Two internal bookkeeping functions for tracking cred IDs per address were declared public, so anyone could call them for any address. An attacker could corrupt or bloat a victim's cred ID list, causing their transactions to fail or making removal of cred IDs revert.
Business logic
Existing PhiNFT1155 contracts store the protocol fee destination address at initialisation and never update it, so after the factory owner changes the address, royalties and art creation fees continue to be sent to the old address. An attacker who controls the old address could keep receiving these funds.
Business logic
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.
Access control
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.