The LibSilo:transferStalk
function does not properly check whether the sender has a sufficient balance of stalk
to transfer. This oversight could allow transfers that exceed the sender's balance, leading to an overdraft situation where the sender's balance goes negative.
See the folowing code:
If the transferStalk
function allows transfers exceeding the sender's balance, it can lead to inconsistencies in the accounting of Stalk and Roots balances. Additionally, it can create unexpected behavior within the application, potentially disrupting the intended flow of operations and causing financial losses for users.
Manual Review
To address this issue, proper validation should be added to ensure that the sender has a sufficient balance of Stalk
to transfer before proceeding with the transfer. If the sender's balance is insufficient, the function should revert the transaction or handle the situation gracefully, based on the requirements of the application.
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.