Ring Protocol
Search
K
Comment on page

UniRef

A reference to a Uniswap Pool holding RUSD and other assets

Contract

UniRef.sol implements IUniRef, OracleRef

Description

UniRef is an abstract contract which references a Uniswap pool. It defines basic utilities for contracts referencing Uniswap. It leverages the OracleRef contract to calculate various quantities relating to spot vs peg price.

Events

PoolUpdate
Referenced Uniswap V3 Pool contract update
type
param
description
address indexed
_pool
new Uniswap pool contract

Read-Only Functions

router

function router() external view returns (ISwapRouter);
Returns the address of the ISwapRouter as an interface.

pool

function pool() external view returns (IUniswapV3Pool);
Returns the referenced IUniswapV3Pool contract as an interface.

token

function tokenId() external view returns (address);
Returns the token id of Uniswap V3 NFT.

liquidityOwned

function liquidityOwned() external view returns (uint128);
Returns the amount of UniswapV3 liquidity.

Governor-Only⚖️ State-Changing Functions

setPool

function setPool(address _pool) external;
Sets the referenced Uniswap pool contract to _pool
emits PoolUpdate

ABIs

uniref.json
4KB
Code
UniRef ABI
iuniref.json
1KB
Code
UniRef Interface ABI