Ramses Exchange Reward Distribution Logic Vulnerability
Notice: This page is a freshly imported case study from an original repository. While the original content had a similar format, some sections may not have been fully completed. Please help fill in any empty sections or any missing information 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!
Ramses Exchange is an online decentralized exchange platform which allows swapping between pools, contributing liquidity, or voting in their decentralized governance. On October 23rd, an error in their reward distribution logic was exploited to gain an attacker $93k. Multiple third parties published analyses of the exploit. It does not appear that the Ramses Exchange team has publicly acknowledged the attack, while they appear to have already been running a competitive audit competition. It is unclear whether the attack will have any effect on platform users.[1][2][3][4][5][6][7][8][9]
About Ramses Exchange
"Welcome to Ramses Exchange. Swap tokens, provide liquidity, vote, and more."
"Ramses is a next-generation AMM designed to serve as Arbitrum's central liquidity hub, combining the secure and battle-tested superiority of Uniswap v3 with a custom incentive engine, vote-lock governance model, and streamlined user experience.
RAMSES places a strong emphasis on fostering a vibrant and engaged ecosystem. As part of this commitment, RAMSES will launch with a focus on providing veNFTs to top protocols on Arbitrum. These veNFTs empower protocols to actively manage their positions in a way that aligns with the best interests of their platforms.
RAMSES is dedicated to achieving a high level of decentralization while ensuring the platform remains functional and efficient. To strike this balance, RAMSES establishes a council comprising trusted entities from the broader community. This council is responsible for making decisions in emergency situations, ensuring the platform's integrity and security are upheld.
RAMSES incorporates some of the most advanced features implemented in existing DEXes. These features have been widely recognized and adopted by many users. RAMSES aims to provide a seamless and user-friendly experience while leveraging the innovative capabilities and underlying value it brings to the market.
By these core tenets, RAMSES seeks to bring forth a DEX that not only aligns with the original vision of Solidly but also introduces novel functionalities and prioritizes the needs of the community."
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 contract of Ramses Exchange on Arbitrum was attacked, resulting in a loss of approximately $93,000."
Date | Event | Description |
---|---|---|
October 23rd, 2024 6:00:30 PM MDT | Arbitrum Attack Transaction | The blockchain transaction on the arbitrum chain which is the attack on Ramses Exchange. |
November 4th, 2024 8:16:00 AM MST | Competitive Audit Conclusion | The Ramses Exchange team announces the conclusion of their competitive audit and that they are excited to look through the findings. |
Technical Details
"On October 24th, 2024, the Ramses Exchange (@RamsesExchange) on Arbitrum suffered a loss of nearly $93,000 due to a flaw in its reward distribution logic. The vulnerability allowed the attacker to repeatedly claim rewards across multiple tokenIds without a corresponding reduction in the total rewards supply. By depositing tokens and invoking getPeriodReward() with different NFTs, the attacker drained reward pools, exploiting the contract’s failure to adequately track reward limits per period. The exploit primarily targeted accumulated incentives and fees rather than the underlying liquidity provider funds."
"The root cause is that the FeeDistributor contract did not decrease tokenTotalSupplyByPeriod after each reward claim, resulting in an inflated total reward supply. This oversight allowed repeated reward calculations from the same supply, leading to excess distributions."
Total Amount Lost
The total amount lost has been estimated at $93,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?
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
- ↑ Arbitrum One Transaction Hash (Txhash) Details | Arbitrum One (Accessed Nov 15, 2024)
- ↑ R A M S E S (Accessed Nov 15, 2024)
- ↑ What is RAMSES? | RAMSES (Accessed Nov 15, 2024)
- ↑ Ramses Exchange Hack Analysis. Overview: | by Shashank | Oct, 2024 | SolidityScan (Accessed Nov 15, 2024)
- ↑ Ramses V3 | Consensys Diligence (Accessed Nov 15, 2024)
- ↑ Unraveling The 90k Mystery Inside Ramses Exchanges Reward Exploit (Accessed Nov 15, 2024)
- ↑ @code4rena Twitter (Accessed Nov 15, 2024)
- ↑ @RamsesExchange Twitter (Accessed Nov 15, 2024)
- ↑ @RamsesExchange Twitter (Accessed Nov 15, 2024)