GemJoin
Inherits: Ownable2Step, Pausable
Collateral deposits are held independently from the IonPool
core contract, but credited to users through gem
balances.
Separating collateral deposits from the core contract allows for handling tokens with non-standard behavior, if needed. This contract implements access control through Ownable2Step
. This contract implements pausing through OpenZeppelin's Pausable
.
State Variables
GEM
POOL
ILK_INDEX
totalGem
Functions
constructor
Creates a new GemJoin
instance.
Parameters
pause
Pauses the contract.
Pauses the contract.
unpause
Unpauses the contract.
Unpauses the contract.
join
Converts ERC20 token into gem (credit inside of the IonPool
's internal accounting).
Gem will be sourced from msg.sender
and credited to user
.
Parameters
exit
Debits gem from the IonPool
's internal accounting and withdraws it into ERC20 token.
Gem will be debited from msg.sender
and sent to user
.
Parameters