VaultFactoryOwnerTransfer ​
Inherits:VaultFactoryOwnerCore
transferPosition and transferDustPosition logic.
Functions ​
constructor ​
constructor(uint256[] memory vaultIds_, address[] memory dustPosAuths_) ;setVaultIdAllowlisted ​
Allowlists or de-allowlists a vault ID for transferPosition. Governance only.
function setVaultIdAllowlisted(uint256 vaultId_, bool allowed_) external onlyGovernance;setTransferDustPosAuth ​
Sets or revokes a transferDustPosition auth address. Team or governance.
function setTransferDustPosAuth(address auth_, bool allowed_) external onlyTeamOrGovernance;transferPosition ​
Transfers a position NFT to team multisig. Vault must be allowlisted.
function transferPosition(uint256 tokenId_) external onlyTeamOrGovernance;Parameters
| Name | Type | Description |
|---|---|---|
tokenId_ | uint256 | The position NFT token ID to transfer |
transferDustPosition ​
Transfers a dust position NFT to team multisig.
All callers require position debt < DEBT_THRESHOLD. dustPosAuths must also satisfy position ratio >= 50% (risky). team multisig and governance may transfer dust positions regardless of ratio.
function transferDustPosition(uint256 tokenId_) external onlyDustPosAuthOrTeamOrGovernance;Parameters
| Name | Type | Description |
|---|---|---|
tokenId_ | uint256 | The position NFT token ID to transfer |
_setVaultIdAllowlisted ​
function _setVaultIdAllowlisted(uint256 vaultId_, bool allowed_) internal;_setTransferDustPosAuth ​
function _setTransferDustPosAuth(address auth_, bool allowed_) internal;_resolvePosition ​
Reads tokenConfig from factory storage, extracts owner and vaultId. Reverts if NFT does not exist.
function _resolvePosition(uint256 tokenId_) internal view returns (address from_, uint256 vaultId_);_resolveVault ​
Resolves a vault by id and determines its type. If TYPE() is unavailable, falls back to legacy T1 semantics (vault already validated via factory).
function _resolveVault(uint256 vaultId_) internal view returns (IFluidVault vault_, uint256 vaultType_);_getPositionTickAndDebtRaw ​
Returns the position's current tick and total raw debt amount. Replicates resolver logic from FluidVaultResolver.positionByNftId(). See position data layout in vaultT1/common/variables.sol (positionData mapping at storage slot 3) and tick data layout (tickData mapping at storage slot 5). Dust debt is NOT subtracted: DEBT_THRESHOLD is compared against gross raw debt. The vault core gates MIN_DEBT on net debt; dust is at most one tick width (0.15%) plus rounding, irrelevant at 10x MIN_DEBT.
function _getPositionTickAndDebtRaw(IFluidVault vault_, uint256 tokenId_)
internal
view
returns (int256 tick_, uint256 debtRaw_);_isPositionAboveRatioThreshold ​
Checks if the position's current ratio (LTV) is >= RATIO_THRESHOLD (50%). Replicates the vault's oracle-adjusted ratio computation from vaultT1/coreModule/main.sol lines 431-457. Uses a fixed RATIO_THRESHOLD (500 = 50%) instead of the vault's per-vault collateral factor.
function _isPositionAboveRatioThreshold(IFluidVault vault_, uint256 vaultType_, int256 positionTick_)
internal
view
returns (bool);