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