zerolawtech / zap-tech Goto Github PK
View Code? Open in Web Editor NEWZeroLaw Augmentation Protocol
License: GNU General Public License v3.0
ZeroLaw Augmentation Protocol
License: GNU General Public License v3.0
ZAP's current governance functionality is very limited:
MultiSig
permission scheme for sub-authorities, but it's a hacky approach that bends one thing to do another.Governance.sol
.call
to forward abritrary calldata, allowing for active actions in the case of a passing proposalMultiSig
authority and permissioning to allow truly decentralized ownership of contractsMultiCheckpoint
to allow complex payouts across multiple tokensNFToken
Certain smart contracts or components should renamed for consistency with whitepaper and maximum generality for all organizations/use cases. Here is my (WIP) proposal for renaming; I will update this from time to time as I work on the whitepaper:
IssuingEntity
--> OrgCode
KYCBase
--> IDVerifierBase
KYCIssuer
--> OrgIDVerifier
KYCRegistrar
--> RegistarIDVerifier
TokenBase
--> OrgShare
NFToken
--> CertShare
SecurityToken
--> BookShare
Investor
--> Member
Before this repo goes public, this should all be in place:
readme.MD
This should have been done a loooong time ago.
Using of a fixed length array for Balance.ranges
, as implemented in https://github.com/iamdefinitelyahuman/nftoken, is more gas efficient and should be implemented in this repo as well.
Per offline discussions, a poison pill could make for an interesting module that could be very useful in some DAO structures. How exactly to best implement this still needs to be explored.
cc @lex-node
Right of first refusal, right of second refusal, tag-along-drag-along... all of this could be enforced on-chain via a module. Opening this PR for discussion on how best implement.
cc @lex-node
NFToken
(currently only works with SecurityToken
)Blacklists will work similar to the existing KYC whitelists, except any address listed on it is unable to transfer tokens. This could require some changes to IssuingEntity
, and will take some thought on how conflicts between whitelists and blacklists work.
How this is implemented will be very dependent upon #9.
NFToken
Regardless of which address tokens are minted to, the Transfer
and TransferRange
events that fire will show them as being minted to msg.sender
:
Change msg.sender
to _owner
in the above lines, and maybe add some unit tests to check the correctness of the events being fired.
In NFToken.transferFrom
, _auth
is set but not properly passed to _transfer
:
When the issuer uses transferFrom
, this results in improper permission checks as well as incorrect modification of the allowed
mapping.
_auth
to _transfer
transferFrom
is called by the issuerIn a situation where it's desirable to have a token trade as freely as possible, there could be a use case for an identity registry that works via on-chain self attestation. On the tech side this isn't overly complex - the legal layer is where this could get challenging.
Implementation ideas (subject to change):
cc @lex-node , we discussed this at length but it was a while ago, we should probably re-explore it to make sure the idea is sane before we begin implementing it
Currently all the contracts are marked as >=0.4.24 <0.5.0
- we should remove this ambiguity and declare them all as using version 0.4.25
.
conftest.py
files are sometimes 3 folders deep, and individual tests declare their own fixturesaccounts
are being imported that could instead be retrieved as fixturestests/conftest.py
explaining what each fixture doesconftest.py
files at most 1 subfolder beyond tests
README.md
files to make tests easier to navigateThe ultimate goal is to make the test suite understandable even to someone who has never seen ZAP before, so it can be linked to from the Brownie docs as an example of what is possible.
Currently the investor count information is deeply embedded within IssuingEntity
. Even if a token should trade freely, it is impossible to stop tracking investor counts. In such a case this creates a massive gas overhead that is un-necessary.
Investor limit logic should be moved to a separate contract and treated as more of a "first class module" in the way the Governance
currently works. This will be a big step away from IssuingEntity
being the center hub of any deployment and toward each component interacting more directly.
This will be a big job and likely the intended spec for it will evolve during the process of completion.
It should be possible to set up a ZAP org that invests in other ZAP orgs - a sort of investment fund:
There are significant legal considerations in such a setup - @lex-node you will have to provide a lot of sanity checks in the review process on this one :)
Every core contract within ZAP should have an interface within contracts/interfaces
, and where possible contracts should import these interfaces instead of importing contract directly. This will improve readability, help enforce the expected ABI, and ease third party integrations in the future.
draft a "ZeroLaw Manfiesto" or similar document setting forth core principles of how to pair law & tech for effective implementations
Istanbul's changes to gas costs make transfer less safe - possibly no changes need to happen, but this at least needs some deep examination.
Further reading - https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/
Once #13 is completed we should add some basic CI checks:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.