Executing a Repayment
Before executing a repayment, there must be enough allowance to pay off the amount in the loan.
Approvals
Check the allowance for the principal token.
functionName: "allowance",
arguments: [userAddress, tellerV2ContractAddress] # the addresses are in the introduction section
contract: principalTokenSymbol # 'USDC' for example
To update the allowance
functionName: "approve",
arguments: [tellerV2ContractAddress, amountToApprove]
contract: principalTokenAddress
Executing the loan
If there is enough allowance, executing the loan repayment is as simple as calling repayLoanFull
with the bidId
as the parameter.
functionName: 'repayLoanFull',
args: [bidId],
contract: TellerV2,
Last updated