Controller

A smart contract from which refinancing operations for a vault-pair can be executed. Refinancing of vault's debt can be 100% or partial.

FUNCTIONS

doRefinancing()

Performs a forced refinancing routine

function doRefinancing(
    address _vaultAddr,
    address _newProvider,
    uint256 _ratioA,
    uint256 _ratioB,
    uint8 _flashNum
    ) external isValidVault(_vaultAddr) onlyOwnerOrExecutor

_vaultAddr: the Fuji Vault address where the collateral is coming from.

_newProvider: The new protocol where all the funds will move.

_ratioA: Ratio to determine how much debt position to move.

ratioB: Ratio A divided by Ratio B is less or equal to 1 and more than 0.

_flashNum: Integer identifier of flashloan provider.

setFujiAdmin()

Sets the fujiAdmin address that is used for verification in doRefinancing()

function fujiAdmin(address _newFujiAdmin) external onlyOwner

Last updated