chainflip-io / chainflip-backend

The Chainflip backend repo, including the Chainflip Node and CFE.
50 stars 15 forks source link

Liquidity Range Update Key - Market Making API feature #245

Closed morelazers closed 1 year ago

morelazers commented 3 years ago

A market maker gave me a good thought yesterday, which is that for security reasons market makers typically dont give their traders withdrawal access for their trading accounts.

We should add an option for liquidty providers to supply a secondary key which can authorise range order updates but nothing else. In fact this could be generalised so that for any given LP, any number of keys can be supplied with Withdrawal and/or Update permissions.

-- @Haafingar

This will need to be factored into our Quote schema, as well as our State Chain schema for the AMM itself. Logging here now as reference but I don't expect us to start on this for quite a while -- tom

AlastairHolmes commented 1 year ago

@dandanlen I see the advantage, but are we actually going to do this?

dandanlen commented 1 year ago

I don't see any reason to do this on-chain. LPs can be responsible for their own internal access controls. I'll close, we can re-open if a concrete need or request arises.

Haafingar commented 1 year ago

I see a reason to do it on chain, as it's essentially impossible to do otherwise. That being said, I agree that there's no concrete need at this stage.

dandanlen commented 1 year ago

essentially impossible to do otherwise

A slight exaggeration.

Slight exaggeration of my own: It's trivially possible: you (the market maker) just need a layer of authentication above the 'master' key, ie. in your trading app or whatever, rather than exposing that key to all of your traders.

Authentication management is a can of worms - entire businesses have been built around software for handling this. If we can avoid it, I think we should.