# Gamers will not receive rewards for allocating to Aave and Beta vaults, while the vaults do generate yield

AaveProvider returns exchange rate 1 and BetaProvider returns 0, so gamer reward numerator is always zero and yield goes only to depositors.

- Payout: Contest reward
- Severity: medium
- Program: Derby
- Credited: Ch_301
- Disclosed: 2022-10-17
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-01-derby-judging/issues/313
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-01-derby%3AM-12
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:solidity technique:source-review vuln:accounting-error vuln:reward-distribution

**Target:** Vault reward accounting via AaveProvider/BetaProvider exchangeRate
**Root cause:** AaveProvider.exchangeRate hardcodes 1 and BetaProvider.exchangeRate hardcodes 0 instead of tracking protocol token exchange rate, so the exchange-rate delta used to compute gamer rewards is always zero.
**Steps:**
1. Read Vault.sol L227-236: gamer rewards numerator uses difference in protocol exchange rate between rebalancings.
2. Inspect AaveProvider.sol L112: exchangeRate returns constant 1.
3. Inspect BetaProvider.sol L118: exchangeRate returns constant 0.
4. Allocate funds to Aave/Beta vaults, let yield accrue, trigger rebalancing.
5. Observe gamer rewards computed as 0 while depositors receive the yield.
**How found:** Code review of the reward formula in Vault.sol and tracing its exchange-rate input to each provider implementation, noticing the hardcoded constants.
**Insight:** When a reward formula depends on a per-adapter exchange-rate delta, audit every adapter's exchangeRate implementation for hardcoded constants; a constant return silently zeroes rewards for that adapter.
