The StakedCitadel contract calls a vesting function named setupVesting, but the actual vesting contract only exposes a function called vest. As a result, the withdraw function reverts and users cannot withdraw their tokens.
When an oracle price falls outside the valid range, the contract sets a flag but does not store the new price. If the policy operations team later clears the flag, the contract continues using the stale price from before the flag, allowing the team to influence pricing without oracle coordination and potentially causing incorrect asset valuations and loss of funds.
The vesting contract resets the unlock schedule when new tokens are vested, but does not reset the claimed amount, so a user who has already claimed some tokens can have their claimable balance underflow and revert. This locks their previously vested tokens until the new schedule completes.
The mintAndDistribute function increases the price of a staking share, allowing a user to deposit before the call and withdraw after to profit from the price increase. An attacker could sandwich the function to take a portion of the distributed citadels, reducing other users' profits.
The first depositor of a new StakedCitadel vault can deposit a tiny amount and then directly transfer a large amount of Citadel tokens to the vault, inflating the cost of one vault share. Subsequent depositors lose most of their deposit to rounding, with the remainder benefiting the attacker.
The buy function uses the current tokenOutPrice without allowing the buyer to specify a maximum acceptable price, so a price change by governance can be included before the buyer's transaction, causing the buyer to pay an unexpected price. An attacker could also front-run the price change to exploit this.
The Funding contract's deposit function calls getAmountOut, which returns zero when no discount is set, causing a later depositFor call to revert because it requires a non-zero amount. As a result, no deposits are possible unless a discount is configured.
The StakedCitadel contract's balance() function returns only the vault's token balance, not the vault plus strategy balance, so share minting and burning use an incorrect denominator. An attacker can deposit a small amount to make the balance non-zero and then deposit more to receive far more shares than deserved, allowing them to withdraw more tokens than they should.
The contract owner could change the token sale price while a buyer's purchase transaction was pending, so the buyer received far fewer tokens than expected and the owner's chosen recipient address received the tokens. The owner could also front-run a buy to set a very high price, effectively giving the buyer almost nothing.
The buy function transfers the buyer's input tokens directly to the saleRecipient without first ensuring the corresponding output tokens are locked in the contract. A malicious saleRecipient can keep the input tokens and finalize the sale without ever providing the output tokens, causing buyers to lose their funds.
The smart contract gives the owner and proxy admin excessive control, allowing them to change sale conditions, pause the contract, sweep unsold tokens, and front-run buyers, which can cause buyers to lose funds. The proxy admin can also upgrade the contract to steal all funds.
BC
Badger Citadel contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.