Punk Protocol Reinitialized: Difference between revisions

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search
(Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/punkprotocolreinitialized.php}} thumb|Punk ProtocolThe Punk Protocol is a decentralized annuity protocol, which allows investors to contribute and pays out periodic regular cash flows. All funds were stored in a smart contract hot wallet. A malicious hacker found an exploit, allowing them to reinitialize the smart contract hot wallet. However, while their transaction sat...")
 
No edit summary
Line 1: Line 1:
{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/punkprotocolreinitialized.php}}
{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/punkprotocolreinitialized.php}}
{{Unattributed Sources}}


[[File:Punkprotocol.jpg|thumb|Punk Protocol]]The Punk Protocol is a decentralized annuity protocol, which allows investors to contribute and pays out periodic regular cash flows. All funds were stored in a smart contract hot wallet. A malicious hacker found an exploit, allowing them to reinitialize the smart contract hot wallet. However, while their transaction sat in the mempool, a white hat hacker was able to frontrun it. The hacker kepts a $1m bounty for themselves and returned the rest.
[[File:Punkprotocol.jpg|thumb|Punk Protocol]]The Punk Protocol is a decentralized annuity protocol, which allows investors to contribute and pays out periodic regular cash flows. All funds were stored in a smart contract hot wallet. A malicious hacker found an exploit, allowing them to reinitialize the smart contract hot wallet. However, while their transaction sat in the mempool, a white hat hacker was able to frontrun it. The hacker kepts a $1m bounty for themselves and returned the rest.
Line 6: Line 7:


This is a global/international case not involving a specific country.
This is a global/international case not involving a specific country.
<ref name="openblocksecgithub-2342" /><ref name="punkprotocolmedium-3497" /><ref name="rektnews-3498" /><ref name="punkfinance-3499" /><ref name="punkdocs-3500" /><ref name="punkprotocolmedium-3501" /><ref name="etherscan-3502" /><ref name="etherscan-3503" /><ref name="punkfinancegithub-3504" />


== About Punk Protocol ==
== About Punk Protocol ==
Line 118: Line 120:


== References ==
== References ==
[https://github.com/openblocksec/blocksec-incidents/blob/main/defi/2021.md blocksec-incidents/2021.md at main · openblocksec/blocksec-incidents · GitHub] (Aug 10)
<references><ref name="openblocksecgithub-2342">[https://github.com/openblocksec/blocksec-incidents/blob/main/defi/2021.md blocksec-incidents/2021.md at main · openblocksec/blocksec-incidents · GitHub] (Aug 11, 2021)</ref>


[https://medium.com/punkprotocol/punk-finance-fair-launch-incident-report-984d9e340eb Punk Finance Fair Launch Incident Report] (Aug 28)
<ref name="punkprotocolmedium-3497">[https://medium.com/punkprotocol/punk-finance-fair-launch-incident-report-984d9e340eb Punk Finance Fair Launch Incident Report] (Aug 29, 2021)</ref>


[https://www.rekt.news/punkprotocol-rekt/ Rekt - Punk Protocol - REKT] (Aug 28)
<ref name="rektnews-3498">[https://www.rekt.news/punkprotocol-rekt/ Rekt - Punk Protocol - REKT] (Aug 29, 2021)</ref>


[https://punk.finance/ Punk.Finance] (Sep 14)
<ref name="punkfinance-3499">[https://punk.finance/ Punk.Finance] (Sep 15, 2021)</ref>


[https://docs.punk.finance/saver/motivation https://docs.punk.finance/saver/motivation] (Sep 14)
<ref name="punkdocs-3500">[https://docs.punk.finance/saver/motivation https://docs.punk.finance/saver/motivation] (Sep 15, 2021)</ref>


[https://medium.com/punkprotocol/punk-compensation-plan-and-the-path-forward-c86b6143c01e Punk Compensation Plan And The Path Forward] (Sep 26)
<ref name="punkprotocolmedium-3501">[https://medium.com/punkprotocol/punk-compensation-plan-and-the-path-forward-c86b6143c01e Punk Compensation Plan And The Path Forward] (Sep 27, 2021)</ref>


[https://etherscan.io/tx/0xa85ce7d9d0882b858bf3dbc8f64b72ff05f5399ec3d78d32cea82e6795ccc7ce Ethereum Transaction Hash (Txhash) Details | Etherscan] (Sep 26)
<ref name="etherscan-3502">[https://etherscan.io/tx/0xa85ce7d9d0882b858bf3dbc8f64b72ff05f5399ec3d78d32cea82e6795ccc7ce Ethereum Transaction Hash (Txhash) Details | Etherscan] (Sep 27, 2021)</ref>


[https://etherscan.io/tx/0xc977ea434d083ac52f9cad00417bcffb866b894a5cbabf1cc7af9c00e78b8198 Ethereum Transaction Hash (Txhash) Details | Etherscan] (Sep 26)
<ref name="etherscan-3503">[https://etherscan.io/tx/0xc977ea434d083ac52f9cad00417bcffb866b894a5cbabf1cc7af9c00e78b8198 Ethereum Transaction Hash (Txhash) Details | Etherscan] (Sep 27, 2021)</ref>


[https://github.com/PunkFinance/punk.protocol/commit/142e4a78eff99e088d7d4b8f230eb89a9242e2a1 Hard Work Now! For Punkers by 0xViktor... · PunkFinance/punk.protocol@142e4a7 · GitHub] (Sep 26)
<ref name="punkfinancegithub-3504">[https://github.com/PunkFinance/punk.protocol/commit/142e4a78eff99e088d7d4b8f230eb89a9242e2a1 Hard Work Now! For Punkers by 0xViktor... · PunkFinance/punk.protocol@142e4a7 · GitHub] (Sep 27, 2021)</ref></references>

Revision as of 21:55, 22 February 2023

Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' section to other sections, and add any missing information or sources you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.

Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!

Punk Protocol

The Punk Protocol is a decentralized annuity protocol, which allows investors to contribute and pays out periodic regular cash flows. All funds were stored in a smart contract hot wallet. A malicious hacker found an exploit, allowing them to reinitialize the smart contract hot wallet. However, while their transaction sat in the mempool, a white hat hacker was able to frontrun it. The hacker kepts a $1m bounty for themselves and returned the rest.

The Punk Protocol has resolved the problem and come up with a plan to compensate affected users - first from the returned funds, but also from the sale of NFTs and ongoing project revenue. They've fixed the code, added unit tests, and are looking to institute a bug bounty.

This is a global/international case not involving a specific country. [1][2][3][4][5][6][7][8][9]

About Punk Protocol

"DeFi Pension 401k. Earn automated cash flows periodically." "[W]e propose the world's first decentralized annuity protocol through this document, hoping that anyone can participate without central permission to receive periodic cash flows with higher interest rates and achieve financial stability and freedom."

"With the explosive growth of TVL in the DeFi market and numerous ways to create profits, it has become possible to design long-term and stable decentralized annuity products. An annuity is a financial product that a subscriber regularly deposits a certain amount of money and receives in periodic cash flows, mainly to prepare an individual retirement or build a steady income source."

"Decentralized annuity protocol and its decentralized autonomous organization (DAO) can be an elegant solution to overcome all of the problems mentioned above or hedge the risk. It can eliminate all fees except for the gas cost, significantly improve profitability through various DeFi product and investment strategies, and hedge against inflation and system risk of traditional finance while operating transparently. Problems such as opaque operation, fiscal imbalance, and unfairness can never occur since smart contracts are automatically operated by the rules."

"Punk Protocol will be your life-saver from a slave-like life. Be Warren Buffett in digital asset. Smart contracts help you HODL Crypto & DeFi."

"The platform planned to offer a DeFi annuity scheme backed by ETH, WBTC and stablecoins." "The project planned to use a Fair Launch to bring $3M of deposits into 3 stablecoin pools: USDC, DAI and USDT."


"On Aug 10th, Punk Protocol was hacked for $8.95M."

"The Punk post-mortem details the vulnerability that led to the attack, and describes the root cause as a missing Modifier in the initialize() function within the CompoundModel code."

"The hacker used delegateCall() to replace what should have been the protocol’s forgeAddress with their own malicious contract, as a parameter of the CompoundModel’s initialize() function."

"The lack of an “initializer” Modifier meant that the manipulated function was executed despite being associated with an unknown (and in this case malicious) contract."

"With the contract address now updated, the attacker was then able to call withdrawToForge, sending the assets controlled by the CompoundModel directly to the malicious contract, and into their wallet."

"Although the withdrawal mechanisms are protected by the OnlyForge Modifier, the initialize() function had already defined the malicious contract as the forgeAddress, and as such OnlyForge did not detect any abnormality."

"Luckily, a whitehat was able to frontrun the transactions and return over half of the funds." "But not without taking a million dollars for themselves."

"We stated that we will be reimbursing the stablecoins invested and was able to recover 3,000,059.381173 USDT + 1,954,191.544042759382372963 DAI after paying a fee of 1M DAI up to approximately 16% of the retrieved. The recovered stab[l]ecoins are safely transferred to a wallet address and will be used as compensation for the Fair Launch participants."

"~$5M was later returned." "Currently, we are unable to recover part of the lost funds($4M). However, we choose to compensate depositors unconditionally and in a swift manner."

"During the Fair launch, we have collected the transaction data through the servers to know who participated in the event. In preparation for the recovery plan, our priority was that users understand the recovery plan while mitigating the damage and maximizing user satisfaction." "The funds recovered from the white-hat hacker will be instantly distributed pro rata to the Fair Launch participants."

"Ideally, we would want to fully refund all of our users. But as a small market cap project with low fees and no treasury, this is quite tough for us now." "[W]e will be granting peUSD, a type of guaranteed token for the lost tokens to reimburse in full. peUSD is a token that explicitly represents the amount of damage caused by the exploit and serves to recover it, meaning the sum of tokens distributed by Instant Recovery and the number of DAIs that can be converted to peUSD in the future is equal to the amount of stable coins deposited in Fair Launch. We will mint a total of 4,041,504 peUSDs of ERC20 specification that cannot be additionally issued to match the amount per damaged Wallet Address. In short, owners of peUSD will be able to do a 1:1 swap for DAI from the <Recovery Fund>."

"Some of the contributors have been putting all their efforts and Punky spirits into preparing an NFT project." "A total of 10,000 collectibles based on 18 characters inspired by Cyberpunk 2077 will be issued and can be minted for 0.04 ETH each. When all are sold out, it will be worth approximately 400 ETH and this is roughly calculated to be $1,200,000. All profits will be transferred to <Recovery Fund> through Fee Treasury for swap, and be paid out for reimbursement."

"[W]e’ll improve our security vulnerabilities and fee mechanisms, get an Audit, and then safely accumulate the Service Fee and Buyback Rate into one Fee Treasury, and then into <Recovery Fund> periodically once Saver V2 is released. All Fees sent to the <Recovery Fund> are swapped to DAI with 18 decimals and transferred to accurately calculate deposits and withdrawals and reduce the likelihood of errors. DAIs accumulated in the <Recovery Fund> can be burned at a 1:1 ratio via peUSD and can be requested for withdrawal at any time."

"With the total of damaged funds, $4,041,504, divided by $20, the sum of Punk Token to be rewarded is calculated to be 202,075.2. The reward originally planned for the Fair Launch, which was put to a halt due to the attack, includes 210,000 Tokens. Making use of the original plan, we will be distributing the amount of Punk Tokens, proportioned to the remaining damaged funds."

"The transfer of the amount of 3,150,000 PUNK (15% of total supply), previously allocated for the contributors, will be frozen until the <Recovery Fund> contract accumulates $4,041,504, targeted for recovery. We believe that it is the best way to restore the lost trust, while we are determined to do our best to solve this problem and normalize the protocol."

"[T]he code that caused the hack has been modified." "We added two Modifiers (only Creator, initializer) so that only the Contract Creator can invoke the Initialize function and control it to be called only once." "We are continuing to perform all Unit Tests in more detail to test all functions and all implementable scenarios so that the same event does not occur in the future." "As the proposal passes, bug bounty on Punk protocol will be covered on ImmuneFi at all times and any updates regarding this will be updated through the community channels."

This is a global/international case not involving a specific country.

The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.

Include:

  • Known history of when and how the service was started.
  • What problems does the company or service claim to solve?
  • What marketing materials were used by the firm or business?
  • Audits performed, and excerpts that may have been included.
  • Business registration documents shown (fake or legitimate).
  • How were people recruited to participate?
  • Public warnings and announcements prior to the event.

Don't Include:

  • Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
  • Anything that wasn't reasonably knowable at the time of the event.

There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.

The Reality

This sections is included if a case involved deception or information that was unknown at the time. Examples include:

  • When the service was actually started (if different than the "official story").
  • Who actually ran a service and their own personal history.
  • How the service was structured behind the scenes. (For example, there was no "trading bot".)
  • Details of what audits reported and how vulnerabilities were missed during auditing.

What Happened

The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.

Key Event Timeline - Punk Protocol Reinitialized
Date Event Description
August 10th, 2021 12:00:00 AM Main Event Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here.

Total Amount Lost

The total amount lost has been estimated at $8,950,000 USD.

How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?

Immediate Reactions

How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?

Ultimate Outcome

What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?

Total Amount Recovered

There do not appear to have been any funds recovered in this case.

What funds were recovered? What funds were reimbursed for those affected users?

Ongoing Developments

What parts of this case are still remaining to be concluded?

Prevention Policies

All funds were stored in a smart contract hot wallet. While audits, bug bounties, and other programs can reduce the risk, the only truly secure method of storage would be a simple offline multi-signature wallet. Placing the majority of funds in a visible wallet held by known and trusted individuals would increase security, while still allowing for rapid interaction with the hot portion. In the future, smart contract insurance protocols may provide additional protection.

References