We want to create a contract that allows people to leverage their token and buy other tokens.
- People can deposit one (stable) coin (token x) into a pool (token X to token A) [i.e. money can be sent to contract itself.]
- There is a fixed return rate for money borrowed in the pool (say 5% per month) [this can be hard coded]
- there is a fix rate (or upgradable via function or oracle) between token X and token A (this is a simplification)
- Borrower can deposits x amount of token A and lock them for a certain period
- Borrower receives 50% of value of token A into token X
Idea is that borrower is able to use the token x to invest in other currency and only having to repay the principal at expiration date (when the lock period ends)
Scenario 2 Borrower can’t pay back the loan
- Borrower doesn’t payback within the deadline
- Lender can decide to take collateral at any time
- Borrower can decide to pay back at “at the time” interest (so 5% over a longer period => lock until period + time of repayment) and unleash the collateral