RichardAH / hotpocket

A smart contract consensus engine for severs and/or Codius
GNU General Public License v3.0
11 stars 0 forks source link

HotPocket Proposal #3

Open wojake opened 2 years ago

wojake commented 2 years ago

@RichardAH I don't know how to contact you to propose this feature, since the current HotPocket/Sashimono repo is private, best I can find is this repository.

CC: @chalith, @ravinsp, @SavindaSenevirathne, @ScottChamberlain and @WietseWind (unsure if Wietse is involved in the project, if you're not, please ignore this proposal, thanks)

I emailed Scott about this proposal but it wasn't really fully explained.

Quality Control as described in the Evernode Whitepaper 1.0:

The best signal of a Node’s trustworthiness is the natural price discovery of its 
Tokens on the DEX. Bad Nodes should quickly be exposed, and their Tokens 
shunned or under-priced relative to peers. Thus, the DEX provides an important 
circuit-breaker function, allowing poor quality Nodes to be easily auto-identified 
by dApps and dApp developers. 

In my opinion, a better term to use is Quality Discovery, its just users discovering if a node is reliable or not to include it to their dApp by referring to the node's host token price, liquidity and volatility.

Back to the proposal, as you know, the users of Evernode can determine if a HotPocket node is reliable or not by looking at its host token's price in the native DEX. This is a great add-on to the overall Evernode ecosystem but this can be manipulated by wash trading and spoofing & its not reliable since every sell requires a buy and every buy requires a sell. So, I propose another feature that can determine if a node is reliable or not, where no funds are used, just real network metrics and the network's consensus mechanism, it it very similar to the UNL consensus protocol but used for an entirely different purpose in the network, catering to the customers or users of Evernode.

Recommended Node List (RNL)

The RNL is a list of HotPocket nodes that are best at a certain category in the Evernode Network, the RNL is a ranked list to determine a node's quality in a certain category, this allows users of Evernode to discover the network's top recommended nodes to include in their dApps. Users could still determine a node's quality by using the quality control function but as I said before, it can be manipulated and its not sufficient enough to determine a node's quality.

To add on this, the problem with the Quality Control feature is not only as mentioned above but there's no telling what caused a node's host token's price declining. Was it because of a long down-time? Was it because of a sudden drop in computational power? Was it because of the node going down? Was it because of a competitive network? Was it because of speculation? We really can't tell.

The RNL fixes this by creating different categories which the users can refer to, this allows the users to get the best value on the Evernode Network for their dApps, this also allows the users to determine which category of nodes to include in their dApps, good up-time nodes? huge computational power nodes? They can choose freely which makes Evernode even more flexible and transparent.

I propose there should be 3 RNLs which keeps track of the listed categories below, there will be exactly 3 RNLs which maintains a list of nodes that are great at a certain category, the 3 RNLs are (not in order and proposed):

  1. Availability
  2. Up-time
  3. Computational Power

These few metrics determines a node's place in their categories (proposed).

RNL for Availability (by order):

  1. Availability
  2. Up-time
  3. Computational Power

RNL for Up-time (by order):

  1. Up-time
  2. Availability
  3. Computational Power

RNL for Computational Power (by order):

  1. Computational Power
  2. Up-time
  3. Availability

There can be a lot more RNLs in the Evernode Network as long as the RNL has real demand like fast settlement, honest nodes that have a past history of 100% agreement on legit transactions, and many more that are limited to the human imagination.

Determining the RNL

How will the Evernode Network determine a set of RNLs to use?

Before we continue, we need to understand how the RNL works, there will be only 1 set of RNL in the Evernode Network, this set of RNL is flexible and can be changed every 10 Moments (proposed). The governance (DAO) can't determine who to include in the RNL, only the participating HotPocket nodes can vote on which set of RNL to choose.

The set of RNLs is accessible to everyone including users, customers, node maintainers and developers by using Evernode's Hook, the HotPocket nodes will propose changes to the Hook and the Hook will determine which set of RNL to choose from.

It is possible to add a new category of RNL but it must be proposed and voted on the DAO, holders of the native currency are the only ones that can propose, edit, delete RNLs on the Evernode Network. The HotPocket nodes can only vote which node to include in an already made RNL.

Every participating HotPocket node must propose their set of RNLs to allow for a more decentralized and transparent network, if a node does not participate, there should be a penalty system for the non-participating nodes, I propose it to be a reward cut penalty for the next 10 Moments.

What if a node suddenly goes offline or a new participating node has gone online after the 10 Moments?

If a participating node did not contribute during the RNL vote, no matter the reason, the node will still be getting a cut or a penalty if the node was available before or during the vote (same % cut for every node).

If the node is a new comer, then the node must stay available and contribute to the next RNL vote.

Here's how its supposed to work (example): 5 participating nodes (A,B,C,D,E), the participating nodes will vote on the RNL for Computational Power:

  1. After 10 Moments has passed, the Hook will ask the participating HotPocket validators to compute their RNL proposals and send it to the Hook.
  2. The participating nodes will structure their proposed RNL and send the proposal to the Evernode Hook.
  3. Node A proposes, 1: Node C, 2: Node E, 3: Node D, 4: Node A, 5: Node B
    Node B proposes, 1: Node E, 2: Node C, 3: Node D, 4: Node B, 5: Node A
    Node C proposes, 1: Node C, 2: Node E, 3: Node D, 4: Node A, 5: Node B
    Node D proposes, 1: Node C, 2: Node E, 3: Node D, 4: Node A, 5: Node B
    Node E proposes, 1: Node E, 2: Node C, 3: Node D, 4: Node B, 5: Node A
  4. The Hook will then gather the proposals and compute the changes.

The set of proposed RNL are (not in order): Set A: 1: Node C, 2: Node E, 3: Node D, 4: Node A, 5: Node B Set B: 1: Node E, 2: Node C, 3: Node D, 4: Node B, 5: Node A

Set A has a quorum of 60% Set B has a quorum of 40%

The set which has the most agreements will be the network's RNL, this RNL will be available for users of Evernode to view. In the above situation, Set A is the network's RNL for Computational Power.

The nodes will structure their own lists of RNLs, they will structure this lists based on already made models that uses network metrics, structuring a model to compute a set of RNL allows the network of HotPocket nodes to agree on a general set of RNL to allow for a more healthy and transparent network.

Why should the nodes propose honestly

Let me begin that the native currency's price is reflected by its use case, network's stability and overall healthiness of the Evernode Network.

If nodes choose to vote dishonestly and not reach a quorum of more then 50% (proposed), this can alert the users that the network of HotPocket nodes are somewhat malicious since they are not voting at a general consensus agreement which can tell the users that the network of HotPocket nodes are not playing honestly. If the users were to stop using Evernode since the network is unhealthy and maybe malicious, the price of the native currency will fall which will then lower the amount of customers and profit for the nodes.

If the nodes were to come at a quorum of 50%/50%, the Hook shall then use the past RNL (10 Moments ago) and penalize every participating node.

Not only that, if the HotPocket nodes come to an agreement to publish a dishonest set of RNLs, the users will use the recommended nodes to include in their dApp, if this happens, the users are not getting the best set of nodes which will give the customers awful end value to their dApp. This can ruin Evernode's entire reputation as a decentralized, fast and the best layer 2 smart contract facilitator.

It is in their best interest to come to an agreement of a list of nodes that are best at a certain category to allow for a more better end value for the customers, if a node were to be one of the worse nodes recommended in a RNL, small amounts of customers will come to them as they are other better options in the market, this will allow the HotPocket node to get a sense to upgrade their hardware and up-time or something else that it wants to strive to get more customers to increase revenue.

The beneficiaries of the RNL are (in order):

  1. dApps and the end users: the RNL allows them to utilize the best set of nodes.
  2. High quality nodes in RNLs: the RNL allows more good exposure to their node.
  3. Governance System and holders of the native currency: better value being outputted to dApps which will increase the usage of the Evernode Network.
  4. The contributors and maintainers of HotPocket, Sashimono and the Evernode Hook: They could potentially use the RNL to analyze and debug a network wide error, they could check the RNLs, which category had the most downgrades of nodes? If the Computational Power category had the most nodes downgrading in the RNL, it may be possible that something is wrong with the computational part of the ecosystem (I'm unsure if this is can work but it's a cool idea)
  5. Low quality nodes in RNLs: They would be able to analyze which RNL they are considered as a bad quality node and they could upgrade their server to supply better value to dApps.

The XRP Ledger's UNL is different since nodes have no incentive nor create any value to the end user, there is no incentive, which is the best.

Evernode's RNL has incentive that is not direct, this incentive benefits every party involved in the ecosystem, the incentive is not direct, this means that nobody profits from being involved directly unless they provide great value to network & users benefit by receiving better end value to their dApp depending on what category they choose from.

The users would be able to allow a specific niche of nodes to be apart of their dApp:

  1. dApp that requires huge amounts of computational powers, the dApp can refer the computation power RNL.
  2. dApp that requires 24/7 up-time, the dApp cant refer the up-time RNL.
  3. dApp that requires a huge network of honest nodes, the dApp can refer the honest RNL which is a list of nodes that have a past history of settling and agreeing with legit transactions & smart contract code.

Overall speaking, the RNL not only allows for a more transparent network, it creates a network of honest players that want to thrive for the best to increase their revenue in the ever growing market of dApps in the XRP Ledger, it allows better value to be utilized by the dApps, it creates an ecosystem which can be analyzed to benefit all the dApps and the participating nodes by allowing them to check the network's metrics to check their ranking in a specific category.

I am open to suggestions and comments since one person can't really structure and develop a good proposal, lets discuss here.

wojake commented 2 years ago

After brainstorming when I tried to go to sleep, when a node is penalized (regardless of their reason) during the RNL voting procedure, we have 2 choices to make, either route the penalized funds to the other participating HotPocket nodes that voted on the current RNL OR we could route the funds to a blackholed account which essentially mean the coins are burnt, the benefits are listed and explained below:

  1. Node maintainers that participated in the RNL voting procedure will be able to increase their profits for maintaining a healthy and transparent network, the rewards and income that are generated by the penalized nodes will be routed to the participating HotPocket nodes. The penalized HotPocket node will not only lose profit as their reward has been penalized but they are funding their competitors (other HotPocket nodes).

  2. All penalized rewards are burnt which benefits the native currency holders since the supply is finite and deflationary after 59.61 years when the reward emission program has ended.

In my opinion, the goal for us right now should be to be using the procedure which benefits every participating party regardless of their contribution to the network. For this specific reason, I will be voting on procedure number 1, my reasoning behind this is that this will not only benefit the listed dApps but it will benefit the participating nodes, the participating nodes would be able to increase their income which would allow them to continue maintaining a healthy node on the Evernode Network and it would allow them to finance their node's upgrades on things (e.g: GPU, more memory) that can boost their income to even higher levels, this is where the dApps and the end users benefit from, the ever increasing amount of better options to choose from in the Evernode System (more better nodes, more faster nodes, more honest nodes).

What if every participating node is penalized (e.g: When the nodes did not come to an agreement (50%/50%)?

All the nodes will be penalized which means they'll still get the same amount of rewards and the nodes that did not participate will be penalized 75% of their reward as they did not participate during the last RNL voting procedure, (50% of reward leaves you with 50%, then cut that 50% in half and you'll get 75% penalty)

But as the network did not come to a general agreement, the price and usage of Evernode's native currency will presumably go down in value and overall in demand since the network did not come to an agreement which showcases an unstable & unhealthy network overall.