UNPKG

@bancor/carbon-sdk

Version:

The SDK is a READ-ONLY tool, intended to facilitate working with Carbon contracts. It's a convenient wrapper around our matching algorithm, allowing programs and users get a ready to use transaction data that will allow them to manage strategies and fulfi

2 lines (1 loc) 231 B
const t=(t,u)=>{const o=t.output.mul(u.input),p=u.output.mul(t.input),n=o.lt(p),l=o.gt(p),r=!n&&!l;return+(n||r&&t.output.lt(u.output))-+(l||r&&t.output.gt(u.output))},u=(u,o)=>t(o,u);export{u as sortByMaxRate,t as sortByMinRate};