Skip to content
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

Merged
merged 48 commits into from
Jun 22, 2021
Merged

Lm for lending #256

merged 48 commits into from
Jun 22, 2021

Conversation

ororopickpocket
Copy link
Contributor

No description provided.

# Conflicts:
#	contracts/farm/LiquidityMining.sol
#	scripts/contractInteraction/mainnet_contracts.json
#	scripts/deployment/liquidity-mining/addETHPoolToken.py
@jameshowlett977 jameshowlett977 changed the base branch from liquidity-mining to development June 9, 2021 07:34
contracts/farm/ILiquidityMining.sol Outdated Show resolved Hide resolved
@@ -20,24 +20,16 @@ contract LoanTokenSettingsLowerAdmin is AdvancedToken {
/// ------------- MUST BE THE SAME AS IN LoanToken CONTRACT -------------------
address public sovrynContractAddress;

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

Copy link
Contributor

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);

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

Copy link
Contributor

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?

contracts/connectors/loantoken/LoanTokenLogicStandard.sol Outdated Show resolved Hide resolved
contracts/farm/LiquidityMining.sol Outdated Show resolved Hide resolved
@jameshowlett977 jameshowlett977 merged commit ec01e73 into development Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants