auto_repay
auto_repay copied to clipboard
auto borrow trigger
in index.js
lines 563 to566
}else if(nowPercent < **belowTrigger**){
let ust_amount = parseInt((target_percent - percentNow) / percentNow * loanAmount)
await repayHandler.borrow_ust(ust_amount)
}
should this be target_percent, as belowTrigger is always -1 and is not the target value
}else if(nowPercent < **target_percent**){
let ust_amount = parseInt((target_percent - percentNow) / percentNow * loanAmount)
await repayHandler.borrow_ust(ust_amount)
}