Hunt prep
Before you test Ajna Protocol
What 25 disclosed reports say about Ajna Protocol: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 16 | 0 | – | – | $0 |
| Smart contracts lesson | 4 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
User can avoid bankrupting by calling PositionManager.moveLiquidity where to index is bankrupted index
The destination bucket should be checked for bankruptcy, and if it is bankrupt its LP should be cleared before adding the moved shares.
Disclosed
-
It is possible to steal the unallocated part of every delegation period budget
The project should introduce a minimum accepted vote power for any proposal to be included in the final slate.
Disclosed
-
Potential unfair distribution of Rewards due to MEV in updateBucketExchangeRatesAndClaim
The reward mechanism should be changed, for example by randomising payouts or limiting claims to staked users with rate limits.
Disclosed
-
Adversary can prevent the creation of any extraordinary funding proposal by frontrunning proposeExtraordinary()
Include endBlock_ in the proposal hash so that front-running with a different endBlock produces a different proposal ID.
Disclosed
-
Incorrect calculation of the remaining updatedRewards leads to possible underflow error
The contract should be fixed by adding a check that if the global claimed total exceeds the per-pool cap, the new reward is set to zero instead of subtracting.
Disclosed
-
The lender could possibly lose unclaimed rewards in case a bucket goes bankrupt
The project disputed the finding as by design and said coupling the position manager to the rewards manager is undesirable, though third-party implementations could add a check that rewards were claimed before zeroing the tracked LP.
Disclosed
-
Delegation rewards are not counted toward granting fund
The treasury update should subtract the delegation rewards (or assume 10% is always paid) from the available funds before adding back the remainder.
Disclosed
-
An Optimizer Bug in PositionManager.getPositionIndexesFiltered
The Solidity version should be updated to 0.8.15 or later.
Disclosed
-
PositionManager.moveLiquidity could revert due to underflow
The position's LP should be deleted after moving liquidity, similar to redeemPositions, to prevent the underflow.
Disclosed
-
PositionManager & PermitERC721 Failure to comply with the EIP-4494
The contracts should be corrected to fully comply with EIP-4494, or references to the standard should be removed and a reference to the Uniswap V3 implementation provided.
Disclosed
-
The voting thresholds in Ajna’s Extraordinary Funding Mechanism can be manipulated to execute proposals below the expected threshold
The threshold should be calculated using a snapshot of the total supply at the time of proposal submission, not the current supply.
Disclosed
-
StandardFunding.fundingVote should not allow users who didn’t vote in screening stage to vote
The report recommends either blocking fundingVote for users who did not vote in screening, or removing the screening-vote check in claimDelegateReward.
Disclosed
-
Governance attack on Extraordinary Proposals
The constraint should compare the votes received against the sum of the non-treasury slice for the requested treasury percentage and the non-treasury slice for the minimum threshold.
Disclosed
-
Unsafe casting from uint256 to uint128 in RewardsManager
Use OpenZeppelin’s SafeCast library or avoid casting from uint256 to uint128.
Disclosed
-
missing isEpochClaimed validation
The text recommends checking the already-claimed mapping inside the internal claim routine and reverting if the epoch was claimed.
Disclosed