I am trying to implement a distribution of collateral deposited in the pool but I am not getting how it should be distributed in the perpetual pool.

1 Answer 1


I believe that you are asking about how the shares are calculated in perpetual pools/vaults based on your collateral. I would recommend you to check the ERC4626 implementation from OpenZeppelin to get glue on how internal math works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.