osmosis-labs / isotonic

Smart Contracts for the Lendex Protocol
MIT License
1 stars 0 forks source link

Optional market caps #81

Closed uint closed 2 years ago

uint commented 2 years ago

Closes #65

The cap is against LToken supply. It's a hard cap.

There's this requirement...

We cap hard on deposit at the limit. User should get a hint before depositing how much the max is, and if depositing more, be told what the max is.

Technically, the UI can query the ltoken contract for the ltoken supply and the market contract cfg for the cap. If we need one snug query for this is probably something to figure out in integration.

uint commented 2 years ago

LGTM Only nitpick for me - I'd personally choose some big-longer-more-meaningful name then "cap". I wonder if after some time, without context that one might be confusing in middle of code.

Would market_cap be helpful? "It's the cap for the whole market, not some random temporary internal variable."

ueco-jb commented 2 years ago

Would market_cap be helpful? "It's the cap for the whole market, not some random temporary internal variable."

Yeah, that looks good.