Post
Share your knowledge.
Mar 29, 2024
Expert Q&A
FundMe Smart Contract Accepts Less Than Minimum USD in ETH
I recently sent 0.02 ETH to the FundMe contract, which equates to a value greater than the specified minimum USD amount of 5e18. However, I am puzzled as to why the contract accepted this transaction despite it being below the minimum USD threshold.
- Transaction
- Solidity
- Blockchain
- Smart Contract
- Gas
0
1
Share
Comments
Answers
1Mar 29 2024, 12:20
The cost of the oracle is a determining factor in this scenario. If the price of ETH is $2000, then the calculation would be 0.02 ETH * $2000 = $40.
In your case, if 0.05 ETH is less than $5, then the price should be less than this: 0.02 ETH * $250 = $5. There are two possible solutions for you:
- You can increase the price of the mock contract.
- You can send additional ETH to cover the cost differential.
0
Official Answer
Comments
Do you know the answer?
Please log in and share it.
Cyfrin Updraft is an education platform specializing on teaching the next generation of smart contract developers
194Posts188Answers
Trending posts