Token-based smart contract for profit distributions

This may well have already been discussed previously elsewhere, and if so please direct me to the thread, but are there any working or beta projects that use a token based smart contract to distribute profits from a decentralized corporation?

Comments

  • MrSkinnyMrSkinny Member Posts: 3
    Did you find any existing smart contracts that could do this?

    I've been working on something similar that I plan to open source. The smart contract would be able to disburse any funds collected by the smart contract based on shareholders. How often the funds are disbursed and adding/removing shareholders would all be done via voting.
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,286 mod
    I have such a contract called 'PayableERC20' and contract factory on the live chain, however it is not yet audited and UI work is continuing. The factory and tokens produced by the factory are designed to work within the SandalStraps DAO framework, but can also work independently. It is one of a number of products in a layer of the project called PayPipes


    New instances of PayableERC20 can be created by calling createNew('[reg name]','[owner address]') and cost about 1.7m gas to create. (reg name is used only by SandalStraps registrars. it may be left blank but is worth naming to allow the contract to be registered at some later date)

    PayableERC20 has been designed for use as a proportional payments splitter for small groups of recipients or accounts. It has fixed supply of only 100 tokens which represent 100.000000% and can be divided to 6 decimal places.

    Upon creation, the factory is awarded 0.2% of the tokens as a developer fee with the remainder (99.8%) being transferred to the account creating the token.

    Symbol can be set after creation using the setSymbol([some sym]) but is not required.

    Payments made to the contract are by trivial send transactions for the minimum gas, i.e, no function call is required.
    Holders check their ether balance by calling etherBalanceOf([address])
    Holders can withdraw their ether by calling withdraw([value])

    WARNING, tokens should never be transferred to a non-custodial holders such as exchanges both centralised and decentralised exchanges using contracts. Such holders require explicit custodial awareness of the ether handled by the contracts and without that custodial awareness, shares of ether payments will be lost.

    The PayableERC20 contracts can recover 'orphaned' tokens and their ether. If tokens on an account are not interacted with by withdrawing, transferring or touching for a period of 3 years, ANYONE can claim the tokens and ether held by those tokens. If the orphaning account is the owner themselves, then contract ownership is also awarded to the claimant. Dormant tokens can be periodically 'touched' which resets the orphan timeout by calling touch([addr_1, addr_2, ..., addr_n]).


    Code has been updated since this deployment and the new contracts will be deployed at a later day. Changes have been made mainly to the decimals and withdrawal functions.

    If this work interests you, please feel free to keep in touch.
  • MrSkinnyMrSkinny Member Posts: 3
    o0ragman0o , this is very cool and certainly more comprehensive than what I've been working on. I've been going through your code to and trying to wrap my head around how everything works.

    Am I right in assuming that with this contract the owner has complete autonomy to transfer tokens to any address?
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,286 mod
    If you're referring to transferAnyERC20Tokens() that is a function the owner can use to recover 'other' ERC20 tokens that have been transferred to the contract itself. It doesn't mean the owner can steal everyone else's tokens
  • MrSkinnyMrSkinny Member Posts: 3
    Right, I got that. I realize I didn't word that question very well.

    I was more referring to the fact that all the token are initially assigned to the contract owner (minus the .2% for the creator). The owner then has the authority to transfer tokens to any address (but not taken them back or transfer them again once they have been transferred).

    I was envisioning a system where the token holders could propose a token transfer and then vote on it.

    FYI I'm pretty new to smart contracts so feel free to end this thread with "you don't know what you're talking about" ;)
Sign In or Register to comment.