Contract Deployment on Nile Testnet
All contracts are live on the Nile Testnet:
- PriceOracle: THFynJj4PuKE6k83VEYMkLods4s9E9iRE5 https://nile.tronscan.org/#/contract/THFynJj4PuKE6k83VEYMkLods4s9E9iRE5/code
- LiquidityPool: TNW2bEeTHh7xAMFaUxcpVAym7ZcyCDFn3P https://nile.tronscan.org/#/contract/TNW2bEeTHh7xAMFaUxcpVAym7ZcyCDFn3P/code
- RapidLoansCore: TQGFMUdmTKC5S5rXaY1UAtjF14M64phMER https://nile.tronscan.org/#/contract/TQGFMUdmTKC5S5rXaY1UAtjF14M64phMER/code
- Subject: TPsYJpTEnWvbQd67WwMFpqPdcW9BDnji5b https://nile.tronscan.org/#/contract/TPsYJpTEnWvbQd67WwMFpqPdcW9BDnji5b/code
RapidLoans is a cutting-edge platform that offers liquidity and flash loans through smart contracts, empowering users to invest, borrow, and earn—all on-chain.
- A reliable oracle providing up-to-date TRX/JST conversion rates.
- Used by the LiquidityPool to manage borrowing, repayments, and more.
Accessible via app.rapidloans.vercel.
- The liquidity pool for the TRX/JST token pair is the fund hub of RapidLoans, from where funds for flash loans are provided.
- Users can deposit TRX or JST for a fixed 15-day term, earning a guaranteed 3% return on their investment.
- Liquidity can only be added after the full withdrawal of the current amount (including profits) once the 15-day period ends.
- Withdrawals can only happen after 15 days, and the full amount along with the earned profit can be withdrawn.
- If users don’t withdraw immediately after 15 days, the balance remains stagnant (no further interest), but can be withdrawn anytime afterward.
- Borrowers can take TRX or JST loans for up to 30 days at a fixed 4% interest rate, with one condition: they must have at least 5% extra of the loan amount in the opposite token already invested in the pool.
- For instance, borrowing TRX worth x requires JST worth x + 5% already locked in the pool.
- Loans must be repaid within 30 days. If the repayment deadline is missed, the interest doubles, and the collateral (opposite token balance) becomes unlocked.
- The full loan amount, along with interest, must be repaid either before or after 30 days (doubled interest applies if late), after which the collateral will be unlocked.
- The central hub of RapidLoans, handling the flash loan process seamlessly.
- Subject contracts request loans from this contract.
- When a loan request is made for TRX or JST, the RapidLoansCore contract pulls funds from the liquidity pool, transfers them to the Subject contract, and triggers the
executeRapidLoanfunction. - The
executeRapidLoanfunction (inherited from IReceiverContract) ensures that the full loan, plus fees, is repaid in the same transaction. - If the repayment isn't successful, the entire transaction is reverted, ensuring security and stability.
- A simple example contract that showcases how to request and manage a flash loan through RapidLoans.
Head over to app.rapidloans.vercel/flashloans for step-by-step instructions on requesting your flash loan today!