LogoLogo
  • Removing USDV From Circulation
    • Announcement
  • What is USDV?
    • USDV Overview
    • How Coloring Works
    • Yield & Peg Management
    • Security
    • FAQ
  • Verified Minters
    • Integrating USDV
    • Initial KYC
    • Minting USDV
    • Monitoring & Reminting
    • Moving USDV Crosschain
    • Claiming Rewards
    • Redeeming STBT
    • Account Settings
    • Setting Default Color
    • Delegating Viewers
  • APP INTEGRATIONS
    • Minter Widget
    • On Ethereum
    • On Sidechain
      • Recolor Helper
  • Concepts
    • USDV Architecture
    • Mint
    • ColorTrace Algorithm
    • ColorTrace Safety
    • Delta
    • Remint
    • Redemption
    • Fees
  • Technical Reference
    • Contract Addresses
    • Contract Governance
    • Contract ABI
    • Liquidity Provision
    • Rate Limiter
    • Gas Profile
  • Legal
    • Terms and Conditions
    • Privacy Policy
Powered by GitBook
LogoLogo

Copyright by Verified USD Foundation

On this page
  • Default: Minter.sol
  • Interface for Custom Implementation
  1. APP INTEGRATIONS

On Ethereum

Swap stablecoins into USDV via EthereumLP

Last updated 1 year ago

To integrate with , your application must:

  • Complete color KYC

  • Deploy contract, either:

    • , which will be deployed by the Operator, OR

    • Custom Minter Contract implementation and provide code hash and contract address to the Operator

  • After above, the contract will be:

    • STBT whitelisted

    • Registered to MinterProxy

Default:

Minter can configure:

  • Supported tokens (e.g. USDV).

  • Blacklisted callers.

  • Reward to user bps: The proportion, if any, of the LP contract reward to distribute to users. For example, if the reward bps from LP is 5bps, and you want to share 1 bps with users, the configuration would be 2000.

Interface for Custom Implementation

import {MessagingFee} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";

interface IMinter {
    struct SwapParam {
        address fromToken;
        uint fromTokenAmount;
        uint64 minUSDVOut;
    }

    function swapToUSDV(
        address _sender,
        address _toSTBTLp,
        SwapParam calldata _param,
        address _usdvReceiver
    ) external returns (uint usdvOut);

    function swapToUSDVAndSend(
        address _sender,
        address _toSTBTLp,
        SwapParam calldata _param,
        bytes32 _usdvReceiver,
        uint32 _dstEid,
        bytes calldata _extraOptions,
        MessagingFee calldata _msgFee,
        address payable _refundAddress
    ) external payable returns (uint usdvOut);

    function getSwapToUSDVAmountOut(
        address _toSTBTLp,
        address _fromToken,
        uint _fromTokenAmount
    ) external view returns (uint usdvOut);

    function getSwapToUSDVAmountOutVerbose(
        address _toSTBTLp,
        address _fromToken,
        uint _fromTokenAmount
    ) external view returns (uint usdvOut, uint fee, uint reward);

    function getSupportedFromTokens(address _lp) external view returns (address[] memory tokens);

    function color() external view returns (uint32);

    function minterProxy() external view returns (address);
}

EthereumLP
Minter.sol
Default
interface