A known issue has been reported in the VestedAirdrop
contract: Time-bound tests fails for an issue in Titanoboa. The issue is being tracked here and here. But it seems that the tests are rightfully failing.
Tests are failing because of the random second difference between EVM block timestamps and datetime
timestamps in seconds. Also the method used to warp time might not be adapted to the test environment. The combination of these two issues might explain the failure of time-bound tests. But normally these issues are not expected to occur in production.
Time-bound tests fails on these tests:
TestVestingSystem::test_claim
TestVestingSystem::test_claim_all
Wrong claim amount are returned and the assert fails.
Printing the timestamp while deploying the contract to check the second difference:
Checking the claimable amount against the expected amount (example with 30 days):
Deploy the contract with boa env timestamp rather than datetime.
Use boa.env.time_travel
instead of custom warping to take into account the block number too.
I propose a reworked test file with all the original tests but with the recommended mitigation on my fork:
https://github.com/s3bc40/2025-02-vyper-vested-claims/blob/92c54dd15738435b4db2245655fbef0c8a0fa0b6/tests/test_audit.py
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.