Skip to content
Business logic Audit finding Intermediate

All reallocate cross-chain token and rewards will be lost for the users using the account abstraction wallet

The Nudge campaign contract sends cross-chain reallocated tokens and rewards to the same address used on the source chain, but account abstraction wallets have different addresses on each chain. An attacker could cause users to lose their reallocated tokens and permanently lock their rewards.

0xDemon Follow with Mike_Bello90

Originally disclosed on Code4rena

Submitted by 0xDemon, also found by Mike_Bello90

https://github.com/code-423n4/2025-03-nudgexyz/blob/88797c79ac706ed164cc1b30a8556b6073511929/src/campaign/NudgeCampaign.sol#L206

https://github.com/code-423n4/2025-03-nudgexyz/blob/88797c79ac706ed164cc1b30a8556b6073511929/src/campaign/NudgeCampaign.sol#L271-L274

https://github.com/code-423n4/2025-03-nudgexyz/blob/88797c79ac706ed164cc1b30a8556b6073511929/src/campaign/NudgePointsCampaigns.sol#L160

Finding description and impact

Users with account abstraction wallets have a different address across different chains for same account, so if user using an account abstraction wallet initiate reallocate cross-chain token, the toToken will be sent to wrong address and lost permanently.

With 6.4 million users and 100+ billion assets, there is very high risk that safe wallet users will try to initiate cross-chain reallocations and suffering a loss

In addition, there are other impacts, the user cannot claim rewards on the destination chain and the rewards for that user end up being locked forever in the NugeCampaign.sol contract because no one can’t rescue the reward token even with rescueTokens() and withdrawRewards() functions.

Proof of Concept

Based on the Nudge docs and Lifi SDK, the user flow for cross-chain reallocation is seen below:

  1. Alice connect her ethereum mainnet address on Nudge campaign website.
  2. Alice initiate cross-chain reallocation for reallocate 100 ETH from Ethereum mainnet to 200_000 USDC on Base.
  3. After LiFi performed swap, then it call handleReallocation() with these params:
function handleReallocation(
        uint256 campaignId_,
        address userAddress,
        address toToken,
        uint256 toAmount,
        bytes memory data
    ) external payable whenNotPaused {
  1. The userAddress param will be filled by the ethereum mainnet address owned by Alice.
  2. Then 200_000 USDC will be sent to that address via the _transfer() function.
_transfer(toToken, userAddress, amountReceived);

function _transfer(address token, address to, uint256 amount) internal {
        if (token == NATIVE_TOKEN) {
            (bool sent, ) = to.call{value: amount}("");
            if (!sent) revert NativeTokenTransferFailed();
        } else {
            SafeERC20.safeTransfer(IERC20(token), to, amount);
        }
    }
  1. After that, reward will be calculated and stored in the Participation struct:
participations[pID] = Participation({
            status: ParticipationStatus.PARTICIPATING,
            userAddress: userAddress,
            toAmount: amountReceived,
            rewardAmount: userRewards,
            startTimestamp: block.timestamp,
            startBlockNumber: block.number
        });
  1. Users can claim rewards by calling claimRewards() and entering the pID in the Participation struct.

Let’s breakdown how users can loss all reallocated cross-chain tokens and the rewards:

  1. Cross-chain reallocates token

It can be seen in step 5, toToken amount or in this example is 200_000 USDC will be transferred to userAddress. The main problem arises here, because as explained the abstraction wallet account has a different address across chains. Thus, the toToken amount will be transferred to the address at userAddress which may not be the address owned by Alice and Alice will lose all reallocated tokens.

And also keep in mind, on current implementation on the Nudge website, there is no option for users to enter the recipient address on the destination chain when performing cross-chain reallocations. Not even in the existing docs. This proves that the Nudge protocol is not aware of this issue.

  1. The rewards

User can claim rewards by calling claimRewards(). One of the checks in this function is whether msg.sender is the same as the userAddress in the participation struct:

// Verify that caller is the participation address
            if (participation.userAddress != msg.sender) {
                revert UnauthorizedCaller(pIDs[i]);
            }

The main problem arises here, because as explained the abstraction wallet account has a different address across chain. This means Alice cannot claim her reward on the Base chain because the address it has on the Base chain (as msg.sender) is different from the address on ethereum mainnet chain (as participation.userAddress).

Note:

Recommended mitigation steps

Give the user the option to pass in the address. The tokens should be transferred on the destination chain. Pass in the warning for account abstraction wallet holders to not to pass the same wallet address when initiate cross-chain reallocations.

raphael (Nudge.xyz) confirmed


The original report as published on Code4rena, by 0xDemon. 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

Likely the contract assumes the same address across chains and does not let the user specify a destination address, so transfers and reward claims use the source-chain address.

Impact

Users with account abstraction wallets could permanently lose reallocated tokens and their rewards could be locked forever, though the report does not demonstrate an exploit against a live system.

What the attacker needed

User has an account abstraction wallet; user initiates a cross-chain reallocation; no destination address option exists

The fix

The contract should let the user provide a destination address and warn account abstraction wallet users not to reuse the same address across chains.

How it was found

  1. Alice connects her Ethereum mainnet address on the Nudge campaign website.
  2. Alice initiates a cross-chain reallocation from Ethereum mainnet to Base.
  3. LiFi performs the swap and calls handleReallocation with Alice's Ethereum address as userAddress.
  4. The contract transfers the destination token to that userAddress on Base.
  5. The reward is stored with the same userAddress.
  6. Alice cannot claim the reward on Base because her Base address differs from the stored userAddress.

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.

An account abstraction wallet is a smart contract wallet that can have a different address on each blockchain. This report says that when a user moves tokens from one chain to another, the system sends the tokens to the address from the first chain, which may not belong to the user on the second chain, so the tokens are lost. Rewards are also locked because the user cannot prove ownership from the different address.

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 0xDemon

View all

8 more disclosed reports, best first.

More from Nudge.xyz

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.