I am faced with a problem regarding the ICO and Token smart contracts (SCs). I am currently using OpenZeppelin SCs to create my token and ICO and everything is working fine. Now I would like to add a functionality that goes as follows:

Suppose after crowdsale, Account X contains 20 tokens and wants to transfer them to Account Y. Now I am using the functionality of RefundablePostDeliveryCrowdsale.sol of OpenZeppelin to make sure that tokens are released only after the crowdsale is completed and also some soft cap is reached. But after the crowdsale, there is no way to stop the transfers of token between accounts

I would like to implement a functionality that would stop the users from spending their tokens for a specific amount of time after they have received them in their wallet from crowdsale.

Ideas so far:

  1. After release transfer the tokens to a timelock SM which would release the tokens to the users after certain time
  2. Use timelock just before sending the tokens from the crowdsale itself and so users cannot withdraw the tokens

Now both of these can work but then the users have to trust the other SCs and further delay the time after which they are receiving the tokens.

I would like to lock the token transfer inside the user wallet if such thing exists.

  • There is no such thing as "lock inside user wallet". The token is completely managed by the smart contract, never goes anywhere except to and from the contract. When you see your token balance, it's just a display of the contract state at a specific time (usually right now). However as you said (if I understood well), you can change the contract (if you can redeploy) with an implementation of time lock for transfers. – Florian Castelain Feb 11 '20 at 7:53
  • So If I understood well, the idea that I mentioned in the question are the correct way to implement a time lock? If not, any advice would be helpful – Hackeerrrr Feb 12 '20 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.