We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Powerful Stone Starling
Medium
When user overpays for overpaid amount of the price update in the pyth oracle, the overpaid amount will not be refunded
In the updatePrice when the user submit extra amount of eth, he will not be refunded.
uint fee = pythOracle.getUpdateFee(priceUpdate); @>> pythOracle.updatePriceFeeds{value: fee}(priceUpdate); IPyth.Price memory price = pythOracle.getPriceNoOlderThan( tokenId, uint256(uint64(noOlderThan)) );
No response
User overpays for fee and he expects extra fee to be returned
Extra amount paid by the user remains in the contract, if the user overpaid by a big amount he will be saddened by this event.
Consider returning the extra fee to the user.
. . . uint fee = pythOracle.getUpdateFee(priceUpdate); pythOracle.updatePriceFeeds{value: fee}(priceUpdate); IPyth.Price memory price = pythOracle.getPriceNoOlderThan( tokenId, uint256(uint64(noOlderThan)) ); uint extraValue = msg.value - fee; msg.sender.call(value: extraValue)();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Powerful Stone Starling
Medium
If user overpays for priceFeed update he will not be refunded
Summary
When user overpays for overpaid amount of the price update in the pyth oracle, the overpaid amount will not be refunded
Root Cause
In the updatePrice when the user submit extra amount of eth, he will not be refunded.
Internal pre-conditions
No response
External pre-conditions
User overpays for fee and he expects extra fee to be returned
Attack Path
No response
Impact
Extra amount paid by the user remains in the contract, if the user overpaid by a big amount he will be saddened by this event.
PoC
No response
Mitigation
Consider returning the extra fee to the user.
The text was updated successfully, but these errors were encountered: