contract StandardUSDTmint is Ownable {
	using SafeMath for uint256;
    using SafeERC20 for IERC20;
	IERC20 public tokenUSDT;
	uint256 public decimal_sUSD;
	IERC20 public contractsUSD;
	mapping (address => uint256) public depositAt;  
	event Miner(
		address indexed wallet,
		uint256 amount,
		string reason,
		uint256 datetime
	);

	constructor(
		address _tokenUSDT,
        uint256 _decimal_sUSD,
		address _contractsUSD
	) public {
		tokenUSDT = IERC20(_tokenUSDT);
        decimal_sUSD = _decimal_sUSD;
		contractsUSD = IERC20(_contractsUSD);
	}

	function mintsusd(uint256 _amount) external {
		require(_amount > 0, "need gt 0");
        tokenUSDT.safeTransferFrom(msg.sender, address(this), _amount);
        uint256 amountTransfer = _amount.mul(uint256(1e18)).div(10**decimal_sUSD);
        contractsUSD.mint(msg.sender, amountTransfer);
 
        emit Miner(
            msg.sender,
            _amount,
            "Mint",
            block.timestamp
        );
	}

	 // stake visibility is public as overriding LPTokenWrapper's stake() function

    function RedeemUSDT(uint _amount) external {
        require(contractsUSD.balanceOf(msg.sender) >= _amount && _amount > 0, "not enough");
        contractsUSD.burn(msg.sender, _amount);
        uint256 amountTransfer = _amount.mul(10**decimal_sUSD).div(uint256(1e18));
        tokenUSDT.safeTransfer(msg.sender, amountTransfer);
        emit Miner(
            msg.sender,
            _amount,
            "Burn",
            block.timestamp
        );
    }

	
}
function RedeemUSDT(uint _amount) external {
    require(contractsUSD.balanceOf(msg.sender) >= _amount && _amount > 0, "not enough");
    contractsUSD.burn(msg.sender, _amount);
    uint256 amountTransfer = _amount.mul(10**decimal_sUSD).div(uint256(1e18));
    tokenUSDT.safeTransfer(msg.sender, amountTransfer);
    emit Miner(
        msg.sender,
        _amount,
        "Burn",
        block.timestamp
    );
}

// stake visibility is public as overriding LPTokenWrapper's stake() function