Skip to main content

IAssetManager

Command line reference for interacting with FAssets AssetManager contract.

Sourced from IAssetManager.sol on GitHub.


Information

getSettings

Returns the complete asset manager settings as the AssetManagerSettings struct.

You can find detailed explanations of each parameter in the FAssets Operational Parameters documentation.

function getSettings()
external view
returns (AssetManagerSettings.Data memory);

getAgentInfo

Returns detailed information about an agent as the AgentInfo struct.

Need to provide the agent vault address.

You can find detailed explanations of each agent parameter in the FAssets Operational Parameters documentation.

function getAgentInfo(address _agentVault)
external view
returns (AgentInfo.Info memory);

collateralReservationFee

Returns the collateral reservation fee amount.

Parameters:

  • _lots: The number of lots for which to reserve collateral

Returns:

  • _reservationFeeNATWei: The amount of reservation fee in NAT wei
function collateralReservationFee(
uint256 _lots
) external view returns (uint256 _reservationFeeNATWei);

collateralReservationInfo

Returns the data about the collateral reservation for an ongoing minting. Note: once the minting is executed or defaulted, the collateral reservation is deleted and this method fails.

Parameters:

  • _collateralReservationId: The collateral reservation ID, as used for executing or defaulting the minting
function collateralReservationInfo(uint256 _collateralReservationId)
external view
returns (CollateralReservationInfo.Data memory);

fAsset

Returns the FAsset token contract (ERC-20) that is managed by this asset manager instance.

Returns:

  • IERC20: The address of the FAsset token contract
function fAsset()
external view
returns (IERC20);

Redemption Queue

redemptionQueue

Returns the redemption queue in the form of an array of RedemptionTicketInfo structs.

Parameters:

  • _firstRedemptionTicketId: the ticket id to start listing from; if 0, starts from the beginning
  • _pageSize: the maximum number of redemption tickets to return

Returns:

  • _queue: the (part of) the redemption queue; maximum length is _pageSize
  • _nextRedemptionTicketId: works as a cursor - if the _pageSize is reached and there are more tickets, it is the first ticket id not returned; if the end is reached, it is 0
function redemptionQueue(
uint256 _firstRedemptionTicketId,
uint256 _pageSize
) external view
returns (RedemptionTicketInfo.Data[] memory _queue, uint256 _nextRedemptionTicketId);

agentRedemptionQueue

Returns the redemption queue for specific agent in the form of an array of RedemptionTicketInfo structs.

Parameters:

  • _agentVault: the agent vault address of the queried agent
  • _firstRedemptionTicketId: the ticket id to start listing from; if 0, starts from the beginning
  • _pageSize: the maximum number of redemption tickets to return

Returns:

  • _queue: the (part of) the redemption queue; maximum length is _pageSize
  • _nextRedemptionTicketId: works as a cursor - if the _pageSize is reached and there are more tickets, it is the first ticket id not returned; if the end is reached, it is 0
function agentRedemptionQueue(
address _agentVault,
uint256 _firstRedemptionTicketId,
uint256 _pageSize
) external view
returns (RedemptionTicketInfo.Data[] memory _queue, uint256 _nextRedemptionTicketId);

Collateral Reservation

reserveCollateral

Reserves collateral for minting FAssets. Before paying underlying assets for minting, the minter must reserve collateral and pay a collateral reservation fee.

Parameters:

  • _agentVault: Agent vault address
  • _lots: Number of lots for which to reserve collateral
  • _maxMintingFeeBIPS: Maximum minting fee (BIPS) that can be charged by the agent - best practice is to copy the current agent's published fee; used to prevent agent from front-running reservation request and increasing fee
  • _executor: Account that is allowed to execute minting (besides minter and agent)
function reserveCollateral(
address _agentVault,
uint256 _lots,
uint256 _maxMintingFeeBIPS,
address payable _executor,
) external payable;

Execute Minting

executeMinting

After obtaining proof of underlying payment, the minter calls this method to finish the minting and collect the minted FAssets.

Note: May only be called by:

  • The minter (creator of the collateral reservation request)
  • The executor appointed by the minter
  • The agent owner (owner of the agent vault in the collateral reservation)

Parameters:

  • _payment: Proof of the underlying payment (must contain exact value + fee amount and correct payment reference)
  • _collateralReservationId: Collateral reservation ID
function executeMinting(
IPayment.Proof calldata _payment,
uint256 _collateralReservationId
) external nonReentrant;

Redemption

redeem

Redeem number of lots of FAssets.

Returns the actual redeemed amount.

Parameters:

  • _lots: Number of lots to redeem.
  • _redeemerUnderlyingAddressString: The address to which the agent must transfer underlying amount.
  • _executor: The account that is allowed to execute redemption default (besides redeemer and agent).
function redeem(
uint256 _lots,
string memory _redeemerUnderlyingAddressString,
address payable _executor
) external payable
returns (uint256 _redeemedAmountUBA);

redemptionPaymentDefault

If the agent fails to transfer the redeemed underlying assets in a timely manner, the redeemer or appointed executor can invoke this method and receive payment in collateral. The agent can also call default if the redeemer is unresponsive to payout the redeemer and free the remaining collateral.

Parameters:

  • _proof: Proof that the agent did not pay with correct payment reference on the underlying chain.
  • _redemptionRequestId: ID of an existing redemption request.
function redemptionPaymentDefault(
IReferencedPaymentNonexistence.Proof calldata _proof,
uint256 _redemptionRequestId
) external;

Core Vault Settings

Reference for managing and interacting with FAssets ICoreVaultSettings contract which is inherited by the IAssetManager contract.

Sourced from ICoreVaultSettings.sol on GitHub.


getCoreVaultManager

Returns the core vault manager address. To interact with the Core Vault manager reference the Core Vault Manager contract.

function getCoreVaultManager()
external view
returns (address);

getCoreVaultMinimumAmountLeftBIPS

Returns the minimum amount of minting left on agent's address after transfer to core vault.

function getCoreVaultMinimumAmountLeftBIPS()
external view
returns (uint256);

getCoreVaultTransferTimeExtensionSeconds

Returns the extra time for an agent's transfer to the core vault.

function getCoreVaultTransferTimeExtensionSeconds()
external view
returns (uint256);

getCoreVaultTransferFeeBIPS

Returns the fee paid by agent for transfer to the core vault.

function getCoreVaultTransferFeeBIPS()
external view
returns (uint256);

getCoreVaultMinimumRedeemLots

Returns the minimum number of lots that a direct redemption from core vault can take.

function getCoreVaultMinimumRedeemLots()
external view
returns (uint256);

getCoreVaultRedemptionFeeBIPS

Returns the fee paid by the redeemer for direct redemptions from the core vault.

 function getCoreVaultRedemptionFeeBIPS()
external view
returns (uint256);