fip | title | status | type | author | created | updated |
---|---|---|---|---|---|---|
7 |
Provide ability to burn FIO Address |
Final |
Functionality |
Casey Gardiner <[email protected]>, Pawel Mastalerz <[email protected]> |
2020-04-22 |
2021-06-15 |
This FIP implements the ability for owners to burn their FIO Addresses.
Proposed new actions:
Action | Endpoint | Description |
---|---|---|
burnaddress | burn_fio_address | Burns FIO Address. |
Presently the FIO Chain burns (removes from state) FIO Addresses after grace period following their expiration dates.
An owner should be able to burn their FIO Address ahead of expiration, if they no longer wish to use it and want to purge all associated data. There are many reasons why someone would want to burn their FIO Address:
- Business/Personal requirements
- Cost effectiveness
- Spam prevention
Burning FIO Address acts the same way as /burn_expired, meaning it removes the FIO Address and associated content except that action is applied only to provided address and can occur ahead of expiration.
When an address is burned it becomes immediately available for others to register it.
No refund of registration/renewal fee is offered for burning a FIO Address ahead of its expiration date.
Burns FIO Address.
Parameter | Required | Format | Definition |
---|---|---|---|
fio_address | Yes | Valid FIO Address | FIO Address to burn. |
max_fee | Yes | Positive Int | Maximum amount of SUFs the user is willing to pay for fee. Should be preceded by /get_fee for correct value. |
tpid | Yes | FIO Address | FIO Address of the entity which generates this transaction. TPID rewards will be paid to this address. Set to empty if not known. |
actor | Yes | 12 character string | Valid actor of signer. |
{
"fio_address": "purse@alice",
"max_fee": 400000000,
"tpid": "rewards@wallet",
"actor": "aftyershcu22"
}
- Request is validated per Exception handling.
- Require auth of the actor
- Verify transaction does not exceed max transaction size.
- Verify that the fee for this does not exceed the max fee specified.
- FIO Address is removed:
- Removes the fio_address from the fionames table.
- Removes the TPID entry inside the tpid index table.
- All entries associated with this address in the keynames table will be removed.
- The account on the fio chain, and the binding for this account in the eosionames table will remain.
- Also remaining will be all requests for funds that have this address as a payee or payer will remain in the fioreqctxts index table
- Fee is charged.
- Return status json containing status (OK), and fee charged.
Error condition | Trigger | Type | fields:name | fields:value | Error message |
---|---|---|---|---|---|
Invalid FIO Address format | FIO Address format is not valid | 400 | "fio_address" | Value sent in, e.g. "purse@alice" | "Invalid FIO Address" |
Invalid fee value | max_fee format is not valid | 400 | "max_fee" | Value sent in, e.g. "-100" | "Invalid fee value" |
Insufficient funds to cover fee | Account does not have enough funds to cover fee | 400 | "max_fee" | Value sent in, e.g. "400000000" | "Insufficient funds to cover fee" |
Fee exceeds maximum | Actual fee is greater than supplied max_fee | 400 | max_fee" | Value sent in, e.g. "400000000" | "Fee exceeds supplied maximum" |
Invalid TPID | tpid format is not valid | 400 | "tpid" | Value sent in, e.g. "notvalidfioaddress" | "TPID must be empty or valid FIO address" |
FIO Address not registered | FIO Address is not registered | 400 | "fio_address" | Value sent in, e.g. "purse@alice" | "FIO Address not registered" |
FIO Address is active producer | Supplied FIO Address is registered as producer and is_active = 1 | 400 | "fio_address" | Value sent in, e.g. "purse@alice" | "FIO Address is active producer. Unregister first." |
FIO Address is proxy | Supplied FIO Address is registered as proxy | 400 | "fio_address" | Value sent in, e.g. "purse@alice" | "FIO Address is proxy. Unregister first." |
Not owner of FIO Address | The signer does not own the address | 403 | Type: invalid_signature |
Parameter | Format | Definition |
---|---|---|
status | String | OK |
fee_collected | String | fee amount collected SUFs |
{
"status": "OK",
"fee_collected": "400000000"
}
Since burn addresses already exists in the protocol, this implementation will mirror what's alreday developed.
Ability to accelerate the expiration of domains was considered but abandoned as it would create a potential conflict with owners of FIO Addresses on that domain, which may want to renew the domain to keep their address active. See discusion.
RAM increase is not required as this action only removes from state.
- Removed ability to accelerate expiration of domains
- Added ability to use bundled transaction
- Removed RAM increase.
The following files will be affected during this implementation:
- fio.address.cpp
- chain_plugin.cpp/.hpp
- chain_api_plugin.cpp
- httpc.hpp ( clio )
The fio.address smart contact, Clio, and the chain plugin are all required to be updated. The proposer will update to current fio version with the new clio and chain_plugin updates. They will then propose the msig for the fio.address contact to the active Block Producers. It is suggested that the top 21 Block Producers vote for the fees of the two new endpoints before the execution of the msig.
The contract action burnaddress was released in fio.contracts v2.2.0.
The burn_fio_address API endpoint released in fio v3.0.0.
This is a new action and there is no impact on existing functionality.
Revisit the ability to renew FIO Domain and consider adding ability to transfer ownership at some point after the domain expired and before it is burned.