<!-- canonical: https://0xsimao.com/findings/fuji-finance-cross-transfer-reverts-share -->

# _crossTransfer(...) reverts for smart contracts that don't share the same address on different chains

Medium · Three Sigma · Lending aggregator · 6th May, 2023

Finding 3S-FUJI-M05 of the Fuji Finance security review.

- Report: /reports/fuji-finance
- Source: https://cdn.sanity.io/files/qoqld077/staging/32181a28eac3175d15fb8924d249bb0d91ca350c.pdf

---

### Description

_crossTransfer(...) has a beneficiary check such that the receiver of the funds in the
destination chain must be the same as the previous beneficiary (most likely the msg.sender
or the ConnextRouter). If the address is a smart contract, the address will probably be
different on the different chain, which will make the transaction revert.

### Recommendation

Allow users to specify in a mapping the corresponding beneficiary in the destination chain,
in a function addBeneficiaryToDestDomain(...), which would set
beneficiary[msg.sender][destDomain] = newBeneficary;.

### Status

Acknowledged with the following statement:
The issue identified is acknowledged by the Fuji team. Smart contract integrations will
require the capability of defining a different address as beneficiary in a different domain.
This feature will be added during Q3-2023 while working on general
optimizations/improvements on the router contracts.

---

Related findings:

- [Lost nfts due to smart wallets having different addresses on different chains](https://0xsimao.com/findings/metazero-i-nfts-wallets-having-addresses): MetaZero Omnichain NFTs
- [Some contracts don't implement their entire interface](https://0xsimao.com/findings/m-0-don-implement-entire-interface): M^0 Minter Gateway
- [`GlobalVariables::oftOrCollateralReceiveFromOtherChains()` calculates the fee as if it was the same in both chains, which is false](https://0xsimao.com/findings/autonomint-collateral-calculates-fee-both): Autonomint
- [Admin will not be able to upgrade the smart contracts, breaking core functionality and rendering the upgradeable contracts useless](https://0xsimao.com/findings/cork-protocol-upgrade-functionality-rendering-upgradeable): Cork Protocol
