LexDAO DripDrop Contract

James McCall
LexDAOism
Published in
9 min readMay 6, 2020

Raining ETH and Happiness

James McCall and Stamford Hwang

lexDAO Drip Drop Ethereum Contract

What is a lexDAO DripDrop?

DripDrop is an Ethereum escrow and payment contract that is noncustodial and adjustable. The DripDrop can serve dual purpose as a payment contract that drops tokens all in one batch or it can `drip` non-custodied ether and tokens to a membership registry, as well as externally `drop` these assets to a collection of accounts, simplifying group transactions such as gas allowances, dividends, and many other patterns.

What is non-custodial escrow?

To explain, most escows in the real world are agreements with Party A and Party B to trust Party C to hold and custody their funds and disperse according to the agreed upon legal parameters of the escrow agreement. For purposes of a noncustodial escrow, the Party C is not a person; it is an Ethereum contract and the parties agree to trust the code and set the conditions under which funds are released and governed. For more on escrows check out blog post here.

What is a LexDAO DripDrop Contract?

The DripDrop contract is an Ethereum contract address that holds ETH and/or ERC20 tokens that are sent to the contract address and held in a noncustodial escrow. Upon filling the coffers of the contract, it waits on the Ethereum blockchain for instructions to disperse the tokens under the agreed upon parameters. For purposes of the LexDAO DripDrop is a registry of wallet addresses.

Some Use Cases:

The original problem that spawned the project was to be able to gush out test network Ether, real Ether, and/or tokens at regular intervals (the “Drip”) to the membership of LexDAO. The constant drip of Rinkeby test Ether and Ether, enable the addresses to have Ethereum gas money to be able to run tests, and in the case of a DAO to vote and carry out activities. It increases convenience and removes apathy and frugality as the excuse for lack of participation in DAO activities. Other use cases:

DAO community drip / drop

  • Parties with social tokens and networks are quickly able to improve decentralization metrics by allocating drips and drops amongst a diverse set of DAO’s that are active in the space and willing to join new projects and participate in the build and governance. In other words, it is targeted toward the very membership of ethereum addresses that are already participating in DAO governance.

DAO governance drip / drop

  • Rewards to company insiders. The DripDrop with a little tweaking is also a mechanism for aligning incentives with a DAO or LAO. In other words, it is achievable to manage a gated token distribution that is the equivalent of a vesting schedule. The longer a member is on the list. The more drips are dropped on the member. It is known that many projects were flush with immediately vested and fungible proceeds. Immediately, the early project participant was able to go down the road with pockets flush without ever actually completing or building on the project.

Casual drip / drop

  • Gifts, Stipends and Trust. On a micro scale this might just be a family allowing their 10 grandchildren a stipend so long as they continue their studies, allowance for living expenses, or any case where control over the flow of funds wants to be managed.

Payroll drip / drop

  • A type of drip / drop that abstracts tax laws so that businesses interested in experimenting with cryptocurrency can experiment with existing smart contracts rather than building everything from scratch. For example, the drip / drop contracts can be tailored to distribute a portion of the cryptocurrency earnings to specific ETH addresses. Through which, a portfolio of ETH addresses could represent a living balance sheet.

Push the Limits

  • Beyond the simple use cases, imagination and resolve are the sole limitations. The point being that a mechanism to get value in peoples’ hands quickly and cost effectively is very valuable.

Sounds awesome, what if there is a problem?

LexDAO has a mission to blend accessibility and the raw power of Ethereum with some bare governance essentials. Basically, in addition to the contract, having a DAO as a potential cog in the machine provides users with permissioned safety rails that provide an opportunity, in some cases, to retrieve, burn, mint, or remove tokens from the metaverse. For purposes of the LexDAO DripDrop contract. The safety rails come in the form of the “secretary” role and in some cases using a DAO such as lexDAO as the potential “flesh and bone” hive mind from which to resolve disputes or reverse errors and errata. The second point of token governance will be further described in a future article or also discussed in LexDAO Banknote $LXB.

What is the contract for DripDrop?

As is often the case in the space the contract is in beta and unaudited. So pioneers in the space that are willing to use the contracts (in moderation) are appreciated but forewarned to use at their own risk. The remaining is the recipe for pioneers (who often meet great peril). Code Disclaimer and License here.

The Rinkeby Test Contract and Mainnet Airdrop contracts can be found at https://github.com/lexDAO/Airdrop/blob/master/README.md. Here the code can be perused and repurposed. As always, pull requests are welcome.

Next we deploy the LexDAO DripDrop contract on Ethereum?

  1. We recommend working with test net in Rinkeby. But for this illustrative example we use mainnet via the etherscan interface for the DripDrop contract here. https://etherscan.io/dapp/0x7d5943dFb6fF3303728629Cf066B6D7cFb22733B#writeContract
DripDrop Deployment on Etherscan
  1. payableAmount(ether) is the amount needed to fund and stake the contract. This is its gas money in ETH needed to either start a ETH drip or fund the Token drip to the array of addresses. This amount is required to be an amount greater than that to carry out the transaction or else it will fail. Solidity is unforgiving with empty purses.
  2. _ethDrip is the amount in wei. This is the amount of each drip. This amount can be changed by the contract Secretary role. Handy calculator here to convert ETH to wei.
  3. _tokenDrip is the amount. Here you may need to look up the token contract to see how many decimals for the token drip. So for example, if it is a six decimal token, then 1,000,000 would equal a “1” token per drip per address. This function is the same as the ETHdrip but with ERC20 tokens.
  4. _members address. Are the first members to add to the array of members for which they will receive the drip. Also important to note, the first address on the list is assigned the secretary role with administrative functions of the contract.
  • It is important here to assign this first member role to an address that you want to assign to control the permissions of the contract.
  • Potential first parties could be an Aragon Agent, or an individual that will be permissioned to control the functions.

5. _message Is just any message that you want to tag the contract with. What is its purpose? An example might be “Hacker Conference test RETH”.

Last connect to and “write” function to have the contract mined. This is the ethereum process for making your very own Ethereum smart contract.

It’s Happening!

To confirm that something did in fact happen, we go to the transaction and check it out in metamask. We are looking for the address of our contract. Click on the internal transactions tab .

Once located, the contract address should be saved and bookmarked to keep track of the contract. The address for the one from the transaction above is 0xFb675DeE3cdD950deD73B6b9700bbc3dadA7E021. ProTip is to sign in to etherscan and track the contract and give it a name. We name this one “BOB”. No reason, just named BOB.

  1. Go to the contract tab, and click to the “read contract” functions and confirm that when you enter the first address (entered in #5 above), that it returns that the membership list and the secretary. If the boolean is true then you are in luck.
  2. Next with the secretary role, we go to “write contract”. These are the functions to change the state of the data on the ethereum blockchain as it relates to our baby BOB.
LexDAO DripDrop Write Functions
  1. addMember. Here we add more members. These are the benefactors of the noncustodial escrow contract; the list of addresses that will get the drip.
  2. addsecretary. This will add the secretary role to other accounts. This is an admin power to remove members and add more secretaries, so this permission should be considered and managed carefully.
  3. customDripETH and customDripTKN are where we are able to custom set the amount of the drip to the ethereum addresses on the list.
  4. depositDripETH and depositDripTKN is where we can add tokens and/or ether to the pool from which to drip out. These functions are best to be used from outside interfaces.
  5. dropETH and dropTKN are money in the club functions. Basically dropping a one time drip or drop of tokens and/or ether on the members registry.
  6. removeMember. It is a way to remove the address from the list so that it will no longer receive the drips.
  7. renounceSecretary. Is the function to throw away the permission to have the secretary role. This might be used to add a Aragon Agent as secretary and then renounce your original secretary role.
  8. Update functions are fairly self explanatory. Just to be allowed to change the ERC20 token, the amount of drip, change message, etc.
Control the DripDrop Flow Via Secretary Role

Let’s get the party started.

We have minted our DripDrop contract, anointed our secretary, defined the address of ethereum addresses that we want to receive the drip. Last step is to add the ERC20 token that we want to share with our members list and start the drip.

  1. Anyone can either send Ether or the ERC20 token to the BOB address. This stakes the contract pool from which to initiate the drip (also a great way to tip to a DAO as well)
  2. Here we send some social token CHARGE which will provide social benefits to the DeFiNFT Charged Particles project to our BOB contract.
  3. Now we want to initiate the drip, therefore we open the headgate and start our dripTKN #10 function.
  4. This percolates the drip down the ethereum canal to your registry addresses. As a side note, the drip above is actually feeding into another dripDrop address. So it would be a way to pool a drip into a bunch of DAO dripDrop contracts that each of their “secretary” agents could disperse under the parameters of their choosing. In order to set the time interval for the drips see the Openlaw.io form below.
Charge Flowing Like Water
LexDAO DripDrop with your own Headgate

LexDAO is a group of legal engineering professionals who are seeking to provide a trusted layer between the decentralized world of blockchains and a legal settlement layer in the real world. We are trying to bridge this layer to provide a working framework for organizations to work in a trustless and trusted manner using Ethereum, blockchains, smart contracts and decentralized organizations. h/t to Ross Campbell, Bill Warren and Stamford Hwang who mashed up this code to experiment with.

Etherscan makes my head explode and confetti come out.

DAO’s are Human Power Nodes

Luckily once the DripDrop is configured there is a much easier and more intuitive way to have ethereum native folks interact with the contract. Here is a link to a customizable form on openlaw.io. DAO Drop Simply fork this over to interact with your dripDrop contract and a simple front facing form that enables users to drop Ether or Tokens on DAO’s. From openlaw it is quickly possible to create an interface to allow customized terms and conditions of the dripdrop contract.

To be continued…..

Reach us:

Check us out on Medium.

Get us on Twitter.

Dig around on Github.

Holla at lexdao.chat

--

--

James McCall
LexDAOism

Love agriculture, finance, and law Not legal advice. DAO things w/ @lex_dao ; @farmapper working wit @realdao ; views are mine and relatively scenic