OpenZeppelin/cairo-contracts

Cairo implementation of EIP-4626

FilipLaurentiu opened this issue ยท 4 comments

Full details of the standard
OpenZeppelin has always offered the best implementations for different standards in Ethereum and now in Starknet.
EIP-4626 it's the new popular standard for tokenized vaults and many projects already use it for their Vaults on Ethereum.

Starknet is becoming more and more popular and many projects need an implementation of this standard on which to rely. OZ has always provided well tested tools with no security issues.

An implementation from OZ would save a lot of development time and money

There are already two implementation for this standard in Cairo
https://github.com/koloz193/ERC4626
https://github.com/milancermak/cairo-4626

A few thoughts on this:

  • This implementation is more respectful of the standard
  • What do we think of using namespaces ? Sounds like a good thing to change everywhere tbh
  • Adding safemath would be great
  • We should use from starkware.cairo.common.bool import TRUE, FALSE if I'm looking correctly at latest changes
  • The storage_var should be called ERC4626_asset_ to fit OZ guidelines

These implementations are awesome. Let me throw one more in the hat: https://github.com/auditless/cairo-erc4626

  • We follow the solmate impl.
  • Use TRUE, FALSE
  • Use ERC4626_ naming conventions

Like the idea of namespaces / safemath.

@EvolveArt added your wishlist of safemath and namespaces:

https://github.com/auditless/cairo-erc4626

a reference implementation for Cairo 1: https://github.com/0xEniotna/ERC4626