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

Superfluid pool #292

Open
wants to merge 55 commits into
base: develop
Choose a base branch
from
Open

Superfluid pool #292

wants to merge 55 commits into from

Conversation

bin-57blocks
Copy link
Contributor

No description provided.

2. rename IncDec to CFALib
3. implement payOwner function
4. add refund logic in burn function
5. limit TradableStream only transfer one time
6. add onlyOwner access control for payOwner and burn
2. convert Super token amount to underlying token amount
@bin-57blocks bin-57blocks requested a review from wisdant February 17, 2023 12:00
@height
Copy link

height bot commented Feb 17, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@00labs 00labs deleted a comment from wisdant Mar 17, 2023
* code and one test

* 1. add the limit to call fixed function mintToWithAuthorization
2. add msg.sender check
3. update tests

* 1. add Multisend contract and tests
2. add permit function in TestToken
3. use block.chainid

* remove owner and nonce parameter

* deploy and verify new contracts about Superfluid

* 1. update superfluid pool tests on mumbai
2. fix bugs of goerli superfluid pool scripts
3. create mumbai superfluid pool scripts
4. deploy, verify and validate superfluid pool contracts on mumbai

* 1. refactor drawdownWithAuthorization function
2. remove drawdownWithReceivable function

* update tests to borrow the same amount as NFT locked value

* update based on review comments

* remove Superfluid v1 contracts
2. use current flow rate instead of the initial flow rate when burn NFT
2. revert increasing/decreasing flows
3. revert creating new flow to processor
4. fix tests and add new tests
address to,
int96 by
) internal {
(, int96 curRate, , ) = _cfa.getFlow(token, from, to);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is not permission check here?

IConstantFlowAgreementV1 _cfa,
ISuperToken token,
address to,
int96 by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we use int96? would uint96 more clear and less error prone?

@00labs 00labs deleted a comment from wisdant May 2, 2023
@00labs 00labs deleted a comment from wisdant May 2, 2023
@PlayJok3r PlayJok3r changed the base branch from main to develop May 11, 2023 20:22
shan-57blocks and others added 6 commits June 6, 2023 11:04
* superfluid processor event update

* update deployed contracts on mumbai for superfluid

* add unit test for settlement success event

* update receivableCleared and settlementMade events

* update deploy contract addresses

---------

Co-authored-by: shan <[email protected]>
update receivableCleared and settlementMade events to include flowKey

Co-authored-by: shan <[email protected]>
* Polish TradableStream.sol

* comment out one skipped test

* comment out logs in SuperfluidFactoringTest.sol

* 1. update burn function permission
2. change require to revert errors in TradableStream contract

* Added some comments

---------

Co-authored-by: bin <[email protected]>
* add new tests
1. replace Niflot to TradableStream
2. rename IncDec to CFALib
3. implement payOwner function
4. add refund logic in burn function
5. limit TradableStream only transfer one time
6. add onlyOwner access control for payOwner and burn

implement a new version

1. remove unused IReceivableAsset interface
2. convert Super token amount to underlying token amount

fix a permission issue of TradableStream burn

add view functions

add positive tests of Superfluid pool

replace require messages to errors

goerli deployment scripts

fixing forking error

remove forking for the whole hardhat network

updated workflow file

adding testing log

add deployment validation script

added env for testing

added env for testing

reverting debugging log

add error code

Borrow in one send (#298)

* code and one test

* 1. add the limit to call fixed function mintToWithAuthorization
2. add msg.sender check
3. update tests

* 1. add Multisend contract and tests
2. add permit function in TestToken
3. use block.chainid

* remove owner and nonce parameter

* deploy and verify new contracts about Superfluid

* 1. update superfluid pool tests on mumbai
2. fix bugs of goerli superfluid pool scripts
3. create mumbai superfluid pool scripts
4. deploy, verify and validate superfluid pool contracts on mumbai

* 1. refactor drawdownWithAuthorization function
2. remove drawdownWithReceivable function

* update tests to borrow the same amount as NFT locked value

* update based on review comments

* remove Superfluid v1 contracts

add more tests

conflict in yarn.lock

Refactor ReceivableFactoringPool (#299)

* 1. involve SuperApp framework
2. split SuperfluidPool to ReceivableFactoringPool and SuperfluidProcessor
3. implement drawdown function of SuperfluidProcessor

* implement payoff function of SuperfluidPoolProcessor

* add flow change logic

* fix approveCredit and mintAndDrawdown tests

* fix Superfluid tests

1. add logic to handle flow termination
2. add related tests

1. refactor SuperfluidPoolProcessor and TradableStream for adding logic in _handleFlowChange
2. add comments to describe options in _handleFlowChange

1. rename payoff to settlement
2. remove decreasing/increasing flow logic
3. revert transaction when decreasing/increasing flow
4. add tryTransferAllowance function
5. make settlement to be able called repeatedly

1. add new errors
2. add a new command 'gen-code-ids'
3. clean code

add negative tests for mintToAndDrawdown

1. fix a bug of settlement
2. add negative tests for settlement
3. add more comments

1. update deployment scripts
2. deploy new contracts on mumbai

1. add comments to describe one limitation of flow terminatation
2. use current flow rate instead of the initial flow rate when burn NFT

1. add new logic to handle multiple borrowers of one flow termination
2. revert increasing/decreasing flows
3. revert creating new flow to processor
4. fix tests and add new tests

add comments

deploy new contracts about Superfluid

deploy new contracts about Superfluid

fix some small bugs

superfluid processor event update (#306)

* superfluid processor event update

* update deployed contracts on mumbai for superfluid

* add unit test for settlement success event

* update receivableCleared and settlementMade events

* update deploy contract addresses

---------

Co-authored-by: shan <[email protected]>

Superfluid pool event update (#311)

update receivableCleared and settlementMade events to include flowKey

Co-authored-by: shan <[email protected]>

update receivableCleared and settlementMade events to include flowKey (#314)

Co-authored-by: shan <[email protected]>

03 fine tune to Superfluid changes (#315)

* Polish TradableStream.sol

* comment out one skipped test

* comment out logs in SuperfluidFactoringTest.sol

* 1. update burn function permission
2. change require to revert errors in TradableStream contract

* Added some comments

---------

Co-authored-by: bin <[email protected]>

New tests (#316)

* add new tests
bin-57blocks and others added 10 commits July 19, 2023 15:21
… burned while settlement function is called.
* fix merge conflicts

* Superfluid SuperApp register support

* remove old files

* remove unused code

* Add isSuperApp view function

* Deploy and verify SuperfluidSuperAppRegister

---------

Co-authored-by: shan <[email protected]>
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.

4 participants