Sebastian 🟡 Profile picture
Apr 6 9 tweets 6 min read
Short 🧵 on #EIP4626: the tokenized vaults standard that will be used by everyone & their mom
eips.ethereum.org/EIPS/eip-4626

Authored by the finest sers
@joey__santoro (@feiprotocol)
@transmissions11 (@paradigm)
@JetJadeja (@RariCapital)
@alcueca (@yield)
@fubuloubu (@ApeFramework)
1/9
EIP4626 aims to standardize tokenized vaults. Wat mean?

A vault is a contract into which you deposit some token, e.g. you deposit DAI into @Compound in order to earn yield on those DAI
🧵2/9
Many of these vaults are tokenized. E.g. Coumpound mints cTokens (cDAI for your deposited DAI), @AaveAave mints aTokens, etc

What sucked is that everyone implemented their own tokenized vaults and we didn't even have a standard interface

EIP4626 fixes this
🧵3/9
EIP4626 has basically two types of tokens:
- `asset`: the token that you deposit
- `share`: the tokenized representation of your deposit

That means EIP4626 *is* in fact a token (the share, ERC20)
🧵4/9
EIP4626 allows you to do two fundamental operation:
- deposit assets & mint shares
- withdraw assets & redeem shares

Here it gets a lil confusing because you can choose if you want to deposit or mint / withdraw or redeem, why so complicated, ser?!
🧵5/9
Because depending on the usecase you might want to

withdraw an *exact* amount of underlying asset tokens (contract will redeem the corresponding amount of share tokens)

or you want to redeem the *exact* amount of shares (contract will withdraw the corresponding assets)
🧵6/9
Now show me the code!
All the usual suspects are working on implementations of the EIP4626 standard, e.g.:

@RariCapital / @transmissions11:
github.com/Rari-Capital/s…

@OpenZeppelin / @amxx:
github.com/OpenZeppelin/o…
🧵7/9
The usecases for this EIP are endless - I review it for the next @hoprnet staking program (with NFT boosts for community supporters) and decouple economic from technical risks

But you can really use it for any sort of tokenized deposits, lending platforms, yield assets...
🧵8/9
As always, this is the frontier and there be dragons 🐉

You are not alone, we're in this together but as with all new shiny things, there WILL be exploits and significant losses of funds, so please be careful 🙏
🧵9/9

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sebastian 🟡

Sebastian 🟡 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @SCBuergel

Jan 21
Knock knock anon, who's watching you?

Correct, your RPC provider

We made derp.hoprnet.org so that you can watch them watching you

Here's 3.5 surprises 👇
Reminder that for 99% of all Ethereum users "RPC provider" simply means "a computer in Uncle Joe's basement that I blindly trust. I blindly trust the data that it delivers to me and I also blindly trust their pinky promise to not log everything they see about me"
So what does your RPC provider actually see?

Pretty much everything that you request "from Ethereum" - and more
Read 11 tweets
Jan 20
Had a few rough days and nights - no real damages but some really interesting Solidity security lessons learned 👇
The core of the issue was being too nice to the user (claiming rewards during unstake) followed by too strict validations (rewards were `require`d to be >0)
Our whitehat contract to reduce the potential for locking further funds and unlocking some of the dead-locked token was then utilizing
1. `owner` privileges
2. re-entrancy (srsly, ERC777 re-entrancy is rough)
3. an accounting bug allowing privileged partial double-spends
Read 4 tweets
Jun 10, 2020
The most expensive Ethereum tx was in fact a bug in a money laundering bot that made people believe it was miner laundering

How would that work, how do we know and why is that a bad idea wrt privacy?

👇👇👇

forbes.com/sites/youngjos… by @iamjosephyoung
Naive money laundering via miner collusion would work like this:

1) Create a tx with *ridiculous* gas price (in this case amounting to over 10k ETH, ~$2.5m)
2) most important step:
DO NOT BROADCAST THAT TX 🤣
(as any other miner would happily pocket your fee)
Read 11 tweets
Feb 7, 2020
The Bitcoin halving is commonly perceived as #NumberGoUp

But isn't it more of a #SecurityGoingDown meme?

Let's look at the fundamentals and some actual numbers:
Proof of work provides consensus-layer security for Bitcoin

PoW relies on miners to actually run infrastructure

That costs money which miners must earn somehow
Miners make money by

(1) block rewards, which are cut in half every 2 years and

(2) transaction fees, hopefully increasing to compensate (1)
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(