Skip to content

Sherlock

Union Finance

Every publicly disclosed report for Union Finance and what kind of bugs they were.

disclosed reports
23
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find Union Finance on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Union Finance chose to make public.

Business logic

Loan can be written off by anybody before overdue delay expires

A borrower's last repay block is not reset when their debt is written off, so a later loan can be written off immediately by any member before the overdue delay expires, causing the staker to lose their stake. An attacker could repeatedly borrow and have the loan written off instantly.

Union Finance

High
Business logic

repayBorrow is inaccessible by overdue borrowers

The repayBorrow function in UToken calls UserManager's updateFrozenInfo when a borrower is overdue, but that function is restricted to the comptroller, causing the repayment to revert. As a result, overdue borrowers cannot repay their debt, permanently freezing lenders' funds.

Union Finance

High
Business logic

UNION rewards issuance can be maximized without providing credit

The reward calculation only updates when a user calls stake, unstake, or withdrawRewards, so a staker can wait a long time, then briefly lend to themselves to become a member and immediately withdraw rewards, receiving the maximum multiplier for the entire period without bearing credit risk or paying interest. This inflates UNION emissions and dilutes honest holders.

Union Finance

High
Business logic

A stake that has just been locked gets full reward multiplier

The rewards multiplier for stakers in Union Finance is calculated based solely on whether a stake is locked, not on how long it has been locked. An attacker can lock a stake, vouch for another member, have that member borrow, then withdraw rewards with the full multiplier and repay the loan in the same transaction, gaining extra rewards without risking funds.

Union Finance

Medium
Business logic

Partial withdrawals by AssetManager lead to user funds freeze

The AssetManager's withdraw function can return less than the requested amount when underlying lending pools lack liquidity, but all calling functions (unstake, borrow, redeem, removeReserves) assume the full amount was transferred and update user balances accordingly. This leaves the shortfall permanently frozen for the user, as their accounting shows a full withdrawal while the actual funds remain in the strategy.

Union Finance

Medium
Business logic

`AssetManager::withdraw` will not return false, when fail to send the withdraw amount

The AssetManager::withdraw function returns true even when it could not transfer the full requested amount, leaving a non-zero remainder. Callers such as UserManager and UToken trust the true result and update their accounting as if the full amount had been paid out, so users may receive less than they unstaked, borrowed or redeemed.

Union Finance

Medium
Access control

Maximal approvals remain for the AssetManager's adapters and tokens after removal

The AssetManager contract grants unlimited token approvals to adapters and markets when they are added, but removing an adapter or token does not revoke these approvals. An attacker could exploit a vulnerability in a removed adapter or token to drain any funds held in the AssetManager's balance.

Union Finance

Medium
Business logic

Staker rewards can be gathered with maximal multiplier no matter how borrowers are overdue

The frozen coin age used to compute staker rewards was reset whenever a borrower took out any new loan, even a tiny one, so a staker could have their borrowers borrow a minimal amount to clear the overdue penalty and claim rewards at the maximum multiplier. This let a staker obtain inflated UNION token issuance and dilute other holders.

Union Finance

High
Business logic

It's impossible to writing off any vouch fully for an outside actor

The public debt write-off function reverts when it tries to fully remove a voucher because the internal cancellation function has stricter access controls. An attacker cannot exploit this, but it prevents full removal of bad debt, leaving dust vouchers that increase gas costs over time.

Union Finance

Medium
Business logic

getUserInfo() returns incorrect values for locked and stakedAmount

The getUserInfo() function in UnionLens.sol returns the locked and stakedAmount values swapped because it destructures the Staker struct in the wrong order. Any user or front end calling this function receives incorrect staking information, which could lead to wrong decisions.

Union Finance

Medium
Business logic

Vouchers and vouchees indices become corrupted by UserManager's cancelVouch

The cancelVouch function in UserManager moves the last element of the vouchers and vouchees arrays to fill the deleted slot but fails to update the corresponding index mappings for the moved element. This leaves stale indices that cause functions like getLockedStake and updateTrust to revert or return incorrect values, potentially allowing a borrower to exploit incorrect trust/locked amounts and freeze the staker's funds.

Union Finance

Medium
Business logic

repayBorrow calls wrong frozen info update for overdue repayments

The repayBorrow function in UToken calls updateFrozenInfo with the borrower's address instead of the staker's address, so the staker's frozen coin age information is not updated when a borrower repays an overdue loan. This can lead to stale totalFrozen values being used in Comptroller reward calculations, resulting in incorrect UNION reward distribution.

Union Finance

High
DoS

Priority withdrawal sequence array will grow infinitely over time

The withdraw sequence array grows indefinitely because removing an adapter does not shrink it, while adding an adapter increases it. Over time, withdrawals iterate over an ever-longer array, raising gas costs and potentially making withdrawals economically unviable or impossible.

Union Finance

Medium
DoS

updateTrust() vouchers also need check maxVouchers

The updateTrust function checks the maxVouchers limit for the vouchees array but not for the vouchers array, so a borrower's vouchers list can grow without bound. This could cause updateLocked to fail due to gas exhaustion when iterating over a large vouchers array.

Union Finance

Medium
DoS

gas limit DoS via unbounded operations

A malicious member can repeatedly vouch for a victim with a zero trust amount, filling the victim's vouchers array. This makes loops over that array unbounded, so the victim's borrow, repay, and registration transactions run out of gas and fail.

Union Finance

Medium