unifarm - Bridge

QuillAuditsCode version: not recorded (see the report)

Audit · firm’s term: audit report

QuillAudits reviewed UniFarm (unifarm - Bridge) on 8 Aug 2022: 34 findings, 0 critical; 23 marked fixed, 11 open.

No open critical findings
Open the reportOpen UniFarm’s security record

Report hosted on quillaudits.com.

Trustblock does not review code.

Findings34

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High001
Medium3010
Low8012
MediumCentralization of getBackTokens()Open

getBackTokens() can be exploited by malicious admin to drain the liquidity from any liquidity pool.

MediumCentralization of update functionality of tokenBridgeRegistryUpgradeable and bridgeUpgradeable addressOpen

tokenBridgeRegistryUpgradeable and bridgeUpgradeable can be updated anytime by the owner using updateTokenBridgeRegistryAddress() and updateBridgeUpgradeableAddress(). If an LP has fees accrued say 100 USD in the contract, but the BridgeUpgradeable address is updated using updateBridgeUpgradeableAddress() function, then the LP will never be able to claim this fees- leading to a Denial of Service. In the BridgeUtilsUpgradeable contract, there is a possibility of mismatch between the feePoolUpgradeable and the most current FeePoolUpgradeable contract in usage as well as bridgeUpgradeable and the most current BridgeUpgradeable in usage, which is same as the issue stated in BridgeUpgradeable contracts section above in the report.

MediumInsufficient test coverageOpen

There is insufficient test coverage provided for the codebase. For some situations it is possible that router protocol should revert or do expected things which must be checked while in testing on mainnet.For example, It is possible that routerSend() returns true but the transaction fails to go on the destination chain. If it passes and the dest chain tx could not be executed due to low gas price and limit, then replay transaction needs to be done.

LowgetUserConfirmedRewards() shows incorrect rewardsOpen

getUserConfirmedRewards() shows zero rewards even when there are non-zero rewards claimable by liquidity providers. This is because the fee calculation and distribution depends on addPassedEpochs() that gets updated only when claimFeeShare, addLiquidity, etc. is called. This means that Liquidity Providers don't have a foolproof way to check what their current rewards are using getUserConfirmedRewards() or even getUserUnconfirmedRewards() unless someone calls claimFeeShare or other state changing functions which call addPassedEpochs() internally.

LowInheritance by utils contract not requiredOpen

BridgeUpgradeableUtils contract inherits BridgeStorage contract which is not required to be used anywhere.

LowMissing event for safeWithdrawLiquidity()Open

safeWithdrawLiquidity is a crucial function which does not emit any event.

LowMissing events for critical functionsOpen

Missing events for critical functions like- addTokenMetadata(), _deploySetuToken(), updateFeeConfig(), updateEpochLength(), disableBridgeToken(), enableBridgeToken() and updateNoOfDepositors()

LowPossibility of exploit of createCrossChainTransferMapping()Open

The function createCrossChainTransferMapping() of the BridgeUpgradeable contract which is critical for cross chain transfers, relies highly Router protocol. There is a possibility that the _transferIndex parameter is set acccordingly to pass the require check every time in createCrossChainTransferMapping(). Also there can be a possibility of transactions getting manipulated or denied of getting executed crosschain if Router protocol is centralized or gets compromised.

LowPossibility of mismatch of contract addressesOpen

In the BridgeUtilsUpgradeable contract, there is a possibility of mismatch between the feePoolUpgradeable and the most current FeePoolUpgradeable contract in usage as well as bridgeUpgradeable and the most current BridgeUpgradeable in usage. This is because the owner of the contract can forget to change the addresses of the bridge and the feepool contract after they have been upgraded. A malicious admin can also take an advantage of this to hide the actual contract with some malicious code.

LowPossibility of Out of Gas errorsOpen

It is possible that if the epochLength is set as too small, epochs will get added faster in the Epoch array of the epochs mapping of the BridgeUpgradeable contract. If this happens, this could to out of gas errors when claimFeeShare() and withdrawAdminTokenFees() because the for loop would be looping over a large array length.

Show 1 more
LowPossibility of User paying more feesOpen

There is a possibility of user paying more fees in case fees is changed(and increased) before the transaction reaches the destination chain.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Part of UniFarm’s security record

UniFarm
Audits5 audits by 2 firmsLast audit Aug 2022, by QuillAudits.
Critical findingsNo open critical findingsAcross 5 reports.
Open UniFarm’s security record

Security firm

QuillAudits

350 projects reviewed · 459 reports · latest Apr 2025

See QuillAudits’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us