๐Previewer (read-only)
Last updated
Last updated
The Previewer is a read-only smart contract specifically engineered for Exactly's web application. Its role is to gather comprehensive on-chain data pertaining to Exactly's markets, and user accounts while minimizing the amount of necessary requests, thus enhancing performance. Moreover, it abstracts the complexities of the protocol from the front-end interface by directly returning oracle prices, counting the amount of deposits and borrows per market, and providing the current snapshot of any account being queried.
This contract can be found in the periphery folder of Exactly's repo.
Please be advised that the Previewer
contract has not undergone a formal security audit. As such, we strongly discourage integrations involving this contract since it is exclusively intended for read-only purposes by the Exactly Web App. Using unaudited contracts for other purposes may expose users to potential security risks or unexpected behavior.
Returns
Name | Type | Description |
---|---|---|
Returns
Name | Type | Description |
---|---|---|
Function to get a certain account extended data.
Parameters
Returns
Gets the assets plus fees offered by all VALID maturities when borrowing a certain amount.
Parameters
Returns
Gets the amount plus fees to be repaid at maturity when borrowing certain amount of assets.
Parameters
Returns
Gets the assets plus yield offered by all VALID maturities when depositing a certain amount.
Parameters
Returns
Gets the assets plus yield offered by a maturity when depositing a certain amount.
Parameters
Returns
Gets the assets that will be repaid when repaying a certain amount at the current maturity.
Parameters
Returns
Gets the amount to be withdrawn for a certain positionAmount of assets at maturity.
Parameters
Returns
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
auditor
contract Auditor
Auditor
basePriceFeed
contract IPriceFeed
BasePriceFeed
account
address
address which the extended data will be calculated.
data
Previewer.MarketAccount[]
extended accountability of all markets for the account.
market
contract Market
address of the market.
assets
uint256
amount of assets that will be borrowed.
previews
Previewer.FixedPreview[]
array containing amount plus yield that account will receive after each maturity.
market
contract Market
address of the market.
maturity
uint256
maturity date/pool where the assets will be borrowed.
assets
uint256
amount of assets that will be borrowed.
positionAssets
Previewer.FixedPreview
positionAssets amount plus fees that the depositor will repay at maturity.
market
contract Market
address of the market.
assets
uint256
amount of assets that will be deposited.
previews
Previewer.FixedPreview[]
array containing amount plus yield that account will receive after each maturity.
market
contract Market
address of the market.
maturity
uint256
maturity date/pool where the assets will be deposited.
assets
uint256
amount of assets that will be deposited.
assets
Previewer.FixedPreview
amount plus yield that the depositor will receive after maturity.
market
contract Market
address of the market.
maturity
uint256
maturity date/pool where the assets will be repaid.
positionAssets
uint256
amount of assets that will be subtracted from the position.
borrower
address
address of the borrower.
repayAssets
Previewer.FixedPreview
repayAssets amount of assets that will be repaid.
market
contract Market
address of the market.
maturity
uint256
maturity date/pool where the assets will be withdrawn.
positionAssets
uint256
amount of assets that will be tried to withdraw.
owner
address
owner of the fixed deposit position
withdrawAssets
Previewer.FixedPreview
withdrawAssets amount that will be withdrawn.