Closed code423n4 closed 1 year ago
https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L275
Sending FPS to a person affects his voteAnchor and can prevent him from withdrawing money for a long time
voteAnchor
Since canRedeem function is using voteAnchor to determine holding period https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L136 and sending FPS evokes adjustRecipientVoteAnchor, which shifts VoteAnchor forward https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L157 then you can send x FPS to a person that only is holding x FPS for 90 days to prevent him from redeeming for a month and a half. https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L161
canRedeem
adjustRecipientVoteAnchor
x
Choose different redeeming mechanism, like requests with timestamps and transfer freeze
0xA5DF marked the issue as duplicate of #668
0xA5DF marked the issue as duplicate of #922
hansfriese marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L275
Vulnerability details
Impact
Sending FPS to a person affects his
voteAnchor
and can prevent him from withdrawing money for a long timeProof of Concept
Since
canRedeem
function is usingvoteAnchor
to determine holding period https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L136 and sending FPS evokesadjustRecipientVoteAnchor
, which shifts VoteAnchor forward https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L157 then you can sendx
FPS to a person that only is holdingx
FPS for 90 days to prevent him from redeeming for a month and a half. https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Equity.sol#L161Recommended Mitigation Steps
Choose different redeeming mechanism, like requests with timestamps and transfer freeze