interbtc-api icon indicating copy to clipboard operation
interbtc-api copied to clipboard

Use parachain RPCs for complex functionality

Open gregdhill opened this issue 3 years ago • 1 comments

Instead of re-implementing (and testing) complex parachain logic, we should switch to using RPCs.

  • [x] Escrow - balanceAt + totalSupply
  • [ ] Issue - request (find vaults for amount)
  • [ ] Nomination
  • [ ] Redeem - request (find vaults for amount)
  • [x] Vaults - computeReward + getBlockRewardAPY, getPremiumRedeemVaults

See: https://github.com/interlay/interbtc/issues/695

gregdhill avatar Aug 05 '22 11:08 gregdhill

Note that on Issue and Redeem, the lib implements extra lib-only functionality (namely, support for batching). I don't think we had any plans for implementing batching in the parachain directly, so these would not be replaceable by RPCs.

theodorebugnet avatar Aug 05 '22 11:08 theodorebugnet