I'm trying to investigate how a token lockup period could work in Stellar for a newly issued token. So for example with a Token sale the newly issued token would be not be allowed to be transferable/ traded until after a specific date set in the contract.

The closest match I've found in respect is using an Authorization flag where you could state Authorization required (0x1) but this would mean having to white list an account for each that wants to hold the token. Where as I want anyone to hold the token but only my Distributor account to be able to send them to another account.

Can anyone suggest a way this is achievable for a token sale?

Thanks

@orbit7 Why would you want to deny your token holders the ability to trade the tokens they hold?

    Standard practise in a token sales (ICO's) is that tokens don't start to be traded until after it is finnished. For example pre-sale buyers may buy early at various discounted rates but it would be undesirable if that then permitted them to then use that to under cut the official token sale period.

    The other option would be to delay release of a token after purchase until a specific date if there is a way to achieve that?

      istrau2

      There are plenty of reasons for holding periods if you look at how things work in securities. Maybe you have founder tokens that vest, maybe you have discounted pre-sold tokens that come with selling restrictions.

      bkolobara Thanks I'd overlooked that as being a validity of the contracts existence instead of it being a completion time.

      dzham Do you know anywhere I can find any documentation in respect to time locks?

      Not sure if there is any.

      You use presigned transactions:
      1. check the signing weights for the account
      2. create a tx that sets the weights to what they are right now, and add a time bound to it so it's only valid after a certain point in time
      3. add that tx as a pre-signed tx with a signature weight that's higher than any of the current individual (low, mid, high) weights.
      4. set all the signing weights to that weight
      5. wait
      6. submit presigned tx to network

        12 days later

        Is there a way that a custom token can be sent via the decentralised exchange in a frozen state from a distributor account to an end recipient? But prevents the end user selling the token held.

        So for example if running an ICO:

        Distributor account creates offer for tokens
        5000 different buyers buy the tokens from distributor
        End user holds token in a frozen (revoked) state preventing trading
        Time locked transaction un-freezes at specified future date.

        The only way is doing something like you first suggested with the auth flag. You can remove the auth required after and then the tokens can be freely traded. You can use bifrost https://github.com/stellar/go/pull/81 rather than the orderbook to distribute the tokens to make it a bit simpler.

        @jed what about authorization revokable. Wouldn't that accomplish exactly this?

        @jed Thanks yeah bifrost looks an interesting developement just a case of waiting until its production ready. However I think in respect to any high volume ICO it really also requires being your own anchor for BTC/ETH for security of the funds unless converting immediately to XLM as ICO's can bring to much in funding to hold in trust to a 3rd party.

        So far I'd come up with:

        Buyer sends funds to buy tokens
        Allow Trust Buyers wallet address authorize is set to True for Asset
        Payment of x amount tokens back to Buyer
        Allow Trust Buyers wallet address authorize is set to False for Asset
        Signed by distributor and issuer


        What would be ideal is if that process could be seamless in the Manage Offer process as this would allow a token to be distributed but arrive in an unauthorized state I think maybe having an automated process that watches the ledger for payments that then sets the authorize flag to false

        I can't see a documented method but is there a wild card way to say...

        Allow Trust

        All Trustors EXCEPT Whitelisted

        Asset Code
        Authorize True/False

        ?