Essence Finance
    • Introduction
  • Protocol
    • Peg Stabilty
    • Collateralization
    • Decentralization
  • TOKENOMICS
    • ZEN
    • Distribution
    • Stake
  • Protocol Controlled Value
    • Protocol Controlled Value (PCV)
    • PCV Management
    • PCV Deposits
  • Governance
    • Essence DAO
    • Governance Phases
    • Access Control
    • Roles
  • Smart Contracts
    • Contract Addresses
    • Audits
  • Development
    • Smart Contracts API
      • Chi
        • IChi
      • Minter
        • IPCVEquityMinter
        • PCVEquityMinter
        • RateLimitedMinter
      • Core
        • Core
        • ICore
        • IPermissions
        • IPermissionsRead
        • Permissions
        • ZenRoles
      • Dao
        • Governor
          • EssenceDAO
        • Timelock
          • EssenceDAOTimelock
          • OptimisticTimelock
          • Timelock
      • External
        • Decimal
        • WETH9
      • Libs
        • CoreRefPauseableLib
        • UintArrayOps
      • Oracle
        • ChainlinkOracleWrapper
        • CompositeOracle
        • ConstantOracle
        • ICollateralizationOracle
        • ICollateralizationOracleWrapper
      • Pcv
        • IPCVDeposit
        • IPCVDepositBalances
        • IPCVGuardian
        • IPCVSwapper
        • PCVDeposit
        • PCVGuardian
      • Peg
        • FixedPricePSM
        • IPegStabilityModule
        • IPriceBound
        • IPSMRouter
        • PegStabilityModule
        • PriceBoundPSM
        • PSMRouter
      • Refs
        • CoreRef
        • ICoreRef
        • IOracleRef
        • IUniRef
        • OracleRef
        • UniRef
      • Timelocks
        • ITimelockedDelegator
        • ITokenTimelock
        • LinearTimelockedDelegator
        • LinearTokenTimelock
        • QuadraticTimelockedDelegator
        • QuadraticTimelockedSubdelegator
        • QuadraticTokenTimelock
        • TimelockedDelegator
        • TokenTimelock
      • Utils
        • RateLimited
      • Zen
        • IZenMinter
        • Zen
        • ZenMinter
Powered by GitBook
On this page
  • Functions
  • constructor
  • setPair
  • getReserves
  • _setupPair
  • _token
  1. Development
  2. Smart Contracts API
  3. Refs

UniRef

defines some utilities around interacting with Uniswap

the uniswap pair should be CHI and another asset

Functions

constructor

function constructor(
    address _core,
    address _pair,
    address _oracle,
    address _backupOracle
) internal

UniRef constructor

Parameters

Name
Type
Description

_core

address

Chi Core to reference

_pair

address

Uniswap pair to reference

_oracle

address

oracle to reference

_backupOracle

address

backup oracle to reference

setPair

function setPair(
    address newPair
) external

set the new pair contract

Parameters

Name
Type
Description

newPair

address

the new pair

getReserves

function getReserves() public returns (uint256 chiReserves, uint256 tokenReserves)

pair reserves with chi listed first

_setupPair

function _setupPair(
    address newPair
) internal

Parameters

Name
Type
Description

newPair

address

_token

function _token() internal returns (address)
PreviousOracleRefNextTimelocks

Last updated 1 year ago