The PositionManager contract allowed anyone to attach arbitrarily small positions to any position NFT, which could bloat the NFT's position index array. An attacker could spam an NFT with many tiny positions until reward calculation and claiming for that NFT exceeded the block gas limit, causing a denial of service.
The moveLiquidity function did not check whether the destination bucket was bankrupt, so a user could move liquidity into a bankrupt bucket and update its deposit time, making previously zeroed LP shares redeemable. This allowed an attacker to steal LP shares belonging to other users from the PositionManager contract.
The standard funding mechanism allowed any proposal with a non-negative funding vote to be included in the final slate, even with zero votes. An attacker could submit a proposal to transfer the unallocated remainder of a low-activity period to themselves and vote for it with a dust amount, stealing those funds.
The public reward-claiming function pays the first caller who updates bucket exchange rates, so a bot can front-run honest users and take the reward. This discourages non-technical users from maintaining the system.
The proposal ID for extraordinary funding proposals did not include the end block, so an attacker could front-run a legitimate proposal with the same parameters but a past end block, creating a defeated proposal that blocks the original. This griefing attack prevents any extraordinary funding proposal from being created.
The rewards manager contract calculates a per-pool reward cap but compares it against a global total of rewards claimed across all pools, so the cap can be smaller than the claimed total. This causes an arithmetic underflow that reverts transactions, temporarily or permanently blocking users from unstaking their NFTs or claiming rewards for affected pools.
When a lender calls memorializePositions after a bucket has gone bankrupt, the contract zeroes out the tracked LP balance, which also removes the basis for claiming any unclaimed rewards. The lender could therefore lose rewards that they would otherwise have been able to claim.
The treasury accounting in the Ajna grants contract fails to subtract delegation rewards when updating the treasury balance, so the recorded treasury is higher than the actual token balance. An attacker could exploit this to cause the treasury to overstate its funds, potentially leading to insolvency or misallocation of grants.
The contract uses Solidity 0.8.14, which contains a known Yul optimizer bug that can remove memory writes in inline assembly. This could cause the array length to be set incorrectly, returning a wrong number of indexes.
The moveLiquidity function could revert due to an underflow when subtracting the moved LP amount from the stored position LP, because the moved amount can exceed the tracked LP. An attacker could trigger this to cause a denial of service for the position owner.
The PositionManager and PermitERC721 contracts do not comply with the EIP-4494 standard for permit-based ERC-721 approvals. This means third-party tools and contracts cannot detect or correctly use the permit functionality, and nonces cannot be tracked, leading to invalid or future signatures.
The voting threshold for Ajna's Extraordinary Funding Mechanism is calculated from the current total token supply, so a large token holder can burn their own tokens to lower the threshold and pass a proposal that would otherwise fail. This could allow them to withdraw more funds from the treasury than the community actually approved.
The fundingVote function allows users who did not vote in the screening stage to vote in the funding stage, but claimDelegateReward rejects those users. As a result, the rewards allocated to those votes are locked and cannot be claimed, causing the contract's token balance to diverge from its recorded treasury.
The vote threshold check for Extraordinary Proposals incorrectly compared a raw token amount against a sum that mixed treasury and non-treasury token slices, so the required percentage of non-treasury votes was lower than the whitepaper design. An attacker who could pass one large proposal could then drain the treasury through successive proposals with decreasing support.
The RewardsManager contract downcasts uint256 values to uint128 without checking for overflow when recording staking data. This can cause incorrect reward calculations, including lost or inflated rewards, and potentially transaction failures.
The internal reward-claiming routine does not check whether an epoch has already been claimed, and the liquidity-moving function calls it without that check. A staker could claim rewards for an epoch and then move their staked liquidity to trigger the same claim again, though the project disputed that this yields extra rewards.
The RewardsManager contract caps the amount of rewards a staker can claim at its current Ajna token balance, so if the contract holds fewer tokens than the staker's accumulated rewards, the staker receives less than earned. The shortfall is not recorded, so the remaining rewards cannot be claimed later, causing a permanent loss of rewards.
The PositionManager's moveLiquidity function removes the source position index unconditionally, even when the pool's moveQuoteToken only partially moves the liquidity due to a deposit constraint. This leaves the remaining LP shares untracked, permanently freezing the beneficiary's funds.
The reward calculation in _updateBucketExchangeRateAndCalculateRewards divides before multiplying, causing precision loss. An attacker could exploit this to receive slightly fewer rewards, with the loss proportional to the interest earned.
The delegate reward formula in the Ajna grants contract gives rewards proportional to the square of a delegate's votes, so a delegate with 7 times more tokens receives about 98% of the rewards instead of the 87.5% a linear formula would give. This discourages smaller delegates and reduces decentralisation.
The RewardsManager contract did not verify that the pool address passed to updateBucketExchangeRatesAndClaim was a legitimate Ajna pool. An attacker could supply a malicious contract that returned fabricated values, causing the contract to transfer an arbitrary amount of reward tokens to the attacker.
The rewards calculation performs division before multiplication, which can cause precision loss and result in zero rewards being awarded. An attacker could potentially exploit this to lose rewards, though the report does not specify a direct attack vector.
The moveLiquidity function in PositionManager copies the source bucket's deposit time to the destination position without checking the destination bucket's bankruptcy time. If the destination bucket went bankrupt after the source deposit time, the moved LP shares become permanently frozen because later operations reject positions whose deposit time is not after the bucket's bankruptcy time.
AP
Ajna Protocol
High
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.