district0x / name-bazaar

A peer-to-peer marketplace for the exchange of names registered via the Ethereum Name Service
Eclipse Public License 1.0
86 stars 23 forks source link

Implement fees #189

Closed madvas closed 3 years ago

madvas commented 3 years ago

We're gonna add simple fee structure to offering contracts. When Ether value is transferred to seller, percentage fee is transferred to emergencyMultisig address.

OfferingRegistry will be storing fee size in following format: 0 = 0% 10 = 0.001% 100 = 0.01% 1000 = 0.1% 10000 = 1% Default value will be 0.

Only emergencyMultisig address can change fee size.

For BuyNowOffering contracts, fee transfer will happen in buy function. For AuctionOffering, fee transfer will happen in finalize function.

When user is defining price for his offering, this price is including fees. That means if user sets price to 1 ETH and fee size is 0.1%, user will receive 0.999 ETH and emergencyMultisig will receive 0.001 ETH, after the name is bought.