XDEFIDistribution: lock should be reused in lockWithPermit #47
Labels
bug
Something isn't working
G (Gas Optimization)
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
PierrickGT
Vulnerability details
Impact
In lockWithPermit, we use the same code to transfer XDEFI and lock the position than in lock. We can create an internal function to reuse this code and avoid duplication.
Proof of Concept
Create an internal function called
_lockPosition
that will transfer XDEFI and lock the position. This function will be called inlock
andlockWithPermit
.Recommended Mitigation Steps
The following change is recommended.
The text was updated successfully, but these errors were encountered: