GithubHelp home page GithubHelp logo

aragon / aragonos Goto Github PK

View Code? Open in Web Editor NEW
687.0 54.0 248.0 5.95 MB

(Aragon 1) Reference implementation for aragonOS: a Solidity framework for building complex dApps and protocols

Home Page: https://hack.aragon.org/docs/aragonos-intro.html

License: GNU General Public License v3.0

JavaScript 46.06% Solidity 53.94%
aragon aragon-app ethereum solidity

aragonos's People

Contributors

0mkara avatar 0xgabi avatar a33bcn avatar bingen avatar cgewecke avatar cpurta avatar drexpp avatar eduadiez avatar facuspagnuolo avatar foopang avatar gregzaitsev avatar haythem96 avatar izqui avatar jakehemmerle avatar jgcarv avatar luisivan avatar macor161 avatar mnaamani avatar onbjerg avatar ottodevs avatar pcowgill avatar quazia avatar readevalprint avatar smokyish avatar sohkai avatar stefek99 avatar usetech-llc avatar verdverm avatar willjgriff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aragonos's Issues

Nested Tokens for multiple stock classes

Current stock classes are completely independent tokens. It would be interesting to implement different stock classes that have the same underlying value.

Example of what could be accomplished with such system:

Stock A: Normal token (liquid token transferable in exchanges)
Stock B: Normal token + extra voting rights (illiquid, but convertible to Stock A 1-to-1)
etc...

Basically Stock B would need to have 1 Stock A for every token it issues, this way the conversion works simply as the unwrapping of the token.

Change ``isDelegate`` in the Register and Deregister events to a unique app id

Right now there's no way of looking up apps in the metadata repository because the only things provided on the Register event are the computed ID and the address of the organ or app.

The issue with this is that multiple apps or organs can have the same computed ID, since it's just a hash of the function signatures in that particular contract.

The provided address can be a shared instance between multiple DAOs or a single instance for that specific DAO, so we can't use the address either.

My proposal is that we change isDelegate to something like appId, where the appId is a unique identifier for the app in question (i.e. even if two apps A and B have the same compId, they will have a different appId).

For organs the appId would be nil.

Migrate GovernanceToken logic to just use MiniMe

  • In order for the organization to be able to issue new tokens, the organization needs to be the token controller.
  • No locking is needed as each vote will use the balance at a certain block height. This also allows for certain debate period, and for holders to sell or buy more tokens before certain vote starts.

Add ability to comment on votes

It would be nice to have the ability to comment on votes while selecting "yes" or "no", I think it could lead to some debates.
Storing the comment string wouldn't be necessary, an event should be sufficient.
Thoughts?

If the idea is accepted I can implement it.

Implement atomic organ or app updates

Right now upgrading an app or organ requires two different actions to deregister and the register the upgraded version.

MetaOrgan should provide a way for this actions to occur in the same call so it isn't open attacks in the period between the deregister and register

Implement incremental nonces for preauth transactions below a certain nonce

Right now nonces are just used for checking a certain preauthorized payload be executed just once, while also allowing for executing different times the same preauth action (with different signatures, of course)

As proposed in this EIP comment, it could be interesting to treat nonces below a certain x threshold (x = 10 ^ 10 seems good enough) as an incremental nonce. This means that a preauthorized transaction that has a nonce n below x, will only be executed iff last executed preauth tx for that address was n - 1.

It would require adding an additional storage key for keeping track of address nonces.

Implement token whitelist for token transactions

Tokens are arbitrary contracts that can run malicious code. Some sort of whitelist has to be implemented for the tokens that are allowed to execute transactions in the DAO.

There is an attack possible where you can create a fake token contract and make transactions to the DAO as another person. Only tokens with trusted code (that doesn't allow impersonation) should be added to this whitelist.

I think a good solution for this would be to implement a token whitelist in BylawsApp, and return false in canPerformAction if the token that performed the action is not in the whitelist (and therefore the sender cannot be trusted)

Events should be indexed

Various events triggered by the different components would benefits using the indexed keyword from solidity (see http://solidity.readthedocs.io/en/develop/contracts.html#events).

Up to three parameters can receive the attribute indexed which will cause the respective arguments to be searched for: It is possible to filter for specific values of indexed arguments in the user interface.

It would ease the devlopment of an interface where it is possible to filter the various events, to list all changes linked to a specific bylaw or member for instance, or to filter by bylaw types.

For instance in https://github.com/aragon/aragon-core/blob/master/contracts/apps/bylaws/IBylawsApp.sol, event BylawChanged(bytes4 sig, uint bylawType, uint256 bylawId, address changedBy); could be event BylawChanged(bytes4 sig, uint indexed bylawType, uint256 indexed bylawId, address indexed changedBy);

Potential issues with not-necessarily-malicious re-entracy related to dao_msg()

Preface

daoMsg() is saved in storage in every transaction to the DAO so other organs can access the full message they are dispatching and eventually populate it to the applications.

Problem

Given that the same storage slot is used, if part of the call to the DAO needs to call the DAO (which could happen without malicious intentions), it would change the daoMsg() for the original call once it is resumed. This is not a problem if the daoMsg has already been set in the Application (we would have application reentracy issues too, but if an app makes a different dao call this won't be an issue).

Posible solutions

  • Make all organ logic re-entrancy proof. Research and efforts towards it have started on #26 and exploring gas limiting functions to reduce reentrancy risk.
  • Have multiple slots for daoMsg() and fetch it with certain key, for example the hash of the msg.data (which is a parameter to which all organs have access regardless of daomsg).
  • Looking for new ideas

Disallow calls with value for functions that don't support it.

Solidity throws when sending ether to a non-payable function.

aragon-core can't take advantage of this feature and right now all functions just allow any value with them and by default it will be deposited in the Vault and creates an untagged incoming transaction in Accounting.

One way to tackle this would be to add a new argument to bylaws on whether they allow value or not.

This is not as bad of an issue as DAOs will always be able to move that capital and will not get stuck as it would in non-prepared contracts.

Open for feedback, for whether this is something to solve and the way to do it.

Clarify usage of babel

Is there any particular reasoning behind depending on babel? It doesn't seem to be used, and the index.js file is fully supported in the latest Node version.

Implement multi-token accounting settings

Blocked by #13

Think about whether we want per token budgeting or convert it all to one currency and denominate in that one (better UX)

If we go the one currency route:

  • Initial implementation will need an oracle to feed token prices in
  • Ideally will rely on 0x for price discovery when it is ready

Implement on-chain factories that setup a default company

Blocked by almost every major issue for the v0.4 millestone.

With the new architecture building an organization is almost as doing a LEGO puzzle.

We should work on a factory that with 1-3 transactions sets up all the needed contracts for the organization with some sane defaults, as the current CompanyFactory works in v0.3

Change 'canHandlePayload' constant calls for a storage registry

Similar to how organs register the payload size some functions return, we could replace the current functionality that requires the DispatcherOrgan to make a static call to every Organ (600 gas * organ length for worst case scenario, aka, ApplicationOrgan).

The idea is that when installed organs would register in global DAO storage their intent to handle a certain payload. Problem is, we can only save and check against function signatures so this could work. Another solution could be to register to be called for a certain function signature instead of dispatching it directly.

Poll application

Submitting another idea: what about having a polling application similar to votes but with more choices than just yes or no?

Add centralized DAO events

We need to add events for DAO actions in order for elements interacting with the DAO to be aware of critical changes. Events are needed for:

  • InstalledOrgan
  • InstalledApp (probably could be merged in one event with a boolean on whether it is an organ or app)
  • KernelChanged
  • DispatchedPreauth

VaultOrgan events should be added to this DAOEvents class.

Develop bot that automatically funds Commiteth bounties

Right now all bounties have to be manually funded sending ETH to the bounty contract address.

It would be great to have a Github bot listening to bounty issues that could allow maintainers to automatically fund the bounties.

Just reserved the @autobounty github username for it.

Example:

@autobounty standard bounty

@autobounty 1 ETH

And it will send the ETH to the bounty address in the issue.

Linter crash on assembly blocks

As outlined in #59:

An error occurred while running the linter on /home/quazia/Sites/quazia/aragon-core/contracts/kernel/Kernel.sol:
Error: An error occured while parsing the source code:
SyntaxError: Expected "=:", "hex", "let", "{", "}", comment, end of line, number, string, or whitespace but "r" found. Line: 108, Column: 17

Test bylaws app integration

Bylaws app is compiling and should be ready to work in the current system.

Integration needs testing and unit tests to ensure the bylaws app does access control for the DAO.

Rethink DAOMessage logic

With the changes introduced in #1 related to storage, DAOMessage can no longer be saved the way it was. It could be saved as storage or other solutions could be thought.

The requirement is to maintain the DAO calling context as we move through different organs via delagatecalls and being able to pass this context to the applications.

Implications related to reentrancy and DAOMessage not being changed need to be properly thought.

Allow complex multi-rule bylaws allowing logic combinators

Introduce a new Bylaw type: CombinatorBylaw that allows for a bylaw to pass if a certain condition among two bylaws is met.

This will allow for having multiple apps or parties that can perform an action.

Example of a complex bylaw:
file1498561656371

Implement real multi-layer liquid democracy using MiniMe

Blocked by #17

@jbaylina did a spike related to this, but I cannot find it right now.

The challenge is to keep the list of who delegates on who in a way that voting doesn't require any for loop interations (that would be hard to scale because of the gas limit).

I think this can be achieved in the case where the organization is the Minime token controller of the token and the delegation balances can be modified with every token transfer (using the 'onTransfer' callback).

Failure downloading nodejs dependencies

Hi,

The file npm-shrinkwrap.jon contains characters of a failed merge (<<<, HEAD, >>>) and npm install command fails to download dependencies.

Regards,
Mauro.

Test multiple transaction types dispatching

Unit tests are needed to cover:

Kernel:

  • Vanilla ETH transactions (when ETH gets wrapped into the EtherToken)
  • Presigned ETH transactions (test payloads are non-reusable)
  • Token receivers (ERC223 and approveAndCall compatibility)

Dispatcher organ:

  • Not dispatching when action is not allowed
  • Not dispatching when no organ can perform the action
  • Dispatching to an app and checking app is sandboxed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.