A complete guide about Resource Credits (RC) and where to find out the transaction value in the moment

in #hive13 days ago

гайд по All about Resource Credits (RC).png

In the Hive ecosystem, there are no transaction fees in the native coin or any other currency. They simply don't exist. Instead, a Resource Credits (RC) system is implemented at the protocol level. This mechanism makes the network resistant to spam transactions and improves the user experience. All your interactions with the blockchain are free in terms of USD cost. Transactions are "paid for" using RC.

Why are RCs a necessary measure?

Every interaction you have with the blockchain involves requests to it, meaning that each time you perform a transaction—whether you're writing an article, giving a like, making an HIVE transfer, leaving a comment, logging into interfaces, taking actions in games, publishing content, etc.—you're essentially interacting with the blockchain.

Theoretically, malicious actors could launch a spam attack on the network (similar to a DDoS attack on centralized servers, where servers can't handle the volume of requests and go offline). By generating an overwhelming number of requests, they could significantly slow down the entire blockchain or, worse, temporarily "take it down." RC is the mechanism that makes the network resilient to such attacks while ensuring that the user experience remains entirely free.

This makes the Hive blockchain an ideal environment for microtransactions, the development of decentralized applications (Dapps), social networks, online games, and much more. You can send any amount of HIVE to wallets without worrying about transaction fees exceeding the value of the transfer. You can play games on the blockchain (involving a large number of transactions) without the fear of going bankrupt. However, if you run out of RC, you may need to "recharge your battery" before making the next transaction.

How does RC work, and how is the battery recharged?

Every new user is assigned a specific amount of RC (Resource Credits) when registering a new account. This amount is fixed. If you’ve just created a new account and have no HIVE coins in your balance or staked, the RC you initially have will be enough to write a short introductory post or leave a few comments.

RC functions like a battery. When you use RC, the "battery" gradually discharges as credits are spent on transactions within the Hive blockchain. However, the battery recharges automatically, and you don’t need to do anything—just wait.

If you completely deplete your RC, it will take approximately 5 days for a full recharge. Each day, the RC battery recharges by about 20%. If your account has no HP (Hive Power) balance, your actions will be limited, and this will become noticeable. When you don’t have enough RC left (most of it has been used for transactions), you’ll encounter an error when trying to perform another transaction.

To regain the ability to interact with the network and spend RC, you have two options:

  1. Simply wait for your battery to recharge—this requires only patience.
  2. Stake some amount of HIVE, temporarily converting it into Hive Power (HP).

For daily social interactions within the Hive blockchain and interfaces (writing articles, participating in comments), having a balance of 10–30 HP is sufficient. This amount is enough for almost all everyday tasks.

More HP in your balance means more available RC. Think of it as increasing the capacity of your RC "battery"—the more Hive Power you hold, the more transactions and interactions you can handle without running out of credits. This allows for greater flexibility and freedom in engaging with the Hive ecosystem, whether you're writing posts, commenting, or playing games.

There are two more ways to increase the amount of RC in your balance, but these will depend not only on you.

Delegation of HP and RC.

The blockchain has the capability to delegate RC and HP. This means that a user with a large amount of RC on their balance (who simply doesn't have time to use them all) can choose to send part or all of their RC to any account in the network at their discretion.

If you have good friends who are already established users in Hive, you can ask them if they could temporarily delegate some of their RC to you until you accumulate a certain amount of HP in your balance. For active users aiming to increase their HP, earning 10-30 HP is not a big challenge—it’s more than achievable in a relatively short period, and within a few weeks, you likely won’t need RC delegation anymore.

HP delegation works on the principle that the blockchain doesn’t care whether the HP in your balance is staked by you or delegated by someone else—RC will be assigned in the same way. If you have good contacts in the network, you can also ask for temporary delegation of a small amount of HP until you accumulate your own. There are also various community programs that offer HP delegation to new users.

Transaction costs on the blockchain in RC

The transaction cost in the network is a dynamic value (not constant). It changes up or down depending on how heavily the network is loaded with the overall number of transactions.

This means that when the total number of transactions in the network increases, the cost of transactions in RC rises. Conversely, when the total number of transactions decreases, the cost in RC decreases as well. This is how the RC principle works.

If malicious actors start increasing the number of spam transactions in the network at an exponential rate, their RC will quickly be depleted. In order to continue the spam attack, they would need to invest finances into the network, thus making the network stronger. This mechanism makes spam attacks a pointless waste of time. The game isn’t worth the candles.

All transactions have a certain cost, but as mentioned earlier, with 10-30 HP in your balance, you won’t need to worry about RC (for social interactions). With this amount of RC, you can perform any transactions except for a few. One example of such a transaction is creating a new account for RC. As of the time this article was written, the cost of this transaction in HP equivalent is about 6695 HP, which is a significant amount for many, but this is done to prevent mass creation of spam accounts. If you want to create a new account, you need to pay (around 3 HIVE) or invest in HP. There is also the possibility of creating free accounts in the ecosystem. https://signup.hive.io/

As mentioned earlier, transaction costs constantly change depending on the network load. If you're interested in seeing the current costs, you can follow the link below and click the "Resource Credits" button. There, you'll find a table showing the transaction costs in RC and the required equivalent balance in HP. This is how it looks at the time of writing the article.
https://beacon.peakd.com/

Screenshot_13.jpg

Screenshot_14.jpg

PS... When I was trying to figure all of this out, it took me a lot of time, particularly because I was curious about how to create a new account for RC. I tried searching within peakd.com, I tried Google search, but none of it helped. I wrote to the community’s Telegram channel and received a reply with a link to https://beacon.peakd.com from @arcange, for which I am very grateful to him. Perhaps someone else will also want to understand how this works, and this article was written for that purpose.

PSPS... During my search for information outside the blockchain, I came across one phrase from @gtg that I liked:

ask questions on chain, then people will answer on chain and the knowledge will stay on chain to be easier to find in future :-)

If you have anything to add — leave a comment.
If you have any questions — leave a comment.
If you have suggestions or wishes — leave a comment.
Thank you for your attention, feel free to come back.

Sort:  

Excellent post and thank you for the mention.

Here is my feedback:

Every interaction you have with the blockchain involves requests to it ...

It is important to distinguish between requests (reading data from the blockchain) and transactions (storing new data on the blockchain). The first one is completely free and does not require RC, only the second one requires RC.

By generating an overwhelming number of requests, they could significantly slow down the entire blockchain or, worse, temporarily "take it down."

Given what is defined above, this is not possible. Requests are addressed to public API nodes, which could have difficulty responding to an overload, but it would be necessary to attack all API nodes simultaneously to block access (meaning reading) from the blockchain.

Again, this is only valid for those who rely on a public API node. Nothing prevents you from running private nodes.

Therefore, to take down the blockchain you need to take down the internet.

RC is the mechanism that makes the network resilient to such attacks

This is not correct. RC is what gives a cost to the recording of transactions, even if it is not (directly) financial.

RC prevents an actor (using one or multiple accounts) from spamming the blockchain for free, filling blocks with transactions to prevent others from recording their transactions. In no case will this slow down the blockchain, which will continue to function normally but will delay excess transactions. But from a user experience perspective, there will indeed be a feeling of slowdown.

Thank you very much for the feedback. You have a different level of knowledge; I am still learning. The information in your comment is very valuable.

I just want to reflect on a thought experiment. What if we imagine that RC doesn't exist—what, then, would prevent a malicious actor from using software to create millions, billions, or even trillions of transactions (what could possibly limit that number)? In this case, the transaction queue would keep growing, and the waiting time for regular user transactions would also increase. If we imagine this playing out, with transaction processing times reaching, say, one week or even one month, wouldn't that essentially mean collapse?

Transactions have a default expiration timeout of 60 seconds, they won't stay in the queue forever.
Before RC was implemented, this was the only protection mechanism. Now we have an additional one :)

Oh, I didn’t know about the 60-second waiting time, but you wrote:

default expiration timeout of 60 seconds.

Can the transaction confirmation timeout be changed, or is the rule fixed at 60 seconds?

AFAIR, 60s is the maximum value and it can be shortened. But take this answer with a grain of salt. I would have to check the code to be sure.
The next hardfork will allow a longer timeout to make multisig transactions easier.

Oh, I didn't know someone made such convenient page for average RC costs. I'd normally just look directly at RC stats in log or call rc_api.get_rc_stats. Then again chain is currently so much underused that RC costs are trivial, so it doesn't even make sense to look at them :o)

Every new user is assigned a specific amount of RC (Resource Credits) when registering a new account. This amount is fixed.

It is not changing for account that was created, but it changes in time for different accounts - generally account created later will have slightly smaller RC adjustment value compared to older accounts. It is the value derived from account creation fee by converting it to VESTS at a price from the moment of account creation. Since that price changes, so does the amount of RC. VESTS are gradually getting more expensive (that's how stake holders are getting part of inflation) so the same fee gets you less VESTS later, which means less RC adjustment. Except accounts created before RC was introduced (Hardfork 20) have their RC adjustment fixed with value of 1 HP from the moment of that hardfork, regardless of how much fee went to their creation. Note, it does not matter if the account was created with "free account token" - for the purpose of RC adjustment it counts as full fee from the moment of account creation. Also note that the fee is decided by witnesses, so if they vote to set it to f.e. 30 HIVE instead of 3 like it is today, then accounts created with bigger fee (of token when bigger fee is active) will receive proportionally bigger RC adjustment.

For more technical description of RC I'm going to shamelessly link my old article and also another one about RC stats :o)

Thanks for the feedback. When I was trying to figure out this topic, I spent a few hours trying to find something similar to what you wrote, but I couldn't, so I had to make do with what information I could find.

Thanks to your comment, I now know where I can find a detailed technical description.

A vary nice post or I can say it's guide about about Resource Credits (RC) that every hiver should read to have a better understanding of this mechanism of hive blockchain. RC is important because this is what we use with each transaction and low RC restricts us to perform any action on chain. I have re-blogged this article for more attention and appreciate the work you have done.

Thank you very much, I’m grateful to you for the repost and feedback; it’s very much appreciated.

Congratulations @detectblock! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 500 upvotes.
Your next target is to reach 600 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

Our Hive Power Delegations to the November PUM Winners

Good breakdown on how RC operates, always need reminder about the engine room, workings beneath the front end.

!BEER

Thank you, that's nice to hear. When I search for information on a topic, I also learn a lot of new and useful things.


Hey @detectblock, here is a little bit of BEER from @joanstewart for you. Enjoy it!

Do you want to win SOME BEER together with your friends and draw the BEERKING.