Skip to content
Business logic Audit finding Intermediate

Unrestricted Minimum Lockup Period

The vault contract only enforces a maximum lockup period during deployment and when updating, but does not enforce the documented minimum of 1 day. The owner could set a lockup period below the intended minimum, causing the actual lockup to differ from the documented range.

Catchme Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

#46676 [SC-Insight] Unrestricted Minimum Lockup Period

Submitted on Jun 3rd 2025 at 08:55:14 UTC by @Catchme for IOP | Paradex

Description

Brief/Intro

The documentation specifies that the lockup period should be between 1 and 4 days. However, the contract only restricts the maximum lockup period during initialization and does not enforce a minimum lockup period. Additionally, when updating the lockup period, there is no enforcement of the minimum lockup period, allowing the owner to bypass the lockup constraints.

Vulnerability Details

According to the official documentation, the lockup period should be within the range of 1 to 4 days. Nevertheless, the contract's deploy_vault function only limits the maximum lockup period during initialization and fails to impose a minimum lockup period. Furthermore, the set_lockup_period_seconds function, which is used to update the lockup period, does not include any restrictions on the minimum lockup period. This oversight enables the owner to circumvent the intended lockup period constraints.

 fn deploy_vault(
            ref self: ContractState,
            vault_owner: ContractAddress,
            vault_operator: ContractAddress,
            paraclear: ContractAddress,
            underlying: ContractAddress,
            profit_share_percentage: u128,
            tvl_limit: u128,
            lockup_period_seconds: u128,
        ) -> ContractAddress {
            self._assert_only_owner();
            assert(
                profit_share_percentage <= self.max_profit_share_percentage(),
                Errors::INVALID_PROFIT_SHARE,
            );
            assert(
                lockup_period_seconds <= self.max_lockup_period_seconds(),
                Errors::INVALID_LOCKUP_PERIOD,
            );
         }

        fn set_lockup_period_seconds(ref self: ContractState, new_lockup_period_seconds: u128) {
            let caller = get_caller_address();
            assert(caller == self.owner(), Errors::INVALID_CALLER); 
            assert(
                new_lockup_period_seconds <= self.lockup_period_seconds(),
                Errors::LOCKUP_PERIOD_INCREASE,
            );
            self._set_lockup_period_seconds(new_lockup_period_seconds);

            self
                .emit(
                    VaultLockupPeriodUpdated {
                        caller: caller, lockup_period_seconds: new_lockup_period_seconds,
                    },
                );
        }

Impact Details

The actual lockup period may not align with the expectations outlined in the official documentation.

Reference Links

Proof of Concept

Proof of Concept

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

Impact

The actual lockup period may not align with the expectations outlined in the official documentation, potentially allowing the owner to bypass the intended minimum lockup constraint.

What the attacker needed

Owner privileges

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 lockup period is the time you must wait before you can withdraw your money from a vault. The documentation says this wait should be between 1 and 4 days, but the code only checks that it is not longer than 4 days. So the person who controls the vault could set it to less than 1 day, which breaks the promised rule.

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.