Carpediem Pension

Carpediem Pension Smart Contract Audit Report

Share
Share
PulseChainPulseChain
DeFiPension
PulseChainPulseChain
DeFiPension

QuillAudits audited the Carpediem Pension smart contracts on PulseChain between Oct 30, 2023 and Nov 28, 2023. The audit found 34 issues: 1 high, 9 medium, 13 low, 11 informational, of which 23 resolved and 11 acknowledged.

Project Description

Carpe Diem Pension (CDP) protocol contains Pension, Auction and CDPtoken contract. The CDP token can be deposited in a Pension contract, and rewards can be earned on it. Users can deposit in auctions with native blockchain tokens and would be able to collect shares, which then can be used to earn CDP tokens.

Timeline

S1
Oct 30, 2023
S2
Nov 28, 2023

Scope of Audit

The scope of this audit was to analyze the Carpe Diem codebase for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

Contract Address

Pension https://scan.pul...b9db12648a5d1bb6bd774c19

Star
speedometer
0
50%
60%
70%
90%
100%
93.2%
AUDIT SCORE
icon

High

Medium

Low

Informational

open0000
acknowledged0155
partially resolved0000
resolved1886
Carpediem Pension

Carpediem Pension

High Severity Issues

User would be able to claim/compound very big amount without depositing and waiting for days/years.

Resolved
arrow-right
Description

While setting _referral in depositCDP() because snapshot is not getting set for _referral address, the _referral would be able to create the scenario where while calculating pending in claimCDP or compoundCDP, in this formula pending += (rewardPerShare - snapshot) * userShares + storedReward; the snapshot would be 0 because that was never set for referral, (rewardPerShare - snapshot) would be rewardPerShare value which will get multiplied with userShares (referral's share in this case) so that _referral would be able to claim rewards for all days even after getting referral very recently.

Contract

Pension.sol

Recommendation

Consider recording a snapshot for a referral address after L123. e.g. userInfo[ref].snapshot=rewardPerShare; and also calculate reward to store for referral address e.g. 
if (referralShares != 0 && referralSnapshot < rewardPerShare) { 
userRef.storedReward += (rewardPerShare - referralSnapshot) * referralShares; 
}
It needs to be added for a referral because if the referral has any previous rewards, it wont get stored as the snapshot will again get recorded for that referral.
If remains unfixed, then any user can intentionally or unintentionally erase the accumulated rewards for any user because the snapshot for that referral will get reset.

Medium Severity Issues

Low Severity Issues

Informational Issues

Appendix

Disclaimer

Carpediem Pension

Carpediem Pension

High Severity Issues
Medium Severity Issues
Low Severity Issues
Informational Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC