and when contract are paused, the decaying bond is forced to expire with no other option because when calling bond / bondWithdDelegate during the pause state,
Does not count the paused time towards expiration and leave sufficient timelock for user to bond / bond with delegate using a bond id that is about to expire
Lines of code
https://github.com/code-423n4/2023-08-dopex/blob/eb4d4a201b3a75dd4bddc74a34e9c42c71d0d12f/contracts/decaying-bonds/RdpxDecayingBonds.sol#L122 https://github.com/code-423n4/2023-08-dopex/blob/eb4d4a201b3a75dd4bddc74a34e9c42c71d0d12f/contracts/core/RdpxV2Core.sol#L636 https://github.com/code-423n4/2023-08-dopex/blob/eb4d4a201b3a75dd4bddc74a34e9c42c71d0d12f/contracts/core/RdpxV2Core.sol#L144 https://github.com/code-423n4/2023-08-dopex/blob/eb4d4a201b3a75dd4bddc74a34e9c42c71d0d12f/contracts/core/RdpxV2Core.sol#L899
Vulnerability details
Impact
Decaying bond is forced to expire when contract are paused
Proof of Concept
when decaying bond is minted, an expiration time is set
but when user bond or bond with delegate, the expiry time is checked
note the expiry check
if the a time decay bond expires, the bond / bondWithDelegate can revert
however, the admin can pause the contract,
and when contract are paused, the decaying bond is forced to expire with no other option because when calling bond / bondWithdDelegate during the pause state,
transaction revert in this line of code
Tools Used
Manual Review
Recommended Mitigation Steps
Does not count the paused time towards expiration and leave sufficient timelock for user to bond / bond with delegate using a bond id that is about to expire
Assessed type
Timing