6 ms·
This isn't even a loophole. Beanstalk apparently set up what amounts to staking system for votes. More money == more votes. Have enough money? Well, then yo
by BaseballPhysics 5y ago
This isn't even a loophole.
Beanstalk apparently set up what amounts to staking system for votes. More money == more votes. Have enough money? Well, then you have the majority of votes and can do whatever you want.
This is precisely how the system was designed to work. They just didn't foresee someone building up a large enough stake to amass the voting power needed to undermine the system. And that is simply a failure of imagination and goes to show how naive these folks were.
The way this works in the real world is you have a limited number of shares that give individuals some number of votes, and those shares change hands. In order to build up a large enough position to control a company, you have to convince existing owners to give up their stake or vote with you.
But if every dollar contributed to a "silo" creates a new vote, then yeah, you're basically saying: If you're rich enough you can take control of the project by simply amassing a large enough fortune in the project.
There's probably things they could've done to reduce the likelihood of an event like this--e.g. requiring supermajority or unanimous voting for certain types of changes, for example--but they didn't, so here we are. The system worked as intended.
And yes, I really mean "intended". They intended for people with more money to have more of a voice. And this is the (extremely obvious) consequence of that choice.
- machiste77 5y agoThe thing about a flash attack is that you don't need to be rich to buy that many tokens. You can borrow funds, buy the tokens with borrowed funds, execute your vote, sell the tokens, and then return the funds all in the same transaction. The only money you would need is the cost of gas.
- BaseballPhysics 5y agoAbsolutely, the mixing of flash loans in all this is a fascinating little "innovation" that made this transaction that much easier. But there's certainly crypto whales out there with enough funds that could've done this if they felt like it. A 2x return on an 80M investment is a pretty darn juicy opportunity for someone with a sufficient lack of scruples. TBH, the more I think about it, the more surprised I am that it took this long for someone to take advantage of this weakness...
- ad404b8a372f2b9 5y agoCan you elaborate on what a flash loan is? I don't understand how someone can anonymously borrow $80M worth of anything.
- freemint 5y agoA flash loan is a risk free crypto loan. It works by releasing the money only on the condition that it is returned before the end of the block. If it is not returned by the end of a block, the block is invalid and can not be added to the blockchain (provided the majority follows the block chain rules). Any block that is added to the blockchain has an exclusive lock to the entire block chain (no two blocks can "happen" at the same "time") meaning this guarantees atomicity of what happens in a block.
- miracle2k 5y agoThis but it's transactions, not blocks.
- UncleMeat 5y agoBut then how are the funds used? Why is somebody able to transact with funds that they will receive in a block that hasn’t yet been added to the chain?
- karpierz 5y agoThe transaction is basically a function call like this: flash_loan(int amount_borrowed, func arbitrary_trades) 1. give LOANEE_ADDRESS amount_borrowed 2. call arbitrary_trades() 3. give LOANER_ADDRESS (amount_borrowed + interest) When 2. is executed, the loanee has the money. When 3. is complete, the loaner has the money back. If the loanee doesn't have the money to give, 3rd step fails. And since its atomic, the whole transaction fails.
- deleted 5y ago[deleted]
- 5y ago
- JulianMorrison 5y agoStructured like that, it honestly sounds like the only thing that "went wrong" is that an unplanned third party end ran their "technically this is completely by the book" rug pull.
- cuteboy19 5y agoWhy are we assuming that the "unidentified" attacker isn't one of the promoters themselves?
- jknutson 5y agoThe only bit of information I’ve found in support of their credibility is their willful “self-doxxing” in the announcement they made post-attack on their discord. Mind you, the names they gave for themselves could be completely false, they did not follow it up with any more identity proofing, but if the projects’ founders identities are what they say they are (and there is no cofounder/person involved with the project), logic dictates that save for some 4D-chess level scheme, no attacker would identify themselves immediately after the attack.
- nullc 5y ago> They just didn't foresee You're assuming that it wasn't intentionally designed that way. The regularity of these events should makes it impossible to believe that they're all accidents... it's also not possible to figure out exactly which ones are and which aren't, which is itself no accident. (Or in which cases a third party exploited the vulnerability prematurely...) Particularly so in that the advertised functionality of the system was obviously a non-sustatinable ponzi scheme... It was always going to explode, the only uncertainty would be how.
- carmen_sandiego 5y agoThe counterbalance is that this is like a game of hot potato. You set up your platform with known flaw, and you wait around trying to hit max locked funds. But the whole time you're nervous someone else is going to spot the issue and take it before you do. If that happens, and you used some kind of personal credibility to set it up, you've missed your shot.
- bornfreddy 5y agoAnd even if you succeed, the funds are still "dirty".
- exdsq 5y agoThis is why you have things like quadratic voting to e the votes you have from your net worth - it’s cheap to vote once, it’s cheap to vote for two different things, but it’s very expensive to vote for the same thing repeatedly
- dragontamer 5y agoBut it's cryptocoin, so you can automatically make wallets and automatically transfer money to them rather easily. Just a python script to avoid that artificial inefficiency entirely.
- newswasboring 5y agoWouldn't this be hindered a bit by the gas prices?
- exdsq 5y agoThere are ways to reduce this issue but yeah you are right. For example, you could require people to be staking X for Y period of time in order to vote. You could have a voting system that picks voters in advance so you can't suddenly generate accounts before the vote you want to abuse is called. You could analyse accounts and not allow 'fake looking' accounts much in the same way you can spot fakes on Twitter. In fact I'm currently building such a tool for NFT collections to try help people avoid ones with dodgy buyer behaviours. Also as the other user posted, gas fees would cripple you on Ethereum. Pretty sure I spent $50 sending some money somewhere earlier.
- skybrian 5y agoQuadratic voting isn't all that different from one-person, one vote, because it assumes it's difficult to create new accounts. Otherwise you could just create a new account for each vote. So then you need an identity verification system, or at least some practical difficulty in creating many accounts without getting caught.
- alasdair_ 5y agoQuadratic voting only works in a case where it’s not trivial to create unlimited new identities that can work together.
- koboll 5y ago>There's probably things they could've done to reduce the likelihood of an event like this--e.g. requiring supermajority or unanimous voting for certain types of changes, for example--but they didn't, so here we are. The system worked as intended. A supermajority was required. The attacker purchased enough LP tokens to secure one. At the moment of the attack they held about 70% of voting power. Unanimous voting wouldn't have been particularly useful because it would never be used. You can't ever convince every last investor to log in and pay gas to vote on a governance measure. There was a protection in place, which was that the measure must be up for 24 hours before it can be passed. But the critical flaw was that the contents of a measure can be swapped out by a supermajority token holder, even after the 24 hour cooldown period. The attacker threw up 2 measures, one pointing to a nonexistent contract address, and another dummy measure as a diversion that would have transferred $250,000 to Ukraine and $10,000 to a wallet they owned. The diversion worked, and everyone spent the 24 hour period discussing why someone thought they could hoodwink the LP token holders into swindling $10,000 from them, and more or less ignored the second measure. Then, during the attack, the attacker deterministically created the treasury liquidation contract at the formerly blank address and used the flash loaned supermajority to pass it.
- deleted 5y ago[deleted]
- mrep 5y agoDo you have a link to where they normally discussed these things? I would love to read that.
- koboll 5y agoNot offhand, but if you want to find the discussions, you can go into the Beanstalk Discord and search "Ukraine" prior to the time of the attack, and you'll see people discussing the rogue measures.
- BaseballPhysics 5y agoObviously I don't understand the details of Beanstalk, and you clearly have a lot of expertise, here, so first, thank you for the details! Second, I am curious: > There was a protection in place, which was that the measure must be up for 24 hours before it can be passed. So what happens after that 24 hours? The way you've described it here, it sounds like there's an up/down voting system after the cooldown period to either confirm or block the proposed measure, but it's not clear to me how that works. Who has control over that final decision?
- SV_BubbleTime 5y ago>This is precisely how the system was designed to work. They just didn't foresee someone building up a large enough stake to amass the voting power needed to undermine the system. And that is simply a failure of imagination and goes to show how naive these folks were. My favorite take on crypto commodity is that “They’re recreating and failing to solve problems that have been solved in traditional banking for hundreds of years”. Maybe there is some upside where this is just all growing pains, or maybe it’s all garbage all the way through, I don’t know. But it’s clear to me that technically smart does not mean economically wise.
- htrp 5y agoI believe the term is "Speedrunning every financial crisis"
- JoshuaDavid 5y agoEpistemic status: mostly joking: So how long until the crypto speedrun of financial crises reaches, and then surpasses, the regular financial system and we see financial crises that haven't even happened yet in the regular financial system (but are likely to happen at some point in the future)?
- alasdair_ 5y agoThis happened at the point where a significant portion of the entire earth’s energy output was consumed just to maintain the financial system.
- vkou 5y ago> This is precisely how the system was designed to work. They just didn't foresee someone building up a large enough stake to amass the voting power needed to undermine the system. And that is simply a failure of imagination and goes to show how naive these folks were. They also didn't do any research on why a mountain of legislature, regulation, and case law that protects minority shareholders exists. By the time you're playing with nine figure sums, one would expect that to be something they should have looked into!
- BaseballPhysics 5y ago> They also didn't do any research on why a mountain of legislature, regulation, and case law that protects minority shareholders exists. Well, no, because the assumption among crypto libertarians is those laws and regulations are a product of a government that's a) incompetent and/or b) corrupt. If you take it as a first principle that the current system is the one that's broken and that you're part of a grand mission to reinvent it, of course you're not going to waste your time trying to learn from it.