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
gpersoon
A liquidator can always claim the liquidation escrow in the following way:
// https://github.com/code-423n4/2021-06-tracer/blob/main/src/contracts/Trader.sol#L67 function executeTrade(Types.SignedLimitOrder[] memory makers, Types.SignedLimitOrder[] memory takers) external override {
https://github.com/code-423n4/2021-06-tracer/blob/main/src/contracts/Liquidation.sol#L394 function claimReceipt( uint256 receiptId, Perpetuals.Order[] memory orders, address traderContract) external override {
perhaps limit who can call executeTrade
The text was updated successfully, but these errors were encountered:
gpersoon issue #2
a6c723a
Valid issue which would allow someone to get reimbursed for slippage against themselves.
The Trader contract will have whitelisted relayers added to prevent issues like this (similar to #119)
Sorry, something went wrong.
No branches or pull requests
Handle
gpersoon
Vulnerability details
Impact
A liquidator can always claim the liquidation escrow in the following way:
Proof of Concept
// https://github.com/code-423n4/2021-06-tracer/blob/main/src/contracts/Trader.sol#L67
function executeTrade(Types.SignedLimitOrder[] memory makers, Types.SignedLimitOrder[] memory takers) external override {
https://github.com/code-423n4/2021-06-tracer/blob/main/src/contracts/Liquidation.sol#L394
function claimReceipt( uint256 receiptId, Perpetuals.Order[] memory orders, address traderContract) external override {
Tools Used
Recommended Mitigation Steps
perhaps limit who can call executeTrade
The text was updated successfully, but these errors were encountered: