ConsenSysMesh / ConsenSysMesh/web3studio-bootleg

Implement Shared Royalty Token contracts

Open
#89 0 comments 0 reactions 0 assignees View on GitHub
Epic
Dominant language
JavaScript
Stars
92
Forks
25
PR merge metrics
No merged PRs in 30d

Description

## Overview

As a developer building a PIB token, I'd like a reference implementation, interfaces, and abstract classes so that I can quickly iterate on my dApp PIB token implementation.

### Reference
- [Open Zeppelin 721](https://github.com/OpenZeppelin/openzeppelin-solidity/tree/master/contracts/token/ERC721)
- [Original designs](https://app.mural.co/t/consensys3989/m/consensys3989/1549562147271/3679eca807e7244ac40c4445a1eff72255219c01) in mural.

### Questions
- HMW scale a Shared Royalty Token and allow for virtually unlimited franchisors?
- Gas prices on transfer will likely increase drastically on `transfer` function if math is in there preventing sale after a certain number
- How do we handle withdraw?
- Is there an ERC standard for handling this allowing for rounding error?
- Likely there is something to do with the first question here. 🤷‍♂️
- Is 721 the correct abstraction?

### Assumptions

### Acceptance

- Shared Royalty Token
- A Shared Royalty Token interface `ISharedRoyaltyToken`
- An abstract contract SRT `AbstractSharedRoyaltyToken`.
- Contains common SRT implmentations
- `SharedRoyaltyTokenEnumerable` enumerable
- Interface `ISharedRoyaltyTokenEnumerable`
- Implemented `SharedRoyaltyTokenEnumerable` for extending
- `PIBBookendToken`
- Implements abstract class and `transferPayoutByFranchisorIndex` to match bookend model

## Story Draft

- [x] Create withdrawal SharedRoyaltyToken interface (likely just find an existing ERC or other art)
- [x] Implement `ISharedRoyaltyToken` (pib interface)
- [x] Implement `ISharedRoyaltyTokenEnumerable` (Enumerable interface)
- [x] Implement `AbstractSharedRoyaltyToken`
- [ ] Implement `SharedRoyaltyTokenEnumerable`
- [x] Implement `SharedRoyaltyBookendToken`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.