User can frontrun opened position's owner's `Position.mint` transaction by calling `Position.reduceLimitForClone` function to reduce opened position's limit to 0
Audit: 2023-04-frankencoin-findings
Severity: MEDIUM

# Lines of code

https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Position.sol#L177-L179
https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Position.sol#L97-L101


# Vulnerability details

## Impact
For an opened position, the position's owner can call the following `Position.mint` function to mint ZCHF tokens after paying the opening fee, depositing the initial collateral tokens, and passing the initialization period.

https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Position.sol#L177-L179
```solidity
    function mint(address target, uint256 amount) public onlyOwner noChallenge noCooldown alive {
       mintInternal(target, amount, collateralBalance());
    }
```

Yet, another user can frontrun the opened position's owner's `Position.mint` transaction by calling the `MintingHub.clonePosition` function, which further calls the following `Position.reduceLimitForClone` function, to use all of the opened position's `limit` for the cloned position. After such frontrunning, the opened position's `limit` becomes 0, and its owner cannot mint any ZCHF tokens so she or he basically paid and lost the opening fee for nothing. Moreover, since the deposited initial collateral tokens could be invested elsewhere for some returns during the initialization period, the opened position's owner also bears the opportunity cost associated with the deposited initial collateral tokens that do not provide any returns during the initialization period.

https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/Position.sol#L97-L101
```solidity
    function reduceLimitForClone(uint256 _minimum) external noChallenge noCooldown alive onlyHub returns (uint256) {
        uint256 reduction = (limit - minted - _minimum)/2; // this will fail with an underflow if minimum is too high
        limit -= reduction + _minimum;
        return reduction + _minimum;
    }
```

## Proof of Concept
Please replace https://github.com/code-423n4/2023-04-frankencoin/blob/main/test/PositionTests.ts#L100-L139 in `test\PositionTests.ts` with the following code. This `User can frontrun opened position's owner's Position.mint transaction by calling Position.reduceLimitForClone function to reduce opened position's limit to 0` test will pass to demonstrate the described scenario.

```typescript
        // @audit comment out the next two tests for POC purpose
        // it("get loan after 7 long days", async () => {
        //     // "wait" 7 days...
        //     await ethers.provider.send('evm_increaseTime', [7 * 86_400 + 60]); 
        //     await ethers.provider.send("evm_mine");
        //     // thanks for waiting so long
        //     fLimit = await positionContract.limit();
        //     limit = dec18ToFloat(fLimit);
        //     let amount = 10_000;
        //     expect(amount).to.be.lessThan(limit);

        //     let fAmount = floatToDec18(amount);
        //     let fZCHFBefore = await ZCHFContract.balanceOf(own