Under normal operation, investors fund the company via fund_cyfrin(1) to purchase shares up to the public share cap. However, when the cap is reached or close to being reached, the contract still accepts excess msg.value without refunding the overpayment.
This issue results in a direct, quantifiable loss of ETH for investors and leaves the company’s internal accounting overstated.
Since the overpayment occurs through a public entry point (fund_cyfrin), any investor interacting close to the share cap is vulnerable.
The lack of a refund pathway makes the loss permanent and violates expected ERC20-like behavior for share issuance fairness.
Likelihood:
Occurs whenever an investor sends more ETH than required for the remaining available shares.
Most likely during race conditions or when the public share cap is nearly full.
Impact:
Trapped funds permanently increase company_balance, misrepresenting equity supply.
Loss of funds for investors.
Potential accounting drift between real ETH balance and issued shares.
The following test from tests/test_phase2_findings.py reproduces the issue by simulating an investor sending more ETH than required for the final available shares.
The contract accepts the entire payment, confirming that no refund logic is triggered.
Add refund logic to return excess ETH to the investor after share issuance.
This prevents trapped funds and aligns the contract with expected DeFi payment safety practices.
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.