Proposal to enable trading of all crypto assets on Bisq without ongoing code modification

Hi, I am posting this proposal to determine if there is community support for this idea. If you are reading this, your opinion matters! Please reply to indicate if you support the idea or not.

If there is support for this idea, then I will plan to work on implementing it in a series of milestones, each with its own DAO / BSQ compensation request.

The milestones would be determined after further discussion with Bisq core developers regarding the feasibility of the idea and general plan for implementation.

edit: sorry for formatting. this was copy/pasted from text editor, which turns indented areas into scrollboxes.

Proposal to enable trading of all crypto assets on Bisq without ongoing code modification.


I envision that Bisq will become THE go-to place when one wishes to trade
ANY and ALL cryptocurrency, even and especially the newest, tiniest, or most
obscure. New assets will be created upon demand, by any trader. Bisq will
have more markets than any other exchange and will provide traders an easy
way to search and filter assets and markets by name, symbol, liquidity, etc.
No trader will have to miss out on a lucrative trade simply because Bisq's
developers did not choose to include the trader's asset of choice. Bisq, the
de-centralized exchange, will de-centralize the very addition of new assets
and markets and will generate a new revenue stream in the process.

Let's make Bisq great again!   ;-)

Background and Motivation:

At present, Bisq facilitates trading of a restricted set of cryptocurrency
based altcoins and tokens (henceforth: "asset"). For a new asset to be
listed on the exchange the Bisq code must be modified to include the asset,
and then the updated software must be installed by interested traders.
Further, the official Bisq policy regarding inclusion of an asset in the
code requires that a developer of the asset submit the inclusion request
together with some technical details and ideally a Bisq pull request.
Although arguably an open process, these are relatively high barriers that
so far have prevented the majority of assets from being added to Bisq.

These barriers also mean that very new assets are typically not added to
Bisq in time for traders to benefit from initial offerings and initial
instabilities. Thus, Bisq traders must choose between registering with a
decentralized exchange (and all the downsides that entails) or not
participating at all and thus losing out on potential profits.

Other times one may hold an obscure and forgotten asset that suddenly
becomes "hot" and experiences a rapid price increase. One wishes to take
advantage of this and sell. And of course one wishes to use Bisq, their
favorite decentralized exchange. But Bisq has not listed the asset, so too

This is a problem for Bisq's users, and therefore it is a problem for Bisq.
I write here from personal experience as a Bisq user that has on several
occasions had an opportunity to make good profits if only I could trade an
asset that is listed on one or more centralized exchanges but not on Bisq.
This is a highly frustrating experience because one must choose between
profits on the one hand vs compromising one's principles on the other. Can't
we have principles and profits?

Each time that a person tries to trade an asset on Bisq and discovers that
Bisq does not even list it, that forms a negative impression. Negative
impressions add up quickly, and Bisq may lose traders forever after a few or
even one such event.

Therefore, I believe we should use Bisq's primary strengths of
decentralization and amazing community to turn this situation on its head
and empower the community to add new assets and thereby new

Bisq is NOT a centralized exchange. Why should it have a centrally curated
list of cryptocurrency based assets?

Further, registration of new assets can be required as an anti-spam measure
and as a new revenue stream for BSQ token holders.

The rest is just details.

User Experience - Markets Tab - Bob

Bob has NEWCOIN to sell. He opens the markets tab and sees a list of
currencies, similar to today, but much longer. The list will have a text-box
for on the fly filtering. Bob searches for "NEWCOIN" but does not see it
listed. There is only one result, which is: "NEWCOIN not listed. Add it
now...". Bob clicks on this result.

User Experience - Add Asset Wizard - Bob

Bob is warned that registration of a new asset is advanced functionality and
requires paying a fee of X BTC or Y BSQ. Bob chooses to continue.

Bob is prompted for the following information:

* Symbol
* Asset Name
* Asset Description
* Asset web page for more information.
* block explorer address.  ( url mask(s) for address and tx? )

* Address validation regex.
* 3 example addresses.     ( that will be matched against regex for verification )

  could allow or require java function for validating address (eg checksum).
  But this would need to be eval'd on all clients and is thus a big security risk.

Bob provides the requested information and clicks Next.

Bob is presented with a summary of the new asset parameters and is prompted
to verify them or go back. Upon verification, Bob is prompted to pay the
asset registration fee.

Once the payment is complete, Bob is notified that the new asset has been
added to Bisq and is available for trading. Bob is asked if he would like to
create an account for NEWCOIN. Bob clicks yes, and is taken to the New
Account page, where he proceeds to add an account as usual.

Bob returns to the market page, selects NEWCOIN from the list and proceeds
to place a SELL offer as usual.

User Experience - Markets Tab - Sally

Sally wants to buy NEWCOIN. opens the markets tab and searches for NEWCOIN.
Sally sees NEWCOIN in the result list and that it has 1 offer and 0 trades.
Sally selects NEWCOIN and takes BOB's sell offer.

Address Validation Discussion:

Ideally Bisq would validate addresses of all tokens. However, this may not
be practical or necessary for a few reasons:

1. Proper validation requires code for calculating and comparing checksum.
This is too large a hurdle for most traders. And even if a user can enter
the necessary code, it is would be a huge security hole to evaluate
user-entered code on all clients.

2. The present-day Bisq code does not perform any validatation for the
majority of altcoins. That does not seem to have caused any real problems.

3. Regular expression validation may be "good enough". But even that can be
tricky to get right and is a hurdle for non-technical users. So it should
either be made optional or omitted altogether.

Asset Registration Base Fee and Asset Modification Base Fee:

This section discusses base fees for the first time a given asset is registered
or edited. As a spam prevention technique, subsequent fees for the same
asset will be greater according to the following formulas:

   Registration:  fee = base_fee * 2 ^ num_previous_registrations
   Editing:       fee = base_fee * 2 ^ num_previous_edits

The base fees should be high enough to prevent most spam and malicious
behavior but low enough that they are not a huge barrier to entry.

Also, each base fee can by modified by a vote of BSQ token holders, ie they
are not hard-coded.

For the initial period, I propose relatively low base fees to encourage the
buildout of new markets and because we trust that most of our community
members have good intent.

So as a target, we can say the BSQ or BTC equivalent of $1 for creation and
$2 for editing.

As time passes and thousands of assets have been created and Bisq has a much
larger community, it can make sense to raise the base fees to $10, $25, or
even hundreds of dollars.

Note: Actual BTC and BSQ base fee amounts based on USD targets are TBD.

Asset Symbol Namespace:

This proposal supposes only a single global namespace for asset symbols.

1. Any user can create a symbol in that namespace provided it does not
conflict with a pre-existing symbol and that the user pays the Asset
Registration Fee.

2. Any user can modify parameters associated with a symbol in the global
namespace provided that the user pays the Asset Modification Fee.

One can envision that users could get into conflicts sometimes over the use
of a given symbol. (Think of ETH vs ETC or BTC vs BCC and BCH.) There could
be editing battles as sometimes happens on Wikipedia. I see a couple
possible ways to resolve this:

1. Double the editing fee after each edit. ie fee = base_fee * 2 ^ num_previous_edits.
This will make it exponentially more expensive to edit an asset over time.
So only edits that people really really want will be performed, and this
should tend to reflect the greatest market demand.

2. Let BSQ token holders vote on:
    a) locking a particular asset definition, or
    b) approving an asset definition proposal.
I prefer option (1) as it is a market based solution and is simpler to

Asset Removal:

There may be times when it makes sense to remove a listed asset. Possible
reasons include:

* The underlying asset no longer exists
* The underlying asset never existed, but was created as spam.
* offensiveness in asset symbol or name.

Removing an asset will be performed by a supermajority (2/3) vote of BSQ
token holders.

After an asset has been removed, it may be added again by anyone willing to
pay the asset registration fee * 2 ^ num_previous_deletions. This exponential formula
prevents a spammer from taking advantage of initial low fees.

Technical Implementation:

This section comprises my initial less than half-baked thoughts on the
subject. I include it only as a starting point for further
discussion with Bisq developers as to the best ways to accomplish
the vision set forth above.

I am not yet very familiar with the internal working of Bisq codebase,
especially not the p2p networking and the DAO, so I very much welcome
technical advice from those who are.

Asset Definition Format:

Assets will be defined and stored in a json data structure that looks like:

    "asset": "NEW",
    "name": "Newcoin",
    "description": "Newcoin, the people's coin.  The coin to rule them all",
    "website": "",
    "blockexplorer": "",
    "blockexplorer-addr-mask": "",
    "blockexplorer-tx-mask": "",
    "validation-regex": "/^[NC][a-km-zA-HJ-NP-Z1-9]{25,34}$/",
    "registration-txid-list": [
        // list of bitcoin TX representing BTC or BSQ payments.
    "edit-txid-list": [
        // list of bitcoin TX representing BTC or BSQ payments.    

These can be stored on disk either as a .json file or in a DB.

Bisq P2P Network:

The following new P2P network messages will be added:

assetnew:  A new asset has been added.

           payload is:
              json data in asset definition format.
           open question: how to prove that payment was made for a particular asset registration.
                          need to include a signature?

assetedit: modification of an existing asset.

           payload is:
             json data in asset definition format.

           open question: how to prove that payment was made for a particular asset edit.
                          need to include a signature?

assetdelete:  removal of an existing asset.  occurs after 2/3 vote of Bisq token holders.

           payload is:
              asset symbol.
asset-reg-fee-change:   change base fee for registering an asset.
                        occurs after majority vote of Bisq token holders.

asset-edit-fee-change:   change base fee for editing an asset.
                         occurs after majority vote of Bisq token holders.

BSQ Token holder voting:

It is unclear to me exactly how voting works and expecially how it can
effect changes across the wire. It may be that the assetdelete,
asset-reg-fee-change, and asset-edit-fee-change messages are not needed at
all, but instead could be implemented as a type of vote, with processing
conditionally performed on each client once vote-result is obtained.

Threat Scenarios / Risks:

* Asset Symbol does not match name, description, website.

  A malicious or user could enter incorrect data for an asset intended to
  mislead traders into making higher or lower offers than they otherwise
  would. This is more likely to be effective if the asset name is ever
  displayed without the symbol. For this reason, the asset symbol should
  always be displayed.
    The erroneous data can be corrected by any user willing to pay the Edit
    Asset fee.
    We might also consider adding a "Flag Invalid Asset" feature that marks
    an asset as under suspicion until it can be reviewed by an arbitrator.
* User enters an invalid address for a given Asset.

  WIthout address validation for each asset, this is a likely event.
    The trade will fail when the other party attempts to send to the provided
    address.  At that point, a dispute can be opened, the trade cancelled,
    and escrowed funds returned.
* Spammers create one or many bogus Assets.

  Traders are unlikely to make offers for assets that don't actually exist.
  It is more of a nuisance and housecleaning problem.
    1. Assets can be deleted by a vote of BSQ token holders.
    2. Asset registration fees can be increated by a vote of BSQ token holders.

* Do we need to worry about asset definitions being tampered with locally?
  It seems the only thing that the network really cares about is the asset
  symbol, which is a fixed identifier that either matches or it doesn't. So
  I don't see that as a big concern.
  Anyway perhaps we can devise a hash or signature scheme to prevent it.

An excellent proposal, @peertrade! Thanks for putting this together.

Thanks @cbeams.

I will just add here that I am seeing many so-called DEX decentralized exchanges popup that are built on ethereum. If Bisq does not get out in front on this, I’m afraid they may eat our lunch in the crypto <–> crypto exchange space, and possibly even somewhat in the fiat space utilizing “tethered” fiat assets.

A few examples: KyberNetwork, 0x Protocol, Prism. Not to mention shapeshift and changelly that are even easier to use.

I had hoped for more enthusiasm for this proposal or at least comments, but I see 30 views of this thread with only 1 reply so far.

Maybe most Bisq users just don’t care about crypto <–> crypto trades for new or smaller coins and assets.

Well, I do, so I might build it just for myself if need be. :wink:

I wouldn’t be too concerned about the lack of replies. You made a very detailed post, so maybe people just didn’t have the time to carefully analyze it. You will probably get more replies as time goes by :slight_smile: