UniswapPCVDeposit
A PCV deposit for holding Uniswap liquidity
An abstract contract for storing PCV in a Uniswap RUSD liquidity pair
Uniswap PCV deposits receive PCV, mint the corresponding amount of RUSD to match the Uniswap spot price, and deposit to Uniswap. They can withdraw and read in the amount of non-RUSD PCV on Uniswap held in the contract.
When withdrawing, any excess RUSD held is burned.
- Minter💰
Deposit
Withdrawal
Collect
Deposit to the PCV
type | param | description |
address indexed | _from | address of the depositor |
uint256 | _amount | amount deposited |
Withdrawal of PCV
type | param | description |
address indexed | _caller | the PCV controller calling this function |
address indexed | _to | the recipient address of the PCV |
uint256 | _amount | amount withdrawn |
Collect of UniswapV3 fees
type | param | description |
address indexed | _from | the PCV deposit that provided LP |
uint256 | _amount0 | amount collected for token0 |
uint256 | _amount1 | amount collected for token1 |
function totalLiquidity() external view returns (uint256);
Returns the total liquidity of pcv deposit UniswapV3 position
function deposit(uint256 amount) external payable;
Deposits
amount
PCV into Uniswap by minting the necessary amount of RUSD to make the liquidity provision.E.g., if there are 50,000 ETH and 100,000,000 RUSD on Uniswap, and the protocol receives another 500 ETH to deposit, the protocol will mint another 1,000,000 RUSD to deposit at the current 2000 RUSD/ETH spot price.
function withdraw(address to, uint128 amount) external;
Withdraws
amount
PCV from Uniswap to address to
by withdrawing the necessary amount of liquidity and burning the corresponding RUSD.E.g., if the protocol owns 50,000 ETH and 100,000,000 RUSD worth of liquidity on Uniswap, a withdrawal of 500 ETH would liquidate 1% of the LP shares and burn the extra 1,000,000 RUSD received before transferring the 500 ETH.
uniswappcvdeposit.json
6KB
Code
UniswapPCVDeposit ABI
ipcvdeposit.json
2KB
Code
PCVDeposit Interface ABI
Last modified 2yr ago