I'm looking to create a set where after a set period of time (a week, a month, a year) the token expires and all its value is wiped. Is it possible to do this and if so how?

1 Answer 1


Yes, this is possible. To accomplish this, you would start with your preferred NFT standard and a timestamp on creation. It also depends what you mean by having its value 'wiped'. Value is something determined by buyers and sellers in a market. So assuming 'wiped' means destroyed, you can have the NFT destroyed after your deadline has passed. One caveat is that you would need someone actually call the NFT to self-destruct after deadline is passed.

To implement a deadline of 365 days, you set the constructor to have something like:

uint _start;

constructor() { _start = block.timestamp; }

function checkTime() external { if(block.timestamp >= _start + 365 days) { selfdestruct(owner); } }

Then after 365 days, you or an automated script needs to call the contract "checkTime()" and the NFT will be gone.

  • Hi, thankyou for answering the question. I am fairly new to coding so how much do you want to teach me the basics of how to do this?
    – Amie
    Sep 4, 2021 at 17:28

Your Answer

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

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