VaultT1

IFluidVaultT1

VAULT_ID

function VAULT_ID() external view returns (uint256)

returns the vault id

readFromStorage

function readFromStorage(bytes32 slot_) external view returns (uint256 result_)

reads uint256 data result_ from storage at a bytes32 storage slot_ key.

ConstantViews

struct ConstantViews {
  address liquidity;
  address factory;
  address adminImplementation;
  address secondaryImplementation;
  address supplyToken;
  address borrowToken;
  uint8 supplyDecimals;
  uint8 borrowDecimals;
  uint256 vaultId;
  bytes32 liquiditySupplyExchangePriceSlot;
  bytes32 liquidityBorrowExchangePriceSlot;
  bytes32 liquidityUserSupplySlot;
  bytes32 liquidityUserBorrowSlot;
}

constantsView

function constantsView() external view returns (struct IFluidVaultT1.ConstantViews constantsView_)

returns all Vault constants

fetchLatestPosition

function fetchLatestPosition(int256 positionTick_, uint256 positionTickId_, uint256 positionRawDebt_, uint256 tickData_) external view returns (int256, uint256, uint256, uint256, uint256)

fetches the latest user position after a liquidation

updateExchangePrices

function updateExchangePrices(uint256 vaultVariables2_) external view returns (uint256 liqSupplyExPrice_, uint256 liqBorrowExPrice_, uint256 vaultSupplyExPrice_, uint256 vaultBorrowExPrice_)

calculates the updated vault exchange prices

updateExchangePricesOnStorage

function updateExchangePricesOnStorage() external returns (uint256 liqSupplyExPrice_, uint256 liqBorrowExPrice_, uint256 vaultSupplyExPrice_, uint256 vaultBorrowExPrice_)

calculates the updated vault exchange prices and writes them to storage

LIQUIDITY

function LIQUIDITY() external view returns (address)

returns the liquidity contract address

operate

function operate(uint256 nftId_, int256 newCol_, int256 newDebt_, address to_) external payable returns (uint256, int256, int256)

liquidate

function liquidate(uint256 debtAmt_, uint256 colPerUnitDebt_, address to_, bool absorb_) external payable returns (uint256 actualDebtAmt_, uint256 actualColAmt_)

absorb

function absorb() external

rebalance

function rebalance() external payable returns (int256 supplyAmt_, int256 borrowAmt_)

FluidLiquidateResult

error FluidLiquidateResult(uint256 colLiquidated, uint256 debtLiquidated)

Variables

vaultVariables

uint256 vaultVariables

note: vaultVariables contains vault variables which need regular updates through transactions First 1 bit => 0 => re-entrancy. If 0 then allow transaction to go, else throw. Next 1 bit => 1 => Is the current active branch liquidated? If true then check the branch's minima tick before creating a new position If the new tick is greater than minima tick then initialize a new branch, make that as current branch & do proper linking Next 1 bit => 2 => sign of topmost tick (0 -> negative; 1 -> positive) Next 19 bits => 3-21 => absolute value of topmost tick Next 30 bits => 22-51 => current branch ID Next 30 bits => 52-81 => total branch ID Next 64 bits => 82-145 => Total supply Next 64 bits => 146-209 => Total borrow Next 32 bits => 210-241 => Total positions

vaultVariables2

uint256 vaultVariables2

note: vaultVariables2 contains variables which do not update on every transaction. So mainly admin/auth set amount First 16 bits => 0-15 => supply rate magnifier; 10000 = 1x (Here 16 bits should be more than enough) Next 16 bits => 16-31 => borrow rate magnifier; 10000 = 1x (Here 16 bits should be more than enough) Next 10 bits => 32-41 => collateral factor. 800 = 0.8 = 80% (max precision of 0.1%) Next 10 bits => 42-51 => liquidation Threshold. 900 = 0.9 = 90% (max precision of 0.1%) Next 10 bits => 52-61 => liquidation Max Limit. 950 = 0.95 = 95% (max precision of 0.1%) (above this 100% liquidation can happen) Next 10 bits => 62-71 => withdraw gap. 100 = 0.1 = 10%. (max precision of 0.1%) (max 7 bits can also suffice for the requirement here of 0.1% to 10%). Needed to save some limits on withdrawals so liquidate can work seamlessly. Next 10 bits => 72-81 => liquidation penalty. 100 = 0.01 = 1%. (max precision of 0.01%) (max liquidation penantly can be 10.23%). Applies when tick is in between liquidation Threshold & liquidation Max Limit. Next 10 bits => 82-91 => borrow fee. 100 = 0.01 = 1%. (max precision of 0.01%) (max borrow fee can be 10.23%). Fees on borrow. Next 4 bits => 92-95 => empty Next 160 bits => 96-255 => Oracle address

absorbedLiquidity

uint256 absorbedLiquidity

note: stores absorbed liquidity First 128 bits raw debt amount last 128 bits raw col amount

positionData

mapping(uint256 => uint256) positionData

position index => position data uint if the entire variable is 0 (meaning not initialized) at the start that means no position at all First 1 bit => 0 => position type (0 => borrow position; 1 => supply position) Next 1 bit => 1 => sign of user's tick (0 => negative; 1 => positive) Next 19 bits => 2-20 => absolute value of user's tick Next 24 bits => 21-44 => user's tick's id Below we are storing user's collateral & not debt, because the position can also be only collateral with no tick but it can never be only debt Next 64 bits => 45-108 => user's supply amount. Debt will be calculated through supply & ratio. Next 64 bits => 109-172 => user's dust debt amount. User's net debt = total debt - dust amount. Total debt is calculated through supply & ratio User won't pay any extra interest on dust debt & hence we will not show it as a debt on UI. For user's there's no dust.

tickHasDebt

mapping(int256 => uint256) tickHasDebt

Tick has debt only keeps data of non liquidated positions. liquidated tick's data stays in branch itself tick parent => uint (represents bool for 256 children) parent of (i)th tick:- if (i>=0) (i / 256); else ((i + 1) / 256) - 1 first bit of the variable is the smallest tick & last bit is the biggest tick of that slot

tickData

mapping(int256 => uint256) tickData

mapping tickId => tickData Tick related data. Total debt & other things First bit => 0 => If 1 then liquidated else not liquidated Next 24 bits => 1-24 => Total IDs. ID should start from 1. If not liquidated: Next 64 bits => 25-88 => raw debt If liquidated The below 3 things are of last ID. This is to be updated when user creates a new position Next 1 bit => 25 => Is 100% liquidated? If this is 1 meaning it was above max tick when it got liquidated (100% liquidated) Next 30 bits => 26-55 => branch ID where this tick got liquidated Next 50 bits => 56-105 => debt factor 50 bits (35 bits coefficient | 15 bits expansion)

tickId

mapping(int256 => mapping(uint256 => uint256)) tickId

tick id => previous tick id liquidation data. ID starts from 1 One tick ID contains 3 IDs of 80 bits in it, holding liquidation data of previously active but liquidated ticks 81 bits data below

First 85 bits

1st bit => 0 => Is 100% liquidated? If this is 1 meaning it was above max tick when it got liquidated Next 30 bits => 1-30 => branch ID where this tick got liquidated Next 50 bits => 31-80 => debt factor 50 bits (35 bits coefficient | 15 bits expansion)

Second 85 bits

85th bit => 85 => Is 100% liquidated? If this is 1 meaning it was above max tick when it got liquidated Next 30 bits => 86-115 => branch ID where this tick got liquidated Next 50 bits => 116-165 => debt factor 50 bits (35 bits coefficient | 15 bits expansion)

Third 85 bits

170th bit => 170 => Is 100% liquidated? If this is 1 meaning it was above max tick when it got liquidated Next 30 bits => 171-200 => branch ID where this tick got liquidated Next 50 bits => 201-250 => debt factor 50 bits (35 bits coefficient | 15 bits expansion)

branchData

mapping(uint256 => uint256) branchData

mapping branchId => branchData First 2 bits => 0-1 => if 0 then not liquidated, if 1 then liquidated, if 2 then merged, if 3 then closed merged means the branch is merged into it's base branch closed means all the users are 100% liquidated Next 1 bit => 2 => minima tick sign of this branch. Will only be there if any liquidation happened. Next 19 bits => 3-21 => minima tick of this branch. Will only be there if any liquidation happened. Next 30 bits => 22-51 => Partials of minima tick of branch this is connected to. 0 if master branch. Next 64 bits => 52-115 Debt liquidity at this branch. Similar to last's top tick data. Remaining debt will move here from tickData after first liquidation If not merged Next 50 bits => 116-165 => Debt factor or of this branch. (35 bits coefficient | 15 bits expansion) If merged Next 50 bits => 116-165 => Connection/adjustment debt factor of this branch with the next branch. If closed Next 50 bits => 116-165 => Debt factor as 0. As all the user's positions are now fully gone following values are present always again (merged / not merged / closed) Next 30 bits => 166-195 => Branch's ID with which this branch is connected. If 0 then that means this is the master branch Next 1 bit => 196 => sign of minima tick of branch this is connected to. 0 if master branch. Next 19 bits => 197-215 => minima tick of branch this is connected to. 0 if master branch.

rates

uint256 rates

Exchange prices are in 1e12 First 64 bits => 0-63 => Liquidity's collateral token supply exchange price First 64 bits => 64-127 => Liquidity's debt token borrow exchange price First 64 bits => 128-191 => Vault's collateral token supply exchange price First 64 bits => 192-255 => Vault's debt token borrow exchange price

rebalancer

address rebalancer

address of rebalancer

absorbedDustDebt

uint256 absorbedDustDebt

FluidVaultT1Admin

Fluid Vault protocol Admin Module contract. Implements admin related methods to set configs such as liquidation params, rates oracle address etc. Methods are limited to be called via delegateCall only. Vault CoreModule ("VaultT1" contract) is expected to call the methods implemented here after checking the msg.sender is authorized. All methods update the exchange prices in storage before changing configs.

X64

uint256 X64

constructor

constructor() public

_verifyCaller

modifier _verifyCaller()

_updateExchangePrice

modifier _updateExchangePrice()

updates exchange price on storage, called on all admin methods in combination with _verifyCaller modifier so only called by authorized delegatecall

updateSupplyRateMagnifier

function updateSupplyRateMagnifier(uint256 supplyRateMagnifier_) public

updates the supply rate magnifier to supplyRateMagnifier_. Input in 1e2 (1% = 100, 100% = 10_000).

updateBorrowRateMagnifier

function updateBorrowRateMagnifier(uint256 borrowRateMagnifier_) public

updates the borrow rate magnifier to borrowRateMagnifier_. Input in 1e2 (1% = 100, 100% = 10_000).

updateCollateralFactor

function updateCollateralFactor(uint256 collateralFactor_) public

updates the collateral factor to collateralFactor_. Input in 1e2 (1% = 100, 100% = 10_000).

updateLiquidationThreshold

function updateLiquidationThreshold(uint256 liquidationThreshold_) public

updates the liquidation threshold to liquidationThreshold_. Input in 1e2 (1% = 100, 100% = 10_000).

updateLiquidationMaxLimit

function updateLiquidationMaxLimit(uint256 liquidationMaxLimit_) public

updates the liquidation max limit to liquidationMaxLimit_. Input in 1e2 (1% = 100, 100% = 10_000).

updateWithdrawGap

function updateWithdrawGap(uint256 withdrawGap_) public

updates the withdrawal gap to withdrawGap_. Input in 1e2 (1% = 100, 100% = 10_000).

updateLiquidationPenalty

function updateLiquidationPenalty(uint256 liquidationPenalty_) public

updates the liquidation penalty to liquidationPenalty_. Input in 1e2 (1% = 100, 100% = 10_000).

updateBorrowFee

function updateBorrowFee(uint256 borrowFee_) public

updates the borrow fee to borrowFee_. Input in 1e2 (1% = 100, 100% = 10_000).

updateCoreSettings

function updateCoreSettings(uint256 supplyRateMagnifier_, uint256 borrowRateMagnifier_, uint256 collateralFactor_, uint256 liquidationThreshold_, uint256 liquidationMaxLimit_, uint256 withdrawGap_, uint256 liquidationPenalty_, uint256 borrowFee_) public

updates the all Vault core settings according to input params. All input values are expected in 1e2 (1% = 100, 100% = 10_000).

updateOracle

function updateOracle(address newOracle_) public

updates the Vault oracle to newOracle_. Must implement the FluidOracle interface.

updateRebalancer

function updateRebalancer(address newRebalancer_) public

updates the allowed rebalancer to newRebalancer_.

rescueFunds

function rescueFunds(address token_) external

sends any potentially stuck funds to Liquidity contract.

this contract never holds any funds as all operations send / receive funds from user <-> Liquidity.

absorbDustDebt

function absorbDustDebt(uint256[] nftIds_) public

absorbs accumulated dust debt

in decades if a lot of positions are 100% liquidated (aka absorbed) then dust debt can mount up which is basically sort of an extra revenue for the protocol.

FluidVaultT1

Fluid "VaultT1" (Vault Type 1). Fluid vault protocol main contract. Fluid Vault protocol is a borrow / lending protocol, allowing users to create collateral / borrow positions. All funds are deposited into / borrowed from Fluid Liquidity layer. Positions are represented through NFTs minted by the VaultFactory. Deployed by "VaultFactory" and linked together with VaultT1 AdminModule ADMIN_IMPLEMENTATION and FluidVaultT1Secondary (main2.sol) SECONDARY_IMPLEMENTATION. AdminModule & FluidVaultT1Secondary methods are delegateCalled, if the msg.sender has the required authorization. This contract links to an Oracle, which is used to assess collateral / debt value. Oracles implement the "FluidOracle" base contract and return the price in 1e27 precision.

For view methods / accessing data, use the "VaultResolver" periphery contract.

operate

function operate(uint256 nftId_, int256 newCol_, int256 newDebt_, address to_) public payable returns (uint256, int256, int256)

Single function which handles supply, withdraw, borrow & payback

Parameters

NameTypeDescription
nftId_uint256NFT ID for interaction. If 0 then create new NFT/position.
newCol_int256new collateral. If positive then deposit, if negative then withdraw, if 0 then do nohing
newDebt_int256new debt. If positive then borrow, if negative then payback, if 0 then do nohing
to_addressaddress where withdraw or borrow should go. If address(0) then msg.sender

Return Values

NameTypeDescription
0uint256nftId_ if 0 then this returns the newly created NFT Id else returns the same NFT ID
1int256newCol* final supply amount. Mainly if max withdraw using type(int).min then this is useful to get perfect amount else remain same as newCol*
2int256newDebt* final borrow amount. Mainly if max payback using type(int).min then this is useful to get perfect amount else remain same as newDebt*

liquidate

function liquidate(uint256 debtAmt_, uint256 colPerUnitDebt_, address to_, bool absorb_) public payable returns (uint256 actualDebtAmt_, uint256 actualColAmt_)

allows to liquidate all bad debt of all users at once. Liquidator can also liquidate partially any amount they want.

Parameters

NameTypeDescription
debtAmt_uint256total debt to liquidate (aka debt token to swap into collateral token)
colPerUnitDebt_uint256minimum collateral token per unit of debt in 1e18 decimals
to_addressaddress at which collateral token should go to. If dead address (0x000000000000000000000000000000000000dEaD) then reverts with custom error "FluidLiquidateResult" returning the actual collateral and actual debt liquidated. Useful to find max liquidatable amounts via try / catch.
absorb_boolif true then liquidate from absorbed first

Return Values

NameTypeDescription
actualDebtAmt_uint256if liquidator sends debtAmt* more than debt remaining to liquidate then actualDebtAmt* changes from debtAmt_ else remains same
actualColAmt_uint256total liquidated collateral which liquidator will get

absorb

function absorb() public

absorb function absorbs the bad debt if the bad debt is above max limit. The main use of it is if the bad debt didn't got liquidated in time maybe due to sudden price drop or bad debt was extremely small to liquidate and the bad debt goes above 100% ratio then there's no incentive for anyone to liquidate now hence absorb functions absorbs that bad debt to allow newer bad debt to liquidate seamlessly if absorbing were to happen after this it's on governance on how to deal with it although it can still be removed through liquidate via liquidator if the price goes back up and liquidation becomes beneficial upon absorbed user position gets 100% liquidated.

rebalance

function rebalance() external payable returns (int256 supplyAmt_, int256 borrowAmt_)

Checks total supply of vault's in Liquidity Layer & Vault contract and rebalance it accordingly if vault supply is more than Liquidity Layer then deposit difference through reserve/rebalance contract if vault supply is less than Liquidity Layer then withdraw difference to reserve/rebalance contract if vault borrow is more than Liquidity Layer then borrow difference to reserve/rebalance contract if vault borrow is less than Liquidity Layer then payback difference through reserve/rebalance contract

liquidityCallback

function liquidityCallback(address token_, uint256 amount_, bytes data_) external

liquidity callback for cheaper token transfers in case of deposit or payback. only callable by Liquidity during an operation.

constructor

constructor(struct Structs.ConstantViews constants_) public

fallback

fallback() external

FluidVaultT1Secondary

Fluid Vault protocol secondary methods contract. Implements absorb() and rebalance() methods, extracted from main contract due to contract size limits. Methods are limited to be called via delegateCall only (as done by Vault CoreModule "VaultT1" contract).

NATIVE_TOKEN

address NATIVE_TOKEN

X8

uint256 X8

X10

uint256 X10

X16

uint256 X16

X19

uint256 X19

X20

uint256 X20

X24

uint256 X24

X25

uint256 X25

X30

uint256 X30

X35

uint256 X35

X50

uint256 X50

X64

uint256 X64

X96

uint256 X96

X128

uint256 X128

constructor

constructor() public

_verifyCaller

modifier _verifyCaller()

absorb

function absorb() public

absorb function absorbs the bad debt if the bad debt is above max limit. The main use of it is if the bad debt didn't got liquidated in time maybe due to sudden price drop or bad debt was extremely small to liquidate and the bad debt goes above 100% ratio then there's no incentive for anyone to liquidate now hence absorb functions absorbs that bad debt to allow newer bad debt to liquidate seamlessly. if absorbing were to happen after this it's on governance on how to deal with it although it can still be removed through liquidate via liquidator if the price goes back up and liquidation becomes beneficial upon absorbed user position gets 100% liquidated.

rebalance

function rebalance() external payable returns (int256 supplyAmt_, int256 borrowAmt_)

Checks total supply of vault's in Liquidity Layer & Vault contract and rebalance it accordingly if vault supply is more than Liquidity Layer then deposit difference through reserve/rebalance contract if vault supply is less than Liquidity Layer then withdraw difference to reserve/rebalance contract if vault borrow is more than Liquidity Layer then borrow difference to reserve/rebalance contract if vault borrow is less than Liquidity Layer then payback difference through reserve/rebalance contract

ErrorTypes

VaultT1__AlreadyEntered

| | VaultT1 | |********__********

thrown at reentrancy

uint256 internal constant VaultT1__AlreadyEntered = 31001;

VaultT1__InvalidOperateAmount

thrown when user sends deposit & borrow amount as 0

uint256 internal constant VaultT1__InvalidOperateAmount = 31002;

VaultT1__InvalidMsgValueOperate

thrown when msg.value is not in sync with native token deposit or payback

uint256 internal constant VaultT1__InvalidMsgValueOperate = 31003;

VaultT1__NotAnOwner

thrown when msg.sender is not the owner of the vault

uint256 internal constant VaultT1__NotAnOwner = 31004;

VaultT1__TickIsEmpty

thrown when user's position does not exist. Sending the wrong index from the frontend

uint256 internal constant VaultT1__TickIsEmpty = 31005;

VaultT1__PositionAboveCF

thrown when the user's position is above CF and the user tries to make it more risky by trying to withdraw or borrow

uint256 internal constant VaultT1__PositionAboveCF = 31006;

VaultT1__TopTickDoesNotExist

thrown when the top tick is not initialized. Happens if the vault is totally new or all the user's left

uint256 internal constant VaultT1__TopTickDoesNotExist = 31007;

VaultT1__InvalidMsgValueLiquidate

thrown when msg.value in liquidate is not in sync payback

uint256 internal constant VaultT1__InvalidMsgValueLiquidate = 31008;

VaultT1__ExcessSlippageLiquidation

thrown when slippage is more on liquidation than what the liquidator sent

uint256 internal constant VaultT1__ExcessSlippageLiquidation = 31009;

VaultT1__NotRebalancer

thrown when msg.sender is not the rebalancer/reserve contract

uint256 internal constant VaultT1__NotRebalancer = 31010;

VaultT1__NftNotOfThisVault

thrown when NFT of one vault interacts with the NFT of other vault

uint256 internal constant VaultT1__NftNotOfThisVault = 31011;

VaultT1__TokenNotInitialized

thrown when the token is not initialized on the liquidity contract

uint256 internal constant VaultT1__TokenNotInitialized = 31012;

VaultT1__NotAnAuth

thrown when admin updates fallback if a non-auth calls vault

uint256 internal constant VaultT1__NotAnAuth = 31013;

VaultT1__ExcessCollateralWithdrawal

thrown in operate when user tries to witdhraw more collateral than deposited

uint256 internal constant VaultT1__ExcessCollateralWithdrawal = 31014;

VaultT1__ExcessDebtPayback

thrown in operate when user tries to payback more debt than borrowed

uint256 internal constant VaultT1__ExcessDebtPayback = 31015;

VaultT1__WithdrawMoreThanOperateLimit

thrown when user try to withdrawal more than operate's withdrawal limit

uint256 internal constant VaultT1__WithdrawMoreThanOperateLimit = 31016;

VaultT1__InvalidLiquidityCallbackAddress

thrown when caller of liquidityCallback is not Liquidity

uint256 internal constant VaultT1__InvalidLiquidityCallbackAddress = 31017;

VaultT1__NotEntered

thrown when reentrancy is not already on

uint256 internal constant VaultT1__NotEntered = 31018;

VaultT1__OnlyDelegateCallAllowed

thrown when someone directly calls secondary implementation contract

uint256 internal constant VaultT1__OnlyDelegateCallAllowed = 31019;

VaultT1__TransferFromFailed

thrown when the safeTransferFrom for a token amount failed

uint256 internal constant VaultT1__TransferFromFailed = 31020;

VaultT1__ExchangePriceOverFlow

thrown when exchange price overflows while updating on storage

uint256 internal constant VaultT1__ExchangePriceOverFlow = 31021;

VaultT1__InvalidLiquidationAmt

thrown when debt to liquidate amt is sent wrong

uint256 internal constant VaultT1__InvalidLiquidationAmt = 31022;

VaultT1__UserCollateralDebtExceed

thrown when user debt or collateral goes above 2128 or below -2128

uint256 internal constant VaultT1__UserCollateralDebtExceed = 31023;

VaultT1__BranchDebtTooLow

thrown if on liquidation branch debt becomes lower than 100

uint256 internal constant VaultT1__BranchDebtTooLow = 31024;

VaultT1__TickDebtTooLow

thrown when tick's debt is less than 10000

uint256 internal constant VaultT1__TickDebtTooLow = 31025;

VaultT1__LiquidityExchangePriceUnexpected

thrown when the received new liquidity exchange price is of unexpected value (< than the old one)

uint256 internal constant VaultT1__LiquidityExchangePriceUnexpected = 31026;

VaultT1__UserDebtTooLow

thrown when user's debt is less than 10000

uint256 internal constant VaultT1__UserDebtTooLow = 31027;

VaultT1__InvalidPaybackOrDeposit

thrown when on only payback and only deposit the ratio of position increases

uint256 internal constant VaultT1__InvalidPaybackOrDeposit = 31028;

VaultT1__InvalidLiquidation

thrown when liquidation just happens of a single partial

uint256 internal constant VaultT1__InvalidLiquidation = 31029;

VaultT1__InvalidMsgValueInRebalance

thrown when msg.value is sent wrong in rebalance

uint256 internal constant VaultT1__InvalidMsgValueInRebalance = 31030;

VaultT1__NothingToRebalance

thrown when nothing rebalanced

uint256 internal constant VaultT1__NothingToRebalance = 31031;

ERC721__InvalidParams

| | ERC721 | |********__********

uint256 internal constant ERC721__InvalidParams = 32001;

ERC721__Unauthorized

uint256 internal constant ERC721__Unauthorized = 32002;

ERC721__InvalidOperation

uint256 internal constant ERC721__InvalidOperation = 32003;

ERC721__UnsafeRecipient

uint256 internal constant ERC721__UnsafeRecipient = 32004;

ERC721__OutOfBoundsIndex

uint256 internal constant ERC721__OutOfBoundsIndex = 32005;

VaultT1Admin__ValueAboveLimit

| | Vault Admin | |********__********

thrown when admin tries to setup invalid value which are crossing limits

uint256 internal constant VaultT1Admin__ValueAboveLimit = 33001;

VaultT1Admin__OnlyDelegateCallAllowed

when someone directly calls admin implementation contract

uint256 internal constant VaultT1Admin__OnlyDelegateCallAllowed = 33002;

VaultT1Admin__NftIdShouldBeNonZero

thrown when auth sends NFT ID as 0 while collecting dust debt

uint256 internal constant VaultT1Admin__NftIdShouldBeNonZero = 33003;

VaultT1Admin__NftNotOfThisVault

thrown when trying to collect dust debt of NFT which is not of this vault

uint256 internal constant VaultT1Admin__NftNotOfThisVault = 33004;

VaultT1Admin__DustDebtIsZero

thrown when dust debt of NFT is 0, meaning nothing to collect

uint256 internal constant VaultT1Admin__DustDebtIsZero = 33005;

VaultT1Admin__FinalDebtShouldBeZero

thrown when final debt after liquidation is not 0, meaning position 100% liquidated

uint256 internal constant VaultT1Admin__FinalDebtShouldBeZero = 33006;

VaultT1Admin__NftNotLiquidated

thrown when NFT is not liquidated state

uint256 internal constant VaultT1Admin__NftNotLiquidated = 33007;

VaultT1Admin__AbsorbedDustDebtIsZero

thrown when total absorbed dust debt is 0

uint256 internal constant VaultT1Admin__AbsorbedDustDebtIsZero = 33008;

VaultT1Admin__AddressZeroNotAllowed

thrown when address is set as 0

uint256 internal constant VaultT1Admin__AddressZeroNotAllowed = 33009;
Table of Contents