Skip to main content

Liquidity Vault

VaultL1.sol is used in the Earn page and provides a way for users to provide liquidity in their desired asset.


  • Upgradable
  • Nonreentrant
  • Ownable


1 (mainnet)proxy0xef4439f0fAe7DB0B5ce88C155fc6af50F1b38728
1 (mainnet)implementation0x729c94a58D17d1BE63196afd08Ca529ff4426d82


// Events emitted when a new asset is added/removed to/from the supported tokens listevent TokenAddedToWhitelist(    address indexed token,    uint256 maxCap);event TokenRemovedFromWhitelist(    address indexed token);
// Event emitted when cap for a supported asset is changedevent TokenMaxCapEdited(    address indexed token,    uint256 newMaxCap);
// Events emitted when someone provides or withdraws liquidityevent Deposit(    address indexed sender,    address indexed token,    uint256 amount,    uint256 indexed totalAmount,    uint256 timestamp);event Withdrawal(    address indexed sender,    address indexed token,    uint256 amount,    uint256 indexed totalAmount,    uint256 timestamp);
// Events emitted when all the L1Vault's functionality is paused/resumedevent Pause(address admin);event Unpause(address admin);


// emits TokenAddedToWhitelistfunction addWhitelistedToken(address _token, uint256 _maxCap)    external    onlyOwner    validAddress(_token)    validAmount(_maxCap)
// emites TokenRemovedFromWhitelistfunction removeWhitelistedToken(address _token)    external    onlyOwner    validAddress(_token) // emites TokenMaxCapEdited function setMaxCapAsset(address _token, uint256 _maxCap)    external    onlyOwner    onlySupportedToken(_token)    validAmount(_maxCap)
// emits FundsMovedfunction moveFunds(        address _destination,        address _token,        uint256 _amount    )    external    onlyOwner    validAddress(_destination)    validAmount(_amount)    function pauseWithdraw(address _token)    external    onlySupportedToken(_token)    onlyOwner    function unpauseWithdraw(address _token)    external    onlySupportedToken(_token)    onlyOwner
// emits Puasefunction pause() external onlyOwner whenNotPaused
// emits Unpausefunction unpause() external onlyOwner
// emits Withdrawalfunction withdraw(address _token)    external    nonReentrant
// emits Depositfunction deposit(address _token, uint256 _amount)    external    whenNotPaused    validAmount(_amount)    onlySupportedToken(_token)    notOverMaxCap(_token, _amount)    function getTokenBalance(address _token) public view returns (uint256)