[AlphaGrowth] Models for Incentivizing Decentralized Hosting

Possible Designs for a Decentralized Hosting Incentivization Model

TL;DR

To make the new Compound frontend truly decentralized, it needs to be hosted by a variety of users and community members similar to the nodes in a blockchain. Users may be willing to run the frontend locally for themselves for free so they can access their Compound Positions. However, non-technical users should also be able to visit a Compound frontend run by another community member via a web address. Anyone hosting the frontend will incur costs each time the site is visited, from server bills to RPC node fees.

To encourage sustainable participation, we need to create an incentivization model that allows those hosting the front end for the community to profit from doing so … and at minimum covers their costs. For reference, currently more than $10,000/month is spent on RPC node calls by current compound users, a single component of the overall cost of delivering a sleek real-time user experience to Compound users.

Below are the possible incentivization models and our considerations.

Incentivization Models

Model 1: Fixed Grant

A fixed grant (e.g., $500) is provided to host the frontend for a set amount of time (e.g. 1 year).

Pros:

  • Easy to award to many community members.

Cons:

  • It doesn’t account for the variable costs of hosting a frontend. The more users this frontend serves and the faster the server responds, the more cost this frontend will incur. To remain profitable this frontend is incentivized to be slow and unavailable, to reduce their variable costs and maximize their profit.

Who pays: Compound DAO Treasury

Recommendation: Not an appropriate solution

Model 2: Flat Fee Per Transaction Type

The costs incurred from hosting compound.finance are divided by the total number of on-chain actions the compound.finance has processed. Compound DAO uses this information to publish a lookup table estimating the cost of every on-chain transaction type in terms of infrastructure cost:

  • For example opening a new position might cost $0.10 (server fees + 34 PRC calls on Average + 2 Write RPC calls)
  • While withdrawing might cost $0.05 because people need less research when they close a position and therefore less RPC calls)

Each frontend includes a unique piece of metadata in the transactions they process, and the Compound DAO automatically pays out frontends in proportion to the transactions they process.

Who pays: Compound DAO Treasury

Pros:

  • Variable payment for variable traffic encourages hosts to provide the best & fastest user experience. If they become known as the best host they will attract more traffic and more revenue.
  • Fixed cost per action doesn’t discriminate between users depositing $10 or $10M and doesn’t discourage whales from using the frontend by taking a % that becomes a massive overpayment when large amounts are deposited.

Cons:

  • If the Reward for processing a transaction is greater than the gas fee + actual expenses. The system encourages pushing fake transactions. These should be easy to spot, could also limit the amount a frontend is capable of earning during set periods to encourage open dialog with the host who will ask for an increase if seeing greater than expected volumes.

We recommend this option because:

It encourages hosts to provide the best hardware and lowest latency for the best user experience so visitors take more on-chain actions. More traffic means the host gets paid more. Incentives are aligned.

Model 3: Percentage of The Gas Fee

The frontend charges a percentage of each transaction’s estimated gas fee as an additional fee on the transaction. This Frontend infrastructure “Gas Fee” is distributed directly to the Frontend Host.

Pros:

  • If the multiple is set correctly this frontend Gas should cover the entire hosting cost & more.
  • Frontends will make more when they’re available and fast during times of congestion when gas prices spike
  • Because the user is paying the gas fee you’ll only lose money for pushing fake traffic.
  • Chains with higher gas will pay more in frontend fees encouraging migration to lower gas chains.

Cons:

  • Only on-chain actions pay: a user may check a position on Compound every day for a year without taking action. Those RPC node calls add up and are being covered by the website host.
  • Users may complain when seeing an additional fee which is the real cost of running the website. They can always host the site themselves locally to circumvent paying the fee.

Who pays: End User

We recommend this option because:

A percentage of Gas Fees will encourage anyone of any size bags to participate and they’ll see fees that are similar to what they’re used to rather than believing the Compound DAO lookup table to be correct. (A multiple on Gas will still need to be decided)

Model 4: Percentage of the amount being deposited/Withdrawn

We don’t recommend this option because it will discourage whales from using the frontend if they have to pay 100x as much to take the same action.

Model 5: Charge for page loads

Have users connect their wallet before being able to see any data in the frontend. The frontend then tracks the pageloads, read RPC calls, write RPC calls & on-chain actions. When a user takes an on-chain action the cost of the infrastructure they’ve used between now and their previous on-chain action would be added as a fee.

Pros:

  • This would most closely compensate hosters for the “Real” cost of running a frontend, tracking both on-chain & off-chain costs.

Cons:

  • Crypto users don’t like being tracked.
  • A user could do all off-chain actions on wallet-A then switch to wallet-B to dodge paying any off-chain costs.

Who pays: End User or Compound DAO

We don’t recommend starting with this option, though long term with future solutioning could provide the most sustainable model.

Additional Considerations

Any of these models still require the use of a third party RPC node provider. An RPC node could also be embedded in the frontend executable. While it requires additional knowledge and hardware to run, an ideal scenario is one in which community members are also sustainably incentivized to run RPC nodes moving away from website usability hinging on the uptime of 1 or a couple providers.

We have another entire article we can write on this subject, happy to discuss it in the comments here as well.

Ask

  1. We invite delegates and the community to share their thoughts on their preferred incentivization model.
  2. If you’d like to host a beta of the website server for testing please let us know and we’ll share the code as it becomes available during the development process.
4 Likes

I was thinking something crazy like a Compound client you stake COMP to (given the coming proposal) that includes decentralized hosting of the frontend. But likely too much work to do it/too crazy.

I am worried that people may spoof the frontend or worse and there needs to be some kind of check. Is there a way to make it so that it has to agree with the main one or the other decentralized ones?

Could we get it integrated into Ledger or metamask etc directly? Or perhaps have a downloadable client so people don’t even need to use someones hosting?

I’m against the variable fee models it just gets too complicated. Could we just let decentralized clients if we go that route put up banner ads?

I’m ok hosting if you can explain it in a way that a noob can run it.

Tough problem to solve. I hadnt though about the RPC nodes having embedded executables.

Are there not trusted front end providers (who do this for other protocols) that we could consider? I know Compound needs to decentralize but at what point is it detrimental to the user?

Surely the better solution is to host and mirror the frontend on IPFS and track updates so users can opt to host themselves on IPFS?

Even trusted providers can’t be trusted as they are only as secure as the services they use. The recent GoDaddy DNS hack is a great example.

When I have time I’m going to setup a youtube vid of the contracts you should be interacting with for each so even if someone hijacks the frontend you can check the addresses match.

These are all great questions, thank you @misher for the input. Here are some additional design considerations I see:

  1. “Could you stake COMP to a frontend to secure it”

It’s not crazy to add COMP tokens to the version you’re hosting to confirm you’re a good actor. This is definitely possible, and potentially later down the roadmap. Owning a large number of COMP tokens would show you are invested in the long term success of the protocol, and you’d be unlikely to abuse users if you were. Alternatively, the site would need to track website uptimes and either reward or slash websites based on their performances.

It is possible to track website performances by adding a unique identifier to the on-chain transactions coming from each frontend instance, these transactions could be used as a proxy for uptime, possibly do a heart beat check on chain as well.

On NEAR, the validators earn a portion of the staking fee from each of the individual that stakes to it. This revenue could cover the hosting (server) fees. NEAR Validator List | Nearblocks This is an economic model that might work.

  1. “I am worried about people spoofing the frontend”

The first line of defense: we are publishing an “Official” version of the frontend via a DAO vote. The version has a hash, Anyone can download this code and check that the Hash matches to know the website has not been tampered. We’ve even discussed calculating the Hash and showing it on the frontend site, so any end user will see that hash and easily be able to compare it to the hash in governance.

However much security we add to the “official” sites there’s still a risk that a bad actor clones the site, alters the code and simply publishes a popup on the frontend with a static hash that says it’s an official site version.

User education is the main way to combat against this, the DAO should have somewhere a user can go to get started possibly linked from DAO governance.

Another possible solution would be to have every website contain a list of all other sites that are run in this manner like NEAR Validator List | Nearblocks making it hard for a bad actor to serve a malicious site in a vacuum.

  1. “Could we create a downloadable client so we don’t have to use someone else’s hosting?”

Yes, that is what we’re building right now. Anyone who wants to host the website will be able to do so by downloading the official client and simply running it with a few setup steps that confirm the hashing is correct. The ultimate goal is that anyone can access a version that someone else is hosting via the web. The first step is that anyone will be able to locally host a version for themselves that they can confirm is genuine.

  1. “Can we get integrated into MetaMask?”

Great idea. This also solves the RPC problem, if the site doesn’t display data until a user connects their MetaMask, then MetaMask will supply the PRC nodes bringing Compound’s PRC cost for those users to zero.

  1. “I’m against variable fees they seem complicated”

Let’s discuss this more, I’d rather collectively come to a solution that is simpler for on-chain fees, than embed banner ads which asks the website to rely on a separate centralized 3rd party for it’s incentive structure.

  1. “I’m ok hosting if you can explain it in a way that a noob can run it.”

We’re packaging it as a program that should be as simple as downloading and installing Minecraft. Will share as soon as V1 is production ready.

3 Likes

Looking forward to your videos, you may find the “interacting with smart contracts” project helpful on our Github. It shows alternative ways to interact with Compound given you don’t want to use the Compound frontend.

1 Like

Thanks, everyone, for your discussion & feedback. After reviewing the options, we are going to pursue Model 2: Flat Fee Per Transaction Type. This model provides a fair way to incentivize hosts based on the value they provide to end users. And it encourages servers with the best performance and user experience. We are proceeding with the development of this model, and will keep the community updated on progress. As always, we welcome additional community input.

2 Likes

Is AlphaGrowth allowed to use Comp Treasury funds to pay for this without a governance vote?

Operational question I guess

A decentralized website is only decentralized if it’s funded by a decentralized source (the Compound DAO), an on-chain proposal will be expected in the future that asks the DAO to lock funds into a contract to programmatically reward those hosting the decentralized website. That’s why the compensation model is so important to ensure the cost of pushing fake traffic is greater than the reward, thus ensuring incentives are only distributed to hosts empowering real users.