Announcing RC Angel | RC Pools But Better.

in HiveDevs2 years ago

image.png

Preface

Hey everyone, first of all... that was a ride! HF26 is right around the corner, with lots of anticipated new features. But one thing that made me quite sad was the deprecation of RC Pools in favour of direct RC delegations, while this is much more simpler, potential ways to utilize RC pools were left with very hard-to-handle RC delegations. So I wrote @rc-angel to make it a lot easier!

First of all, I would like to thank @howo, for the initial idea of RC pools and @ausbitbank for providing data that makes RC-Angel work.

RC Angel will be on "Early Access" or "Alpha" period until at least the hardfork date. Since RC delegations are gated behind the hardfork. However, this does not mean they do not work. You can test them on mirrornet right now. (courtesy of @gtg)

During this period, I want app devs especially to feel free to contact me so that we can work together on implementing RC-Angel into their systems. You can contact me on Telegram, Discord or other platforms -- whichever you prefer.

I'll dump the documentation I wrote for RC-Angel below, but feel free to ask me any questions that you have.

What is RC-Angel?

RC-Angel serves as the central hub for RC delegations, previously with the Hardfork 26, one of the most anticipated features was the existence of "RC" Pools. RC Pools were unfortunately scrapped due to performance constraints. RC-Angel serves as a replacement for RC Pools, and is a more efficient way to delegate RC to other accounts than direct delegations.

For the uninitiated, RC is basically your mana as you may have seen in video games, on the blockchain. Depending on your Hive Power stake, you get RC from the blockchain. RC is the "transaction fee" you pay for each transaction you perform. However, as opposed to other blockchains like Bitcoin and Ethereum, this fee is not monetary and will regenerate over time (hence, mana) with the hardfork 26, the way RC works and is calculated for transactions is being changed, which makes all transactions more expensive. RC-Angel aims to help minnows (in other words, newcomers) to Hive blockchain by giving them the initial push to earn and power up their first HIVE.

How does RC-Angel work?

RC-Angel works by requesting two things from the "volunteer" namely their posting authorization, since RC delegations require posting authority and the maxRc that the account owner (or volunteer) is willing to spend on delegations. Afterwards, the volunteer is added to the "pool" (i.e. the database of RC-Angel) and is ready to send delegations. RC-Angel, in itself, is actually just a backend API. Where people can access the API with Auth Keys (API Keys) -- this API key allows the general use of RC-Angel. So essentially, RC-Angel is a backend API that allows people to delegate RC to other accounts.

Whenever a request is made to the API, the API will check the RC costs of certain transactions (comment, vote, transfer, custom_json) and dynamically calculate X RC required for Y of these said transactions. The API will then check the RC Pool, find the best suitable volunteer for the delegation and delegate the necessary RC to the user.

RC-Angel has two options at runtime, it can either calculate a dynamic RC or delegate a static RC. These delegations last, for the time being, 30 days from the delegation.

How do I use RC-Angel?

If you are an app developer, frontend, or community, you can request an auth key to integrate RC-Angel into your service.

Example Use Cases:

You have a Hive Onboarding service where you create brand new accounts, you can implement RC-Angel to delegate RC to the accounts you onboard automatically.
You are operating a game on Hive and one of your users are running out of RC and is unable to transact, you can give them some extra RC to help them out.

What RC-Angel is NOT!

RC-Angel is not a service that people can use to get around having more RC. In other words, RC-Angel is not a service that anyone can use to get some extra RC for themselves, it is a service that only delegates a small amount of RC to help getting around with day-to-day transactions on Hive. If anyone is in need for extra RC for themselves, I heavily recommend powering up Hive Power instead.

Misuse of RC-Angel by both the app developers as well as the users may result in auth keys being revoked and/or abusers being permanently blacklisted from RC-Angel.

And that's it for general information, down below, I wrote the API documentation for developers :)

API

API Keys

All endpoints require an authentication key, without an authentication key, you cannot use the API. You can request an API key by contacting me on Discord.

Notes

All endpoints require a Content-Type of application/json.

All endpoints return a JSON object with a status field, which will be either success or error.

All endpoints return an HTTP code of 200 if the request was successful, 500 if the request was unsuccessful due to issues on RC-Angel's side, 503 if there are no available accounts for delegation or 418 if the request was unsuccessful due misconfigured parameters within the request itself.

All endpoints require an authentication key sent in the header of the request with the key "auth" and value being the API key.

Endpoints

/delegate

Description

This endpoint is used to delegate RC to an account.

Parameters

user: string (required) - The account that you want to delegate RC to.

Example Request

curl --location --request POST 'https://rc-angel.deathwing.me/delegate' \
--header 'Auth: APIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{"user": "deathwing"}'

Example Response

HTTP Code: 200

{ 
    "status": "success",
    "message": "Successfully delegated RC to deathwing"
}

/undelegate

Description

This endpoint is used to undelegate RC from an account.

Parameters

user: string (required) - The account that you want to undelegate RC from.

Example Request

curl --location --request POST 'https://rc-angel.deathwing.me/undelegate' \
--header 'Auth: APIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{"user": "deathwing"}'

Example Response

HTTP Code: 200

{
    "status": "success",
    "message": "Successfully undelegated RC from deathwing"
}

/banuser

Description

This endpoint is used to ban a user from using RC-Angel.

Parameters

user: string (required) - The account that you want to ban from using RC-Angel.
reason: string (required) - The reason why you are banning the user.

Example Request

curl --location --request POST 'https://rc-angel.deathwing.me/banuser' \
--header 'Auth: APIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{"user": "deathwing", "reason": "Abusing delegated RC by spamming posts"}'

Example Response

HTTP Code: 200

{
    "status": "success",
    "message": "Banned deathwing from using RC-Angel."
}
```i
Sort:  


~~~ embed:1578127967070441472 twitter metadata:WWFuUGF0cmlja198fGh0dHBzOi8vdHdpdHRlci5jb20vWWFuUGF0cmlja18vc3RhdHVzLzE1NzgxMjc5NjcwNzA0NDE0NzJ8 ~~~

~~~ embed:1578285748926783490 twitter metadata:Yml0Y29pbnNfZ2V0fHxodHRwczovL3R3aXR0ZXIuY29tL2JpdGNvaW5zX2dldC9zdGF0dXMvMTU3ODI4NTc0ODkyNjc4MzQ5MHw= ~~~

~~~ embed:1578765617733468160 twitter metadata:cXVhc2Vfcmljb3x8aHR0cHM6Ly90d2l0dGVyLmNvbS9xdWFzZV9yaWNvL3N0YXR1cy8xNTc4NzY1NjE3NzMzNDY4MTYwfA== ~~~
The rewards earned on this comment will go directly to the people( @arc7icwolf, @shiftrox, @taskmaster4450le, @wilsonthe, @seckorama, @michupa ) sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

I want to talk to you about the method for calculating RC costs of operations.

I think I will have a reliable way of recording this for custom json.

Feel free to reach out anytime.

This is great news. Many beginners on Hive can't even reply to comments due to lack of RC. It seems that thanks to you, this problem will be eliminated or minimized. I had a similar problem when I first started Hive, thanks to @damla who delegated me some HP. It is pleasing to see such developments since then.

What an awesome project! For new users the lack of RC can be frustrating (to say the least)... but thanks to project like this the overall experience will be way more user-friendly and it will surely help keeping newcomers on #hive

Great work!

🙂

I am sure @tobetada would be interested in this :)

So glad to see another project coming up. Thanks for bringing this up!

RC-Angel serves as the central hub for RC delegations, previously with the Hardfork 26, one of the most anticipated features was the existence of "RC" Pools

If I may ask what is Hardfork 26, how does it functions

Hardfork 26 is the next version of Hive, it's an update that'll make the chain better and more efficient.

@themarkymark explained the features in a simpler way on his post.

Some of the improvements include:
One Block Irreversibility
Increasing HBD haircut ratio
Allow more than one vote per block
Remove vote change penalty
Support for block log compression
Peer to peer performance improvements
Resource credit overhaul
Resource credit delegation
General improvements to improve operation handling

wow, that was quick :))

this will be very beneficial for all newcomers! Thanks for making this happen

@tipu curate

Congratulations @deathwing! Your post has been a top performer on the Hive blockchain and you have been rewarded with the following badge:

Post with the highest payout of the day.

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 the last post from @hivebuzz:

Our Hive Power Delegations to the September PUM Winners
Feedback from the October 1st Hive Power Up Day
Hive Power Up Month Challenge 2022-09 - Winners List

It's exciting to see the many improvements of the ecosystem. Thanks for this.

This is a really good development. In the first days when I started writing on the Hive platform, I did not have enough hive power to correct my writing. So I was very upset. I think that the RC deficiency we are talking about will disappear in the valuable information you have given. I believe that these developments are a big step for the growth and development of Hive and the participation of new friends. Thank you very much for the information.

I think what would be nice is if newcomers on Hive (who predominantly use Hive for blogging) could be granted an automatic RC delegation of an equivalent 50 HP or so without them having to request this as I would imagine this to be a hurdle to figure this out. Maybe there could be a threshold that when they power up more Hive than X amount it would again undelegate. That would probably do wonders for retention rate

I think maybe it would be good to trigger it at a specific time such as time of first transaction like comments or posts that way the RC's aren't wasted handing out to every single account. Perhaps as well if someone tries to transact but has insufficient resources it could trigger too? Spit balling here :D

A helpful constraint could also be accounts <60 days old too, that way they've had time to familiarize with hive and weed out those who just sell 100% of their rewards.

makes sense

Interesting redistribution system!

Thanks @deathwing for this solution at least we won't face such no more RC has been some new hivians problem because even as beautiful and lovely your content is they want to like it doesn't work but thanks to you something is been done.

Congratulations @deathwing! Your post has been a top performer on the Hive blockchain and you have been rewarded with the following badge:

Post with the highest payout of the week.

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 the last post from @hivebuzz:

Our Hive Power Delegations to the September PUM Winners

This sounds awesome! I have some questions:
Are you planning to make an interface for directly delegating RC to other accounts? Or is there such interface and I don't know about it? I would love to help those users I onboard on my own and check their accounts and undelegate when they reached enough HP to be able to transact on their own. I probably have way more RC than I ever use, even with the tx "cost" being much higher, but I wouldn't know how much of my RC I can delegate without compromoising my own abilities to us the chain. I am playing with a ton of dapps and sending around a bunch of tokens. How much RC do I need? If there is a tool an enduser like me can use to find out all this feel free to point me there :D
I am voting your witness since forever and just realized I had not been following, that has changed now.
Thanks for helping the n00b, have a great day!

Are you planning to make an interface for directly delegating RC to other accounts? Or is there such interface and I don't know about it?

No. I am not planning such feature, and I don't think there is one yet.

How much RC do I need?

There is no fixed amount, it'll vary depending on the usage of the transaction type on the blockchain. It's hard to say "X RC is enough for you." because not everyone uses RC the same.

If there is a tool an enduser like me can use to find out all this feel free to point me there :D

Would be awesome to have, but none at the moment. :(

I am voting your witness since forever and just realized I had not been following, that has changed now.

Thanks a lot, have a great day as well!

Thank you for your answers. I will dig into it more.