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.
Submitted by Trust, also found by 0x52
Paladin receives a 5% cut from Boost purchases, as documented on the website:
“Warden takes a 5% fee on Boost purchases, and 5% on Quest incentives. However, there are various pricing tiers for Quest creators. Contact the Paladin team for more info.”
Here’s how fee calculation looks at createPledge function:
vars.totalRewardAmount = (rewardPerVote * vars.votesDifference * vars.duration) / UNIT;
vars.feeAmount = (vars.totalRewardAmount * protocalFeeRatio) / MAX_PCT ;
if(vars.totalRewardAmount > maxTotalRewardAmount) revert Errors.IncorrectMaxTotalRewardAmount();
if(vars.feeAmount > maxFeeAmount) revert Errors.IncorrectMaxFeeAmount();
// Pull all the rewards in this contract
IERC20(rewardToken).safeTransferFrom(creator, address(this), vars.totalRewardAmount);
// And transfer the fees from the Pledge creator to the Chest contract
IERC20(rewardToken).safeTransferFrom(creator, chestAddress, vars.feeAmount);
The issue is that the fee is taken up front, assuming totalRewardAmount will actually be rewarded by the pledge. In practice, the rewards actually utilized can be anywhere from zero to totalRewardAmount. Indeed, reward will only be totalRewardAmount if, in the entire period from pledge creation to pledge expiry, the desired targetVotes will be fulfilled, which is extremly unlikely.
As a result, if pledge expires with no pledgers, protocol will still take 5%. This behavior is both unfair and against the docs, as it’s not “Paladin receives a 5% cut from Boost purchases”.
Impact
Paladin fee collection assumes pledges will be matched immediately and fully, which is not realistic. Therefore far too many fees are collected at user’s expense.
Proof of Concept
- Bob creates a pledge, with target = 200, current balance = 100, rewardVotes = 10, remaining time = 1 week.
- Protocol collects (200 - 100) * 10 * WEEK_SECONDS * 5% fees
- A week passed, rewards were not attractive enough to bring pledgers.
- After expiry, Bob calls
retrievePledgeRewards()and gets 100 * 10 * WEEK_SECONDS back, but 5% of the fees still went to chestAddress.
Recommended Mitigation Steps
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. Otherwise, it is a completely unfair system.
Kogaroshi (Paladin) acknowledged and commented:
The issue is acknowledged, and we do calculate fee on the basis of all rewards, and not only the one that are gonna be used to reward users.
The fee ratio is gonna be of 1% to start with (might change before deploy based on market estimations), and the Core team will be able to change the ratio quickly to adapt it to market and Pledge creators needs (with also considering the Paladin DAO revenues). The Paladin team will also considers Pledge creators that are in specific cases and overpay fees (because they already have delegated boost that will last through the whole Pledge and more), and will be able to refund a part of those fees to the creator if the DAO agrees.
And if this system does not fit in the current market, and is a blocker to potential Pledge creators, we will be able to modify the way fees are handled, and deploy a new iteration of Pledge pretty fast to answer the issue.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the fee is calculated and transferred upfront based on the total theoretical reward amount, without accounting for the actual rewards that will be utilised.
Impact
Pledge creators may overpay fees because the protocol collects fees on rewards that are never actually distributed, which is unfair and contrary to the documented fee model.
What the attacker needed
A pledge creator; a pledge that is not fully matched
The fix
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.
How it was found
- Bob creates a pledge with target 200, current balance 100, rewardVotes 10, remaining time 1 week.
- Protocol collects fees on the difference (200 - 100) * 10 * WEEK_SECONDS * 5%.
- A week passes and no pledgers join because rewards were not attractive enough.
- After expiry, Bob calls retrievePledgeRewards() and gets back 100 * 10 * WEEK_SECONDS, but the 5% fee still went to chestAddress.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you create a pledge, the system charges a fee based on the maximum possible reward you offer, not on what is actually paid out. If nobody takes up your pledge, you still lose the fee even though no rewards were given. This is unfair because the fee should only apply to rewards that are actually used.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.