You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
submitOffchainDelayedOrder() is called wrong with wrong paramters
Summary
At the end of the liquidation function, the protocol submits an offchain delayed order in sythetix with a 1X leverage
File: borrowLiquidation.sol
361: // Submit an offchain delayed order in synthetix for short position with 1X leverage362: synthetixPerpsV2.submitOffchainDelayedOrder(
363: @>-int((uint(margin *1ether*1e16) / currentEthPrice)),
364: currentEthPrice *1e16365: );
The problem is that the leverage is over estimated.
Using 1 ether instead of 1 overestimates the sizeDelta
Root Cause
No response
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
This can lead to opening position with an overblown leverage or better yet reverting in the synthetix contract itself
PoC
No response
Mitigation
modify as shown below
File: borrowLiquidation.sol
361: // Submit an offchain delayed order in synthetix for short position with 1X leverage
362: synthetixPerpsV2.submitOffchainDelayedOrder(
-363: -int((uint(margin * 1 ether * 1e16) / currentEthPrice)),+363: -int((uint(margin * 1 * 1e16) / currentEthPrice)),
364: currentEthPrice * 1e16
365: );
The text was updated successfully, but these errors were encountered:
Jolly Umber Cormorant
Medium
submitOffchainDelayedOrder()
is called wrong with wrong paramtersSummary
At the end of the liquidation function, the protocol submits an offchain delayed order in sythetix with a 1X leverage
The problem is that the leverage is over estimated.
Using
1 ether
instead of 1 overestimates thesizeDelta
Root Cause
No response
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
This can lead to opening position with an overblown leverage or better yet reverting in the synthetix contract itself
PoC
No response
Mitigation
modify as shown below
The text was updated successfully, but these errors were encountered: