Poison.Finance
  • โญIntroduction
  • ๐Ÿš€Mission
  • ๐Ÿ‘ฉโ€โœˆ๏ธUser Roles
  • โ“FAQ
  • Protocol
    • โš—๏ธHow to Use
    • ๐ŸงชSynthetic Potions
    • ๐ŸŽฉPotion Peg
    • ๐Ÿ’ฒPoison Token (POI$ON)
    • ๐Ÿ’ฐTokenomics
    • ๐Ÿค–Multichain Access
  • Smart Contracts
    • ๐Ÿ“–Contract List
    • ๐ŸฆPotion Vault
  • Appendix
    • Information and Social Links
    • Supported Collateral Tokens
    • Public and Private Sale Info
Powered by GitBook
On this page
  1. Smart Contracts

Potion Vault

The Potion Vault contract is the heart of Poison Finance - allowing users to mint new pTokens.

PreviousContract ListNextInformation and Social Links

Last updated 2 years ago

This contract has been audited by Solidity Finance. You can view the audit .

The PotionVault is the main Poison.Finance contract, it implements the logic for Vault, through which users can mint new pTokens against their . Current prices of minted pTokens are provided by Chainlink Price Oracles and determine the Cratio of each Vault. The PotionVault Contract also contains the logic for liquidating Vaults with Cratios below the minimum for their minted pTokens.

interface IPotionVault {
    
    function open(uint collateral, uint amount, uint id, uint synid) external;
    
    function close(uint id) external;
    
    function deposit(uint id, uint collateral) external;
    
    function withdraw(uint id, uint amount) external;
    
    function burn(uint id, uint amount) external;
    
    function mint(uint id, uint amount) external;
    
    function liquidate(uint id, address account, uint amount) external;
    
}
๐Ÿฆ
here
supported collateral tokens