tac0turtle / Entropy

13 stars 1 forks source link

Reduce wrappers #30

Open tac0turtle opened 3 years ago

tac0turtle commented 3 years ago

Summary

Right now we are mainly wrapping other contracts. Ideally we could call the other contracts directly without needing to go through the margin account.

For example we could try to see if we can call init obligation without needing to call the margin account but only the token-lending contract.

austinabell commented 3 years ago

Yeah I agree, our assumption that the obligation account should live within the state of the margin account was definitely under a false premise. Although I wouldn't rule it out because there might need to be the restriction to be able to use margin borrows. Otherwise if that functionality is exposed on lending that might cause issues with margin positions being opened without the liquidate option. (perhaps lending needs to include the liquidate, not the margin program, but then that combines lending and swap programs)