You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This BSIP describes an implementation of Resource Exchange operations.
Motivation
Now many people have invested in many asset names and account names. The BSIP provides these people with the possibility of on-chain exchange.
Rational
Although, it can currently be achieved by combining multiple operations such as proposal transfer. However, since the proposal needs to be approved by both parties, the experience is not very friendly. Therefore, the design here is to provide a merchant/customer purchase model on the chain.
Specifications
Describe implementation details.
New object id
GRAPHENE_DEFINE_IDS(resource_exchange)
New global parameter
Add a new global parameter resource_exchange_fee_percent which can be updated by the committee only after the protocol upgrade. Initial value of that parameter is 0%. Valid range of that parameter is [0%, 20%].
resource_exchange_object
class resource_exchange_object : public graphene::db::abstract_object<resource_exchange_object>
{
public:
static const uint8_t space_id = protocol_ids;
static const uint8_t type_id = resource_exchange_object_type;
account_id_type merchant_id;
object_id_type res_id; ///< account id or asset id
asset price; ///< desired price
}
Just like domain name trading, users on the chain could be able to list anything they own for sale, including account ownership, asset ownership, vesting balances, debt positions and etc. The chain is able to settle the deals automatically.
On the other hand, for account ownership trading, it could be a challenge for asset owners who enabled whitelisting and etc.
Abstract
This BSIP describes an implementation of Resource Exchange operations.
Motivation
Now many people have invested in many asset names and account names. The BSIP provides these people with the possibility of on-chain exchange.
Rational
Although, it can currently be achieved by combining multiple operations such as proposal transfer. However, since the proposal needs to be approved by both parties, the experience is not very friendly. Therefore, the design here is to provide a merchant/customer purchase model on the chain.
Specifications
Describe implementation details.
New object id
New global parameter
Add a new global parameter
resource_exchange_fee_percent
which can be updated by the committee only after the protocol upgrade. Initial value of that parameter is 0%. Valid range of that parameter is[0%, 20%]
.resource_exchange_object
resx_create_operation
resx_take_operation
resx_cancel_operation
APIs
TODO:
Discussion
if
resource_exchange_fee_percent
is set too high, users may consider offline transactions. Should consider setting a reasonable value.Copyright
This document is placed in the public domain.
See Also
The text was updated successfully, but these errors were encountered: