Open hats-bug-reporter[bot] opened 5 months ago
The first deposit cap inside _deposit
protects us from ever reaching the higher MAX_SUPPLY
.
I see it as intended if the protocol has in mind other ways to mint or distribute Elastic tokens, different than deposits.
Github username: -- Twitter username: @EgisSec Submission hash (on-chain): 0x165b6846a51cb69f358cb6571844ca29c53d0a10b531db08670632d04a443730 Severity: low
Description: Description\ If we take a look at
_deposit
inFM_Rebasing_v1
You can see that there is a check for
DEPOSIT_CAP
, which is hardcoded to100_000_000e18
.When
_deposit
is called,_mint
will be called inElasticReceiptTokenBase_v1
The function also has a cap on the amount of
tokens
that the contract can hold.The issue is that
MAX_SUPPLY
is1_000_000_000e18
, which has 1 more 0 thanDEPOSIT_CAP
.Considering both variables check the same thing, they should be in sync or one of them should be removed.
Attack Scenario\
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
Sync both variables or remove one of them, as they are effectively checking the same thing.