Users can earn free money by buying tickets and selling tickets while earning the LOT token staking rewards
Proof of Concept
Since all tickets are just NFT and free to transfer, and LOT token staking reward is directly related to the amount of ticket amount, a user can deposit lots of LOT to the staking contract, and then buy and sell lots of ticket NFTs. In this way he/she can earn free staking rewards.
Tools Used
Manual Review
Recommended Mitigation Steps
Consider forbidding the transfer of ticket NFTs. Anyone want tickets can only mint by themselves.
Lines of code
https://github.com/code-423n4/2023-03-wenwin/blob/91b89482aaedf8b8feb73c771d11c257eed997e8/src/Lottery.sol#L110-L131
Vulnerability details
Impact
Users can earn free money by buying tickets and selling tickets while earning the LOT token staking rewards
Proof of Concept
Since all tickets are just NFT and free to transfer, and LOT token staking reward is directly related to the amount of ticket amount, a user can deposit lots of LOT to the staking contract, and then buy and sell lots of ticket NFTs. In this way he/she can earn free staking rewards.
Tools Used
Manual Review
Recommended Mitigation Steps
Consider forbidding the transfer of ticket NFTs. Anyone want tickets can only mint by themselves.