Prices computed in SimplePriceManager is off even after `BatchRequestManager#revokeShares()` is called
When shares are revoked on the spoke chain, the corresponding assets are not withdrawn, so the net asset value remains unchanged while the share supply decreases. This causes the computed price per share to be higher than expected, meaning anyone minting shares immediately after a revocation pays more assets for fewer shares.
Source: https://github.com/sherlock-audit/2025-10-centrifuge-protocol-v3-1-audit-judging/issues/712
Found by
0xpiken, 6PottedL, Audittens, Cybrid, LeFy, TessKimy
Summary
It is stated in the Known issues that:
Prices computed in SimplePriceManager may be off if approve and issue or approve and revoke are called separately, as then assets and shares are imbalanced.
However, this could happen even if BatchRequestManager#revokeShares() has been called.
During the process of revoking shares, AsyncRequestManager#revokedShares() will be called on the spoke chain:
function revokedShares(
PoolId poolId,
ShareClassId scId,
AssetId assetId,
uint128 assetAmount,
uint128 shareAmount,
D18 pricePoolPerShare
) public auth {
// Lock assets to ensure they are not withdrawn and are available for the redeeming user
(address asset, uint256 tokenId) = spoke.idToAsset(assetId);
balanceSheet.reserve(poolId, scId, asset, tokenId, assetAmount);
globalEscrow.authTransferTo(address(spoke.shareToken(poolId, scId)), 0, address(this), shareAmount);
balanceSheet.overridePricePoolPerShare(poolId, scId, pricePoolPerShare);
@> balanceSheet.revoke(poolId, scId, shareAmount);
balanceSheet.resetPricePoolPerShare(poolId, scId);
}
BalanceSheet#revoke() will be called to burn shares and trigger shareQueue updating:
function revoke(PoolId poolId, ShareClassId scId, uint128 shares) external payable isManager(poolId) {
emit Revoke(poolId, scId, msgSender(), _pricePoolPerShare(poolId, scId), shares);
ShareQueueAmount storage shareQueue = queuedShares[poolId][scId];
if (!shareQueue.isPositive) {
shareQueue.delta += shares;
} else if (shareQueue.delta > shares) {
shareQueue.delta -= shares;
} else {
shareQueue.delta = shares - shareQueue.delta;
shareQueue.isPositive = false;
}
IShareToken token = spoke.shareToken(poolId, scId);
token.authTransferFrom(msgSender(), msgSender(), address(this), shares);
token.burn(address(this), shares);
}
Anyone can call QueueManager#sync() to sync the share balance updating to the NAVManager on hub chain:
function sync(PoolId poolId, ShareClassId scId, AssetId[] calldata assetIds, address refund) external payable {
gateway.withBatch{
value: msg.value
}(abi.encodeWithSelector(QueueManager.syncCallback.selector, poolId, scId, assetIds), refund);
}
function syncCallback(PoolId poolId, ShareClassId scId, AssetId[] calldata assetIds) external {
gateway.lockCallback();
ShareClassQueueState storage sc = scQueueState[poolId][scId];
require(sc.lastSync == 0 || block.timestamp >= sc.lastSync + sc.minDelay, MinDelayNotElapsed());
for (uint256 i = 0; i < assetIds.length; i++) {
bytes32 key = keccak256(abi.encode(poolId.raw(), scId.raw(), assetIds[i].raw()));
if (TransientStorageLib.tloadBool(key)) continue; // Skip duplicate
TransientStorageLib.tstore(key, true);
// Check if valid
(uint128 deposits, uint128 withdrawals) = balanceSheet.queuedAssets(poolId, scId, assetIds[i]);
if (deposits > 0 || withdrawals > 0) {
balanceSheet.submitQueuedAssets(poolId, scId, assetIds[i], sc.extraGasLimit, address(0));
}
}
@> (uint128 delta,, uint32 queuedAssetCounter,) = balanceSheet.queuedShares(poolId, scId);
@> bool submitShares = delta > 0 && queuedAssetCounter == 0;
if (submitShares) {
@> balanceSheet.submitQueuedShares(poolId, scId, sc.extraGasLimit, address(0));
sc.lastSync = uint64(block.timestamp);
}
}
NAVManager#onSync() will be called subsequently:
function onSync(PoolId poolId, ShareClassId scId, uint16 centrifugeId) external {
require(msg.sender == address(holdings), NotAuthorized());
require(address(navHook[poolId]) != address(0), InvalidNAVHook());
@> uint128 netAssetValue_ = netAssetValue(poolId, centrifugeId);
navHook[poolId].onUpdate(poolId, scId, centrifugeId, netAssetValue_);
emit Sync(poolId, scId, centrifugeId, netAssetValue_);
}
SimplePriceManager#onUpdate() is called to calculate pricePoolPerShare and notified it to all eligible spoke chains. Any eligible user can mint new shares with this latest pricePoolPerShare immediately if the asset vault is a sync vault.
/// @inheritdoc INAVHook
function onUpdate(PoolId poolId, ShareClassId scId, uint16 centrifugeId, uint128 netAssetValue) public virtual {
require(msg.sender == navUpdater, NotAuthorized());
require(scId.index() == 1, InvalidShareClass());
gateway.withBatch(
abi.encodeWithSelector(
SimplePriceManager.onUpdateCallback.selector, poolId, scId, centrifugeId, netAssetValue
),
address(0)
);
}
function onUpdateCallback(PoolId poolId, ShareClassId scId, uint16 centrifugeId, uint128 netAssetValue) external {
gateway.lockCallback();
NetworkMetrics storage networkMetrics_ = networkMetrics[poolId][centrifugeId];
Metrics storage metrics_ = metrics[poolId];
uint128 newIssuance = shareClassManager.issuance(poolId, scId, centrifugeId);
// When shares are transferred, the issuance in the SCM updates immediately,
// but in this contract they are tracked separately as transferredIn/Out.
// Here we get the diff between the current stale SPM issuance and the new SCM issuance,
// but we need to negate the transferred amounts to avoid double-counting them in the global issuance.
// This adjusted diff is then applied to the global issuance.
(uint128 issuanceDelta, bool isIncrease) = _calculateIssuanceDelta(
networkMetrics_.issuance, newIssuance, networkMetrics_.transferredIn, networkMetrics_.transferredOut
);
metrics_.issuance = isIncrease ? metrics_.issuance + issuanceDelta : metrics_.issuance - issuanceDelta;
metrics_.netAssetValue = metrics_.netAssetValue + netAssetValue - networkMetrics_.netAssetValue;
networkMetrics_.netAssetValue = netAssetValue;
networkMetrics_.issuance = newIssuance;
networkMetrics_.transferredIn = 0;
networkMetrics_.transferredOut = 0;
@> D18 pricePoolPerShare_ = pricePoolPerShare(poolId);//@audit-info calculate new share price
@> hub.updateSharePrice(poolId, scId, pricePoolPerShare_, uint64(block.timestamp));
uint16[] storage networks_ = _notifiedNetworks[poolId];
@> for (uint256 i; i < networks_.length; i++) {
@> hub.notifySharePrice(poolId, scId, networks_[i], address(0));//@audit-info notify new share price to all spoke chains.
@> }
emit Update(poolId, scId, metrics_.netAssetValue, metrics_.issuance, pricePoolPerShare_);
}
function pricePoolPerShare(PoolId poolId) public view returns (D18) {
Metrics memory metrics_ = metrics[poolId];
@> return metrics_.issuance == 0 ? d18(1, 1) : d18(metrics_.netAssetValue) / d18(metrics_.issuance);
}
However, while the total supply of shares will decrease following shares burning, netAssetValue_ might not change because there is no assetQueue updating at the moment. As a result, pricePoolPerShare might be higher than expected, If someone mint shares at this moment, they will pay more assets for less shares.
Root Cause
When shares are revoked on the spoke chain, the corresponding redeemed assets are not withdrawn concurrently.
Internal Pre-conditions
No response
External Pre-conditions
No response
Attack Path
No response
Impact
pricePoolPerShare is off and anyone who mint shares just after shares revoking could pay more assets for less shares.
Mitigation
Transfer the redeemed assets to globalEscrow directly when revoking shares on spoke chain.
Assets will be transferred from globalEscrow to the receiver when an eligible user call redeem() or withdraw() to withdraw their assets.
function revokedShares(
PoolId poolId,
ShareClassId scId,
AssetId assetId,
uint128 assetAmount,
uint128 shareAmount,
D18 pricePoolPerShare
) public auth {
// Lock assets to ensure they are not withdrawn and are available for the redeeming user
(address asset, uint256 tokenId) = spoke.idToAsset(assetId);
- balanceSheet.reserve(poolId, scId, asset, tokenId, assetAmount);
+ balanceSheet.withdraw(poolId, scId, asset, tokenId, address(globalEscrow), assetAmount);
globalEscrow.authTransferTo(address(spoke.shareToken(poolId, scId)), 0, address(this), shareAmount);
balanceSheet.overridePricePoolPerShare(poolId, scId, pricePoolPerShare);
balanceSheet.revoke(poolId, scId, shareAmount);
balanceSheet.resetPricePoolPerShare(poolId, scId);
}
function _withdraw(IBaseVault vault_, address receiver, uint128 assets) internal {
VaultDetails memory vaultDetails = vaultRegistry.vaultDetails(vault_);
PoolId poolId = vault_.poolId();
ShareClassId scId = vault_.scId();
- balanceSheet.unreserve(poolId, scId, vaultDetails.asset, vaultDetails.tokenId, assets);
- balanceSheet.withdraw(poolId, scId, vaultDetails.asset, vaultDetails.tokenId, receiver, assets);
+ globalEscrow.authTransferTo(vaultDetails.asset, vaultDetails.tokenId, receiver, assets);
}
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/centrifuge/protocol-internal/pull/100
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 revoked shares are burned without concurrently withdrawing the corresponding assets, leaving the net asset value unchanged while the share supply decreases.
Impact
The price per share is inflated, so anyone who mints shares just after a revocation could pay more assets for fewer shares.
What the attacker needed
Asset vault is a sync vault; user can mint shares
The fix
The protocol team fixed this issue in a pull request.
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.
This is a smart contract bug in a system that manages shares and assets. When someone redeems shares, the system burns the shares but does not remove the matching assets from the pool. This makes the remaining shares look more valuable than they are, so new buyers overpay.
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.