<!-- canonical: https://0xsimao.com/findings/yieldoor-i-risk-ramses-reward-periods -->

# DoS risk in IRamsesGauge(gauge).getReward() when enough periods have passed

Low/Info · 0xSimao · Leveraged yield farming · 12th May 2025

Finding L-1 of the Yieldoor Gauges security review.

- Protocol: https://app.yieldoor.com/
- Report: /reports/yieldoor-i
- Source: https://github.com/0xSimao/audits/blob/main/0xSimao/2025-05-12-yieldoor-i.pdf

---

**Description:**

`IRamsesGauge(gauge).getReward()` iterates through all periods since the first period in the Gauge, which means that whenever a new token is added, it will loop through all periods. Thus, given enough time, there is a DoS risk, although it is likely not significant as it would require a lot of time to pass (probably not even in a lifetime).

**Recommended Mitigation:**

The Gauge has a `getPeriodReward()` function which can be used to collect rewards.
