An abstract contract for storing PCV in a Uniswap FEI liquidity pair
Uniswap PCV deposits receive PCV, mint the corresponding amount of FEI to match the Uniswap spot price, and deposit to Uniswap. They can withdraw and read in the amount of non-FEI PCV on Uniswap held in the contract.
When withdrawing, any excess FEI held is burned.
When depositing, if no existing LP exists, the oracle price is used.
Deposit to the PCV
address of the depositor
Withdrawal of PCV
the PCV controller calling this function
the recipient address of the PCV
update to maxBasisPointsFromPegLP
function totalValue() external view returns (uint256);
Returns the effective amount of non-FEI PCV held by the contract.
E.g., if the deposit holds 50% of all ETH/FEI liquidity on Uniswap, and there are 100,000 ETH in Uniswap, the function should return 50,000e18 wei.
function maxBasisPointsFromPegLP() external view returns (uint256);
Returns an amount of basis points (1/10000) beyond which if the FEI-ETH spot price is trading outside of the peg, the deposit function will fail.
function deposit(uint256 amount) external payable;
amount PCV into Uniswap by minting the necessary amount of FEI to make the liquidity provision.
E.g., if there are 50,000 ETH and 100,000,000 FEI on Uniswap, and the protocol receives another 500 ETH to deposit, the protocol will mint another 1,000,000 FEI to deposit at the current 2000 FEI/ETH spot price.
function withdraw(address to, uint256 amount) external;
amount PCV from Uniswap to address
to by withdrawing the necessary amount of liquidity and burning the corresponding FEI.
E.g., if the protocol owns 50,000 ETH and 100,000,000 FEI worth of liquidity on Uniswap, a withdrawal of 500 ETH would liquidate 1% of the LP shares and burn the extra 1,000,000 FEI received before transferring the 500 ETH.
function setMaxBasisPointsFromPegLP(uint256 _maxBasisPointsFromPegLP) external view;
Sets the new