Internals ​
Fluid "VaultT1" (Vault Type 1). Fluid vault protocol main operate contract. T1 -> Normal collateral | Normal debt
constructor ​
solidity
constructor(struct Structs.ConstantViews constants_) internal
FluidVaultT1Operate_Not_For_Prod ​
operate ​
solidity
function operate(uint256 nftId_, int256 newCol_, int256 newDebt_, address to_) external payable returns (uint256, int256, int256)
Performs operations on a vault position
This function allows users to modify their vault position by adjusting collateral and debt
Parameters ​
Name | Type | Description |
---|---|---|
nftId_ | uint256 | The ID of the NFT representing the vault position |
newCol_ | int256 | The change in collateral amount (positive for deposit, negative for withdrawal) |
newDebt_ | int256 | The change in debt amount (positive for borrowing, negative for repayment) |
to_ | address | The address to receive withdrawn collateral or borrowed tokens (if address(0), defaults to msg.sender) |
Return Values ​
Name | Type | Description |
---|---|---|
[0] | uint256 | nftId_ The ID of the NFT representing the updated vault position |
[1] | int256 | Final supply amount (negative if withdrawal occurred) |
[2] | int256 | Final borrow amount (negative if repayment occurred) |
constructor ​
solidity
constructor(struct Structs.ConstantViews constants_) public