Having some spare time, I am learning web3 and smart contract. I am learning how to do some contract audit. Today, I am going to do PxN project, which is quite popular recently.
When doing a contract audit, 5 areas should be considered.
Reentrancy - Safemint or nft transfer must be the last step in the function
function teamMint(), mintDutchAuction(), mintWL() all are the last steps in the function ✅
Ownership - Wrong permission put into public function of the contract
The contract has already added Ownable interface. ✅
All of the set functions added onlyOwner modifier ✅
Withdraw functions added onlyOwner modifier ✅
DOS with Flow✅
Refund -→ becareful the token cant be accepted, the refund cannot be proceeded.
In PxN Contract, there is no refund activity
Contract Interact ✅
Dutch Auction: funtion mintDutchAuction(), can only mint 2
Condition:
WL mint: function mintWL(), can only mint 1
Condition
Dev Mint: function devMint()
The remaining supply will be minted by Owner
Team Mint: function teamMint()
Allow team player to mint
This is my analysis. The contract looks good to me. I hope this is helpful!