Gem Join

Overview


GemJoin allows users to convert their ERC20 tokens into internal gem balance inside the IonPool which can then be collateralized and borrowed against

Design Decisions


GemJoin vs Directly Holding in IonPool

The sole purpose of the GemJoin is to convert external ERC20 tokens into the internal collateral credit system of IonPool.

This is simple for standard ERC20 tokens that have no idiosyncratic behaviors, however, atypical tokens (such as fee-on-transfer) may require special logic to be properly credited. Externalizing the handling of the collateral tokens allows the support of unconventional tokens without having to make changes to the core. All the extra logic can be created externally while keeping the core as simple as possible.

Contract Architecture


GemJoin.sol

This contract is used in IonHandlerBase and IonZapper to join the collateral into gem before interacting with IonPool.

Last updated