diff --git a/contracts/p2pix.sol b/contracts/p2pix.sol index f68bc1e..456c2e3 100644 --- a/contracts/p2pix.sol +++ b/contracts/p2pix.sol @@ -222,7 +222,9 @@ contract P2PIX is msg.sender ); } else if (_amount > 1e2 ether) { - + if (_amount > 1e6 ether) + revert AmountNotAllowed(); + uint256 userCredit = userRecord[ _castAddrToKey(msg.sender) ]; @@ -230,10 +232,15 @@ contract P2PIX is uint256 spendLimit; (spendLimit) = _limiter(userCredit / WAD); - if ( - _amount > (spendLimit * WAD) || - _amount > 1e6 ether - ) revert AmountNotAllowed(); + if (_amount > (spendLimit * WAD)) { + SafeTransferLib.safeTransferFrom( + t, + msg.sender, + address(this), + _amount >> 4 // 6,25% + ); + _amount += _amount >> 4; + } } DT.Lock memory l = DT.Lock(