Skip to content
Business logic Audit finding Intermediate

Router Owner Could Steal All The Funds Within SponsorVault

A router owner could exploit the sponsor vault's fee reimbursement by making large transfers between their own wallets, ensuring only their router provides liquidity and then claiming the subsidy. This allows them to siphon funds from the SponsorVault.

xiaoming90 Follow

Originally disclosed on Code4rena

Submitted by xiaoming90

BridgeFacet.sol#L541 SponsorVault.sol#L196

Assume the following:

  • For simplicity sake, only two (2) routers exist within Connext. Gas, relayer, callback fees and slippage are ignored.
  • An attacker owns Router A. Router A has 1,000,000 oUSDC on Optimism Domain/Chain
  • Router B has only 100 oUSDC on Optimism Domain/Chain
  • The liquidity fee is 5% for fast transfer service
  • SponserVault will reimbursed 50% of the liquidity fee incurred by the users

At this point, attacker balances are as follows (2,000,000 USDC in total)

Attacker’s wallet in Ethereum = 1,000,000 USDC

Attacker’s wallet in Optimism = 0 oUSDC

Attacker’s router in Optimism = 1,000,000 oUSDC

First, the attacker attempts to transfer an extremely large amount - 1,000,000 USDC from attacker’s address in Ethereum to attacker’s address in Optimism Chain. The transfer amount should be much larger than the rest of the router’s liquidity so that only attacker’s router is capable of providing the liqudity.

In our example, since Router B does not have sufficient liquidity to faciliate the fast transfer, Router B will not be selected by the Sequencer. Since only Router A has sufficient liquidity, Router A, which is owned by the attacker, will faciliate the fast transfer and selected by the Sequencer.

Since the liquidity fee is 5%, Router A only need to supply 950,000 oUSDC on execute. The Sponsor will then reimburse 50% of the liquidity fee, which is25,000 oUSDC in total. The final amount of oUSDC send to the attacker’s wallet address in Optimism will be 975,000 oUSDC.

At this point, attacker balances are as follows (1,025,000 USDC in total)

Attacker’s wallet in Ethereum = 0 USDC

Attacker’s wallet in Optimism = 975,000 oUSDC

Attacker’s router in Optimism = 50,000 oUSDC

When the nomad message arrives, the attacker will be reimbursed 1,000,000 oUSDC when BridgeFacet._reconcile is triggered.

At this point, attacker balances are as follows (2,025,000 USDC in total)

Attacker’s wallet in Ethereum = 0 USDC

Attacker’s wallet in Optimism = 975,000 oUSDC

Attacker’s router in Optimism = 50,000 + 1,000,000 oUSDC

Attacker earned 25,000 USDC, and SponsorVault lost 25,000 USDC.

Impact

Router owner can intentionally perform many large transfer between their own wallets in two different domain to siphon all the funds from the SponsorVault, and then proceed to withdraw all liquidity from his router.

Recommended Mitigation Steps

Although having a sponsor to subside the liqudity fee to encourage users to use sponsor’s chain, this subsidy can be gamed by malicious actors for their own benefits. It is recommended to reconsider the need of having a sponsor in Connext as extreme care have to be taken in its design to ensure that it will not be exploited.

LayneHaber (Connext) acknowledged and commented:

The SponsorVault is not mandatory for the bridge flow, and the entire point of the vault option is to allow domains to subsidize fees for users transferring funds there. This is incredibly useful for new domains, that have no default bridge and want to remove any friction for users to get to their chain. Sponsor vault funders should be informed there is no way to enforce only legitimate users get the funds and it is inherently vulnerable to sybil attacks. In our conversations with potential sponsors, they are aware of these issues and are still willing to fund sponsor vaults to a limited capacity.

0xleastwood (judge) commented:

It seems that it would be easy for routers to sybil attack the protocol and continuously drain the sponsor vault of all its funds. While I understand this might not be an issue when the set of routers is trusted, however, as the protocol continues to become more decentralized, this would be a likely path of attack. I also agree with the current risk even though users’ funds aren’t at direct risk, the functionality of the sponsor vault is rendered useless and the router profits from this attack.


The original report as published on Code4rena, by xiaoming90. 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 sponsor vault reimburses liquidity fees without verifying that the transfer is not self-dealing by the router owner, allowing routers to game the subsidy.

Impact

A router owner could repeatedly perform such transfers to drain all funds from the SponsorVault, and then withdraw their liquidity.

What the attacker needed

Attacker owns a router with sufficient liquidity; sponsor vault is active and funded; attacker can initiate transfers between own wallets

The fix

The report recommends reconsidering the need for a sponsor in Connext, as extreme care must be taken in its design to prevent exploitation.

How it was found

  1. The attacker owns Router A with 1,000,000 oUSDC and initiates a transfer of 1,000,000 USDC from Ethereum to Optimism.
  2. Because Router B has only 100 oUSDC, it cannot provide liquidity, so only Router A is selected.
  3. Router A supplies 950,000 oUSDC and the sponsor reimburses 25,000 oUSDC, so the attacker receives 975,000 oUSDC.
  4. When the nomad message arrives, the attacker is reimbursed 1,000,000 oUSDC via BridgeFacet._reconcile.
  5. The attacker ends up with 1,025,000 oUSDC, earning 25,000 USDC at the expense of the SponsorVault.

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 router is a participant that provides liquidity for fast transfers and earns a fee. The sponsor vault reimburses half of that fee to users. Because the router owner can also be the user, they can route transfers through their own router, collect the fee, and then get half of it back from the vault, effectively taking money from the vault.

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 xiaoming90

View all

122 more disclosed reports, best first.

More from Connext Amarok contest

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.