Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/supernovahs/phantom_function_poc
https://github.com/supernovahs/phantom_function_poc
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/supernovahs/phantom_function_poc
- Owner: supernovahs
- Created: 2022-12-18T11:26:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T11:40:06.000Z (about 2 years ago)
- Last Synced: 2024-10-29T17:56:33.302Z (3 months ago)
- Language: Solidity
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Phantom_Function_POC in smart contracts that let to a recent [hack](https://twitter.com/MultichainOrg/status/1483733455296860160).
## What are Phantom Functions?
When you call a particular function on a contract, which does not even exist , devs expect it to be reverted by the EVM . But , some contracts , implement a fallback function , which does not revert on any data.
WETH is the same . Hence any phantom call to WETH will not revert which can be dangerous if not handled properly.## To run
```
forge test --fork-url --match-path test/Phantom.t.sol```
Thanks to [Patrickd](https://twitter.com/patrickd_de) for giving inspiration in the [Secureum](https://twitter.com/TheSecureum) Race12.