Ring Protocol
Search…
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

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

pool

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

token

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

liquidityOwned

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

Governor-Only⚖️ State-Changing Functions

setPool

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

ABIs

uniref.json
4KB
Binary
UniRef ABI
iuniref.json
1KB
Binary
UniRef Interface ABI
Last modified 4mo ago