Skip to content

Code4rena

Paladin - Warden Pledges contest

Every publicly disclosed report for Paladin - Warden Pledges contest and what kind of bugs they were.

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

Disclosed reports

Newest first. Only what Paladin - Warden Pledges contest chose to make public.

Audit finding

Due to loss of precision, targetVotes may not reach

The pledge function checks that the receiver's adjusted balance plus the pledged amount does not exceed targetVotes, but the actual votes received are less than the amount due to integer division precision loss. This means the receiver's balance may not reach targetVotes even though the check passes.

Paladin - Warden Pledges contest

Medium
Business logic

Fees charged from entire theoretical pledge amount instead of actual pledge amount

The fee for creating a pledge is calculated on the entire theoretical reward amount rather than the actual rewards used, so the protocol takes a fee even if the pledge expires with no pledgers. An attacker could create a pledge that is never matched and still pay a fee, but the report frames this as unfair fee collection rather than an exploit.

Paladin - Warden Pledges contest

Medium
Business logic

Reward can be over- or undercounted in extendPledge and increasePledgeRewardPerVote

The pledge contract caches the number of missing votes when a pledge is created and reuses that stale value when the pledge is extended or its reward per vote is increased. If the receiver's voting balance has changed since creation, the total reward is miscalculated, so the creator can overpay for rewards that can never be claimed or underpay so the target is never reached.

Paladin - Warden Pledges contest

Medium
Business logic

Pausing WardenPledge contract, which takes effect immediately, by its owner can unexpectedly block pledge creator from calling closePledge or retrievePledgeRewards function

The WardenPledge contract's pause function, callable by the owner, immediately blocks pledge creators from calling closePledge or retrievePledgeRewards, which use the whenNotPaused modifier. This can unexpectedly prevent creators from withdrawing their deposited reward tokens, potentially causing financial hardship.

Paladin - Warden Pledges contest

Medium
Access control

Owner can transfer all ERC20 reward token out using function recoverERC20

The contract's owner-only recoverERC20 function lets the owner withdraw any token, including reward tokens meant for users. Because the owner can first remove a token from the whitelist, the safeguard fails and the owner can transfer all reserved reward tokens to themselves, causing loss of funds for pledge creators and rewards for users.

Paladin - Warden Pledges contest

Medium
Business logic

Pledge may be out of reward due to the decay in veCRV balance. targetVotes is never reached.

The pledge reward was calculated once at creation from the receiver's veCRV balance, but that balance decays over time, so the reward pool no longer matches the votes still needed to reach targetVotes. A booster could take all the allocated reward while the pledge never reaches its target, and later boosters would be reverted for insufficient rewards.

Paladin - Warden Pledges contest

Medium
Smart contracts

HolyPaladinToken.sol uses ERC20 token with a highly unsafe pattern

The custom ERC20 implementation used by HolyPaladinToken.sol updates the sender's allowance after calling _transfer, contrary to the checks-effects-interactions pattern. An attacker could potentially exploit this ordering to double-spend or reenter if the token were extended with external calls.

Paladin - Warden Pledges contest

Medium
Access control

PaladinRewardReserve.sol may have potential bugs if it uses new tokens as rewards

The contract's approvedSpenders mapping does not record which token a spender is approved for, so if a new token is added as a reward, existing approvals from a previous token carry over. An attacker already approved for one token could then call updateSpenderAllowance for the new token.

Paladin - Warden Pledges contest

Medium
Access control

Emergency mode enable/disable issue

The emergency mode in a smart contract could be toggled on and off by the owner, allowing them to perform emergency withdrawals and then disable emergency mode, which gives them a privileged position. An attacker with owner privileges could exploit this to withdraw funds without restrictions and then revert the contract to normal operation.

Paladin - Warden Pledges contest

Medium
Business logic

Users with large cooldown s can grief other users

An account with a large cooldown can increase the cooldown of another account by sending it a small amount of tokens, because the receiver's cooldown is recalculated as a weighted average that includes the sender's cooldown. This could delay the victim's ability to transfer or unstake their tokens.

Paladin - Warden Pledges contest

Medium
Business logic

Users at UNSTAKE_PERIOD can assist other users in unstaking tokens.

A user whose cooldown has almost expired can receive freshly staked tokens from another user and then unstake them immediately, because the weighted-average cooldown calculation lets the receiver's old cooldown dominate. This lets the receiver help another user bypass the intended unstake waiting period.

Paladin - Warden Pledges contest

Medium
Business logic

Function cooldown() is not protected when protocol in emergency mode

The cooldown() function in the HolyPaladinToken contract lacks the emergency mode check that other major functions have. During emergency mode, users can still initiate cooldown, potentially allowing them to prepare for unstaking once the emergency is lifted.

Paladin - Warden Pledges contest

Medium
Access control

Add a timelock to PaladinRewardReserve functions

The owner of the PaladinRewardReserve contract can approve and transfer any amount of tokens without limits. This centralisation risk means the owner could drain or move funds arbitrarily, which is not good for investors.

Paladin - Warden Pledges contest

Medium
Business logic

Updating the state

The emergency withdraw function fails to reset the user's bonus ratio and duration ratio, leaving stale values. An attacker could later claim funds with an incorrect ratio if the contract exits the emergency state.

Paladin - Warden Pledges contest

Medium
Info disclosure

UserLock information can be found during emergency mode

During the contract's emergency (blocked) mode, the getUserLock function was meant to return empty lock information, but the getUserPastLock function lacked the same emergency check and still exposed the user's lock details. An attacker could therefore read the information the protocol intended to hide.

Paladin - Warden Pledges contest

Medium
Business logic

Users Can Bypass Emergency Restrictions on updateUserRewardState()

The emergency withdrawal feature is meant to freeze reward accrual, but a user can still update their rewards by transferring a small amount of unlocked tokens. This lets them keep earning rewards during the emergency, potentially claiming a larger share of allocated rewards.

Paladin - Warden Pledges contest

Medium
Business logic

cooldown is set to 0 when the user sends all tokens to himself

The token contract resets a user's cooldown to zero when they transfer their entire balance to themselves, which unintentionally extends the lock period. An attacker could exploit this to freeze a victim's funds for an additional period, though the funds are not permanently locked.

Paladin - Warden Pledges contest

Medium
Business logic

Incorrect number of seconds in ONE_YEAR variable

The ONE_YEAR constant in a smart contract was set to 31,557,600 seconds instead of the correct 31,536,000, making it slightly too long. This incorrect value was used in vote-related functions, which could negatively affect users.

Paladin - Warden Pledges contest

Medium
Business logic

System could be wrapped and made useless without contract whitelisting

The token's locking mechanism did not restrict which contracts could lock tokens, so anyone could build a wrapper contract that locks hPAL and then sells or tokenises ownership of that contract, making the locked tokens effectively liquid and transferable again. This undermines the intended design where locking is meant to make tokens illiquid in exchange for boosted voting power and rewards.

Paladin - Warden Pledges contest

High