LST 预言机机制

整体架构

SolvBTC LST与预言机相关函数

基于份额的资产值

/**
 * @notice Get amount of underlying asset for a given amount of shares.
 */
    function getValueByShares(uint256 shares) external view returns (uint256 value);

资产值的小数位数

/**
 * @notice Get the decimals of the values.
 */
function getOracleDecimals() external view returns (uint8);

LST预言机合约地址

/**
 * @notice Get the address of LST Oracle.
 */
function getOracle() public view returns (address);

LST预言机合约

获取净资产值 (NAV: Net Asset Value)

function getNav(address erc20) external view returns (uint256);

净资产值的小数位数

function navDecimals(address erc20) external view returns (uint8);

流动性池净资产值预言机

获取净资产值

function getSubscribeNav(bytes32 poolId_, uint256 time_) 
    external view returns (uint256 nav_, uint256 navTime_);

设置净资产值

function setSubscribeNavOnlyMarket(bytes32 poolId_, uint256 time_, uint256 nav_) external;

最后更新于