When joining a DAO, tier price is not scaled to currency decimal used by the DAO membership which can allow a DAO to be joined for almost free.
ThejoinDAO
function in MembershipFactory.sol
does not scale the fee amount that will be transferred by the new member to the currency used in the DAO membership. Below is a snippet of the joinDAO
function:
As seen above, there tier price is taken directly from the stored value without any scaling to the currency used by the DAO membership.
It is reasonable to assume that DAO creator will not think of the currency decimal used in the DAO. So for example, if they want a tier price to be 10 USDC, then the price will be inputted as 10 by the DAO creator.
However most of ERC20 tokens by default is 18 decimals, and some tokens with smaller decimal that will be used as currency in this protocol is USDC,USDT which are 6 decimals.
So, if a DAO membership used USDC as the currency and the price of tier 0 is 10, new member will only require0.00001
in USDC to join the DAO.
DAO membership can be joined for almost free
Loss of fee for platform
Loss of fee for DAO membership
Manual review
Scale the tier price according to the currency decimal used by the DAO membership:
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.