delegate(address) :
This function allows a user to delegate their voting rights to another address. This allows the delegatee to vote on behalf of the delegator. The delegator can revoke the delegation at any time by calling the undelegate() function. The delegatee will be able to vote on behalf of the delegator until the delegation is revoked. (autogenerated documentation)
initialize(address,string,string,uint8) :
This function initializes the cToken contract. It sets the underlying asset, comptroller, interest rate model, initial exchange rate mantissa, name, symbol, and decimals of the cToken. It also calls the totalSupply() function of the underlying EIP20 token to get the total supply of the underlying asset. (autogenerated documentation)
mint() :
This function is used to mint a specified amount of tokens. It calls the mintInternal() function, which is responsible for actually minting the tokens, and then returns a status code of NO_ERROR to indicate that the minting was successful. (autogenerated documentation)
redeem() :
This function allows users to redeem tokens from the contract. It takes in an argument of the amount of tokens to redeem and returns a status code of 0 if the redemption was successful. The function calls the internal redeemInternal() function to perform the actual redemption. (autogenerated documentation)
redeemUnderlying() :
This function allows a user to redeem a certain amount of underlying tokens from the contract. It works by calling the internal function redeemUnderlyingInternal, which handles the actual redemption process. The function returns a status code of NO_ERROR to indicate that the redemption was successful. (autogenerated documentation)
borrow() :
This function allows a user to borrow a specified amount of funds from the contract. It works by calling the internal borrowInternal() function, which updates the user's balance and the contract's total debt. It then returns a status code of NO_ERROR to indicate that the transaction was successful. (autogenerated documentation)
repayBorrow() :
This function allows a user to repay a loan taken out from the contract. It takes in a uint repayAmount as an argument, which is the amount of the loan that the user wishes to repay. The function then calls the repayBorrowInternal() function, which handles the actual repayment of the loan. Finally, the function returns a uint value of NO_ERROR to indicate that the repayment was successful. (autogenerated documentation)
repayBorrowBehalf(address) :
This function allows a borrower to repay a loan on behalf of another borrower. It takes in the address of the borrower and the amount to be repaid as parameters. The function then calls the internal function repayBorrowBehalfInternal, which handles the actual repayment of the loan. Finally, the function returns a status code of NO_ERROR to indicate that the repayment was successful. (autogenerated documentation)
liquidateBorrow(address) :
This function allows a borrower to liquidate their borrow of a cToken collateral. It takes in the address of the borrower, the amount to be repaid, and the cToken collateral as parameters. The function then calls the internal liquidateBorrowInternal function, which handles the actual liquidation process. This includes transferring the repayAmount from the borrower to the cToken contract, and then transferring the cToken collateral from the borrower to the cToken contract. Finally, the function returns a status code of NO_ERROR to indicate that the liquidation was successful. (autogenerated documentation)
sweepToken() :
This function allows the admin of the contract to sweep tokens from the contract's balance to their own address. It first checks that the sender is the admin, and then checks that the token being swept is not the underlying token. Finally, it gets the balance of the contract and transfers it to the admin's address. (autogenerated documentation)
_addReserves() :
This function adds a specified amount of reserves to the contract. It works by calling the internal function _addReservesInternal() which updates the reserves balance and returns the new balance. (autogenerated documentation)
getCashPrior() :
This function is used to get the amount of cash held by the contract prior to a transaction. It works by calling the EIP20Interface token contract and using the balanceOf() function to return the amount of cash held by the contract. (autogenerated documentation)
doTransferIn(address) :
This function is used to transfer tokens from an external address to the contract address. It first retrieves the underlying token contract and then calls the transferFrom() function on it, passing in the external address, the contract address, and the amount of tokens to be transferred. It then checks the return data size to determine if the transfer was successful, and if so, it calculates the difference between the balance before and after the transfer to return the amount of tokens transferred. (autogenerated documentation)
doTransferOut(address) :
This function is used to transfer tokens from the underlying EIP20NonStandardInterface contract to an address specified by the 'to' parameter. The amount of tokens to be transferred is specified by the 'amount' parameter. The function first calls the transfer() function of the underlying EIP20NonStandardInterface contract, passing in the 'to' and 'amount' parameters. It then uses assembly code to check the return data size of the transfer() call. If the return data size is 0, it sets the success variable to true. If the return data size is 32, it copies the return data into memory and sets the success variable to the value stored in memory. If the return data size is neither 0 nor 32, it re (autogenerated documentation)
_delegateCompLikeTo(address) :
This function allows the admin of the contract to delegate the CompLike function to another address. This allows the delegatee to access the CompLike function and use it to interact with the underlying contract. The function requires that the msg.sender is the admin, and if so, it calls the CompLike function on the underlying contract and passes in the delegatee address. (autogenerated documentation)