-
Notifications
You must be signed in to change notification settings - Fork 13
XRC Dividend Yielding Tokens XIP #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CoinClubQuincy
wants to merge
8
commits into
XDC-Community:main
Choose a base branch
from
CoinClubQuincy:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
28768c2
Create xip-shards.md
CoinClubQuincy a33f2fe
Update xip-shards.md
CoinClubQuincy 188018d
Update xip-shards.md
CoinClubQuincy 7d18ab6
Update xip-shards.md
CoinClubQuincy 7978a8f
Update xip-shards.md
CoinClubQuincy 588b0d3
Update xip-shards.md
CoinClubQuincy ca40979
SHARDS => SHARES
CoinClubQuincy 2bacc66
SHARDS => SHARES
CoinClubQuincy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| <<<<<<< Updated upstream | ||
| --- | ||
| xip: 2 | ||
| title: SHARES Dividend Yielding Token Standard | ||
| status: Draft | ||
| type: Standard Track | ||
| category: XRC | ||
| author: R. Quincy Jones | Github:@CoinClubQuincy | quincy@xdc.org | ||
| created: 2022-9-25 | ||
| --- | ||
|
|
||
| ## What is a SHARE? | ||
|
|
||
| The SHARES are built for Apps on the XDC Network that would like an autonomous means of distribution of Fees paid to the contract in the form of dividends to the token holders LIVE as the DApp gains usage.`. | ||
| ======= | ||
| --- | ||
| **xip:** <to be assigned> | ||
| **title:** SHARES - Dividend Yielding Token Standard | ||
| **description:** SHARES are a NFT token standard that provides a means for fees paid to the contract to become split among the token holders | ||
| **author:** R. Quincy Jones | Github:@CoinClubQuincy | quincy@xdc.org | ||
| **discussions-to:** <URL> | ||
| **status:** Draft | ||
| **type:** Standards Track | ||
| **category:** XRC | ||
| **created:** (2022-9-25) | ||
| **requires :** none | ||
| --- | ||
|
|
||
| The standard provide here is built for Apps on the XDC Network that would like an autonomous means of distribution of Fees paid to the contract in the form of dividends to the token holders LIVE as the DApp gains usage.`. | ||
| >>>>>>> Stashed changes | ||
|
|
||
| ## Abstract | ||
| The SHARE token is a decentralized share of ownership over a DApp and the profits generated by the DApp. The SHARE tokens are NFTs that can also be used within the DApp for governance and control over functions in the DApp. | ||
| SHARES act as a new means for Apps,Startups,and Businesses to have an automated means to distribute XDC generated by their applications on the XDC Network. | ||
| ## Motivation | ||
| This standard allows for a new Market of autonomous Apps on XDC where applications can act entirely autonomous as the grow and allow for interested parties be able to own the DApps. currently Apps either direct funds to a founder contract or have a currency created with its own fees and incentives. The Idea with SHARES is a developer can create the app they want, accept fees and direct the fees to the SHARES while being able to sell parts of their app as it grows to help fund the further developements of additional contracts that contribute to the original SHARES or sell applications they have that get steady use. Globally developers can create DApps and sell them as they grow as well as redeem the yields generated by the contract. | ||
|
|
||
| ## Specification | ||
|
|
||
| **Token Variables** | ||
| MUST - Developers must Name the DApp accordingly and define how many SHARES are created | ||
|
|
||
| - name: Name is required for naming DApp | ||
| - symbol: Symbol is a short hand 3-5 character code to reference DApp Nnme. | ||
| - totalSupply: total supply MAX is 1000 tokens | ||
| ```` | ||
| string public name; | ||
| string public symbol; | ||
| uint public totalSupply; | ||
| ```` | ||
|
|
||
|
|
||
| **View_Account** | ||
| OPTIONAL - view tokens yield in contract | ||
|
|
||
| function View_Account(uint _token)public view returns(uint); | ||
|
|
||
| **Redeem** | ||
| In order to again dividends user MUST select the Redeem function | ||
|
|
||
| function Redeem()public returns(bool); | ||
|
|
||
|
|
||
|
|
||
| ****All other function of inherited from the XRC1155 contract standard*** | ||
|
|
||
|
|
||
|
|
||
| ## Rationale | ||
| this contract act as a amendment to the XRC1155 token standard to create a new type of token that acts as ownerships of different DApps this new type of token allows for DApps to be own and traded to allow for developers to sell their blockchain products as the perform no mater the function of how big or small they are. | ||
|
|
||
| ## Backwards Compatibility | ||
| All XIPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The XIP must explain how the author proposes to deal with these incompatibilities. XIP submissions without a sufficient backwards compatibility treatise may be rejected outright. | ||
|
|
||
|
|
||
| ## Reference Implementation | ||
| Github:https://github.com/CoinClubQuincy/XRC-SHARES | ||
|
|
||
| All function within contract can use this line of code at the bottom of their function to forward funds to the **receive()** function to allocate funds. | ||
| ````solidity | ||
| address(this).call{value: msg.value}; | ||
| ```` | ||
| This contract bellow is an example of a lemonade stand contract that receives 100XDC for a glass of lemonade and divides those funds amongst 10 token holders | ||
|
|
||
| ````solidity | ||
| contract lemonadeStand is XRC100{ | ||
| constructor(string memory _name,string memory _symbol,uint _totalSupply) XRC100(_name,_symbol,_totalSupply){} | ||
|
|
||
| function GlassOfLemonade() public payable returns(bool){ | ||
| require(msg.value == 100000000000000000000,"need more funds"); | ||
|
|
||
| //this call can be used in all functions that recive fees | ||
| address(this).call{value: msg.value}; //use this to forward all funds to the receive function | ||
| return true; | ||
| } | ||
| } | ||
| ```` | ||
| ## Security Considerations | ||
| **WARNING: Lost SHARES will result in the portion of funds allocated to the token to also be lost** | ||
|
|
||
| ## Copyright | ||
| Copyright and related rights waived via [CC0](../LICENSE.md). | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this
>>>>>>>a leftover from merge conflicts?