stacks-archive / app-mining

For App Mining landing page development and App Mining operations.
https://app.co/mining
MIT License
49 stars 16 forks source link

Reward by most locked bitcoin safely #237

Open pstan26 opened 3 years ago

pstan26 commented 3 years ago

What is the problem you are seeing? Please describe. We’ve experienced difficulty trying to create a fair one-size-fits-all way of ranking apps.

How is this problem misaligned with goals of app mining? App Mining would be great if it were turned back on and we knew it was not gamed, attracted more innovation and value to our platform.

What is the explicit recommendation you’re looking to propose?

We should consider turning app mining back on with a specific, objective metric that is healthy for the ecosystem and difficult to be gamed.

My suggestion is BTC locked up. This is objectively measurable and would allow a new economy to develop that interacts with BTC in a valuable and safe way.

What is the dry run period (if any) 3 months? Start with something like $50k in STX across an infinitely long tail at some fair distribution [which could be an infinite tail].

Describe your long term considerations in proposing this change. Please include the ways you can predict this recommendation could go wrong and possible ways mitigate. You’d need to make sure the governance (if any) is hard to seize.

Will give it more thought and come back if I find something.

Cc @blocks8 , @muneeb-ali as you’ve been discussing defi with bitcoin lately.

muneeb-ali commented 3 years ago

This is a great idea. It'd be very hard (maybe impossible?) to game this metric.

DeFi with Bitcoin as reserve cryptocurrency is a potential big area and the Stacks chain, connected to Bitcoin, with Clarity lang is uniquely positioned for such DeFi with Bitcoin use-cases.

jcnelson commented 3 years ago

My suggestion is BTC locked up. This is objectively measurable and would allow a new economy to develop that interacts with BTC in a valuable and safe way.

I think I'll need to see more details to form an opinion. What does "locked up" mean here -- does it mean "render unspendable for a period of time"? Do app users lock up BTC to use the app (or unlock features in it), or do app developers do this, or do app reviewers, or some combination, or someone/something else? Locking up BTC sounds expensive and high-friction -- if an app is successful, what stops someone from forking the app and removing the lock-up requirement? What stops someone from just taking a loan out against their locked BTC, and thereby diminish the quality of the signal the lock-up would send?

muneeb-ali commented 3 years ago

I think Patrick means BTC locked at Bitcoin chain and used in a Clarity smart contract. So the Clarity contract with more liquid BTX (just making up name for BTC moved to Stacks chain) gets higher app mining rewards.

dantrevino commented 3 years ago

How would you prevent out-of-band side-deals between BTC hodlers and app developers? I could easily set up a completely separate "defi" app that says "lock" your btc with me and get rewards. This would ruin any correlation between app quality and the BTC lock.

pstan26 commented 3 years ago

@dantrevino nice! We should walk through this further. What are the incentives for competitors if this happens? What are the incentives of the btc hodler locking up their BTC?

This is something I’ve been thinking about as well but I’m not sure this necessarily corrupts the game in the long term.

jcnelson commented 3 years ago

What if the act of locking BTC was done in a way that it had to be "pointed at" a particular app? You could structure the BTC lock-up transaction to not only lock the BTC, but also include some metadata that identifies a particular application. This would make it possible to do things like "lock 1 BTC for NoteRiot," "lock 0.5 BTC for Sigle," etc.

In Stacks 2.0, the application could encourage people to lock BTC for them by minting tokens to the locker's address. Freshly-locked BTC could be used to mint new tokens in the app's Clarity smart contract. Because the Clarity VM has direct access to the state of the underlying Bitcoin chain, it would be straightforward for the Clarity code to SPV-verify that the BTC was locked for a given number of blocks, and was pointed towards a particular app.

The app tokens would effectively be a yield for the BTC-locker. They could either be used to access features or services within the app (e.g. proof-of-hodl login, access otherwise-paid features, get preferential tech support, etc), or they could be re-sold to people who want said features or services. Even the act of re-selling could be programmatically controlled if app developer wants, since the act of re-selling would necessarily be routed through the Clarity contract as well. For example, maybe the app tokens would be placed in a time-lock, or maybe they could be structured as NFTs that could only be transferred a fixed number of times before becoming unspendable.

pstan26 commented 3 years ago

@jcnelson and you think there could be some STX payouts (like app mining) alongside this to developers? Might also be useful to reward app developers who win and continuously hodl STX. Think that works or is too contrived?

friedger commented 3 years ago

Moving BTC to another address looks like PoX. So, app developers should start mining and ask their users to provide BTC for them. The more users contribute BTC to the mining pool of the app the more STX gets the app developer.

jcnelson commented 3 years ago

and you think there could be some STX payouts (like app mining) alongside this to developers?

I think you'll need to be very careful about how you do this. Specifically, you want to make sure that it's unprofitable for someone to just lock up a bunch of STX, and then get both the STX back later as well as the payout (this would just encourage developers to race each other to buy and lock up as much STX as they can, since they'll get it all back and then some). I think you may need to require that some amount of the STX locked up gets burned -- specifically, you'll need to burn at least as much locked STX as you give in the total STX payout, so there's no longer an incentive to race to lock up the most STX.

In order to encourage people to lock up STX and only get some of it back, you'll need to compensate them some other way for the burnt STX. I think this could be achieved with a locked-STX-mints-app-tokens scheme similar to the locked-BTC-mints-app-tokens scheme I described earlier. Then, people would only lock/burn their STX if they truly thought that the app-specific tokens they'd get from it would be worth at least as much as the STX burned.

jcnelson commented 3 years ago

So, app developers should start mining and ask their users to provide BTC for them. The more users contribute BTC to the mining pool of the app the more STX gets the app developer.

Yeah, this could be done as well. The mining protocol already supports this through user-support burns -- i.e. the user sends a BTC transaction that burns some BTC and signals support for a particular block. This burnt BTC contributes to the block's probability of being selected, and the Stacks chain automatically distributes the STX coinbase to the addresses that sent the user-support burns (proportional to their contribution).

markmhendrickson commented 3 years ago

What's the value (for the ecosystem, user, developer or otherwise) to locking up BTC with apps, however executed?

In other words, why orient a rebooted App Mining around this concept aside from it being (possibly) hard to game, objective and measurable? Is the idea that a certain breed of defi apps would arise that we want seen on the platform? Is "locking up" BTC core to them for some reason?

jasperjansz commented 3 years ago

@markmhx Yes you're right, you need collateral for decentralized financial products. I think this scheme would incentivize defi over general-purpose apps as locking up is the primary operation for defi. There are the things that Jude mentioned for general-purpose apps but the token use there is mostly secondary, you'd need to build an app that people want to use first.

Another reason I think it wouldn't work as well for these general-purpose apps is because you're subject to the price movements of BTC while you have it locked.

jcnelson commented 3 years ago

In other words, why orient a rebooted App Mining around this concept aside from it being (possibly) hard to game, objective and measurable?

I think you've answered your own question ;) The problems with app mining are that it is easy to game, subjective, and hard to measure. If we resurrect app mining, this would potentially provide a better way to measure interest in apps.

Is the idea that a certain breed of defi apps would arise that we want seen on the platform? Is "locking up" BTC core to them for some reason?

I didn't have defi in mind when I was writing this. I see app-specific tokens as a novel form of paid-for SaaS -- by obtaining and holding an app token, you get access to features within the app for some period of time.

How should app developers make access tokens available to users? The most naive way is they could just sell them directly, kind of like how developers today will sell you an API key to their SaaS product. They could make it so you had to buy or renew that API key to keep getting service; similarly, app developers in Stacks could make it so your tokens expire, forcing you to buy new ones from them. Unlike API keys in most SaaS products, the tokens could be designed in such a way that they can be re-sold -- Alice can sell her access token to Bob if she doesn't want to use the product anymore, but Bob does.

The reason the lock-BTC-to-mint-tokens concept appeals to me is because it rewards both app developers and early users of successful apps. Users have a choice of how to acquire the token -- they can either pay the app developer to mint them an access token, or they can lock up some BTC and use the app's smart contract to mint the token for themselves (the app developer would specify on an ongoing basis in the contract how much BTC needs to be locked up, and for how long, in order to ensure that the cost of doing one versus the other remained reasonable). The reason the user would take the latter option is if they believed that the app token would become valuable later on -- i.e. worth more than the opportunity cost of locking up the BTC (note that I don't mean "valuable" in the resell-sense; I mean "valuable" in the "getting your money's-worth" sense).

For example, suppose I built an app where the users who held one of the first 100 tokens minted would get free tech support, and everyone else had to pay for it. If my app grew to having more than 100 paying users, those 100 tokens would become more valuable than they were when they first minted -- some of those remaining users would want to acquire one of the initial tokens to get free tech support. If you were an early user and got one of those "free tech support" tokens by locking up some BTC, you have now made a profit -- you get your BTC back when the lockup expires, and you have a token that's worth something.

How does this help app mining? It lets the set of Blockstack app users vote on app quality in a Sybil-resistant manner. The BTC you lock up is like voting -- if you lock it for app A, you cannot lock it for app B. Moreover, you can only profit by locking up BTC if the app itself succeeds in drawing enough demand for the tokens the lockup gets you that the tokens are worth more than the lockup opportunity cost. So, the amount of BTC locked for an app should be a "measuring stick" for its perceived future success (conversely, if you didn't think the app was going to be sufficiently successful in the foreseeable future, you would just buy the app access token directly, if at all).

There are the things that Jude mentioned for general-purpose apps but the token use there is mostly secondary, you'd need to build an app that people want to use first.

Yes; no one profits from building an app no one wants. That's a feature, not a bug ;) App mining rewarded apps that were pretty low-quality.

Another reason I think it wouldn't work as well for these general-purpose apps is because you're subject to the price movements of BTC while you have it locked.

I fully expect and endorse systems like this where the developer unilaterally controls how much BTC must be locked to obtain a token, and how long. I think this is completely reasonable because this protocol is replacing the act of selling you an API token for a fixed cost. Moreover, we don't want the app developer's token contract to be a business suicide pact -- if they need to adjust prices to react to market forces, they should be able to do so.

Before someone says "stablecoins" or "yield" or "compound" or some other defi buzzword: No, this is not what I'm going for here. I'm only trying to make app-mining work in a way that rewards both developers and early users, so we can get more users to Blockstack and attract more high-quality developers.

jasperjansz commented 3 years ago

@jcnelson I understand the intentions, but they're different from the incentives of the program as currently proposed. We know from experience that giving away rewards will attract developers who optimize for earning those rewards. Given that, would you:

  1. Build a SaaS app that is good enough to retain users (super difficult) and incorporate a BTC-locking business model, or
  2. Copy some defi "protocol" where locking is the primary operation

That's why I said this will incentivize number 2, not 1.

If I were to game this I would create an app which distributes part of the app mining payout back to the users who lock their BTC. Yield!

jcnelson commented 3 years ago

If I were to game this I would create an app which distributes part of the app mining payout back to the users who lock their BTC. Yield!

Ah, I didn't mention this explicitly. I don't think there's going to be an app mining payout in the first place. BTC-locking is meant to replace it altogether.

Build a SaaS app that is good enough to retain users (super difficult) and incorporate a BTC-locking business model, or

Yes, I agree that the SaaS app that is good enough to retain users is super difficult. But, it's also exactly what we're trying to encourage -- we want people to be able to build profitable apps on Blockstack, and we want the path to profitability to be shorter and easier for Blockstack apps than traditional SaaS apps. We already help this somewhat with Gaia and BNS auth, for example -- Blockstack app developers don't need to pay to host user data any longer, thereby removing an operational expense. (I know you know this already; I'm just explaining the rationale for the greater Stacks community that's also reading this thread).

The primary use-case of the BTC-locking approach is to help app developers attract their first paying users faster than they would have in the SaaS model. App developers can design their apps so that only certain features or services are available to app token holders, and there's a wide design space of how the app developer can design the token (or tokens) that unlock them. But, just making a paid-for app token isn't good enough by itself -- at best, it's no different than trying to build a paid-for SaaS app.

The BTC-locking approach changes this dynamic by rewarding people who discover and signal support for apps that they believe will later be successful. Unlike SaaS, the first paying users don't necessarily need to be committed users -- they just need to believe that the app token they get out of locking BTC will be worth something later. But, that belief is necessarily predicated on the app attracting lots of users, since that's what's going to create a market for their early-issued token. I think this creates a virtuous cycle -- a high-quality app attracts both paying users and BTC-lockers, which in turn signals to the market that this app is thought to be high-quality (as measured by the quantity of BTC locked), which in turn attracts more attention (and more users) to the app.

The closest real-world process I can think of for what BTC-locking does for apps is what VC rounds do for SaaS companies today. The analogy isn't perfect, but the act of seeing which VC firms invested in which apps at what valuations does send a signal to both other VCs and to users that there's something about this app (or at least, the team that produced it) that makes them believe it will be successful in the future. Of course, the analogy breaks down after this -- BTC-locking isn't investing or lending, no equity is purchased, the app's smart contract isn't a corporation, etc.

Can this be gamed? Sure -- I think there's two significant ways this could be gamed. First, the app developer can just promise would-be token holders a share in future proceeds for locking BTC up now. But, this is probably illegal in most jurisdictions -- I'm not a lawyer, but treating the token this way feels like it would be considered an unregistered security. In the US at least, the fact that the SEC has taken a dim view on similar practices with tokens in the recent past gives me hope that they would go after people who do this in the future. Second, the app developer can lock up their own (large quantity of) BTC, and fake a positive signal for their app. But, this isn't free -- in order for the signal to be believable, the BTC needs to be locked for a long time (e.g. months, maybe years), and that has an opportunity cost. The cost may be less than the BTC locked, but as long as there is such a cost (and such a high barrier to entry), I think it would discourage a lot of the low-effort scammers from doing something like this.

What do you all think? Would love more insights into how this could be gamed.

MarvinJanssen commented 3 years ago

I share the same reservations as @dantrevino. I think such a dapp will inevitably be created because it is too easy and tempting to do so: a simple dapp that does nothing more than pay app mining reward dividends to all users that participate. Surely there is opportunity cost to locking up your BTC but a lot of people are in it for the long term. (People that might have zero interest in the ecosystem and are in it just to extract value.) And when it happens, what would be the course of action? Halt app mining once more, blacklist the dapp, create a fork? Naturally those are not solutions. If app mining turns out that way then those funds might as well be airdropped to all users on the network, at least then it is more fair. Locking is definitely a very interesting dapp business model that requires more exploration but I think attaching app mining to it is quite dangerous.

I feel like app mining has been trying to find an automated technical solution to an inherently social issue. Why not simply have active verified users of the community vote for dapps and use that as a basis? There are a variety of ways to verify users based on community activity, contributions, and so on. Arguably, this will bestow the foundation with an extended degree of control of where the app mining rewards are going, but is it not the point that it should go where the community wants it to go? Also, the community can decide on the level of verification required. I do not think only allowing verified users to vote is detrimental or exclusionary because those who are sincerely interested in moving the ecosystem forward will have no problem stepping out into the limelight a little. A nice "side-effect" is that it will incentivise developers to engage with the community.

I talked to Sandeep from Matic last week and they released a program called "build-n-earn", which is based on the original app mining program but with changes to combat gaming. Worth a look: https://matic.network/build-n-earn/

jcnelson commented 3 years ago

I think that if we adopt this solution, app mining payouts will need to cease altogether (per my above comment).

MarvinJanssen commented 3 years ago

What do you mean by adopting this solution? Since this issue is about restarting app mining, do I understand correctly that your suggestion is to not restart app mining at all but that developers should come up with their own solutions? "BTC-lock-and-mint" (and derivatives) sound like a possible business model for dapp developers that they are free to implement or not, regardless of the existence of an app mining program. The model might not make sense for every dapp.

jcnelson commented 3 years ago

I think that if app mining in its current form is restarted in any capacity, then it cannot use the amount of BTC locked in the BTC-lock-and-mint scheme as a metric for quality (I think this is true for any lock-up scheme, per my original comment https://github.com/blockstack/app-mining/issues/237#issuecomment-659522605). Your comment and @jasperjansz's comment on how to use BTC-lock-and-mint to game the reward system are both well-taken.

In a broader sense, app mining in its current form is not sustainable, since PBC doesn't have infinite money. But, I think it's worth trying to have some form of app mining exist with or without PBC, because I think it's valuable to the ecosystem for there to exist a hard-to-game way of publicly measuring app quality (and use it to drive money towards high-quality apps). Any approaches to solving this problem will necessarily be business models. BTC-lock-and-mint is a business model that happens to produce an app-mining-like quality measurement (i.e. locked BTC over time) as a means to making money. In fact, it's a lot like traditional mining -- miners (those who lock BTC) expend a resource (opportunity cost) to produce a token (an app access token) that the believe to be worth more than the expended resource.

Another reason I like BTC-lock-and-mint over the current app mining is because the quality metric is fork-resistant. If someone makes a high-quality Blockstack app that has a lot of locked BTC behind it, then even if someone makes a knock-off of the app, they still need to convince people to lock BTC behind it. The rip-off will have a lower-quality signal than the original, unless the rip-off can make genuine improvements over the original in attracting users to lock BTC for access tokens. In the current app-mining program, the reviewers had to be vigilant against rip-offs in order to ensure that they didn't get an undue payout. This does not scale in the current program -- there's no way to manually review millions of apps to make sure no one is cheating in this way.

MarvinJanssen commented 3 years ago

I completely agree. I would personally like app mining to be resumed in some form and as stated, I think the core issue necessitates a social solution. There is a sizeable sum of STX allocated for app mining / developer funding and I believe that is what it should go towards. It will definitely cause developers to optimise for receiving those rewards per @jasperjansz comment but if there is a strong social model, then the developer still has to build something that the community actually wants—that is to say, optimising for rewards is equal to working closely with the community. Thus, my answer to "a fair one-size-fits-all way of ranking apps" would be that.

BTC-lock-and-mint has to be explored further. Perhaps we can take that discussion to a different channel.