LoansBase.sol
Base contract that describes how to interact with a Loan.
There are 2 types of loans. Loans with Ether as collateral and loans with a token as collateral. The difference is how the loans are created and the collateral is payed out.
Reliance on Block Timestamp
It's important to note that the contract uses block.timestamp
to check against a loan's expiration timestamp. By doing so it relies on the timestamp that was set by the miner of the block. This leaves the possibility for a loan to be:
Taken out later than expected.
Liquidated earlier than expected.
Because of this, when setting a loan's terms, one should be aware that the expiry
timestamp value can have a granularity of +/-15 seconds.
Last updated