Pods Finance Logic Error Fixed
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' and 'General Prevention' sections 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!
Pods Finance is a tool which allows you to hedge your portfolio to reduce the risk of vulnerability. This tool uses a smart contract to manage the reward distribution.
The proposed smart contract (which was not yet deployed) had a vulnerability which would have allowed a hacker to claim additional rewards. A bounty of $4,000 was paid out to for responsible disclosure.
This is a global/international case not involving a specific country.[1][2][3][4][5][6]
About Pods Finance
"Crypto volatility keeps you from having a good night's sleep. Hedge crypto and protect your portfolio with Pods. Unlock a new level of safety for your assets."
"Pods' design leverages DeFi's composability and makes it easy for other projects to integrate with the Pods Protocol." "Tailor made to DeFi options, it unlocks a different experience of earning while using the liquidity provision feature in an options pool." "Sell, buy, provide liquidity for both puts and calls. It will result in many different ways to interact with the protocol. Find the one that suits you best." "We’re in beta and currently hold admin keys to make the funds of our users safe. We expect to let go of the admin keys by the end of the year. More here."
"Sell options and earn more. Generate additional yield on your aTokens and get exposure to assets of your choice." "Buy options to protect your portfolio. Investing in crypto does not have to mean suffering from volatility fever. Reduce your exposure to price downside by placing hedges in your portfolio."
"Whitehat Csanuragjain submitted a vulnerability to Immunefi regarding Pods Finance on June 25. The vulnerability was given a severity rating of “high”, as it is a logic error that allows for theft of yield or abuse of the rewards system on the protocol. The contract was not deployed on mainnet, so there were no funds at risk."
"Pods Finance has a rewards system that mints rewards for users who issue options, but the reward calculation logic itself, present in both AavePodPut.sol and AavePodCall.sol, allows a malicious attacker to claim rewards owed to other users and drain the entire contract. This vulnerability was rated as “high” because it is tantamount to a theft of yield. Although the vulnerable contracts also hold original user funds, this bug does not allow an attacker to steal them. The way it works is that, if a malicious attacker had minted at least one option in the past, they could repeatedly call unmintWithRewards() with a single share forever — as long as the attacker has the required gas."
"The logic above distributes rewards based only on the user shares, instead of also considering the amountOfOptions. As opposed to the withdraw function, where the caller always withdraws 100% of their shares, the unmint function allows the caller to do a partial unmint. The error was that the rewards function was paying as if the user was always unminting 100% of their shares. This led to a vulnerability where the user could remove more rewards than what was due."
"Pods Finance received the report, evaluated it, and paid out $4,000 USDC to the whitehat in just 13 minutes, winning the award by far for the fastest ever bug bounty response and pay-out on Immunefi. We congratulate Pods Finance for their excellent work and response."
"Pods Finance fixed a logic error which could result in the theft of yield after it was responsibly disclosed by Csanuragjain." "The reward calculation should be based on options unminted, rather than only the shares a user possesses."
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.
| Date | Event | Description |
|---|---|---|
| June 25th, 2021 | Main Event | Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here. |
Technical Details
This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?
Total Amount Lost
No funds were lost.
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?
General Prevention Policies
There were no losses in this case. The bounty was paid prior to the smart contract even being deployed.
In general, smart contract hot wallets may contain bugs or vulnerabilities, and nothing is ever certain. Simple offline multi-signature storage should be used for the majority of funds. Smart contract hot wallets can be insured through an offline multi-sig treasury fund, industry fund, or accepted smart contract insurance protocol.
Individual Prevention Policies
No specific policies for individual prevention have yet been identified in this case.
For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.
Platform Prevention Policies
Policies for platforms to take to prevent this situation have not yet been selected in this case.
For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.
Regulatory Prevention Policies
No specific regulatory policies have yet been identified in this case.
For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.
References
- ↑ No Title (Jul 24, 2021)
- ↑ Pods Finance Bug Fix Postmortem (Jul 24, 2021)
- ↑ Pods Finance | The easiest way to hedge crypto (Aug 22, 2021)
- ↑ Rewards bug (#280) · pods-finance/contracts@8549326 · GitHub (Aug 30, 2021)
- ↑ Pods Finance Bug Fix Postmortem (Feb 8, 2022)
- ↑ https://www.blockthreat.io/p/blockthreat-week-26-2021 (Feb 8, 2022)