# PXN  合约分析 

By [wellfrog](https://paragraph.com/@wellfrog) · 2022-05-11

---

*   合约地址
    
    [https://rinkeby.etherscan.io/address/0x3201fe090e70bd464bc93469545be5278595d1f5#code](https://rinkeby.etherscan.io/address/0x3201fe090e70bd464bc93469545be5278595d1f5#code)
    
*   合约类型
    
    *   ERC721A
        
    *   Ownable
        
*   关键数量
    
    *   该项目共计 10k 个nft
        
    *   白单可以mint 6k
        
    *   白单价0.35e
        
    *   荷兰拍的数量 4k
        
    *   荷兰拍起拍价 2e，之后每隔15分钟降价 0.05e，白单mint价格 0.35e
        
*   合约审计分析
    
    *   Reentrancy
        
        *   用了\_safeMint来防止了Reentrancy
            
        *   关键的逻辑都使用了require来进行校验
            
    *   Ownership Take Over
        
        *   继承使用了Ownable合约。在需要的地方都做了限制
            
    *   Timestamp
        
        *   代码中有timestamp相关的限制
            
    *   Contract interact
        
        *   使用了callerIsUser来防止合约调用
            
*   业务逻辑分析
    
    *   mintDutchAuction()
        
        *   通过DA\_ACTIVE来开启
            
        *   判断数量不超过4000个
            
    *   mintWL()
        
        *   在开启whitelist之后24小时之后就不能mint了
            
    *   teamMint()
        
        *   必须要在whitelist开启24小时之后才能操作
            
    *   devMint()
        
        *   require( block.timestamp >= WL\_STARTING\_TIMESTAMP, "WL has finished!" );
            
        *   上面这个的提示有点奇怪。其他都还好

---

*Originally published on [wellfrog](https://paragraph.com/@wellfrog/pxn)*
