added lock bonds (hardcoded to 6,25%)
This commit is contained in:
		
							parent
							
								
									55409a960c
								
							
						
					
					
						commit
						5c989e3596
					
				| @ -222,6 +222,8 @@ 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( | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user