Prime Cash Markets
Fetch Prime Cash and Prime Debt Addresses
# Fetch the Prime Cash and Prime debt addresses for a given currencyId
pCashAddress = notional.pCashAddress(currrencyId)
pDebtAddress = notional.pDebtAddress(currrencyId)Fetch a market's total pCash and total pDebt supply
from brownie.network.state import Chain
chain = Chain()
primeFactors = notional.getPrimeFactorsStored(currencyId, chain.time())
totalPrimeSupply = primeFactors['factors']["totalPrimeSupply"]/1e8
totalPrimeDebt = primeFactors['factors']["totalPrimeDebt"]/1e8Get a market's pCash and pDebt Supply in Underlying
from brownie.network.state import Chain
chain = Chain()
primeFactors = notional.getPrimeFactorsStored(currencyId, chain.time())
totalPrimeSupply = primeFactors['factors']["totalPrimeSupply"]/1e8
totalPrimeDebt = primeFactors['factors']["totalPrimeDebt"]/1e8
supplyScalar = primeFactors["factors"]["supplyScalar"]/1e18
debtScalar = primeFactors["factors"]["debtScalar"]/1e18
underlyingScalar = primeFactors["factors"]["underlyingScalar"]/1e18
# Total Prime Supply in underlying
totalPrimeSupplyInUnderlying = totalPrimeSupply * underlyingScalar * supplyScalar
totalPrimeDebtInUnderlying = totalPrimeDebt * underlyingScalar * debtScalar
Calculate a Prime Cash Market's utilization
Fetch Prime Cash markets Supply Rates and Borrowing Rates
Last updated