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
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
In the mint(), burn(), open(), close(), and liquidate() functions, the protocol uses tx.origin to identify the user. Using tx.origin makes users more vulnerable to phishing attacks.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
Bauer
Medium
Use
msg.sender
instead oftx.origin
Summary
In the
mint()
,burn()
,open()
,close()
, andliquidate()
functions, the protocol usestx.origin
to identify the user. Usingtx.origin
makes users more vulnerable to phishing attacks.Root Cause
https://github.com/sherlock-audit/2024-08-velar-artha/blob/main/gl-sherlock/contracts/core.vy#L166
https://github.com/sherlock-audit/2024-08-velar-artha/blob/main/gl-sherlock/contracts/core.vy#L202
https://github.com/sherlock-audit/2024-08-velar-artha/blob/main/gl-sherlock/contracts/core.vy#L241
https://github.com/sherlock-audit/2024-08-velar-artha/blob/main/gl-sherlock/contracts/core.vy#L281
https://github.com/sherlock-audit/2024-08-velar-artha/blob/main/gl-sherlock/contracts/core.vy#L318
The protocol uses
tx.origin
instead ofmsg.sender
as the user to execute the subsequent operations.Internal pre-conditions
External pre-conditions
Attack Path
mint()
,burn()
,open()
,close()
, or similar operations.As a result, the user's assets can be manipulated without their authorization.
Impact
The user is subjected to a phishing attack.
PoC
@external
def mint(
id : uint256,
base_token : address,
quote_token : address,
lp_token : address,
base_amt : uint256,
quote_amt : uint256,
ctx : Ctx) -> uint256:
self._INTERNAL()
user : address = tx.origin
Mitigation
Use
msg.sender
instead oftx.origin
.Duplicate of #82
The text was updated successfully, but these errors were encountered: