I've been looking at some NFT Smart Contract functions and I noticed that there were a function that allows access to the base URI, which can basically be the address where the .json files (including the NFT attributes) are stored.

I wonder if someone could have access to the NFT attributes before minting and use it to cheat and select only the ones with rare attributes.

Example with BAYC: https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code

function baseURI() public view virtual returns (string memory) {
    return _baseURI;

2 Answers 2


Generally afaik while it is theoretically possible this is dependent on whether the owner has fully uploaded the metadata. Some collections only do so at the end or as mint progresses.

There are also some collections that randomize the token id assigned while having metadata fully available thus knowledge of the associated image w token id has little impact.


Yes, so as mentioned in the other answer you avoid this by introducing randomization. This is often done via Commit & Reveal approach where users first have to pay for the mint (Commit) and then after all collection or a certain batch are reserved, then randomization happens and the contract Reveals the IDs upon claim.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.