Authors : Blake West
Summary :
On Dec. 2nd, anonymous hackers exploited a 5-year old test Goldfinch contract, which resulted in a loss of $330k USDC. We propose to use $250k out of the remaining Bug Bounty budget to cover losses.
Context:
Before Goldfinch launched publicly, in Sept. 2020, we built and deployed test contracts to ensure everything worked. This was prior to audits or any public announcements of Goldfinch. One of those contracts was 0x0689aa2234d06Ac0d04cdac874331d287aFA4B43, which a small number of people tested by depositing, getting repayments, etc.
This contract contained a critical vulnerability that was fixed prior to public release. The full potential of the bug was not fully understood though and the old test contract was not patched.
In short, because the contract was empty and devoid of any real investors, the vulnerability enabled an attacker to take all the USDC in someone’s wallet for themselves by making a false loan repayment (which could be done via the victim’s address), and collecting the “interest” all for themselves. This effectively let the attacker to take up to the amount that the test users had set as their USDC allowance for the contract. Note: Setting USDC allowance to the max available (effectively infinite money) was the default of the contract as was standard industry practice at the time 5 years ago, and still is for many DeFi protocols.
For example, if you had an allowance of 0, nothing was possible, but if you had an allowance of $1078 set, then if you received $2k USDC into the wallet, the attacker could take $1078 without you doing anything. Had there been substantial other investors, the false payment would have gone to all investors, and still been bad, but it would not have been economically very interesting for an attacker.
As soon as the attack came to light, we immediately diagnosed the problem, notified all parties who might theoretically be affected, and also effectively neutered the contract by upgrading it to the zero address to double ensure that no further damage could be done
Motivation
In terms of what to do, because this was a legitimate technical bug on a Goldfinch contract (albeit a non-public contract) that the team asked a small group to use, I think we need to at a minimum maintain the technical integrity of the protocol and show we stand behind our contracts and our users. We had previously allocated $500k to a bug bounty program, of which around $100k had been used, leaving around $400k left. Had this bug been brought forth responsibly, we probably would have given it the a reward of around $250k or maybe even the maximum of $500k. To balance this loss with ongoing needs of the protocol, we propose only using $250k. This would leave the protocol with a year of expenses already pre-paid (through the Annual Budget approved from August), plus with $250k still remaining.
Discussion:
We recognize this is a sizable portion of the treasury and the community has many costs right now, including supporting lenders with the prior borrowers. We need to balance all of these things, and a very important thing is maintaining the security and technical integrity of the protocol. The other costs (eg. legal for loan recovery, community mods, market makers, etc.) have already been budgeted significant funds, and this is coming out of a separate pre-existing budget for security. So we believe it’s an appropriate allocation across the community’s overall priorities that we need to balance.
Specification & Requirements:
Specification
- The DAO treasury send $250k for reimbursement immediately to the community multisig where it will be disbursed to victims.
Rationale
- To maintain the technical integrity of the protocol and help the victims of the attack
Benefits
- The Goldfinch protocol technical integrity is maintained and users are substantially compensated for the theft that occurred.
Drawbacks and Risks
- The treasury has less funds to handle expenses in the future.
Voting :
- YES vote: Reimburse $250k of the losses (about 75% of total damages) from the hack
- NO vote: Do nothing
Resources :
- Hack tweet thread
- Hacked contract on Etherscan