Skip to content

Latest commit

 

History

History
115 lines (99 loc) · 3.88 KB

fip-0045.md

File metadata and controls

115 lines (99 loc) · 3.88 KB
fip title status type author created updated
45
Set price of new FIO Domain registrations based on length
Draft
Functionality
Pawel Mastalerz <[email protected]>
2022-11-29
2023-02-16

Abstract

This FIP proposes a FIO Domain fee structure, which would increase the cost to register new domains shorter than 8 characters.

Modified actions

Contract Action Endpoint Description
fio.address regdomain /register_fio_domain Registers FIO Domain fee multiplier is implemented.
fio.address regdomadd /register_fio_domain_address Registers FIO Domain and FIO Address fee multiplier is implemented.

Modified getters

End point Description
get_fee Modified to include domain and returned multiplied fee.

Motivation

Currently all FIO Domains cost the same amount of FIO Tokens to register. The fees are set by the Block Producers. However, an argument can be made that shorter domains are worth more than longer domains and therefore the on-chain cost should be higher. This would also discourage domain squatting.

Specification

Proposed fee structure

This FIP proposes a FIO Domain fee structure, which would vary the cost of registrations of new FIO Domains by introducing a fee multiplier for domains shorter than 8 characters. The multiplier will apply to register_fio_domain and register_fio_domain_address fees, if the corresponding domain is less than 8 characters.

The modified fee would not apply to renewal of existing domains.

FIO Domain length Fee multiplier Example cost if fee $40
8+ characters 1x $40
7 characters 2x $80
6 characters 4x $160
5 characters 6x $240
4 characters 8x $320
3 characters 10x $400
2 characters 20x $800
1 character 30x $1,200

Example

  • register_fio_domain fee is set by BPs at 1,000 FIO
  • User attempts to register a 'test' domain
  • The fee would be: 8 x 1,000 FIO = 8,000 FIO

Modified actions

Register FIO Domain

Registers FIO Domain fee multiplier is implemented.

Contract: fio.address

Action: regdomain

End point: /register_fio_domain

New fee: The new fee structure as defined above is implemented

Request body

No change

Exception handling

No change

Response body

No change

Register FIO Domain and Address

Registers FIO Domain and FIO Address fee multiplier is implemented.

Contract: fio.address

Action: regdomadd

End point: /register_fio_domain_address

New fee: The new fee structure as defined above is implemented

Request body

No change

Exception handling

No change

Response body

No change

Modified getters

Get fee

Modified to include domain and returned multiplied fee.

End point: /get_fee

Request body

Parameter Required Format Definition
end_point Yes String Name of API call end point, e.g. add_pub_address.
fio_address No FIO Address FIO Address to consider for bundled transactions.
fio_domain No String FIO Domain to register, if end point is register_fio_domain or register_fio_domain_address
Example
{
  "end_point": "add_pub_address",
  "fio_address": "purse@alice",
  "fio_domain": "bob"
}

Processing

  • When fetching the fee for register_fio_domain or register_fio_domain_address, the fee returned is multiplied by the corresponding multiplier for the supplied domain as defined above. If no domain is supplied, multiplier is not applied.

Exception handling

No change

Response

No change

Rationale

A fee multiplier is an easy way to vary prices of FIO Domains without adding new fees.

Implementation

TBD

Backwards Compatibility

None. Existing action request and response bodies are unchanged. The new /get_fee parameter is optional and does not need to be supplied.

Future considerations

None

Discussion link

https://fioprotocol.atlassian.net/wiki/spaces/DAO/pages/572915744