Skip to content
Business logic Audit finding Intermediate

Admin should be able to refund or redeem the sanctioned users

The report claims that sanctioned or unverified users' funds become permanently locked because the admin function for completing redemptions also enforces KYC checks on the recipients. An attacker cannot exploit this; it is a design flaw that could trap user funds.

hansfriese Follow

Originally disclosed on Code4rena

Submitted by hansfriese

Sanctioned user’s funds are locked.

Proof of Concept

It is understood that the sanctioned users can not mint nor redeem because the functions requestMint() and requestRedemption() are protected by the modifier checkKYC().

And it is also understood that the protocol team knows about this.

But I still believe the admin should be able to refund or redeem those funds.

And it is not possible for now because the KYC is checked for the redeemers and refundees in the function completeRedemptions().

So as long as the user becomes unverified (due to several reasons including the signature expiry), the funds are completely locked and even the admin has no control over it.

CashManager.sol
707:   function completeRedemptions(
708:     address[] calldata redeemers,
709:     address[] calldata refundees,
710:     uint256 collateralAmountToDist,
711:     uint256 epochToService,
712:     uint256 fees
713:   ) external override updateEpoch onlyRole(MANAGER_ADMIN) {
714:     _checkAddressesKYC(redeemers);
715:     _checkAddressesKYC(refundees);
716:     if (epochToService >= currentEpoch) {
717:       revert MustServicePastEpoch();
718:     }
719:     // Calculate the total quantity of shares tokens burned w/n an epoch
720:     uint256 refundedAmt = _processRefund(refundees, epochToService);
721:     uint256 quantityBurned = redemptionInfoPerEpoch[epochToService]
722:       .totalBurned - refundedAmt;
723:     uint256 amountToDist = collateralAmountToDist - fees;
724:     _processRedemption(redeemers, amountToDist, quantityBurned, epochToService);
725:     collateral.safeTransferFrom(assetSender, feeRecipient, fees);
726:     emit RedemptionFeesCollected(feeRecipient, fees, epochToService);
727:   }

Recommended Mitigation Steps

Assuming that the MANAGER_ADMIN can be trusted, I suggest removing KYC check for the redeemers and refundees.

ali2251 (Ondo Finance) disputed and commented:

It’s not in scope as mentioned in README, specifically in Not in scope ->

KYC/Sanction related edge cases specifically when a user’s KYC status or Sanction status changes in between different actions, leaving them at risk of their funds being locked in the protocols or being liquidated in Flux

Trust (judge) commented:

I don’t believe this clause includes the described case, i.e. even admin cannot move the locked funds.


The original report as published on Code4rena, by hansfriese. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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

The admin function completeRedemptions applies the same KYC check to redeemers and refundees, preventing the admin from moving funds for unverified users.

Impact

Sanctioned or unverified users' funds are permanently locked, and even the admin cannot refund or redeem them.

What the attacker needed

User becomes unverified or sanctioned; admin attempts to process redemption

The fix

The report suggests removing the KYC check for redeemers and refundees in completeRedemptions, assuming the MANAGER_ADMIN is trusted.

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 about a smart contract where users can deposit money and later withdraw it. The contract checks that a user is verified (KYC) before allowing withdrawals, but it also checks this when an administrator tries to process refunds. If a user's verification expires or they are sanctioned, their money gets stuck because even the admin cannot bypass the check.

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.

More by hansfriese

View all

65 more disclosed reports, best first.

More from Ondo Finance

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.