Skip to content

Code4rena

Sandclock contest

Every publicly disclosed report for Sandclock contest and what kind of bugs they were.

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

Disclosed reports

Newest first. Only what Sandclock contest chose to make public.

Business logic

Vault can’t receive deposits if underlying token charges fees on transfer

The vault's deposit and sponsor functions check that the vault's balance increases by exactly the transferred amount after a safeTransferFrom. If the underlying token charges a fee on transfer, the balance increase is smaller, so the check fails and the function reverts, making deposits and sponsorships impossible.

Sandclock contest

Medium
Access control

A Single Malicious Trusted Account Can Takeover Parent Contract

Any single trusted account can remove all other trusted accounts from the isTrusted mapping, effectively taking over the trusted group that controls all restricted functions in the parent contract. This could lead to loss of funds if a trusted account becomes malicious or is compromised.

Sandclock contest

Medium
Business logic

Changing a strategy can be bricked

The vault's setStrategy function requires the strategy to have zero invested assets, but anyone can send a tiny amount of aUST to the strategy, making investedAssets non-zero and preventing the strategy from being replaced. An attacker could repeatedly grief the protocol by sending 1 wei of aUST, forcing the protocol to redeem and wait, and since EthAnchor does not accept redeems below 10 aUST, the protocol would need to add more funds to redeem the griefer's dust.

Sandclock contest

Medium
Business logic

unsponsor, claimYield and withdraw might fail unexpectedly

The vault's totalUnderlying() figure counts assets that have been invested and are not held in the contract balance, so withdrawals, yield claims and unsponsoring can try to transfer more than the contract actually holds. A forced unsponsor would always fail for this reason, and in stressed conditions users could be unable to retrieve funds.

Sandclock contest

Medium
Access control

Centralization Risk: Funds can be frozen when critical key holders lose access to their keys

The contract requires trusted key holders to call a function to initiate withdrawals from EthAnchor, so if those key holders lose access to their keys, user funds invested in EthAnchor become frozen. An attacker cannot directly exploit this, but the centralization risk means funds could be permanently locked under certain conditions.

Sandclock contest

Medium
Business logic

NonUSTStrategy.sol Improper handling of swap fees allows attacker to steal funds from other users

The NonUSTStrategy contract swaps deposited assets into UST but does not charge the swap fee to the depositor, instead spreading it across all vault users. An attacker can provide most of the liquidity in the swap pool, deposit a large amount to generate fees, and then withdraw, capturing the majority of the fees paid by other users.

Sandclock contest

Medium
Smart contracts

sponsor() function in open to reentrancy attacks

The sponsor() function in Vault.sol lacks a reentrancy guard and calls depositors.mint() before updating state, allowing an attacker to reenter and call mint() multiple times while the totalSponsored amount is only updated once.

Sandclock contest

High
Smart contracts

deposit() function is open to reentrancy attacks

The deposit() function in Vault.sol calls external NFT minting functions that trigger a callback to the sender, allowing reentrancy before execution completes. An attacker could mint multiple NFTs for themselves and manipulate state variables like newShares or enter other functions such as withdraw.

Sandclock contest

High
Smart contracts

Vaults with non-UST underlying asset vulnerable to flash loan attack on curve pool

The NonUSTStrategy contract uses a Curve pool's spot exchange rate to value assets, which can be manipulated by a flash loan. An attacker could take a flash loan, swap a large amount to skew the pool's rate, then deposit or withdraw from the vault at favourable terms and profit.

Sandclock contest

High
Business logic

forceUnsponsor() may open a window for attackers to manipulate the _totalShares and freeze users’ funds at a certain deposit amount

The forceUnsponsor function can transfer all underlying tokens to a sponsor even when other depositors exist, leaving the vault with a tiny balance. An attacker can then deposit a small amount to receive an extremely large number of shares, which can later freeze user funds when deposit or withdraw amounts reach a certain value.

Sandclock contest

High
Business logic

Incompatibility With Rebasing/Deflationary/Inflationary tokens

The strategy contracts do not account for tokens whose balances change during transfers or over time, such as rebasing, deflationary, or inflationary tokens. This could lead to a loss of funds because the contract's internal accounting may not match the actual token balance.

Sandclock contest

Medium
Smart contracts

no use of safeMint() as safe guard for users

The Vault contract's deposit function mints NFTs to claimers using a plain mint call rather than a safe mint, so a recipient contract that cannot handle NFTs may not be checked. The report argues this could leave users unprotected, though the text does not demonstrate a concrete exploit.

Sandclock contest

Medium
Business logic

Check _to is not empty

The smart contract functions claimYield, _withdraw, and _unsponsor do not check that the recipient address _to is not the zero address. An attacker could accidentally or intentionally send funds to the zero address, causing permanent loss of assets.

Sandclock contest

Medium
Business logic

No setter for exchangeRateFeeder, whose address might change in future

The BaseStrategy contract lacks a setter to update the exchangeRateFeeder address, which EthAnchor documentation says may change. If the address changes, the strategy would use an outdated feeder, leading to inaccurate calculation of the vault's total invested assets.

Sandclock contest

Medium