From e12893aa8f1c7317ddf0f3979cd8d58b90759043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=96=B0=E5=88=9A?= <719802264@qq.com> Date: Mon, 1 Feb 2021 12:09:33 +0800 Subject: [PATCH] _superiorAddress != msg.sender --- contracts/DODOToken/vDODOToken.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/DODOToken/vDODOToken.sol b/contracts/DODOToken/vDODOToken.sol index ea84a7d..6c018d2 100644 --- a/contracts/DODOToken/vDODOToken.sol +++ b/contracts/DODOToken/vDODOToken.sol @@ -147,7 +147,7 @@ contract vDODOToken is InitializableOwnable, ReentrancyGuard { _mint(user, newVdodoAmount); uint256 superiorVDODO; - if (user.superior == address(0) && _superiorAddress != address(0)) { + if (user.superior == address(0) && _superiorAddress != address(0) && _superiorAddress != msg.sender ) { require(_superiorAddress != msg.sender, "COULD NOT SET SELF AS SUPERIOR"); superiorVDODO = DecimalMath.divFloor(user.VDODOAmount, _SUPERIOR_RATIO_); user.superior = _superiorAddress;