Hunt prep
Before you test Paladin - Warden Pledges contest
What 24 disclosed reports say about Paladin - Warden Pledges contest: 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 | 15 | 0 | – | – | $0 |
| Access control lesson | 5 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 0 | – | – | $0 |
| Info disclosure 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.
-
Due to loss of precision, targetVotes may not reach
The check should use the bias (actual votes received) instead of the amount when comparing against targetVotes.
Disclosed
-
Fees charged from entire theoretical pledge amount instead of actual pledge amount
Fee collection should be done after the pledge completes, in one of the close functions or in a newly created pull function for owner to collect fees.
Disclosed
-
Reward can be over- or undercounted in extendPledge and increasePledgeRewardPerVote
The project confirmed the issue and introduced a new method for calculating needed votes and rewards so the exact amount is paid when extending a pledge or increasing the reward per vote.
Disclosed
-
Pausing WardenPledge contract, which takes effect immediately, by its owner can unexpectedly block pledge creator from calling closePledge or retrievePledgeRewards function
The pause function should be time-delayed, for example by making it only callable by a timelock governance contract, to give creators time to react.
Disclosed
-
Owner can transfer all ERC20 reward token out using function recoverERC20
The project should use a multisig wallet for the owner and track reserved reward amounts so that recoverERC20 only transfers tokens that are not reserved for rewards.
Disclosed
-
Pledge may be out of reward due to the decay in veCRV balance. targetVotes is never reached.
The logic was changed so the votes needed for each second of the pledge duration are calculated, accounting for the receiver's veCRV balance and its decay, allowing only the exact reward needed to be added.
Disclosed
-
WardenPledge accidentally inherits Ownable instead of Owner which removes an important safeguard without sponsor knowledge
The contract should inherit from Owner instead of Ownable to restore the two-step ownership transfer safeguard.
Disclosed
-
System could be wrapped and made useless without contract whitelisting
A whitelist was added so that only approved contracts can lock tokens, while other contracts can still stake and use the basic hPAL features.
Disclosed
-
HolyPaladinToken.sol uses ERC20 token with a highly unsafe pattern
The issue was fixed by updating to the latest OpenZeppelin ERC20.sol that follows the checks-effects-interactions pattern.
Disclosed
-
PaladinRewardReserve.sol may have potential bugs if it uses new tokens as rewards
The issue was fixed by changing the mapping to include the token address and updating the require checks accordingly.
Disclosed
-
Emergency mode enable/disable issue
The emergency mode should be made irreversible by removing the trigger parameter and setting emergency to true after a successful withdrawal.
Disclosed
-
Users at UNSTAKE_PERIOD can assist other users in unstaking tokens.
The unstake period was reduced to two days to make the scenario less likely.
Disclosed
-
UserLock information can be found during emergency mode
The function was changed to return an empty Lock during emergency mode, matching getUserLock, and the fix was confirmed and resolved.
Disclosed
-
Function cooldown() is not protected when protocol in emergency mode
The function should be updated to check the emergency flag and revert if emergency mode is active; the report states the issue was resolved.
Disclosed
-
Add a timelock to PaladinRewardReserve functions
The functions for transferring and approving spenders should be put behind a timelock.
Disclosed