Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Vault

Git Source

Inherits: IEvents

The vault serves as a liquidity vehicle for market creation using a shared bucket of liquidity. Dao-earned fees are repaid to this vault when the market is resolved, subtracting what’s needed to earn more than the fees.

State Variables

version

uint8 public version

ERC20

IERC20 public ERC20

FACTORY

address public FACTORY

OPERATOR

address public OPERATOR

outstandingDebt

uint256 public outstandingDebt

debt

mapping(address => uint256) debt

Functions

init

function init(IERC20 _erc20, address _factory, address _operator) external;

borrow

function borrow(address _for, uint256 _amount) external;

repay

function repay(uint256 _feesEarned) external;

drain

function drain() external returns (uint256 amt);