Casper as an EOS Contract

in eos •  2 years ago  (edited)

I recently reviewed the latest Casper Research Paper in light of an ongoing discussion with Vitalik Buterin over consensus mechinisms. It is my intent to be as objective and practical as possible while recognizing all factors of the greater picture.

One thing that has become abundantly clear in my research is that the various consensus camps have been talking past each other due to a general lack of language precision. For the sake of clarity I will attempt to use the language and terms found in the Casper papers.

Two Parts of the Problem

There are two parts to the Casper protocol, the proposal mechanism and the consensus mechanism. The proposal mechanism produces a sequence of blocks that link together and the consensus mechanism creates a checkpoint every 100 blocks.

Under the hybrid proof-of-work model Ethereum will use POW blocks as the proposal mechanism and the Casper algorithm to reach consensus on checkpoints.

The proposal mechanism is deliberately kept abstract; this can be a dictator, it can be a round-robin scheme between the participants in the consensus, or, as in our case with hybrid Casper, it will be the original proof of work chain.

Given that the proposal system is abstract, it is trivial to replace it with DPOS. In other words, where Ethereum uses POW we can use DPOS. Note that using POW with casper does require changing the Fork Choice Rule away from the “longest chain” to a new rule that factors in Casper first and only uses longest chain rule to break the tie.

Casper Protocol Messages

Because the Casper papers keep the proposal mechanism deliberately abstract, their initial proposal mechanism will be proof of work, and I am not aware of any proposed alternative proposal mechanisms, we can skip straight to the consensus mechanism of Casper.

Casper is first and foremost a protocol based on mathematics and game theory. This protocol attempts to reward those who agree while punishing those who disagree. It also has properties that punish all participants if certain objective measures of mischief are observed.

In the Casper protocol there is a set of validators and all validators are expected to send two messages per epoch: PREPARE and COMMIT over their preferred last blocks in the chain of the epoch. The proposed epoch is 100 blocks; under Ethereum an epoch is 1500 seconds, under DPOS it would be 300 seconds.

The bandwidth required grows order N with the number of participating validators and comes at the expense of potential bandwidth for other transactions. It is for this reason that an Epoch is 100 blocks and not 1 block.

Casper as an EOS Application

With this basic understanding, the EOS community could elect to adopt Casper as a contract to increase the perceived security of their blockchain. The rewards for participation could be funded by one of the 3 community benefit applications elected by stakeholders. Delegated Proof of Stake currently uses the longest-chain rule.

All of this could be implemented without actually changing the EOS protocol or at most tweaking the fork-choice rule to account for information from Casper validators. However, given the almost complete lack of forks in DPOS this hardly seems necessary.

The Importance of the Proposal Mechanism

The proposal mechanism determines what transactions get included in blocks and what transactions are censored. It also determines the set of blocks available to the casper consensus process.

The proposal mechanism controls the following aspects of a protocol:

  1. When is a block produced
  2. Who produces it
  3. What transactions are included
  4. Potentially who gets the fees
  5. When hard forks are adopted
  6. What soft forks are enforced
  7. The speed of short-term transaction confirmation
  8. The probability of short-term forks

This means that the proposal process is what determines centralization of production and censorship. Shutting down the proposal process shuts down the network as the Casper Consensus process depends upon a valid source of produced blocks. All Casper provides is a economic measure of finality every 30 minutes (Eth POW hybrid) or 5 minutes (DPOS hybrid).

We can conclude from this that the vast majority of the real consensus problems fall within the responsibility of the proposal mechanism. We can also see that Casper does nothing to improve the performance. Lastly, by the time an Ethereum block is buried under 30 minutes of POW the probability of reversal is so small that the relative cost of "casper insurance" likely far outweighs the actual risks involved.

My Proposed Proposal Mechanism

If we allow anyone to propose anything at anytime then Casper validators could reach a deadlock by not knowing which blocks to sign PREPARE messages for. It is in the validators interests to cooperate to reach consensus.

The Casper Validators may be wise to the deadlock issue and agree to “take turns” sending PREPARE messages. In this way the validators always send PREPARE for a valid block which already has the most PREPARE messages. Once we have established that validators will cooperate to schedule and synchronize timing of sending PREPARE messages we can also suggest that the first to send PREPARE will do so for a block that they themselves produced.

Therefore we can model Casper as a protocol of N validators that each submit a PREPARE message at individually allocated time slices, say once every 3 seconds. This means that with a 100 block epoch and 3 second blocks you could have over 100 validators. You could support more validators if you reduce the interval and start allowing multiple validators to submit PREPARE messages in parallel after enough momentum has built up. Think of it as an avalanche started by a single PREPARE snowflake.

While any number of validators is possible, a protocol would be wise to limit the absolute number. My understanding of Casper is that the minimum required bond grows as the number of validators increases. To support scaling Casper expects validators to create pools of bonds and potentially apply multisig to the PREPARE and COMMIT messages.

DPOS is Pipelined Casper

For bandwidth and performance reasons Casper currently executes one round (called an epoch) every 100 blocks. You could improve upon this by pipelining the epochs so that you have 100 epochs being processed in parallel with a new epoch finalizing every block. If we assume that the validators are taking turns being first to PRODUCE and PREPARE then we can view each DPOS block as a PREPARE message on all prior blocks for 99 prior epochs and a PROPOSE message for a block in the next epoch. In this same pipeline we can consider a PREPARE a COMMIT for the previous PREPARE.

So if you pipeline Casper and make each block Proposal a PREPARE for the current round (epoch 0) and a COMMIT for the prior round (epoch -100) then it is possible to apply the similar slashing conditions while getting much higher performance.

Two Phases to DPOS

There are two independent parts of the DPOS algorithm:

  1. Selecting the Producers
  2. Reaching Consensus

If you make the producer selection based upon size of the producer bond then you replace voting for producers with producer bonds. If you reinterpret the DPOS block production schedule as a pipelined sequence of Casper epochs then you can apply the Casper slashing conditions while having all the speed and benefits of DPOS.

Validator and Proposer Selection

Under the hybrid POW model, the proposers are selected by proof of work and the validators are selected by those with the highest stake. This hybrid model does nothing to prevent empty blocks or censorship from mining pools. This hybrid stage will eventually give way to some other proposal system, so let's speculate on what that might be.

A reasonable solution is to have the validators take turns producing blocks. The frequency of their selection could either be proportional to stake or independent of stake. If it is independent of stake then this role could be sybil attacked by someone dividing their stake into as many independent accounts as they can fund with the minimum bond. Therefore we prefer stake weighted production.

Under a stake weighted system each “proposer” will produce a block with a frequency proportional to their stake. This would be like the traditional proof of stake system.

We can assume that block producers (proposers) are rewarded with transaction fees and/or block rewards. These rewards can either be socialized or individualized. To keep incentives aligned among the validators it would appear that socialization makes the most sense to encourage cooperation rather than competition; however, under the hybrid POW model being adopted by Ethereum it would be individualized to the miners (aka producers, proposers).

Bias toward centralization

There are two forces at work in Ethereum’s proposal that both tend towards centralization. Firstly, assuming the operating cost for a validating node is constant, the rate of return is proportional to the stake at risk under the proposed individualized rewards structure. Therefore those with the largest bonds in a single pool have the highest rate of return.

Rationally, in terms of raw return on investment, everyone should pool their stake into a single account that certifies all blocks. Not doing this is against the economic best interest of the majority. The end result will likely mirror the distribution of mining pools where there are less than 10 individuals deciding the entire consensus.

Secondly, the operating cost of the validating node actually rises with the throughput of the blockchain. As Ethereum is already straining at around 15 transactions per second, this is an immediate concern. Purchasing and operating top end hardware is going to challenge smaller operations and therefore is another force for concentration (centralization).


At this point it should be clear that Casper is an application layer protocol that can be layered on top of any of the existing consensus algorithms to add check points. What Casper does not solve is the governance problem. Layered on POW governance would be left to block signaling, or layered on proof of stake it would amount to stake weighted direct democracy among validators. Under DPOS governance is multi layered delegation to a panel of equally weighted producers.

Absent a defined and robust governance model blockchains are governed by adhocracy which generally reduces to influence peddling to the largest validators and miners. Decisions over hard forks impact all stakeholders and all stakeholders should have some influence. This influence needs to extend beyond a basic opinion poll which could be ignored by producers, proposers, and validators. The selection of block producers (proposers) needs to be tied to community governance because it is only through the production (proposal) of blocks that decisions of governance are ultimately executed.

One thing is clear, unless a non-technical individual can trivially participate in the governance the interests among all participants on a blockchain will be misaligned. This means that individuals will have to contribute (and risk) their stake to a validator pool. The risk associated with contributing to a single pool is significant, especially if it is uncompensated. The pool operator would take on significant liability and has no incentive to share 100% of the rewards. This in turn means pool operators gain a larger percentage of the rewards.

Just as in Bitcoin and Ethereum, there will be a small number of pool operators who benefit from economies of scale. The more stake a pool has the lower the risk to the pool and the lower the overhead percentage of the operator. In this case people committing their stake to pools are not “voting” based on the politics of the pool, but based on their selfish rate of return offered by the pool operator. Who knows, pool operators may even rent stake to gain a 51% control over the proposal algorithm.


Casper is an interesting algorithm to reward those willing to bet-their-stake on the validity of a block. It remains to be seen what the real-world risk/reward looks like for participating in this game. It is a game where honest mistakes caused by software bugs, network disruptions, or griefing peers may cause unexpected and undeserved losses. This risk may be difficult to access and may discourage participation of honest players. The slashing conditions are a harsh code-is-law kind of governance that leaves little room for honest mistakes that caused no measurable harm (such as accidentally running a backup node with the same key and signing twice). The intention was to maximize uptime and minimize missed epochs, but the outcome was to get slashed.

After all of this effort and game theory, it is still not clear that Casper will result in more relevant security or decentralization than we have with POW and traditional POS. I remain convinced that DPOS provides the best possible proposal algorithm for the Casper consensus algorithm, but I am unconvinced that Casper adds any meaningful value. After all, a properly functioning bug-free version of DPOS produces no forks and achieves irreversible checkpoints 30 times faster.

That said, I think it would be a worthwhile experiment to implement that Casper protocol as an EOS smart contract. Using our concept of Community Benefit Contracts (CBCs) we can propose that Casper be implemented the staked EOS holders vote on how much inflation to reward the Casper contract with, if any at all.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Looks good to me, Dan.


  ·  2 years ago (edited)

"But I know he is damn right !"


That literally sums up the last 4+ years of me reading Dan's writings. But just try and get me off that chair... just try it...

Neither do I.

LOL hahaha

I know the feeling.


LOL hahaha

Don't worry. Here's another one.

HaaHaa! Too funny!


"One thing that has become abundantly clear in my research is that the various consensus camps have been talking past each other due to a general lack of language precision."

If this is how you feel, please define acronyms! You start using DPOS without defining it, leaving it to the reader to go and Google it. Please define acronyms!


i love honesty


This ^^ literally made me laugh aloud!!

hahaha I'm glad <3

haha That has made my day, never go full retard lol x


like it is

Oh god this made me laugh so hard lol

@alainite; that is hilarious and honest!!!!!

hahaha thank you <3

Exactly my thoughts. Is he even speaking english?

Lol, wkwkwkwk

Same here but I am trying to learn about crypto world .

there's probably less than 1% who truly comprend....

i felt like this is mathematics written in english and then i saw this meme i couldnt help bursting out with laughter so much so people around me looked askance at me like i was loosing it. really funny dude.

lol :D

Same feeling, Haha

That's me when I read something new!

  ·  2 years ago Reveal Comment

I noticed you mentioned this twice, and it's a key point:

Not doing this is against the economic best interest of the majority. The end result will likely mirror the distribution of mining pools where there are less than 10 individuals deciding the entire consensus.

I like how DPOS encourages people to vote based on their own long-term interests which are for the entire network, not some immediate financial gain. I also agree with Vitalik's comments about the information asymmetry involved (i.e. politics) in trying to keep voters engaged and informed enough to make good decisions. To test this, I wrote some code last night to analyze voter engagement (using an arbitrary definition of "had to post at least once" to mean an "active" account) to find we only have 7.5% engagement among active accounts. If you call > 100 posts active, that percentage grows closer to 50%. Still though, I think we as a community have some work to do to explain to people the importance and benefit of regularly voting on witnesses and keeping those votes updated as things change. I plan to do a regular weekly report to show how the voting engagement is changing over time and who the top accounts by VEST are who are not voting for a witness.

You can read more here: How Many Steemians Are NOT Voting for a Witness? I Found the Answer!

Nicely done! So 50%, eh? Sounds very similar to typical US voter turnout :P

much better than US voter turnout. and here our votes actually do something

You took my words :( But I didn't need to type much either.

As always quite insightful Luke, I am likely part of that missing activity, as I have been un-engaged throughout the summer...Come winter I will be hobbled in front of my computer again.

Love that your making it happen

unconvinced that Casper adds any meaningful value

Sure it does, it has a cool sounding name. Sounds newer and better than the proven DPOS even if it isn't.

We could change the name of DPOS to something cool like "Ghostly Duo protocol" and we'd be cool and could raise all kinds of ICO funds with it.

[For those unaware, this is sarcastic humor]

  ·  2 years ago (edited)

Let's rename DPOS to CASPEOS


  ·  2 years ago (edited)

I know a bit of crypto, but I was like:

WOW! More the 3500 views already !!!

Well, based on this post, I'm glad to see that the difference of opinion with Buterin didn't turn into some kind of silly internet feud, even over matters as major as this. Both of you have done incredible things in changing the cryptocurrency (and thus fintech) landscape; there's room for both EOS and Ethereum to show their quality.

In my professional opinion.... Poo sticks to the bowl. FACT

After reading this is there any doubt Dan is the real SN?

LOL right!
only the ones who know, know :)


As an EOS holder, let's implement the Casper protocol.

@dan Your article brought to mind my growing concern about blockchain governance and concensus systems, and the ability of enemies of blockchain freedom (eg. those who would/are enslaving us) to manipulate 'the cyber masses' to adopt trojan horse code that opens up the blockchain to attack. I started off as a comment and it grew into this article

Casper atau tuyul adalah lambang pesugihan di indonesia

It gives me (as a non-techie) great confidence in both EOS and Ethereum that Dan and Vitalik are talking about POS. I am sure both platforms will form a large part of the Internet of Money and I admire and respect you both ;-) Thank you for your wonderful work!

Curious to hear your thoughts on Steemit's SMTs. In particular, folks are asking how does this impact EOS? Always appreciate your thoughtful comments.

i have been subscribe on , but still little bit confuse to do a participating..can i get some help please..?

This is a great post, it gives us non-tech people an idea or picture how everything works at the backend. Good Read.

One thing is for sure, Block chain technology is growing. Dan and Vitalik is a legend, they will set standard and shape the future of this technology

.com era has gone through.. i hope that this technology helps uplift the life of humanity.

I support Blockchain technology for everyone's future

@dan I guess that your response gave a comprehensive answer to Vitalik response to your former post..see the link

In light of all these exchanges, I think that both technologies are great and innovative . However, EOS is built to solve all the limitations of Etherium and will certainly disrupt the smart contract segment if properly implemented.
These exchanges between both of you are great because it leads to innovation: trying to improve on already great technology and we users will be at advantage especially on EOS which is currently cheaper to buy. I hope , that we can easily access EOS tokens via our steem wallet just like Bitshares . Keep up the good job @dan, you have my full support and blessings.

Is this about governance or efficiency? Or consensus?

Maybe the fastest thing is to force ordering of all transactions and only sending the hashes out to check agreement. Why resend transactions if nodes have them?

As for governance, so many systems seem to work. I perhaps did overkill with a 3 branch system of checks and balances.

I'm not an expert, but this all seems possible to me.

Hi @dan, thanks for the extensive expose on Casper. I tend to agree with your conclusions as well. On a different but relevant note, would you advise​ holding exchange bought EOS tokens in the Exodus wallet? Even though the EOS site cautions against this. I guess my real question is that is there any risk of loss if I hold my exchange bought EOS Tokens in the Exodus wallet?

This went right over my head and out the window !!!!! Bye !!!!

wiping away that wall of text

Wow, I have a lot to learn!

Me too. So much to learn each day. Learning is fun too.

  ·  2 years ago (edited)

Hi Dan, i agree DPOS is a better philosophy to follow. Simply because in a dedicated network you have a more controlled environment it is much more secure and you know who does the actual work and is awarded by the electors. You avoid outside interference to the blockchains creation process and have better faster more secure control over the blocks Great Idea!
As for Casper i would recommend for blockchain creation in the case where the work "hash mining" is being done by outofhouse services which have no mechanisms to check themselves and have certain security and fairness issues.
Also EOS Tokens in the Exodus wallet? Your thoughts please.

I really admire all your posts, your post is very very amazing, I really want to be like you ,,, once again extraordinary @dan

  ·  2 years ago (edited)

Is this why openledger has been rewarding voting so well. And why BTS instead of Obits now? Thanks for any explanation.

@dan deberias traducir o escribir contenido en español también somos muchísimos ya los usuarios hispanohablantes... a quienes nos servirá tus análisis!

Si @dan , me permite a mi traducirá todas sus publicaciones también y dejaria el link al articulo oficial de su perfil! Depende de usted Dan!...

Porque son muy interesantes!

Ni pidas permiso, hacelo nomas y ponele el tag #spanish.

If @dan allow me, I can translate some of his work to spanish. Will be a pleasure!


Isn't Casper a ghost?

An adorable casper mr @ and ...
Casper as an EOS contract is remarkable ...

You are a true anarchist, even if you don't consider yourself as one! Good for You, making history. Congrats!

Sounds about right... if I could understand anything :D

Woooww, very good planing...👍👍

Very informative article. Thanks.

Dan, will EOS run on the Ethereum network permanently or will they develop their own platform over time?

To be precise EOS is not running on Ethereum. Only the crowdsale of the token is being done on it. The actual blockchain will be launched after the end of the crowdsale.

EOS will run on own blockchain when it is ready.

Good post my friend
Check out my post and give upvote

Casper @dan

You repeat a paragraph under: "Bias toward centralization"

Thanks, fixed.

Thanks for the article. Clear concise and well written. I found it to be a big help. I am going to Resteem and Follow. Especially, so I can find this and refer back to it.


Well formulated and interesting read.

I Comment Here , By Hoping You See Potential Good Post From My Blog , If You Would Be Able To Look Into This Post And Give Me A Fair Mark For The Post . Any Advice Is Appreciated. I Am A Newcomer Here On Steemit.

yeah My favorite animation ever ;)

Penalizing for disagreement? Sounds impractical.

But initially would this reduce the value of EOS?

goog post thank for sharing


thanks for the great content

Great post of quality information bro, indeed helpful. Kudos

If Casper doesn't get rid of POW, it would be a lot of effort with little result.

Rationally, in terms of raw return on investment, everyone should pool their stake into a single account that certifies all blocks. Not doing this is against the economic best interest of the majority. The end result will likely mirror the distribution of mining pools where there are less than 10 individuals deciding the entire consensus.

Is this bit posted twice to empathise this point, or in error? Otherwise great analysis, thanks!

Dan you're killing it recently! I'm studying very hard......I saw three great videos of you recently, too.....very good work!

Ethereum derives some of it's valuation from ICO launches.
How sustainable is this?

Ethereum is slower and more expensive compared to my Steemit transactions.
The user doesn't care about the technicals.

Dan has proven his ability to start great blockchains. He is a top professional. The proof is in Bitshares and Steemit.

Dan is transparent and poses logical arguments that are clear.

The billionaire Chris Sacca is one of the greatest angel investors of all time.
Sacca bets on people, not companies. What is your gut on this?
Dan is my man.

PS. I did read through all the previous articles and all comments. All the technical points have been covered better than I could attempt, so this is my way to add a perspective.

It's "Ethereum."

Cheers. Thank you. I corrected it.

@eeks are you a witness?


Really amazing explanation, Dan. I wish I had more free time so I could contribute more to the ongoing discussion. As always, like you said, it really boils down to economic incentives. On Casper/ETH there is an incentive to centralize block production in order to earn the maximum rate of return possible. With DPOS, the economic incentives are to collaborate.

That alone is a very compelling argument. You can design a tremendously impressive, complex technological achievement, but if the economic incentives do not align to encourage good behavior, things are unlikely to turn out how you expect. This is especially the case when there are equally viable competitors that designed their systems around the fundamental economics of the system.

Just my 2 cents.

I thought you are going to talk about the cartoon... LOL

I follow your writing fun for me

Interesante pero discutible

100 blocks could eventually be corrupted by one powerful node. how can it ensure true randomization? How can anything create a real randomization, if algorithms aren't really random? Nuclear decay. Completely random. Read a Geiger counter in front of an opened smoke detector. Viola.

Please follow back and upvote me :)
Thank you.

Everytime i see Casper the friendly ghost, i always remember how pretty Christina Ricci was 😍

I just want to ask you for help as many honorable popes, I created a UPVOTED COMMUNITY program, but as you can see in my post when promoting upvoted community, not having seen my post, I want to ask you to look at it even for a while my post HERE !!!

my program wants to help the minnows in steemit but see i do not have enough steem power, i just a minnow too, i have to give them 100% reward every post but my post limit is so fast so i can not upvote many post minnow other. at least I just want you to catch a glimpse of my post so minnow just as I can grow. I am very grateful to the pope like you @dan

great post

you get so many vote but earning in - 0.00 why

I have to reread the article for understanding before applying it. I have bookmarked it.

I feel like Jon Snow after reading this.

Great work Dan. We believe you would have picked the best mechanism thats works well with EOS.

By the way I dont understand anything that you wrote here lol. Best wishes,


i think is very nice topic

Cheers to not overengineering everything! Btw really hard to follow when you're using Ethereum terminology ;)

I think the Casper protocol would be a useful experiment to implement as an EOS contract.
Upvote and Resteemed
Steem on

"Anyone who is actually paying attention realizes it is just a matter of structure and externality management regarding new functionality."
Teams, comunity and Research is what matters now. Very good approach for analyzing Casper and thanks for sharing your thoughts so fast!

New to this platform, I have some understanding of what the writer is trying to promote.. Looking forward to the role I can play

Where's ned man ?

You have won the internet today

my friend, do you have more of these?

About 24 oh these , you can find them on my profile .

Proofreading hat on: In the section 'Bias toward centralization', the fourth paragraph contains a large repeat of the second paragraph. Looks like a copy-paste then edit where there should have been cut-paste then edit?

Is there a simpler way to explain what you said? I would really like to understand it. Or at least a link to the basics.

I am not a programmer, but Vitalik started off as a curious kid in Bitcoin and ended up developing Ethereum, a more complete and viable Blockchain. We, as curious people can learn as well, and who knows, makes wonders in the world

I was reminded that in the ninety-year-old casper movie was in great interest by the children of that year, the story was very interesting

good read nice post!

What is the reason why the payout has been declined?

Potential Payout $835.28
in 6 days
Payout Declined

I was wondered all this all worked. Thanks!

Hahahah I make people around me curious, why I laugh

Congratulations @dan!
Your post was mentioned in the hit parade in the following category:

  • Pending payout - Ranked 1 with $ 833,01

A bit off-topic, but it would be Great if it might be possible to buy EOS tokens by STEEM and Bitcoins (as in example I don't have any Etherum)
And buying EOS with Steem would be great, I think not only for me (anyway I don't have much Steem) but for many users on this site

Is this something which can be done?

so is it a ghost application!!!!! loll

EOS to the moon !

Just remember that Casper was a ghost.

thx for the post.. today I made my first very small investment in EOS.. see my post

I am just a newby and it's fu... hard to survive last month in this crazy world

After reading that and understanding absolutely nothing, I feel I should extend me EOS holdings.

Great share with the community. I feel like I am further down the rabbit hole.


first CASPER ref I've seen, love it... he's the friendly ghost !! (-: watched that show on WGN out of Chicago on Grandparent's cable back in the day !

As somebody who's new to crypto, could you direct me to some resources for EOS? This was great a great post and I'd like to learn from the same place you did

Congratulations @dan! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Your post got the highest payout on one day

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Very well written article, however i think making Casper based on another system forces Ethereum to rely on security of EOS, and adds a possibly uncontrollable attack surface.

Yeah interesting.