CoverCompared
  • INTRODUCTION
    • About Us
      • What is CoverCompared?
      • Our Products
  • CoverCompared Offerings
    • CoverCompared Services
    • How is CoverCompared different from other insurance platforms?
      • Cryptocurrency Hacks - a primer
    • What is DeFi insurance?
    • What problems are CoverCompared trying to solve?
  • COVERCOMPARED PLATFORM
    • Ecosystem Overview
    • Risk Management
    • Partnerships
  • COVERCOMPARED TOKENOMICS
    • What is $CVR
    • CVR Use Cases
    • CVR Tokenomics
  • CoverCompared dAPP
    • How to take part in our Testnet & Bugbounty programme
    • How To
      • Buy a Smart Contract Cover
      • Buy Device Insurance
      • Buy MSO Products
      • Check bought products
      • Get test $CVR tokens
    • DeFi Covers
      • IsurAce
      • Nexus Mutual
      • Exchange Agent
    • Contemporary Covers
      • P4L
      • MSO
      • Exchange Agent
    • Contract Addresses
  • resources
    • CVR - FAQ
    • FAQ
Powered by GitBook
On this page
  • Get Token Amount For USDC
  • Get Token Amount for ETH

Was this helpful?

  1. CoverCompared dAPP
  2. Contemporary Covers

Exchange Agent

Exchange Agent contract contains all the information and functions for which enables CoverCompared to take payment in multiple currencies even though our partners may take payments in limited forms.

Get Token Amount For USDC

To enable payments using an ERC20 token the getTokenAmountForUSDC function is called to know the amount of tokens required against USDC to enable payment.

  function getTokenAmountForUSDC(address _token, uint256 _desiredAmount)

Input variables :

  • _token : refers to the ERC20 token being accepted as payment

  • _desiredAmount : desired USDC amount

Get Token Amount for ETH

To enable payments using an ERC20 token the getTokenAmountForETH function is called to know the amount of tokens required against ETH to enable payment.

 function getTokenAmountForETH(address _token, uint256 _desiredAmount)

Input variables :

  • _token : refers to the ERC20 token being accepted as payment

  • _desiredAmount : desired ETH amount

PreviousMSONextContract Addresses

Last updated 3 years ago

Was this helpful?