Compound Uncategorized Specifications

Compound Uncategorized Specifications



  • For cErc20 contracts, Compound supports repaying a borrow fully using the special ‘-1’ amount. Since the CToken contract is approved to transfer what it needs, it can determine the borrow amount and then transfer the exact amount, post-interest accrual, directly within the repayBorrow function;
  • For cEther, things work a bit differently. Since ‘-1’ is actually UINT_MAX, it’s practically impossible for anyone to transfer this amount to the repay function. In order to completely repay a borrow in cEther, we deploy a separate contract to handle the details of collecting more than enough Ether to repay the borrow plus recent interest, and then refunding the overpay amount;
  • Starport contracts are the connector for the peer chains that live on Gateway. Starport is responsible for locking or unlocking assets on the Compound Chain (once validators have reached consensus that an event has occurred).
  • CASH is the native token and uni of account within the Compound Chain. An analogy to the asset’s minting would be DAI, where the asset is created by the protocol through borrowing activity. This means that the amount of CASH held by users and validators is always equal to the amount of CASH debt.

Stay safe!

Report Page