Omniscia Ultra Yield Audit
VaultPriceManager Manual Review Findings
VaultPriceManager Manual Review Findings
VPM-01M: Potentially Incorrect Restriction of Price Movements
| Type | Severity | Location |
|---|---|---|
| Logical Fault | ![]() | VaultPriceManager.sol:L156 |
Description:
The referenced statement will restrict time-based linear price updates through the VaultPriceManager::_checkSuddenMovements function meant for abrupt price changes.
Impact:
A linear price update that occurs over a significant amount of time may be erroneously considered "abrupt" in the current VaultPriceManager implementation due to applying the same sudden movement restriction across instantaneous and linear vested price updates.
Example:
151/// @notice Internal gradual price update function152function _updatePriceWithVesting(153 PriceUpdate calldata priceUpdate,154 uint256 timestampForFullVesting155) internal onlyAdminOrOwner(priceUpdate.vault) {156 _checkSuddenMovements(priceUpdate);157 oracle.scheduleLinearPriceUpdate(158 priceUpdate.vault,159 priceUpdate.asset,160 priceUpdate.shareValueInAssets,161 timestampForFullVesting162 );163}164
165/// @notice Check price update for sudden price swings and update highwatermark166function _checkSuddenMovements(167 PriceUpdate calldata priceUpdate168) internal {169 uint256 lastPrice = oracle.getCurrentPrice(170 priceUpdate.vault,171 priceUpdate.asset172 );173 uint256 highwaterMark = highwaterMarks[priceUpdate.vault];174 Limit memory limit = limits[priceUpdate.vault];175 if (176 // Sudden drop177 priceUpdate.shareValueInAssets <178 lastPrice.mulDivDown(1e18 - limit.jump, 1e18) ||179 // Sudden increase180 priceUpdate.shareValueInAssets >181 lastPrice.mulDivDown(1e18 + limit.jump, 1e18) ||182 // Drawdown check183 priceUpdate.shareValueInAssets <184 highwaterMark.mulDivDown(1e18 - limit.drawdown, 1e18)185 ) {186 IPausable vault = IPausable(priceUpdate.vault);187 if (!vault.paused()) {188 vault.pause();189 }190 } else if (priceUpdate.shareValueInAssets > highwaterMark) {191 highwaterMarks[priceUpdate.vault] = priceUpdate.shareValueInAssets;192 }193}Recommendation:
We advise a distinct restriction to be imposed on linear price updates that will take into account the time it takes for price updates to occur.
Alleviation (28f27853965de07fb79f4f2b5fed696d35120032):
The Ultra Yield team evaluated this exhibit and opted to acknowledge it as they consider vesting durations to be at most 7 days, meaning that the same sudden price movement principle can be applied to both instantaneous changes as well as gradual ones.
By definition, these two approaches can never be identical so imposing the same limitation is a matter of usability over functionality and thus consider this exhibit to be acknowledged by the Ultra Yield team.
