Skip to content
Business logic Audit finding Beginner

No Restriction on Self Transfer

The registry contract's transfer restriction check does not reject transfers where the sender and recipient are the same account. An attacker could perform self-transfers, which the report claims may bypass business rules and complicate transaction monitoring.

Catchme Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

#47377 [SC-Insight] No Restriction on Self Transfer

Submitted on Jun 13th 2025 at 06:38:07 UTC by @Catchme for IOP | Paradex

Description

Brief/Intro

The detect_transfer_restriction() function in the Registry contract fail to restrict self-transfers. This oversight allows an account to transfer assets to itself, which is typically undesirable and should be restricted for the sake of security and data integrity. The lack of a self-transfer restriction may lead to unintended asset movements and can complicate the tracking and monitoring of user activity.

Vulnerability Details

In the detect_transfer_restriction() function, there is no check to identify whether the sender and recipient are the same account. This allows an account to perform self-transfers, which is often undesirable or unnecessary, and can be exploited in various attack vectors, such as token manipulation or fund misappropriation.

Self-transfers typically should be restricted or at least closely monitored, as they may bypass certain business rules and cause confusion in transaction logs. This missing check introduces a gap in transaction validation and can lead to data inconsistencies, unexpected behavior, or regulatory concerns.

Vulnerable Code Location

  • detect_transfer_restriction() function
Rust
// Missing self-transfer check
if sender_is_operator {
    return TransferRestriction::InvalidTransferPair.into();
}
if sender_is_sub_operator {
    return TransferRestriction::InvalidTransferPair.into();
}
if sender_is_auxiliary {
    return TransferRestriction::InvalidTransferPair.into();
}

Impact Details

Unrestricted self-transfers could violate transaction monitoring or regulatory requirements.

Proof of Concept

Proof of Concept

use crate::tests::test_utils::{RECEIVER, deploy_registry};

#[test]
fn test_detect_transfer_restriction_same_address() {
    let registry = deploy_registry(OWNER(), FACTORY(), PARACLEAR());
    let registry_dispatcher = IRegistryDispatcher {
        contract_address: registry.contract_address,
    };

    let sender: ContractAddress = RECEIVER();

    let invalid_pair: u8 = 1;

    start_cheat_caller_address(registry.contract_address, sender);

    assert_ne!(
        registry_dispatcher.detect_transfer_restriction(sender, sender, 100),
        invalid_pair,
        "same address should be restricted",
    );

    stop_cheat_caller_address(registry.contract_address);
}

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

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 transfer restriction function omits a comparison between the sender and recipient addresses before allowing the transfer.

Impact

Self-transfers could violate transaction monitoring or regulatory requirements, though the report does not show direct loss of funds.

What the attacker needed

Ability to call the registry contract

The fix

The transfer restriction function should be updated to reject transfers where the sender and recipient are the same address.

How it was found

  1. Deploy the registry contract in a test environment.
  2. Set the sender address to the same value as the recipient address.
  3. Call the transfer restriction function with that identical sender and recipient.
  4. Observe that the function does not return the invalid transfer pair result.

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.

A smart contract is a program on a blockchain. This one checks whether a transfer between two accounts is allowed, but it never checks if the two accounts are actually the same. That means someone can 'send' assets to themselves, which the report says could confuse tracking or break rules.

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 Catchme

View all

16 more disclosed reports, best first.

More from Paradex

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.