Skip to content

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 ​

solidity
address NATIVE_TOKEN

X8 ​

solidity
uint256 X8

X10 ​

solidity
uint256 X10

X16 ​

solidity
uint256 X16

X19 ​

solidity
uint256 X19

X20 ​

solidity
uint256 X20

X24 ​

solidity
uint256 X24

X25 ​

solidity
uint256 X25

X30 ​

solidity
uint256 X30

X35 ​

solidity
uint256 X35

X50 ​

solidity
uint256 X50

X64 ​

solidity
uint256 X64

X96 ​

solidity
uint256 X96

X128 ​

solidity
uint256 X128

constructor ​

solidity
constructor() public

_verifyCaller ​

solidity
modifier _verifyCaller()

absorb ​

solidity
function absorb(uint256 vaultVariables_, int256 maxTick_) public returns (uint256)

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 ​

solidity
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