Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
I present you the Emerald Vault DAO (proof of concept), powered by CashTokens
Post Flair (click to view more posts with a particular flair)
Post Body

Emerald Vault is a simple DAO template which acts as a fixed-term deposit savings vault with optional rewards scheme, designed to show off features of UTXO DeFi capabilities built with CashTokens L1 primitives (activating on BCH mainnet on May 15)

Imagine a big empty vault with a bunch of numbered slots, each slot can fit a safebox. When you want to make a deposit, you put your coins into a safebox and place it into the vault's next available slot. The moment you insert your safebox into the slot a click is heard, it's locked in position, and a keycard is released from an opening next to the safebox. You try to use it to take out the safebox but you can't, you hear "access denied, timelock not expired!". Ok, so the keycard will be able to access the safebox, but not before some timer expires.

The keycard has your slot# and deposited amount printed on it, it's an NFT that you can move around or try to sell at face value if you want liquidity before the safebox's timelock expires. You notice something else too, the amount printed on the keycard is a little more than what you actually put in, how can that be? When you put the box in, the vault's system dropped a little extra into your safebox! From where did it come from? From anyone who voluntarily donated. Anyone can add to the vault's rewards pool to incentivize depositors, and it will be distributed pro-rata to next depositors as a little airdrop into their box, a crowdfunded savings scheme.

At some point in the future, the timers in the vault will expire. Whomever comes to the vault with the keycard can insert it into a matching safebox, and take out the coins! The NFT gets destroyed and coins are released!

Does this make sense?

Here's the TX flow diagram: https://i.imgur.com/xVwk4So.png

Here are the actual TXes on testnet:

Here's the BitAuthIDE template: https://alpha.ide.bitauth.com/import-gist/0709df6ec68d61b7aaa1bfd2dab7a3e9

BitAuthIDE is our main tooling for low-level contract design (high-level is CashScript). It's like a power-user BCH smart wallet and I successfully used it to:

  • Design a BCH DAO in WYSIWYG mode while debugging all spending paths
  • Import my testnet wallet's xpriv to sign for actual on-chain UTXOs
  • Build & broadcast the TX!

It's not a full wallet, tho, as it requires manual labor to select UTXOs, bring their data into the IDE, and adjust input/output amounts etc., and then copy&paste the produced raw TX to broadcast it.

Author
Account Strength
100%
Account Age
3 years
Verified Email
Yes
Verified Flair
No
Total Karma
10,751
Link Karma
3,555
Comment Karma
6,289
Profile updated: 2 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago