//src/yield/YieldStakingBase.sol

    function _unstake(uint32 poolId, address nft, uint256 tokenId, uint256 unstakeFine) internal virtual {
...
        // sender must be bot or nft owner
        if (msg.sender == botAdmin) {
            require(unstakeFine <= nc.maxUnstakeFine, Errors.YIELD_ETH_EXCEED_MAX_FINE);

            uint256 hf = calculateHealthFactor(nft, nc, sd);
            require(hf < nc.unstakeHeathFactor, Errors.YIELD_ETH_HEATH_FACTOR_TOO_HIGH);

            sd.unstakeFine = unstakeFine;
|>          totalUnstakeFine += unstakeFine;//@audit at this point, unstakeFine is not availalbe because  the position is not claimed until repay() flow.
        }
...
//src/yield/YieldStakingBase.sol
    function collectFeeToTreasury() public virtual onlyPoolAdmin {
        address to = addressProvider.getTreasury();
        require(to != address(0), Errors.TREASURY_CANNOT_BE_ZERO);

        if (totalUnstakeFine > claimedUnstakeFine) {
|>          uint256 amountToCollect = totalUnstakeFine - claimedUnstakeFine;
            claimedUnstakeFine += amountToCollect;

            underlyingAsset.safeTransfer(to, amountToCollect);

            emit CollectFeeToTreasury(to, amountToCollect);
        }
    }
