primitivefinance / DFMM

Smart contracts of the DFMM protocol
https://www.primitive.xyz/blog/dfmm_protocol
18 stars 6 forks source link

Simplify allocate and deallocate flow for solvers #115

Open 0xJepsen opened 3 months ago

0xJepsen commented 3 months ago

The log normal solver has redundant implementations for the allocation and deallocation data getters. They should only return abi byte encoded deltas. In general each solver should have three pure getters that return the

I think the update and swap calls are correct right now I have only implemented the pool type here https://github.com/primitivefinance/DFMM/pull/35, after merging in the spearbit fixes and getting new bindings. But the Constant sum allocations are not there and the log normal allocations are redundant. I have yet to finish the G3M and n-pools G3M.

Should we use the strategy lib here? there are redundant implementations it seems.

functions in each solver should call the strategy lib and return the abi-encoded result