# Asset.lotPrice() doesn't use the most recent price in case of oracle timeout

Asset.lotPrice() fallback uses stale saved price instead of newer oracle price after oracle timeout, causing mispricing and zeroed lot price.

- Payout: Contest reward
- Severity: medium
- Program: Reserve
- Credited: 0xA5DF
- Disclosed: 2023-04-27
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2023-01-reserve-findings/issues/326
- Library page: https://bugbountylibrary.com/r/c4%3A2023-01-reserve%3AM-08
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:solidity technique:source-review vuln:accounting-error vuln:oracle-manipulation

**Target:** Asset plugin lotPrice()/tryPrice() oracle fallback
**Root cause:** When tryPrice() reverts due to oracle timeout, lotPrice() falls back to the last saved price and applies lotMultiplier decay, ignoring a newer oracle price that exists but is beyond the tryPrice timeout window.
**Steps:**
1. Set ORACLE_TIMEOUT to 86400 (one day) in fixtures
2. setOraclePrice(rsrAsset, 1.1e8); rsrAsset.refresh(); read lotPrice() -> ~1.09-1.11e18
3. advanceTime(5 days); setOraclePrice(rsrAsset, 2e8); read lotPrice() -> ~1.98-2.02e18
4. advanceTime(1 day + 1 hour); read lotPrice() -> ~1.49e17 (decayed from day-0 price, not day-5 price)
5. setOraclePrice(rsrAsset, 2e8); advanceTime(1 day + 1 hour); read lotPrice() -> 0 despite oracle price 25h old
**How found:** Reading Asset.lotPrice() fallback logic and noticing tryPrice() can fail on oracle timeout while a newer-but-still-valid oracle price exists; wrote a Foundry test advancing time past ORACLE_TIMEOUT to demonstrate decay from stale saved price.
**Insight:** When a contract has a stale-price fallback, check whether the fallback's notion of 'last price' can diverge from the oracle's actual latest price due to timeout windows — the fallback may decay from an older snapshot than the oracle holds.
