MELD
Published in

MELD

MELD Dev Diary 12

Borrowing and Lending

On-chain:

  • Added liquidation mechanism to account and pool contracts
  • Fixed pool contract list data types to reduce ExUnit cost from tryFromData function
  • Fixed check validity range function on-chain to circumvent cardano-api restriction of upper bound being open
  • Allowed users to cancel pending requests which haven’t been applied to jPool contract. Changed logic of updating pending requests in account contract for less calculation.
  • Added logic of burning account auth token when closing an account.
  • Refactored more places using plet instead of let to optimize on-chain code.
  • Changed oracle’s updating price method from using master key to using NFT
  • Added logic for pool contract to skip checking loan-to-value requirement for deposit and repay only requests
  • Add migration for Pool and Account contracts
  • Implemented batcher fee constraints for deposit, repay, and set collateral

Off-chain & tests:

  • Added unit tests for liquidation on-chain code
  • Added repay, borrow, set collateral, close account in api
  • Separated dist-newstyle cache for different PR builds
  • Extracted max duration between lower and upper bound of validity range from latest datum of manager contract instead of hard code while building batching transaction.
  • Integration tests for update account indexer, borrow, repay, set collateral, close account
  • Integration tests for batching transaction.
  • Improved better logging for integration tests.
  • Enforced max number of collateral inputs in transaction building by querying Cardano protocol params
  • Retried querying DB on failure in integration tests to avoid flaky tests
  • Updated faucet config with more types of tokens and more readable token name
  • Checked error message for some failed scenarios in unit tests

Infrastructure:

  • Scanned all active AWS accounts using prowler software for security best practices
  • Maintenance on Cardano stake relay instance on old MELD stack
  • Maintenance on Cardano stake producing instance on old MELD stack
  • Cleaning out old unused ec2 instances

Read more from the Dev Diary series here!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store