MELD Dev Diary 18

Charlierobertstad
MELD
Published in
2 min readJan 9, 2023

Borrowing & Lending

On-chain

  • Move withdraw and migrate logic for pool to separate files for better code organization.
  • Avoid checking pool min ADA value to reduce execution cost.
  • Store required min ADA value for each account inside account datum to simplify logic check while improving UX.
  • Assert exact value and datum for account outputs.
  • Rewrite applying state change to pool in order to export the function to off-chain.
  • Decouple oracle format to easily integrate with different oracles.
  • Allow partial liquidation, check close factor when liquidating an account, calculate incentive for liquidator and protocol.

Off-chain

  • Add integration tests for contract migration.
  • Write API to extract protocol’s state to JSON.
  • Add more details to API schema.
  • Reset GHC performance build flags.
  • Export pool functions to off-chain to avoid duplicate code and avoid unexpected bugs while maintaining duplicate logic on both on-chain and off-chain sides.
  • Vendor TxOut converters from plutus-ledger.
  • Support querying multiple Accounts’ state.
  • Use exported on-chain functions in batcher.
  • Implement API to query global state and compute derived data to support frontend.
  • Fix Aeson instances for some API types.

Infrastructure

  • Modified initial backend infrastructure by introducing additional internal load balancer for microservices.
  • Configured Github workflows for building, pushing, and deploying backend microservices.

MELDapp

  • Implementation of Faucet system and authorization mechanism for testnet launch.
  • Frontend integration to Supply and Borrow protocol.
  • Implementation of sending and receiving tokens in MELD wallet.

Read more from the Dev Diary series here!

--

--