Skip to content
Access control Audit finding Beginner

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.

Jujic Follow

Originally disclosed on Code4rena

Submitted by Jujic, also found by danb

The owner of PaladinRewardReserve can approve and transfer any amount of tokens with no limits on any account. This is not good for investors. To give more trust to users: these functions should be put behind a timelock.

Proof of Concept

PaladinRewardReserve.sol#L28

PaladinRewardReserve.sol#L52

Tools Used

VS Code

Recommended Mitigation Steps

Add a timelock to transfer and spender approved functions.

Kogaroshi (Paladin) acknowledged and commented:

Those 2 smart contracts will be owned by a Multisig, executing decisions based on Governance Votes in the Paladin DAO. In future evolutions of the DAO, it should have a Timelock and an on-chain Governance controlling the smart contract.


The original report as published on Code4rena, by Jujic. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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

Impact

The owner could transfer or approve any amount of tokens, which may undermine investor trust; the project noted that a multisig and future governance would control the contracts.

What the attacker needed

Owner privileges

The fix

The functions for transferring and approving spenders should be put behind a timelock.

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.

A smart contract has an 'owner' who has special powers. Here, that owner can move any amount of tokens out of the contract or let others spend them, with no delay or limit. If the owner's key is misused, users' funds could be taken, so the report suggests adding a waiting period (a timelock) before such actions take effect.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Jujic

View all

4 more disclosed reports, best first.

More from Paladin - Warden Pledges contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.