-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lm for lending #256
Lm for lending #256
Conversation
Lm claim and update
# Conflicts: # contracts/farm/LiquidityMining.sol # scripts/contractInteraction/mainnet_contracts.json # scripts/deployment/liquidity-mining/addETHPoolToken.py
@@ -20,24 +20,16 @@ contract LoanTokenSettingsLowerAdmin is AdvancedToken { | |||
/// ------------- MUST BE THE SAME AS IN LoanToken CONTRACT ------------------- | |||
address public sovrynContractAddress; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could (?) move all new variable declarations to AdvancedTokenStorage
contract. without it you have to maintain storage compatibility manually, which is error-prone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to maintain storage compatibility since LoanTokens (proxy contracts) were already deployed and we need to add variables only to LoanTokenSettingsLowerAdmin.
I prefer to leave as is for now.
minted = _mintToken(receiver, depositAmount); | ||
|
||
//transfer the tokens from the receiver to the LM address | ||
_internalTransferFrom(receiver, liquidityMiningAddress, minted, minted); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_internalTransferFrom
is very "internal" function and should be used sparingly. To avoid it, one can mint tokens to the contract itself and then transfer them via erc20.transfer
With this change the token flow during mint
operation would be the reverse of the one during burn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we need to change it.
@ororopickpocket what do you think?
# Conflicts: # scripts/contractInteraction/contract_interaction.py # scripts/contractInteraction/mainnet_contracts.json # scripts/contractInteraction/testnet_contracts.json
# Conflicts: # contracts/connectors/loantoken/LoanTokenLogicStandard.sol # scripts/contractInteraction/contract_interaction.py
No description provided.