Git Product home page Git Product logo

fraction-contracts's Introduction

Warning

  • This contracts were made in a short period of time for a hackathons and was not properly audited.
  • This contracts may serve as templates for other projects.
  • This contracts may contains severe bugs (it actually contains some bugs, but they are features 😝).
  • The contracts of this project will constantly be worked on (updated) and upgraded.

Fraction contracts

This is the contracts that governs all fractions logic, this contracts include the wrapping of erc20(stables) mechanism, the staking of wrapped erc20(stables), Fraction bounded NFTs (soul bounded) to increase rewards earned by verification, The in-built ability to perform flash loan(flash-mint) (havent test lol)

Deployed on Mumbai : most contracts should be verified to see the code

Fraction Token : FRACT

https://mumbai.polygonscan.com/address/0x953f88014255241332d8841c34921572db112d65

Super Fraction Token : FRACTx

https://console.superfluid.finance/mumbai/supertokens/0xbcC35477b5b360713C8CE874EE936a0FB14b5E3c?tab=streams

Fractionless : FRACTIONLESS

https://mumbai.polygonscan.com/address/0x147Aef142CCebf9902ec57A369D4aB1B6126Fc69

FractionWrapper : FRACTWRAPPED

https://mumbai.polygonscan.com/address/0xb68dF2721e747a30A611D9279169d36E448C600C
due to reasons, contract could not be verified, but here is the ABI

NFT Registry : NFTRegistry

https://mumbai.polygonscan.com/address/0x34c93Cf06bADc3c64c18d02DD2dFb5f43a32C472

FractionNFT : FractionNFT

https://mumbai.polygonscan.com/address/0x8b78A188f3941BdF5BcDE61A0c32C68A4044fdbB

contract

These contracts were made using foundry

To get the contracts running, clone the repo and then run

forge install

and then

npm install

Then you build the contracts and write test and fixs some problems lol

For the flash mint functionality to work, the reciever (if a contract) has to have a onERC1155Receiver function (implementation)

fraction-contracts's People

Contributors

0xpr0f avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

larxeze hhsean

fraction-contracts's Issues

♻️ NFT Registry not passing the proper amount

In the setName function when NFT are minted, the cost of minted is 0.3 (native token), but this is by passed for some reason and throw errors when msg.value is placed, this was again due to no test for all the contracts.

Decision : There is not amount for the contract to receive, so users mint NFT only paying gas

Conclusion : Another feature 😝

πŸ–– More Issues to come and Disclaimer

For more bugs in the contracts, pls create an issue, we will be pushing a fix for all tiny bugs, there maybe bugs in the other contracts but dont forget they are still features 😝

Although this should not cause for high alarm, the contracts are 100% useable and nicely written for tests (plays, hackathons ), it may need to be audited and more optimised for production.

Use at your own risk ⛔️ lol

Warning
Disclaimer

  • This contracts where made for a hackathon, they where never crossed checked, audited or professional looked at and written (even by the writer), all feature still works as intended, the contracts are on mumbai, dont lose mainnet funds.

Stay safe πŸ’™

⏰ Faucet wait time

it turns out that the faucet wait time is not properly validated due to code not tested (rushing and forgetfulness), so users and bots can potentially mint unlimted amount of tokens as there is not wait time or cap to total supply.

but there is not specifed amount, the minted tokens are 1000 FRACT per mint function call

Decision: This is not a high threat as it is currently on the mumbai testnet and we also want users to test it and play around with it and who doesn’t like a wonky total supply ?

Conclusion : It is a feature 😝

βŽ‹ Superfluid upgraded contract imports and syntax

project is not currently using the updated superfluid contract syntax, to my surprise it works and there are no error till you try the new ACL management or you import the updated contracts

Decisions : These Contracts works perfectly cause we are not importing the upgraded one or trying the new ACL features for this, Contracts will be upgraded in the future

Conclusion : I had no idea it was old lol, i saw it in the superfluid docs 🀷

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.