-
Revert with message
!credit limit
when openning a position- We limit the borrow credit if the caller is a contract (not EOA). you can call
setWhitelistUsers
andsetCreditLimits
to grant borrow credit to the contract.
- We limit the borrow credit if the caller is a contract (not EOA). you can call
-
Revert with message
incorrect LP token.
when openning a position- It happens when you use an incorrect spell. Please see which spell contract should be use from the doc.
-
Revert with message
refund ETH failed
when openning or closing a position- It happens when the contract try to send a leftover (native ETH) to the caller but the caller cannot recieve them due to no
recieve
function.
- It happens when the contract try to send a leftover (native ETH) to the caller but the caller cannot recieve them due to no
-
Revert with message
bad cast call
when openning or closing a position- It shows this message because it cannot extract internal error. The best way to investigate is by running forge and look into the stack trace.
-
Revert with message
insufficient cash
when openning or closing a position- It happens when the amount tokens user want to borrow is more than the token amount available in the lending pool. To resolve the issue on fork-environment is to lend the tokens to the pool.
- which view function is able to get the number of LP tokens in a Homora position?
- you can use the amount of wrapper tokens from function
bank.getPositionInfo
. The number of wrapper tokens is equivalent to the number of LP tokens that the position holds.
- you can use the amount of wrapper tokens from function
(_, _ , _, num_tokens) = HomoraBank.getPositionInfo(position_id)
-
Why does calling
setCreditLimit
function on fork environment fail?- It may be because we haven't called
setWhitelistUsers
before callingsetCreditLimit
or use incorrect ABI (there are different interfaces on some chains).
- It may be because we haven't called
-
Why the same amount of collateral does not allow the same amount of borrow for both tokens (e.g. DAI vs ETH)?
- The factor of the borrow token is different from its volatility. We allow to borrow more if it is more stable.
-
Contract code in public repo is not align with ABI file in gitbook.
- The latest version of Homora contracts are in private repo. The ABI should be up to date. If not, feel free to contact us.
-
Is there any spot where we can see the verified contracts? Notice on production many contracts aren’t verified.
- Unfortunately, there isn't. It's intended that we don't verify the contracts, for security reasons (to be on a safer side).
- However, the component flow + implementation should follow closely to the public repo. The diff is mainly supporting new pool types, more checks, gas opts, etc.