Property Grouping
@Akira-Taniguchi is already working on this.
Since Dec 11, 2020.
Assessment
This issue has not been assessed yet.
Description
This proposal is a new implementation proposal of DIP5 (#5) for efficient handling of multiple Properties.
"Property Grouping" feature allows creators to combine multiple properties they have tokenized into one or more groups. This behavior is similar to the relationship between "folders" and "files" in a file system.
Directory Tokens
An ERC20 contract creating to group multiple Property Tokens (a.k.a. Creator Tokens). The total supply is fixed at 10,000,000. There are no restrictions on the transfer destination.
Directory Tokens holders can earn creator rewards for all grouped Property Tokens.
Once Directory Tokens are generated, no one can self-destruct them.
Technical requirements
I propose the main technical requirements and interfaces for Directory Tokens as follows.
Also, Directory Tokens should be implemented as an upgradeable contract. I think it is desirable to implement it as an external contract rather than incorporating it into the Dev Protocol core. However, Dev Kit and GraphQL should support Property Grouping.
Association
Creators can associate up to 9 Property Tokens with Directory Tokens (this limit works to keep low gas fees). The operation is required the Directory holder and the Property holder to be the same.
The association between Directory Tokens and Property Tokens is done by sending Property Tokens to Directory Tokens (Contract).
The interface is:
function associate(address _property, uint _amount) external;
Disassociation
Note: This feature should not be implemented initially. It should be implemented after sufficient security verification.
Transfer the Creator Tokens deposited in a Directory Token to another address. This operation requires agreement by all Directory Tokens holders. This is because disassociation means a reduction in rewards for Directory Tokens holders.
The interface is:
function disassociate(address _recipient, address _property, uint _amount) external;
Reward withdrawal
Withdraw rewards for associated Property Tokens. With the total reward amount of all associated Property Tokens as the maximum value, the reward is withdrawn according to the share ratio of Directory Tokens held by the account.
Calling Withdraw.withdraw each grouped Properties means running ERC20.mint and Lockup.update each grouped Properties, which means higher gas fees. Should add the bulkWithdraw function to the Withdraw contract.
The interface is:
function withdraw(address _directory) external;
Transfer Hook
A hook that updates the withdrawable rewards for the source and destination when transferring Directory Tokens. Withdraw.beforeBalanceChange is the reference model.
The interface is:
function beforeBalanceChange(address _directory, address _from, address _to) external;
- Dominant language
- No language data
- Stars
- 11
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dev-protocol/DIPs
-
priority - high tokenomics
Difficulty 5/5 Over a week Newbie friendliness 20/100
dev-protocol/DIPs#76 · 4 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
dev-protocol/DIPs#61 · 2 reactions ·
-
layers
Difficulty 5/5 Over a week Newbie friendliness 20/100
dev-protocol/DIPs#52 · 2 comments · 4 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
dev-protocol/DIPs#50 · 28 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
dev-protocol/DIPs#48 · 13 comments ·