Decred Developer Review - state of the market

I'd like to see a lot more integration with existing platforms. It would also be nice to have more applications and utility built on top of the core primitives

Decred Developer Review - state of the market
Decred Developer Review - state of the market

LISTEN TO THE PODCAST:

💡
We went LIVE – Sunday, November 12th 2023 – 3pm UK TIME

Decred and the State of the market is brought to you by Exitus and PhoenixGreen.

In this episode, we’ll be discussing the Decred Developer AMA and their thoughts on the questions asked by the community.

Decred Developer "Ask Me Anything" (AMA) feat. Dev Lead Dave Collins
by u/Exittus in decred

Live stream agenda:

Q1. What do you think could be the next big thing for Decred?

Q2. Are we going to embrace smart contract stuff like RGB in the near future?

In the short term, for core network development, which is my primary area of focus the next big things on the agenda are:

  • Decentralizing the meeting place for mixes to take place by moving the necessary logic into dcrd as opposed to the current mechanism that relies on one or more servers and split the anonymity set with multiple
  • Working towards efficient and scalable scaffolding for supporting things such as NFTs in a truly decentralized way as opposed to the typical way they just point at a URL that can be changed at any time while still calling it an NFT

In the medium to longer term, making use of that new scaffolding to implement some of those higher-level use cases such as NFTs.

I know there are quite a lot of other developments on the horizon in other areas such as the DEX, Bison Relay, and integration with Cake wallet which will allow buying gift cards with DCR which in turn opens up an easy way to use DCR for real world purchases.

Q3. What other crypto currency projects do you follow?

Nowadays, as it pertains to development, I tend to focus more on following underlying advances in technology as opposed to specific cryptocurrencies as a means to stay abreast of the developments that really matter.

I used to follow several cryptocurrencies much more closely (as in following every commit made), but it became fairly obvious to me that the vast majority of the work being done is largely irrelevant in terms of technology that really moves the needle forward. That isn't to say those things aren't useful for those projects, rather that I've found following things at that level of detail rather wasteful because anything that is really important always becomes well known in short order regardless.

I still loosely follow most of the major cryptocurrencies within each of the primary technology types such as XMR, BTC, BCH, ETH, and ZEC.

Side conversation:

  • bspus - BCH is one of those major cryptocurrencies in a technology type? What type is that, pre-segwit BTC clone?
  • davec - It has implemented quite a few things that BTC can't/won't due to BTC's no hard forks policy which BCH does not share.
  • jet_user - One recent example is difficulty algorithms (DA). BCH activated ASERT in 2020. BTC's algo is not too good per this study but it "kind of works" thanks to the massive hashrate. Should they ever need to change it, I'm sure it would be a huge problem.

Q4. What will happen with PoS and PoW after emission drop far too low? According the the emission plan, by 2040 they will have stopped but long before that, maybe even by 2030 they wil already be low enough to cause incentive problems

First, a clarification. While I know the docs only show up to about 2040 for the sake of brevity, the final atom is technically not emitted until block height 11,010,048, which is about 100 years from now. However, to your point, the subsidy will be pretty low long before that since there is intentionally a very long slowly decaying tail emission which gives a long time horizon for the market to adapt.

With that out of the way, I'll preface this by saying that nobody has a crystal ball and therefore it really isn't possible to say with 100% certainty exactly what will happen when block subsidies run dry and that is equally true for all cryptocurrencies that are based on a deflationary model.

That said, I don't foresee it as an issue for Decred thanks to its ability to adapt via its voting combined with the aforementioned long tail emission time horizon.
At present, the primary intended monetary incentive mechanism at that point is transaction fees. Ultimately, I expect the consensus rules will be changed to split the fees instead of giving them all to Proof of Work as is done today and the most probable outcome is a transition to a fee-only regime where everything continues as normal.

In a deflationary model, each individual unit of account becomes more valuable over time, which is the exact opposite of the inflationary model of fiat where every unit of account (for example, cents) become less valuable over time. In other words, while the fees may not seem like much today, that same amount of fees becomes more valuable once there is no longer an inflation due to subsidy emission.

I think it's also important to make the distinction that this primarily applies to Proof of Work rather than Proof of Stake, because stakeholders who actually care about sovereign money and are not simply here for the sole purpose of the rewards are already highly incentivized to stake due to the sovereignty it provides. In fact, that is the primary reason for the existence of PoS to begin with!

It is also worth noting that there are a variety of ways to create incentives that are not tied to the block subsidy which can be explored should it be necessary.

Side conversation:

  • Lost coins reduces supply, could this be an issue?
  • Could a similar tail emission to Monero’s be an option?

Q5. A lot of focus goes into how we bring new folk to Decred. But my question is, how do we keep them? What makes people leave or give up on Decred?

This largely depends on why they were here to begin with.

For developers, most DCR developers have stuck around for average to above average time frames. In the development world, software engineers typically only stay at one job for an average of two years before moving somewhere different. Since it is the area I work in, I've seen many reports that show software engineering has the highest churn rate of all industries.

Considering that, I'd say DCR has done quite well in retaining developers overall.
On the other hand, for most of the other 'public' people who have left, when you get right down to it, it's because of the price action (or more precisely the lack thereof). The example you gave from Checkmate is some evidence of that. He is also on record saying that "it almost killed him" because he was spending a ton of time actively promoting Decred and it made no difference on the price. We know now that this is due to market manipulation by malicious actors, but the reason for it doesn't change the outcome. Many others have shared with me personally that price (typically wrapped up in some euphemism such as "not enough marketing") is the reason they were moving on as well, so it is not just conjecture on my part.

I personally think it's a short-sighted view, but I understand that seeing projects that get exploited left and right and require full blown data centers to run a full node have much higher valuations than Decred when Decred objectively has better core technology and has never had a single exploit that led to stolen funds gets extremely frustrating and leads to people giving up.

But how do we keep them?

This is a large reason for the most recent consensus changes which aims to reduce the amount of ammunition that malicious actors have available and have been using to manipulate the markets. Positive price action is very likely to be the most effective way to retain people who only care about price action.

Q6. Do you think that blockchain might play a substantial role in supply chain one day? If so, do you have any ideas on how this type of technology might operate in the future (dcrtime perhaps)? Lastly, do you have any advice for companies that are eager to use it?

Do you think that blockchain might play a substantial role in supply chain one day?

I personally think it is highly probable that it will as it solves many of the issues that exist with supply chains that solely rely on trust today.

As anyone involved with the manufacture of goods is certainly all too aware, as it stands today, every individual entity of the supply chain for anything of even remotely moderate complexity keeps their own records that are often incompatible and inconsistent which can make tracking down the root cause of issues and dispute resolution rather challenging. This would not be an issue with supply chain records using blockchain technology due the immutability guarantees, globally consistent view, and decentralization of the ledger it provides. This synergy can provide a trustless supply chain record that is exceedingly difficult to do via other mechanisms.

Moreover, it can automatically provide additional data that typically is not available today such as a timestamped log of all steps from end-to-end similar to how postal tracking works.

Do you have any ideas on how this type of technology might operate in the future (dcrtime perhaps)?

From a technological standpoint, a bare bones implementation isn't that difficult because it essentially just boils down to timestamping records and providing proofs, which is exactly what existing DCR technology like Politeia already does.

It is also important for such systems to avoid storing the actual records themselves directly on the chain for reasons of privacy, cost effectiveness, and scalability. That can be accomplished by having the supply chain software involved form its own decentralized storage network for the data associated with all timestamped records.

The more challenging part though, which is often the case, is the more political aspects involved with arriving at an agreed-upon standard that is flexible and extensible enough to satisfy the needs of all entities involved in the supply chain while also balancing transparency and privacy between competing entities who may want more or less of one or the other.

Do you have any advice for companies that are eager to use it?

My advice as with most things of this nature is if you're interested in a new technology is to ease your way into it by using the new facilities in addition to existing systems and working with adjacent entities to show them how it can help streamline their process and improve their efficiency.

Q7. Do you wish there were more developers working on decred?

Definitely.

Specifically, I'd like to see more developers working on higher level things that build on top of Decred (like the DEX, BR, contracts, multisig applications, etc) as opposed to the core software (dcrd in particular).

I say that because dcrd is extremely mature and the only things really left require a deep understanding and major changes to make any real headway, so I don't think having more than a couple more developers working there would really be a good use of developer time.

On the other hand, there are innumerable things that can be built on top and, as such, is fertile ground for many more developers.

Q8. What are the next milestones for dcrd in terms of optimizations and features like multi-peer downloads?

What are the next milestones for dcrd in terms of optimizations and features like multi-peer downloads?

While there are certainly some more things such as finishing the multi-peer code that I would like to do, and will eventually get back to, for the time being, as I've mentioned elsewhere in this thread, I plan to pivot to working towards efficient and scalable scaffolding for supporting things such as NFTs in a truly decentralized way.

I say that because the core network is already extremely solid and reasonably efficient (eg it's already significantly more efficient than most everything else out there), so most optimizations are unlikely to really move the needle in terms of what users care about.

Does dcrd have a chance to become a solid framework for building Go implementations of other coins and replace btcd in that role?
Some of the modules, for example, secp256k1, already have replaced btcd's code. As a case in point, btcd's btcec module is now just a thin wrapper around dcrd's secp256k1 module.

Similarly, other projects directly use it such as Ethereum's INFURA, nostr, the Cosmos SDK, Blockwatch's TzGo - Tezos Go SDK, Ethereum Optimism, and many more.

Another example is txscript which is used frequently.

Q9. any plan for dandelion for decred ?

It's something I'd like to see implemented (well, more specifically dandelion++). It isn't high on my priority list at the moment though, so unless someone who is capable shows up to the do the work, I wouldn't expect it in the near future.

Q10. Is the following "attack" on PoW chains realistic to pull off, and does the drop of subsidy to 1% make it worse for Decred (and is also somewhat alleviated now by difficulty adjustment algo being made more "responsive"), and what can be done to mitigate it ?

Suppose Decred hash-rate stabilizes around 0.01 Ph/s, and there are not much insentives to increase it (eg. DCR price also stabilizes). Somebody could attack Decred network by using their 10 Ph/s mining gear to mine certain number of blocks and then stop, effectively pushing the difficulty to such a high level that honest/rational miners (those with 0.01 Ph/s hash rate) will need to mine for days to get it back down (while blockchain will be frozen during that period, similarly to what we observed when switched to the latest PoW consensus version). And this can be repeated again and again.

I believe same issue exists in pretty much all PoW networks, but for Bitcoin for example isn't as likely to occur in practice due to mining difficulty being very high already. I mostly just want to confirm my understanding, pls don't spend too much time describing the details.

And, I guess it would be interesting to put a number on how costly it would be (in $ terms) to pull off such an attack on Decred network under current conditions (say, current price of 13$, honest/rational PoW hash-rate stays at what it currently is, and somebody rents AWS instance to stall blockchain for a couple of days).

Response:
As you note, such an attack is theoretically possible on all PoW chains. It's essentially a temporary Denial of Service attack and it has happened to many chains, typically due to using an unresponsive and poorly adapted difficulty adjustment algorithm (DAA) as opposed to deliberate attacks.

That said, if such attacks were to become common, Decred has the means to fight back against them by stakeholders refusing to vote on blocks that are coming in too quickly once a certain threshold has been surpassed. That, in turn, would prevent the difficulty from rising too quickly while more advanced heuristics could be deployed or even a complete change to the DAA to a much more complicated RTT if it came to that.

In short, it is indeed a possible (and expensive) way to be marginally disruptive for a short time.

Q11. When will it be simple enough to develop the application side on the DCR platform?

This is something I plan to pivot to improving in the nearish future.

I can't provide any specific dates or time frames, but I will note that to date I have personally primarily been focusing on the core network development, and while there is always more to do there, it is basically mostly at the point of diminishing returns in terms of obvious user facing utility.

So, I believe pivoting to things is this arena will provide more value for the time being.

Q12. How you would imagine Decred in the future (5 or 10years) when you first started /thinking/working on it...

In terms of the technology, it is pretty close to what I originally imagined as everything that was originally promised (and more) has been delivered.

I would say the one aspect that is not as realized as I would've expected is in terms of development on top of the scripting system. The opcodes in the scripting system really aren't that hard to use and, looking back to the perspective I had at the beginning, I would've expected there to be novel scripts making use of them.

However, as I've seen across the entire cryptocurrency ecosystem in the intervening years, that is not a unique thing to Decred. The reality is that very few things have been developed on the scripting systems of any chains. Instead, the most active are things that are built on frameworks like ERC-20 which typically only involve tweaking a parameter or two without really having any substantial difference.

Q13. What Decred looks like best case scenario?

I'd like to see a lot more integration with existing platforms (exchange listings, multi-coin wallets, etc). It would also be nice to have more applications and utility built on top of the core primitives and extremely solid foundation in a scalable and off-chain way.

Q14. What advice would you give someone young starting in crypto?

It depends on what their goals are. I'll assume you're referring to development given this is an AMA primarily aimed at that.

For those who are looking to get into either developing the blockchain base layer itself, or building applications on top of it, my biggest advice would be to spend the time to learn the fundamental properties that make the blockchain base layer secure, decentralized, and trustless.

Although it might be tempting to start with some high level script from an example found online and just modify a few params, that approach will more often than not result in creating something that is exploitable. It is paramount to both truly understand what that code is doing and, most important, why it's doing it that way as well as what the implications of doing it another way entail.

Blockchain development is often dealing with large sums of money and is therefore much less forgiving than development in many other domains. A small bug in blockchain development can easily lead to exploits of hundreds of millions of dollars which are seen constantly in the space. That is in stark contrast to other domains where the consequences of small bugs are typically nothing more than temporary annoyances.

Q15. What things you wish Decred would have done differently?

In hindsight, I would very much have not supported ASICs and would have actively worked to prevent them despite their having some beneficial properties such as making the type of DoS attack described elsewhere in this thread that much harder to conduct.

We were well aware of the centralization tendencies of ASICs and designed the hybrid system, in part, to ensure the network stayed secure in the face of such inevitable centralization. The system has been, and still is, very effective in that regard.

Unfortunately, what we (and pretty much everyone else around that time it seems) overlooked is that it would allow a fairly cheap way for malicious actors to completely control and manipulate the market and that has led to taking its toll in many ways.
I personally believe Decred would easily be a top 30 coin right now if not for that. I say that because it was near there even in spite of it all.

Q16. Decred works on many fronts, BR, DCRDEX, etc.. Which one excite you the most?

If you mean in terms of what I personally like to work on the most, I prefer to work on the core network. It is extremely meticulous work that is quite stressful, because so much is at stake, but it can also be challenging which keeps things interesting.

If you mean in terms of what is most exciting for the prospects of Decred's future between, it's probably a toss up between BR and DCRDEX.

I absolutely love seeing the evolution of the DEX and being able to easily start from scratch and actually have traded coins with less hassle and faster than is possible with a centralized exchange is something not to be underestimated. It's easy to think something like that doesn't matter so long as you can get on a CEX, but as soon as those doors close, the DEX shines.

It's similar for BR. At the current time, it's pretty undeniable to me that the centralized offerings are more polished and provide a higher degree convenience than BR. However, those things are mostly just a matter of continued development and time. What is really important is the uncensorable nature of it. Seeing the absolutely draconian and authoritarian censorship of bills such as the OSB recently passed in the UK should really be a wake up call for people that censorship resistant tools are needed if you want to be able to actually speak about topics that aren't approved by the un-elected elite who get to decide things like what is considered "harmful" and what constitutes "misinformation" (aka topics and information they don't like).

Q17. What was the most difficult moment in your Decred journey?
I'm sure that my particular case is going to be significantly different than someone who came along later because I've been here from the beginning.

For me personally, the most difficult part really hasn't been a specific moment, rather it has been coming to terms with the realization over time that most people simply don't actually care at all about the things they claim to.

For example, I've seen time and time again that someone will vehemently affirm they believe decentralization is extremely important, but then do things like keep their coins on centralized exchanges and invest in things that require full blown data centers to even run a full node which are the exact antithesis of decentralization. That is but one example, but it's the same story for just about every unique property that cryptocurrencies generally bring to the table.

Q18. Question for DCRDEX Devs if they've got the time:

  • What is the status of the DEX rebrand?
  • What is the status/progress of the market-maker bots?
  • USDC unfortunately hasn't been a used trading pair due to Ethereum network fees being high. Was this anticipated, and do you think Polygon support will help?

What is the status of the DEX rebrand?

The DEX rebrand is coming along. I'm working on securing branding, but even then, I probably won't pull the trigger until we're at or nearly at a v1 release. The rebranding is one of the best chances we have at getting outside attention. I don't want to announce a rebrand until we have a rock-solid product and the infrastructure for healthy markets (= maker bots in place). We're making quick progress on these objectives.

What is the status/progress of the market-maker bots?

We have now merged the market maker bot refactor and the simple arbitrage bot. The combo bot is in review, with a couple reviews already submitted. We're moving at a good pace, considering the code complexity involved. Once that effort is incorporated, we need to do a final refactor and a healthy amount of UI work. I would estimate between 6 and 12 weeks to finality.

USDC unfortunately hasn't been a used trading pair due to Ethereum network fees being high...

do you think Polygon support will help?

Yes. Polygon USDC is already implemented and I think that when we get our market structure right, Polygon will be the blockchain of choice for USDC.

That said, Circle has complicated the process with their announcement to migrate from an ETH-bridged token to a native Polygon token. Migration starts tomorrow. We're fortunate that they're doing this before Polygon landed in a dex release, because we can avoid a complicated upgrade process.

Was this anticipated?

We've been starkly aware for quite some time that network fees for Bitcoin and Ethereum are stifling activity. Recent work has been focused on developing solutions, such as WBTC and WETH on Polygon, making low-lot-size markets feasible, and modifying the reputation system to handle these low-fee markets.