A critical vulnerability in the profit distribution mechanism allows a malicious user to claim all profit tokens intended for
legitimate users by inflating the totalProfit
.
NOTE: this issue opens multiple kind of attacks:
attacker can steal all Profit.
attacker can Prevent members from claiming their shares and Dos the whole claiming process.
The vulnerability lies in the sendProfit
function, which calculates the totalProfit
based on the totalSupply
. An attacker can mint
the first token, obtaining 100% of the share, and then send a large amount of tokens eg: 10k USDC via sendProfit
.
After attacker sendProfit and inflate totalProfit he can claim 10k back in same Tx.
and then attacker buys new tier with another account now when DAO sends Profit to users the attacker can claim all tokens to himself.
attacker mints the first token, tokenId 6
, gaining 100% of the share (since they are the only holder).
attacker sends 10k USDC to sendProfit, due to the calculation, totalProfit is massively inflated.
attacker calls claimProfit and receives all of the profit due to their total share.
attacker buy a new tier lets say tokenId_6 (1 share)
after users joined the DAO the DAO wants to distribute Tokens to users.
DAO sends 20k.
now attacker with the new account (tokenId_6 -> 1 share) he can back-run DAO Tx and claim all the tokens.
attacker can use flash loans to borrow lets say 10M USDC, he send them as first and only owner of shares
then he claim them back in same Tx, what happened here is that the totalProfit is inflated after that
when DAO sends Profit to members no one will be able to claim his share because the Profit will be 10M in USDC.
This is the result when attacker uses flash loan:
attacker can steal all Profit.
attacker can Prevent members from claiming their shares and Dos the whole claiming process.
Prevent users to sendProfit.
make delay eg: deposit can be made only after 1 day after Dao is created.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.