contract PoolGov is Pool {
    // Staking for governance token

    using SafeMath for uint256;
    using Decimal for Decimal.D256;

    bytes32 private constant FILE = "Pool Gov";

    mapping(address => uint256) public lockedUntil;

    constructor(
        IDAO _dao,
        IERC20 _stakingToken,
        IERC20 _rewardsToken
    ) public Pool(_dao, _stakingToken, _rewardsToken) {}

    // Locks token in place i.e. they can't unbond it
    function placeLock(address account, uint256 newLock) external onlyDao {
        if (newLock > lockedUntil[account]) {
            lockedUntil[account] = newLock;
        }
    }

    function withdraw(uint256 value) public {
        // When voting, dao can place a lock on the contract
        Require.that(epoch() > lockedUntil[msg.sender], FILE, "Locked till gov passes");

        Pool.withdraw(value);
    }

    function statusOf(address user) public view returns (PoolAccount.Status) {
        if (epoch() <= lockedUntil[user]) {
            return PoolAccount.Status.Locked;
        }

        return PoolGetters.statusOf(user);
    }
}
function placeLock(address account, uint256 newLock) external onlyDao {
    if (newLock > lockedUntil[account]) {
        lockedUntil[account] = newLock;
    }
}

// Locks token in place i.e. they can't unbond it