RLP

Minting RLP Tokens

  1. Request Minting:

    • Method: requestMint(address _depositTokenAddress, uint256 _amount, uint256 _minMintAmount)

    • Parameters:

      • _depositTokenAddress: The address of the token you want to exchange for RLP. Supported tokens: USDC and USDT.

      • _amount: The amount of the depositing token.

      • _minMintAmount: The minimum amount of RLP tokens you want to receive. If this amount is higher than the executable amount, the request will not be handled and will remain in the CREATED status.

  2. Mint Event:

    • After the backend (BE) receives the mint request, it processes the mint through the completeMint method.

    • This method emits a MintRequestCompleted event, indicating that the minting of RLP tokens is done.

    • The minting process takes approximately 1 minute.

    • Quantity of RLP minted is equal to the quantity of tokens used for minting adjusted by their oracle price (Pyth) and divided by the RLP price

  3. Canceling a Mint Request:

    • Method: cancelMint(uint256 id)

    • A mint request can be canceled if it is not in the COMPLETED state.

    • The current state of the request can be queried using the mintRequests(uint256 id) method.

Burning RLP Tokens

  1. Request Burning:

    • Method: requestBurn(uint256 _issueTokenAmount, address _withdrawalTokenAddress, uint256 _minWithdrawalAmount)

    • Parameters:

      • _issueTokenAmount: The amount of RLP tokens to burn.

      • _withdrawalTokenAddress: The address of the token you want to receive after burning. Supported tokens: USDC and USDT.

      • _minWithdrawalAmount: The minimum amount of tokens you want to receive. If this amount is higher than the executable amount, the request will not be handled and will remain in the CREATED status.

  2. Burn Event:

    • Upon receiving the burn request, the backend processes the burn through the completeBurn method.

    • Value of tokens distributed at completion of the burn request is based on Pyth oracle price of those tokens.

    • This method emits a BurnRequestCompleted event, indicating that the burning of RLP tokens is done.

    • The process of burning RLP tokens takes up to 24 hours.

    • Quantity of tokens transferred when burn event is completed is equal to the quantity of RLP tokens burned multiplied by the RLP price at completion.

  3. Canceling a Burn Request:

    • Method: cancelBurn(uint256 id)

    • A burn request can be canceled if it is not in the COMPLETED state.

    • The current state of the request can be queried using the burnRequests(uint256 id) method.

Last updated