DAPPCON 2018: Building Modular Organizations - Aragon Brett Sun (Aragon)
DappCon 2018 · July 2018 · 25:20
Brett Sun of Aragon presents building modular organizations at DappCon 2018, walking through how the Aragon platform lets communities assemble DAOs from interchangeable smart contract modules covering voting, token management, and finance. The talk covers how this modular approach lets organizations customize their governance structure without writing custom contracts from scratch, positioning Aragon as infrastructure for the broader DAO ecosystem.
Speakers
Topics
From DappCon 2018, hosted by Dappcon Berlin.
Transcript
[Applause] hey hey hey good morning everyone uh thank you all for for coming here this early um i know i had to down a couple bottles of club mate uh before i could get up on stage i'm a little bit jittery but thanks for being here it's hard to follow up after matan and martin but i hope you all enjoy it so my talk is going to be about building modular governance and organizations and i really like the word modular because i think it really encapsulates well um what the new tools that we have today enabled us to do and how it kind of captures the essence of uh the new organizations going forward and i really like this image here
if you don't recognize it it's the cambrian exposure uh explosion of organisms on planet earth we started from very very little if i can get the laser i don't know if you can see that earth birth and then we've kind of gone outer and downer and elder and we've had a huge explosion in species and this was pointed out by fred erham or ursam about a year ago and how governance today is really maybe around ocean's crust maybe a little bit further but we're really starting to get to the stage where we can build larger and larger and different organizations uh that we've never seen before because we have new tools and the reason why we're able to do so is because we're thinking about the tools
that we have the the governance how we build governance organizations in a totally different manner we're starting to think about them in terms of software and not hardware not wetware it's all about software and so we can experiment now with these modular pieces we can apply software engineering and systems designs to uh what we're before very difficult to change very difficult to manipulate um very difficult to get right on like a on a static or um hard basis we can now do it with software we can take components that all implement the same interface um and switch them around swap them see how they work together compose them
differently and that is really really exciting and so that really kind of brings us to like what do we have today and how do we go from from there right so today we have monolithic cathedrals of text that define what our organizations what our governments are meant to do we take it or leave it we have one degree of freedom but with software engineering with the ability to modulize our components if you look at the constitution um i took a quick spin at it yesterday night actually you'll see a lot of it is like social code written in the 18th century literally a lot of it is like six months we have to do this we have a structure to do this every four years we have to do this it has to
be through this process literally it's code but now we can take those components and say okay how do we break them up how do we implement them piece by piece how do we go from trusting an entire system to trusting its components and it's the composition of those components and i'm not the first one um there were people before there were people after uh we all kind of are aligned along and resonate along this the same uh vision here we have from doubt stack a lot of their architecture is built on adaptive modular upgradable dow structures uh we have a new project that just got unveiled a few weeks ago i think it's called kelsen and they have kind of
an interesting two-tier rules-based engine where the first rule says who can do what and the second rule says or a second layer says who can change who can do what um but if and they've really done some interesting work as well they've tried uh turn the french government into a set of rules that they can implement using their own smart contract system so this is kind of a graph of what they've done to try and visualize that a whole bunch of components of who can do what and who can change who does what and mapped it out into basically their i guess the entire political uh structure and i mean at aragon as well i wouldn't be up here talking about modular
government governance and organizations if we didn't believe the same uh vision going forward and so we have in our apps in our launch tab we have uh very much the same principles we've built a few applications a token manager a finance app that controls account balances and and where these uh the funds are going we have a new upcoming payroll app that will enable organizations to automatically and trustlessly pay their employees we have a binary binding voting map that allows decisions to be executed directly on the evm once they've been passed and we also have
a non-binary our multi-option non-um non-binding survey that allows people to organizations to pull what their token holders or any other group of people think about some ideas that they might have for example for aragon what app should we implement next and so a lot of the a lot of our engineering has gone towards making this possible um especially on the front end we've kind of taken these concepts and said how do we make sure that we can enable people to design their organizations any way they want how do we let them customize what they want to build and we thought it's really a good analogy as an app store it's like
we have apps that we installed they're logic um they're components and we have kind of an organization operating system that controls organizational resources and shares them across these applications and so we've done a lot of interesting work uh front end wise to try and sandbox these and make sure that it all works together and it's a seamless experience for developers but today i i want to talk a little bit more about underneath the stack down in the evm how we actually make some of these apps possible and what the really cool features are that we've enabled people to build the most important thing that i'd like to point out is that modularity really doesn't provide us anything if we can't compose them well if we can't interact between components and interacting in
the sense of governance a lot of it is escalation it's permissions escalation if one app wants to use a resource let's say it's transferring funds let's say i want to transfer a bunch of money to help the the thai rescue operation that was happening earlier this month i can try and do that through my organization my ngo organization but when i try to do that it tells me hey brett um you can't you can't actually do that you don't have any access to directly send funds anywhere you want that would that would be pretty bad i think and so what we have here is actually we've been able to build a graph to say look brett i know you want to send a
payment out to these people to help them out but first we have to go through some rules we have to make sure you abide by the organization's rules and and how you're supposed to make these decisions and so we have two options here we have one for example let's make sure that it passes on a majority vote let's make sure that you have to go through a voting application before you can actually send this out or the second option is let's make sure that first you're a token token holder and then you can create a vote and maybe it's a slightly different vote that's easier because you're a token holder in the organization uh and if we think about this we start to to see the possibilities of what this kind of graph can do we start to see like that the way that we've built
organizations and governments today they're all just literally process flows of we have one set of people or a group of people that then defer their ability to do something to another group of people and so we have a bunch of the white boxes here are really if we look at them they're they're really whitelist they're just a bunch of people who are whitelisted to do something and then they go up the stack and they say hey look i can't do this but can you do it for me and so if you know adults 18 people 18 years and older they go and say hey i want to vote somebody and then these people who get voted in then decide more and more and then we can build these structures inside organizations not with wet code not with lawyers and police and other people but with real
working code on the evm on a trustless execution environment and this is just a differ because we're in germany how the two um how the two look i don't really know the difference to be honest to really tell you the political side of things but it also is really interesting this is a little bit blurry but the way we make laws can be encoded like this too because law making is really just a process flow again it's like i want a bill to be passed i need to see that through to my from a constituent to an mp or someone else inside a body of parliament and then they go through and they have checks and they um they try to get that pass further and further until finally somebody says this bill can be a law and that's when it gets minted into
the organization's rules and so we as i said before we can actually do this today in code so if you've played um if anybody has played with our 0.5 beta this is some simplified code a lot of the code i'm showing today is simplified uh for the sake of fitting it in slides and you know like 40 character width but this is pretty much the code that's running on two thousand three thousand ricky b dows right now basically all we say is we nee we make a new contract that's called the kernel that's basically the dow itself and then we say hey can you give some or some apps permissions can we give the finance app the ability to transfer
funds out of the vault can we make sure that any action we take whether it's giving you tokens transfer um minting new tokens uh creating payments executing payments can we make sure that they happen through a voting app so that nobody like it's not just anyone being able to execute some piece of code and then once it's all finished we have everything basically we have that whole flow where when i try to do something when i try to create a payment it says hey look you don't have direct access on the finance app you can't do that but i can tell based on the graph that we've been able to take out from here hey the finance app it's able to be called from the voting app and anybody can create a
voting uh a vote a new vote and then they can execute that once it's been passed and i want to get into a few of the details that really make this possible and and a few of the generic aspects that we've made so that any developer today can hook into the system build an aragon app and make sure it's able to be governed and integrated into the ecosystem so the first one is how we do permissions uh and we do permissions based on what we call an access control list it's literally just a mapping of uh who is calling what they're calling to and uh what they're trying to do inside the the um the the target let's say so we can really think of this as like an analogy
our five-year-old selves like i can ask my my parents i can ask my mom hey um i'd like five dollars to buy candy and my mom would be like okay well who is brett where is uh the vault let's say the the family bank account and what is take out money um there's a little bit more that says uh why like five five dollars for candy and she's like yeah okay that's fine that's no problem although those requests once like every week or something they're fine but if i go to bc or my mom and say hey mom um i'd really like thirty thousand dollars to buy a car um she probably wouldn't really be up
for that and she'd be like no no no you gotta go through some more process here we gotta like talk about this talk to your dad make sure we voted correctly it's more like a multi-sig there but anyway et cetera and how do we use this hcl inside applications inside real code is using this auth modifier that literally is just what we said before it's like uh make sure that the person who's executing something on this target has been authorized for that particular role that they need to have now the the second part to this is what a concept we call forwarders and this is what enables us to create these graphs to create these interactions between apps and escalate permissions from one
app to another so it's really got a simple interface it has a way to just define whether or not somebody or an app is is a forwarder that they can be executed upon they have a they have a function called can forward that says based on what i'm doing am i allowed to forward and then they can finally call forward and if ken ford is is true nothing is going to happen if it isn't true just it'll just require false and will revert but we can see an implementation a simplified one based on what's actually inside our voting contract and we see here that obviously the voting contract is a forwarder it can forward based on whether or not
you have the permissions and when it does forward all it does is this little bit here it says okay so you uh because you're forwarding through me i need to make a new vote i need to make sure that an action happens so if i'm the uh if i'm someone trying to call into the finance contract the finance um actually gets encapsulated it's almost like uh mail delivery where like you have mail inside mail and and first we realized okay first i had to make a vote and then once the vote is over we can actually execute the code to run the finance application instead of the voting application and that's where this evm script that we'll jump into right away is all about it's about how do we
execute saved evm code almost so these evm scripts are essentially a way for us to encode some way of like what should happen next after one app is taught to another app once an action has been permitted and it really is just exact script that's kind of the the interface it just takes in a byte array uh the the contract itself is responsible for parsing that bytes um array and figuring out exactly what it's meant to do and to call into it and an example is uh oh sorry an example is this call script this is the only one we've implemented let's say we tried to do a few more fancy things they were horribly horribly broken so
we've left just with call script but basically call script is like a batched uh function like batch transaction sender uh the first the first uh un 32 byte is just a spec id that says like hey i'm the call script the all the bytes afterwards are just many calls with and a bytes array of the first one being two the target uh what the call data should be what the input should be to there um oh sorry the length of it and then what the actual call data should be so if we had in this case the finance app we would tell the voting application hey once you're done with this vote call this contract with this function signature with this information and then once it's
you know once a vote's been executed it'll go ahead and do that and make a new payment for us and then running it this is kind of real code from our voting contract as well basically we just make sure that we can execute this vote uh we make sure it's been set to be true and then we just execute it we just let it run uh if it's the finance app we just say yeah like it's gonna make a payment to somebody and that'd be cool all of this combined i want to bring this back to what we just kind of saw here what what this enabled um this is a really a generic interface for people to hook into and say hey aragon i want my permissioning to have this kind of graph encode that inside their contracts to
build that with code and again it's just these three really interface three interfaces that has permission from the acl the forwarding interface and then executing an arbitrary script and i again i want to kind of come back to this and say this this really enables us to experiment at the speed of software because never before have we been able to take these modules and say okay now i just want to have a voting contract and multiple voting contracts that say i'm going to do this at this time i'm going to do that at that time and compose them together create rules around how they're used so that we don't need a bunch of people signing documents to say okay this has to be done this way
pass it off to the next person the next person picks it up and it's like okay yeah this has been done properly i'm going to do that now we execute code and we get organizational structures uh and kind of there's one thing from this talk that i hope you all remember it's it's this url hack.eragon.one it explains a lot more about some of these concepts that we just went through and how to build your own aragon app how to integrate that inside the aragon ecosystem and how to get organizations using that application so that they can be running your logic to help them organize in the future we have a tutorial on there it's really really simple to get started using
aragon in the contract side it's literally three steps um you first you inherit from our base class aragon app second you define some of these roles that we were talking about it's just the bytes32 constant and then you use auth you say this function can only be executed this action can only be executed if somebody has these permissions and then you can wire these permissions however you want to create these dynamic modular organizations uh and don't don't take it from me take it from other people that have used the software um this is adria way back in i think this was february uh he was like painless to implement painless to integrate
i got it working super super easily and he's got a little bit just there to show a really small project uh and then i'd like to highlight a few of our other projects we're actually here at dabcon if you'd like to talk to them and learn about what they're doing and what they're what really cool things they're doing on top of modular governance these guys are superstars both of these people i'm i'm going to be shouting out right now um pando is really really awesome they've basically re-implemented git using uh this governance structure and on top of ipfs um so you can do basically everything and git you can like commit you can stage you can you can have branches you can then
put all of it on ipfs and you have a repository linked in the evm to an ipfs hash but that's not really the only cool thing you have permission management so if you see at the bottom it's a little bit hard to read um but you'll see somebody else clones this repo tries to take it out for a spin wants to commit to master and it says hey dude you can't do that you don't have the right permissions and this is obviously a really simple example but you can start imagining how we can develop code using git like interface with very different models of governance where maybe there's a white list built by tcr's where uh only the people who people trust or people bet on are going to have commit access and then their
votes go up and down and you can start to imagine like crazy crazy things happening with these organizational structures that we've never really had the chance to do before because we never had that flexibility the second one i'd like to highlight is dap note i think they're giving a talk at the side chain stage in about an hour and a half or two please check out eduardo if you're interested in what they're doing dap note is really really cool software again basically they want you know a big problem in the decentralized space is the fact that we're all running on centralized gateways um it's not really a joke it's like a real problem let's say and so dapnode is trying to make that easier for people it's like giving every baby that gets born at a computer by themselves so that they can have all of
their infrastructure with them their entire lives um basically you run their software you hook it up at home you get a vpn server you get access to mainnet and fura please check out eduardo for more details but daf node has used aragon to manage what applications can be installed on that node um jordy from the white hat group you've probably seen him around was uh he's an incredible person he before let's say we're we're not really prepared to support mainnet right now um for most applications majority one and head off in march and said you know what i'm going to deploy a real mainnet dao to manage the the content registry for dapnode
and and just go with it because he was feeling safe about the code so that's it um please if you want to find me later i'm on telegram twitter at sokai thank you