5

I have a few questions concerning the 'asset-freezing protocol' that I hope you will be able to help me with.

1- It is my understanding that only the entity that created the tokens can freeze them, but is there a limit in when the freezing can happen or how often it can happen? For example, is it only possible to use the freezing option after the tokens only moved one-hop away from the original wallet or can it still be done after the tokens have circulated between many wallets? Can the assets be repeatedly frozen/unfrozen?

2- Once the assets are frozen, they can only be moved to the original wallet but is it possible to only move a portion of the frozen assets or is movement of asset allowed only when the full amount of the frozen tokens is transferred?

3- Are the assets unfrozen automatically once they come back to the original wallet? If not, what exactly needs to be done to unfreeze them?

Any information you can provide would be greatly appreciated. Thank you for your time.

Sincerely, J.

2
  • That is three separate, although related, questions. Please edit the post to ask one question at a time. The StackExchange system works on voting upon answers to specific questions. Posts with multiple questions are likely to be closed as too broad.
    – Chenmunka
    Apr 27, 2018 at 13:54
  • I have had tokens frozen by an asset issuer. Certain allegations were made by the issuer for the freeze. Yet no evidence has ever been provided that such allegations took place. I find the freeze feature to be unjust and discriminative toward the buyer of such assets, tokens. I also find the freezing feature to be one sided and easily has the potential to be taken advantage of, and used dishonestly and fraudulently by some asset, token issuers.
    – Charlie
    Feb 2, 2019 at 23:10

2 Answers 2

3

Wanted to write a full, updated answer after doing a somewhat "deep dive" into this... not discounting @cesarm's answer at all!

First of all, there was in fact an error in the docs. Note the PR recently merged here: https://github.com/stellar/docs/commit/8d06491910ceb8c6a9734a99ab2ea87bca635412

This change should show up on the website docs soon (if it is not already there).

To make this asset freezing concept clear, I will describe how the freezing of an asset occurs:

Setup

Issuer with AUTHORIZATION REQUIRED and AUTHORIZATION REVOCABLE flags set.

User with an open trustline (has been approved by Issuer).

Process

  1. Issuer identifies someone whose asset they wish to freeze
  2. Issuer deauthorizes the trustline for that user via the allow trust operation
  3. That user's assets are frozen. This means the user is unable to send these assets anywhere, not even back to the issuer.

To best understand how this works, it is best to think of this more like freezing an account than freezing an asset.

So, with this updated information, your second and third questions are no longer necessary -- these assets are just frozen and cannot be moved back.

Regarding your first question, the issuer can freeze assets at any time, however many times they want, as long as the AUTHORIZATION REVOCABLE flag is set on the issuer account -- this action is simply an allow trust operation and thus you can send this over and over and over again if you desire... and with such a low transaction fee, you can do this a lot for so little :)

If the issuer's account does not have the AUTHORIZATION IMMUTABLE flag set then they can always set the AUTHORIZATION REVOCABLE flag. See the doc on account flags for more info.

4
  • If I may add another question on the topic: is it mandatory to set the flag AUTHORIZATION REQUIRED to be able to use the AUTHORIZATION REVOCABLE flag? My thought was that not setting the AUTHORIZATION REQUIRED flag, would be similar to having the allow trust operation true for all users and therefore would still allow the Issuer to freeze the targeted account. Is that the case?
    – julien
    May 2, 2018 at 23:08
  • Yes, if you want AUTHORIZATION REVOCABLE you need AUTHORIZATION REQUIRED. However the opposite is not true -- it is possible to have AUTHORIZATION REQUIRED but not AUTHORIZATION REVOCABLE meaning only authorized users can open trustlines, but once authorized, users cannot be unauthorized.
    – Rob
    May 3, 2018 at 0:10
  • 1
    it's possible to have the AUTHORIZATION REVOCABLE flag without the AUTHORIZATION REQUIRED flag. See this account on testnet as an example
    – nikhils
    May 3, 2018 at 22:25
  • 1
    That is true, but you cannot actually revoke anything without both flags set.
    – Rob
    May 4, 2018 at 0:48
1

Looks complicated... Maybe you could have a look at this first, before scrolling down.

How do I use the flag: authorization revocable

.

.

.

2 operations are related to your questions: [Set Options] & [Allow Trust]. Both operations can only be done by the asset issuer.

And 3 info essential to your questions: (I'll skip explanations here)

  1. Allow Trust

  1. Set Options >> Flags

Authorization required (0x1): Requires the issuing account to give other accounts permission before they can hold the issuing account’s credit.


  1. Asset freezing

This can be useful for national currencies, but is not always applicable to other kinds of assets. (so it may not be applicable to your case..)


Q1

For example, is it only possible to use the freezing option after the tokens only moved one-hop away from the original wallet or can it still be done after the tokens have circulated between many wallets?

Seems unlikely to monitor how many hops easily. Stellar Smart Contract functionality handles rather simple use cases, but it seems too generic. It is simpler to implement on your application level.

Can the assets be repeatedly frozen/unfrozen?

Yes.

"0x1" flag lets the asset issuer to allow someone to handle (send/receive) the issued assets, i.e. "unfreezing"

"0x2" flag lets the asset issuer to ban someone to handle the issued assets, i.e. "freezing.


Q2

Once the assets are frozen, they can only be moved to the original wallet but is it possible to only move a portion of the frozen assets or is movement of asset allowed only when the full amount of the frozen tokens is transferred?

This is revoking, and I am not sure how it works.

Just tested that after the ISSUER set "0x2" flag to an account: this account could not handle the asset at all. He couldn't even send it (any amount) back to the asset issuer, failing with "op_src_not_authorized" code.

Not sure if I made something wrong, as it is supposed to be able to send the asset back to the issuer. If capable, the amount to be sent back should be unconstrained.


Q3

Are the assets unfrozen automatically once they come back to the original wallet?

I am not sure with what you mean by "original wallet". A note is that revoking concerns with the asset issuer, and once again I have no idea how revoking works..

What exactly needs to be done to unfreeze them?

Set the flag "0x1" to the account that you have frozen the asset at.

0

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.