Auction date will drift irreversibly forward over time leading to loss of yield for bond holders
The auction start function sets lastDistribution to the current block timestamp instead of the scheduled distribution time, causing any delay in starting the auction to permanently shift future distributions later. This cumulative drift reduces yield for bond holders over time.
Source: https://github.com/sherlock-audit/2024-12-plaza-finance-judging/issues/446
Found by
0x52
Summary
During the creation of the auction, lastDistribution is set to block.timestamp. Delays are compounding and will lead to loss of yield over time as the subsequent distribution will be delayed.
function startAuction() external whenNotPaused() {
// Check if distribution period has passed
@> require(lastDistribution + distributionPeriod < block.timestamp, DistributionPeriodNotPassed());
// Check if auction period hasn't passed
require(lastDistribution + distributionPeriod + auctionPeriod >= block.timestamp, AuctionPeriodPassed());
... SNIP
// Update last distribution time
@> lastDistribution = block.timestamp;
}
Above we see that lastDistribution is used to determine if the auction can be started. Additionally, lastDistribution is set to block.timestamp which means that any delay between lastDistribution + distributionPeriod and block.timestamp will cause loss of yield in the subsequent quarter.
According to sherlock rules a loss of 0.01% qualifies as medium impact. The distribution period is 1 quarter or 90 days which is 7 776 000 seconds. This means that a delay of 777.6 seconds (13 minutes) will break this threshold. Given that the start of the auction is expected to be within lastDistribution + distributionPeriod + auctionPeriod it is reasonable to assume that in real world conditions that a delay of this magnitude can and will happen.
Root Cause
Pool.sol#L570 sets lastDistribution == block.timestamp
Internal preconditions
None
External preconditions
startAuction is delayed by at least 777.6 seconds
Attack Path
N/A
Impact
Loss of yield for bond holders
POC
N/A
Mitigation
Instead of setting lastDistribution to block.timestamp is should be set to lastDistribution + distributionPeriod
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/Convexity-Research/plaza-evm/pull/163
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the code sets lastDistribution to the current block timestamp rather than the scheduled distribution time, so any delay in starting the auction permanently shifts the schedule.
Impact
Loss of yield for bond holders, with delays of 13 minutes or more exceeding the 0.01% threshold for medium severity.
What the attacker needed
StartAuction delayed by at least 777.6 seconds
The fix
The protocol team fixed this issue by setting lastDistribution to lastDistribution + distributionPeriod instead of block.timestamp.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In a bond auction system, the time of the next auction is based on when the last one actually started. If an auction starts late, the next one is also pushed back, and this delay adds up. Over many cycles, bond holders receive their returns later and later, effectively losing some yield.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.