district0x / district-registry

A community-curated registry of marketplaces on the district0x Network.
Eclipse Public License 1.0
11 stars 9 forks source link

Replace Meme related contracts with District #1

Closed madvas closed 6 years ago

madvas commented 6 years ago

As pasted from MemeFactory, currently we have 2 types of registry entries: Meme - for meme entries ParamChange - for TCR Parameter changes

Meme should be replaced with Distrct. District contract should contain bytes public infoHash state variable for storing IPFS hash of file that contains all data from form fields. Only original creator can edit this hash later on.

District contract should also contain all logic for staking & unstaking. We may want to stick with EIP 900 interface for staking smart-contract (without supporting optional history there). At the same time, district contract should implement ERC20 interface, because it'll serve as an address for governance token.

So to shortly sum it up:

  1. A John stakes into district using stake method of a district contract to stake DNT.
  2. Now, when calling balanceOf, passing John's address, it returns basically same number as he staked in. Let's forget bonding curve for now, we'll get back to it later.
  3. John calls unstake method for the contract, it returns DNT back to him.
  4. balaceOf shows lowered amount of governance token for him.

MintableToken implementation might be worth checking for how to properly mint new tokens. Overall, use Zepellin's token contracts for token logic.