No donation required to restructure the table #949
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-132
grade-b
Q-07
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2023-04-frankencoin/blob/1022cb106919fba963a89205d3b90bf62543f68f/contracts/Equity.sol#L309-L315
Vulnerability details
Impact
The issue is that in function:
https://github.com/code-423n4/2023-04-frankencoin/blob/1022cb106919fba963a89205d3b90bf62543f68f/contracts/Equity.sol#L309-L315
the documentation literally says:
meaning that the holder should make a donation to actually be able to restructure the table. In this case, any holder that is classified:
https://github.com/code-423n4/2023-04-frankencoin/blob/1022cb106919fba963a89205d3b90bf62543f68f/contracts/Equity.sol#L311
is able to restructure the table without donating any funds and they are in the power to burn anyone's shares, including the frankencoin team shares.
Therefore there is a clear discrepancy between the docs and the code which would enable any classified holder to burn anyone's shares without donating funds.
Proof of Concept
Steps for the attack to happen:
frankencoin equity is below minimum:
Classified user that has voting power just calls the function
restructureCapTable
with the address that he wants to burn shares from.Tools Used
Manual
Recommended Mitigation Steps
Make a require statement that indeed the classified user has to donate x amount of funds depending where the equity is and he will be able to burn y amount of shares.
The text was updated successfully, but these errors were encountered: