Sub-Reserve

sub-reserve is a solution for hiding user position from being exposed

  • Reserve

    • Need to be encrypted since its variation can leak data of users’ positions

    • Need to be know by user so that they can borrow from the protocol

  • Solution: Maintain a mainReserve and a subReserve

    • A lower Estimation of the mainReserve will be public

    • SubReserve will be completely hidden

    • Add to reserve

      • Move a random percentage from 0% to 40% of subReserve to mainReserve

      • Move a random percentage from 0% to 40% of input to subReserve

      • Move the left-over input to mainReserve

    • Remove from reserve

      • Move a random percentage from 0% to 40% of subReserve to mainReserve

      • Move the input from mainReserve

  • Estimation of mainReserve

    • The Estimation of mainReserve will be a deterministic lower bound that is higher than 85% of mainReserve

      • 10, 11, 12, 13, 14, 15, 16, 17, 18 ,20, 22,24,26,28,30

      • 33,36,40,44,48,52,56,60,66,72,78, 84, 90

Last updated