Skip to content

MujeebSulayman/Assetrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Assetrix Smart Contract Assessment

🎯 Objective

This contract implements a crowdfunding-style escrow system for real estate projects. It allows developers to create fundraising campaigns, receive contributions in ETH, and conditionally access funds depending on whether the funding goal is met before the deadline.


πŸ—οΈ Key Features

βœ… Campaign Creation

  • Developers can create campaigns by providing a name, funding goal (in ETH), and deadline (timestamp).
  • Each campaign is uniquely identified and tracked.

βœ… Investor Contributions

  • Anyone can contribute ETH to a campaign before the deadline.
  • Contributions are recorded per user and locked in escrow.

βœ… Escrow Logic

  • Funds are held securely until the deadline.
  • If the funding goal is met, only the campaign owner can release funds to themselves.
  • If the funding goal is not met, contributors can individually claim refunds.

βœ… Security Measures

  • Uses OpenZeppelin's Ownable, Pausable, and ReentrancyGuard contracts:
    • Ownable restricts admin actions like pausing.
    • Pausable allows emergency pause of contributions.
    • ReentrancyGuard protects against reentrancy in withdrawals/refunds.
  • Follows checks-effects-interactions pattern for fund handling.

βœ… Events for Transparency

  • CampaignCreated
  • ContributionReceived
  • FundsReleased
  • RefundIssued

πŸ› οΈ Design Decisions

  • ETH-only was used for simplicity, but the contract is modular and can be upgraded to support ERC20 tokens (e.g., USDC) for stablecoin-based funding.
  • Funds are only released manually by the campaign owner (once eligible), giving flexibility for post-campaign compliance.
  • Refunds are pull-based: users must actively claim, avoiding unintended gas consumption.

🚨 Assumptions

  • All timestamps are based on block.timestamp, assuming an honest miner majority.
  • Campaign owners are trusted to register only valid real estate campaigns; legal validation is assumed off-chain.

πŸ“‚ File Structure

assetrix/

β”‚ β”œβ”€β”€ contracts/ β”‚ └── Assetrix.sol # Main smart contract β”‚ β”œβ”€β”€ ARCHITECTURE.md # Architecture decisions β”‚ β”‚ β”œβ”€β”€ README.md # Design decisions and usage


πŸ“š License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Mujeeb Sulayman
Blockchain Developer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published