profile
viewpoint
Julian Traversa JTraversa @NescienceSoftware, @Swivel-Finance District of Columbia, USA Founder & Full Stack @ Swivel Finance Founder & Full Stack @ Nescience Software

JTraversa/DefiHedge-Protocol 7

The Decentralized Protocol for Interest-Rate Derivatives & Fixed-Rate Lending

JTraversa/bondable 2

A minimalistic debt issuance mechanism in Solidity

JTraversa/Omisario 1

An integration between the OmiseGo Network and Super Mario NES

JTraversa/aave-protocol 0

Aave Protocol Version 1.0 - Decentralized Lending Pools

JTraversa/btrccts 0

BackTest and Run CryptoCurrency Trading Strategies

JTraversa/catalyst 0

An Algorithmic Trading Library for Crypto-Assets in Python

JTraversa/ccxt 0

A JavaScript / Python / PHP cryptocurrency trading API with support for more than 120 bitcoin/altcoin exchanges

JTraversa/CCXT-Historical-Data-Scraper 0

Scrape historical data from most major exchanges

issue openedSwivel-Finance/gost

Integrate Optimized Compound Library

A recent library came out that doesnt mutate state and thus reduces the costs for reading the current compound cToken.exchangeRateCurrent significantly:

https://github.com/transmissions11/libcompound

<html> <body> <!--StartFragment--><h3 dir="auto" style="box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 1.25em; font-weight: 600; line-height: 1.25; color: rgb(36, 41, 47); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">LibCompound</h3>

Method balanceOfUnderlying Gas exchangeRateCurrent Gas
Direct Call 70,638 67,236
LibCompound 51,163 39,281
Method balanceOfUnderlying Gas exchangeRateCurrent Gas
Direct Call 81,177 77,968
LibFuse 66,954 63,183

created time in 6 hours

push eventSwivel-Finance/swuniswap-v3

Julian Traversa

commit sha 054e962dd74212e6822a954155d35c2d7084dbf0

update constants

view details

Julian Traversa

commit sha 2a2b76bc459e07a410f0c2a371d8f66c5a68bcc2

Merge branch 'main' of https://github.com/Swivel-Finance/swuniswap-v3

view details

push time in 7 hours

push eventSwivel-Finance/swuniswap-v3

Julian Traversa

commit sha eb9eeb4df9e13f562a21309b25b010126d5fed56

Update README.md

view details

push time in 8 hours

push eventSwivel-Finance/swuniswap-v3

Julian Traversa

commit sha 7789f77618b73b8ec64227c04f0990ae7fc8a2ef

Update README.md

view details

push time in 8 hours

push eventSwivel-Finance/swuniswap-v3

Julian Traversa

commit sha 14f29f0f2feaf13307eb724719bb5bbe45cadb93

Update README.md

view details

push time in 8 hours

push eventSwivel-Finance/swuniswap-v3

Julian Traversa

commit sha bc0c8e175475ba880c4e8362b6979cc2f740bff0

Update README.md

view details

push time in 8 hours

push eventSwivel-Finance/scrivel

Julian Traversa

commit sha 0c1df5a2e0f6793554eb36cd8f98cfa587c94301

orderbook filtering

view details

Julian Traversa

commit sha 593ed8be580ac0c346bc9a671c4456e8e21515fb

crash-recovery

view details

Julian Traversa

commit sha 965315eae8f836a2563913450d2283ccf9493423

remove-todo

view details

Julian Traversa

commit sha 7308979b4795a80f1b2afae26b46f22641915f6d

remove most courtesy sleeps

view details

Julian Traversa

commit sha 96b5e0fe1e2e5900ac41be4227328bd074ef333d

better storage + logging

view details

Julian Traversa

commit sha 898da78ce42623f8e8744de3c5390c396f128f2a

Merge pull request #18 from Swivel-Finance/filtering-storage Filtering storage

view details

push time in 9 hours

PR merged Swivel-Finance/scrivel

Filtering storage
  • Add a script to identify potential spam orders on testnet
  • Add order storage to allow recovery from most crashes
  • Remove all but initial courtesy sleeps
+174 -59

0 comment

3 changed files

JTraversa

pr closed time in 9 hours

push eventSwivel-Finance/scrivel

Julian Traversa

commit sha 96b5e0fe1e2e5900ac41be4227328bd074ef333d

better storage + logging

view details

push time in 9 hours

push eventSwivel-Finance/scrivel

Julian Traversa

commit sha 7308979b4795a80f1b2afae26b46f22641915f6d

remove most courtesy sleeps

view details

push time in 4 days

PR opened Swivel-Finance/scrivel

Filtering storage
  • Add a script to identify potential spam orders on testnet
  • Add order storage to allow recovery from most crashes
+86 -20

0 comment

3 changed files

pr created time in 4 days

push eventSwivel-Finance/scrivel

Julian Traversa

commit sha 965315eae8f836a2563913450d2283ccf9493423

remove-todo

view details

push time in 4 days

create barnchSwivel-Finance/scrivel

branch : filtering-storage

created branch time in 4 days

push eventSwivel-Finance/scrivel

Julian Traversa

commit sha 4c6ef33f0f71badc7eb31f1d361379cbc5f299ee

refactor structure to break down logic

view details

Julian Traversa

commit sha e1c6bb58e401b366db8a25cb3444b11aeec6755b

fix expiryLength

view details

Julian Traversa

commit sha e46d3dd7ca527a1b3a1ae6a934e35a8a28d32aa3

el fiximundo para newExpiry scope

view details

Julian Traversa

commit sha d614b18a6017aac9aeee41e5a1c4637267ab28e0

"nexExpiry" -> "newExpiry" typo

view details

Julian Traversa

commit sha 1cf75d36da122235cc4ed0026915328e2b52135c

spacing

view details

Julian Traversa

commit sha dad9faa0581de3767a6b4c82eee4c65baa12fe9e

Merge pull request #17 from Swivel-Finance/refactor-return-structure refactor structure to break down logic

view details

push time in 4 days

PR merged Swivel-Finance/scrivel

refactor structure to break down logic
  • Rename some stuffs
  • Refactor structure
+230 -198

0 comment

1 changed file

JTraversa

pr closed time in 4 days

push eventJTraversa/bondable

Julian Traversa

commit sha d465f620e21c657314406272ca86c4344fcd013d

Update README.md

view details

push time in 6 days

push eventJTraversa/bondable

Julian Traversa

commit sha 3be14bc1714f6cc62b542bf463e777dcab10393c

Update README.md

view details

push time in 6 days

push eventJTraversa/bondable

Julian Traversa

commit sha a830c5aea6ae6c3ec256523fa5bd4151f7fbcc93

Update README.md

view details

push time in 6 days

push eventJTraversa/bondable

Julian Traversa

commit sha b86249dce6673d662f729d193ca34bea7f4fa661

Update README.md

view details

push time in 6 days

push eventJTraversa/bondable

Julian Traversa

commit sha fb3745ee2cd96d4ada9a747a6f232daa8f6b02d7

Update README.md

view details

push time in 6 days

PR opened snapshot-labs/snapshot-spaces

adding swivelDAO

Hi! What is your PR about?

  • [ ] Add or edit a skin
  • [x] Add a custom domain for your space
  • [ ] Add an alias to migrate your space
+2 -1

0 comment

1 changed file

pr created time in 6 days

push eventJTraversa/snapshot-spaces

Julian Traversa

commit sha 9103bfb44ac528c6be85ae5723c3295f7758c911

adding swivelDAO

view details

push time in 6 days

Pull request review commentethereum/EIPs

EIP-4626: Yield Bearing Vault Standard

+---+eip: 4626+title: Yield Bearing Vault Standard+description: A standard for yield bearing vaults.+author: Joey Santoro (@joeysantoro), t11s (@transmissions11), Jet Jadeja (@JetJadeja)+discussions-to: https://github.com/ethereum/EIPs/pull/4626+status: Draft+type: Standards Track+category: ERC+created: 2021-12-22+---++## Abstract++The following standard allows for the implementation of a standard API for yield bearing vaults within smart contracts. This standard provides basic functionality for depositing and withdrawing tokens and reading balances with an optional extension for tokenized vaults using ERC-20.++## Motivation++Yield bearing vaults have a lack of standardization leading to diverse implementation details. Some various examples include lending markets (Compound, Aave, Fuse), aggregators (Yearn, Rari Vaults, Idle), and intrinsically interest bearing tokens (xSushi). This makes integration difficult at the aggregator or plugin layer for protocols which need to conform to many standards. This forces each protocol to implement their own adapters which are error prone and waste development resources.++A standard for yield bearing vaults will allow for a similar cambrian explosion to ERC-20, unlocking access to yield in a variety of applications with little specialized effort from developers.+++## Specification++### Methods++#### deposit++`function deposit(address _to, uint256 _value) public returns (uint256 _shares)`++Deposits `_value` tokens into the vault and grants ownership of them to `_to`.++MAY return a pro-rata ownership `_shares` value corresponding `_value`, if not MUST return `0`.++MAY represent `_shares` using internal accounting or an ERC-20 token. ++If pro-rata shares ownership is implemented, the vault SHOULD implement `balanceOf`, `redeem`, `totalSupply` and `exchangeRate`.+++#### withdraw++`function withdraw(address _to, uint256 _value) public returns (uint256 _shares)`++Withdraws `_value` tokens from the vault and transfers them to `_to`. ++MAY return a pro-rata ownership `_shares` value corresponding to `_value`,  if not MUST return `0`.+++#### totalHoldings+`function totalHoldings() public view returns (uint256)`++Returns the total amount of underlying tokens held/managed by the vault.+++#### balanceOfUnderlying+`function balanceOfUnderlying(address _owner) public view returns (uint256)`++Returns the total amount underlying tokens held in the vault for `_owner`.++#### underlying+`function underlying() public view returns (address)`++Returns the address of the token the vault uses for accounting, depositing, and withdrawing. ++SHOULD return a token implementing the ERC-20 standard.+++#### totalSupply++`function totalSupply() public view returns (uint256)`++Returns the total number of unredeemed vault shares in circulation.++OPTIONAL - This method is only needed for vaults that implement a pro-rata share mechanism for deposits.++#### balanceOf++`function balanceOf(address _owner) public view returns (uint256)`++Returns the total amount of vault shares the `_owner` currently has.++OPTIONAL - This method is only needed for vaults that implement a pro-rata share mechanism for deposits.++#### redeem++`function redeem(address _to, uint256 _shares) public returns (uint256 _value)`++Redeems a specific number of `_shares` for underlying tokens and transfers them to `_to`. ++MAY return a pro-rata ownership `_shares` value corresponding `_value`, if not MUST return `0`.++OPTIONAL - This method is only needed for vaults that implement a pro-rata share mechanism for deposits.++#### exchangeRate++`function exchangeRate() public view returns (uint256)`++The amount of underlying tokens one `baseUnit` of vault shares is redeemable for. ++e.g. `_shares * exchangeRate() / baseUnit() = _value`.++`exchangeRate() * totalSupply()` MUST equal `totalHoldings()`.

Id say in addition to.

Like @alcueca's saying, a calculateX is needed to ensure your own internal bookkeeping is in line for a single specific deposit/withdraw that could include unknown fees, but for more generalized bookkeeping that isnt tied to a single tx, it's still ideal to record the exchangeRate.

e.g. In our contracts, we benchmark exchangeRate at maturity (potentially regardless of any deposits/withdrawals) and use this as a point to begin divesting any additional yield from YT holders, back to PT holders.

Joeysantoro

comment created time in 13 days

PullRequestReviewEvent

Pull request review commentethereum/EIPs

EIP-4626: Yield Bearing Vault Standard

+---+eip: 4626+title: Yield Bearing Vault Standard+description: A standard for yield bearing vaults.+author: Joey Santoro (@joeysantoro), t11s (@transmissions11), Jet Jadeja (@JetJadeja)+discussions-to: https://github.com/ethereum/EIPs/pull/4626+status: Draft+type: Standards Track+category: ERC+created: 2021-12-22+---++## Abstract++The following standard allows for the implementation of a standard API for yield bearing vaults within smart contracts. This standard provides basic functionality for depositing and withdrawing tokens and reading balances with an optional extension for tokenized vaults using ERC-20.++## Motivation++Yield bearing vaults have a lack of standardization leading to diverse implementation details. Some various examples include lending markets (Compound, Aave, Fuse), aggregators (Yearn, Rari Vaults, Idle), and intrinsically interest bearing tokens (xSushi). This makes integration difficult at the aggregator or plugin layer for protocols which need to conform to many standards. This forces each protocol to implement their own adapters which are error prone and waste development resources.++A standard for yield bearing vaults will allow for a similar cambrian explosion to ERC-20, unlocking access to yield in a variety of applications with little specialized effort from developers.+++## Specification++### Methods++#### deposit++`function deposit(address _to, uint256 _value) public returns (uint256 _shares)`++Deposits `_value` tokens into the vault and grants ownership of them to `_to`.++MAY return a pro-rata ownership `_shares` value corresponding `_value`, if not MUST return `0`.++MAY represent `_shares` using internal accounting or an ERC-20 token. ++If pro-rata shares ownership is implemented, the vault SHOULD implement `balanceOf`, `redeem`, `totalSupply` and `exchangeRate`.+++#### withdraw++`function withdraw(address _to, uint256 _value) public returns (uint256 _shares)`++Withdraws `_value` tokens from the vault and transfers them to `_to`. ++MAY return a pro-rata ownership `_shares` value corresponding to `_value`,  if not MUST return `0`.+++#### totalHoldings+`function totalHoldings() public view returns (uint256)`++Returns the total amount of underlying tokens held/managed by the vault.+++#### balanceOfUnderlying+`function balanceOfUnderlying(address _owner) public view returns (uint256)`++Returns the total amount underlying tokens held in the vault for `_owner`.++#### underlying+`function underlying() public view returns (address)`++Returns the address of the token the vault uses for accounting, depositing, and withdrawing. ++SHOULD return a token implementing the ERC-20 standard.+++#### totalSupply++`function totalSupply() public view returns (uint256)`++Returns the total number of unredeemed vault shares in circulation.++OPTIONAL - This method is only needed for vaults that implement a pro-rata share mechanism for deposits.++#### balanceOf++`function balanceOf(address _owner) public view returns (uint256)`++Returns the total amount of vault shares the `_owner` currently has.++OPTIONAL - This method is only needed for vaults that implement a pro-rata share mechanism for deposits.++#### redeem

Yup its a 1-1 of redeem from compound!

But if there is no redeemUnderlying, only withdraw and withdraw+redeem do the same thing, just one is scaled for shares, it might make sense to associate the two. (in the same way compound associates redeem and redeemUnderlying)

Again, I think redeem sounds nicer, withdrawShares describes what this does in context of other methods. Very minor hairs being split.

Joeysantoro

comment created time in 13 days

PullRequestReviewEvent

Pull request review commentethereum/EIPs

EIP-4626: Yield Bearing Vault Standard

+---+eip: 4626+title: Yield Bearing Vault Standard+description: A standard for yield bearing vaults.+author: Joey Santoro (@joeysantoro), t11s (@transmissions11), Jet Jadeja (@JetJadeja)+discussions-to: https://github.com/ethereum/EIPs/pull/4626+status: Draft+type: Standards Track+category: ERC+created: 2021-12-22+---++## Abstract++The following standard allows for the implementation of a standard API for yield bearing vaults within smart contracts. This standard provides basic functionality for depositing and withdrawing tokens and reading balances with an optional extension for tokenized vaults using ERC-20.++## Motivation++Yield bearing vaults have a lack of standardization leading to diverse implementation details. Some various examples include lending markets (Compound, Aave, Fuse), aggregators (Yearn, Rari Vaults, Idle), and intrinsically interest bearing tokens (xSushi). This makes integration difficult at the aggregator or plugin layer for protocols which need to conform to many standards. This forces each protocol to implement their own adapters which are error prone and waste development resources.++A standard for yield bearing vaults will allow for a similar cambrian explosion to ERC-20, unlocking access to yield in a variety of applications with little specialized effort from developers.+++## Specification++### Methods++#### deposit++`function deposit(address _to, uint256 _value) public returns (uint256 _shares)`++Deposits `_value` tokens into the vault and grants ownership of them to `_to`.++MAY return a pro-rata ownership `_shares` value corresponding `_value`, if not MUST return `0`.++MAY represent `_shares` using internal accounting or an ERC-20 token. ++If pro-rata shares ownership is implemented, the vault SHOULD implement `balanceOf`, `redeem`, `totalSupply` and `exchangeRate`.+++#### withdraw++`function withdraw(address _to, uint256 _value) public returns (uint256 _shares)`++Withdraws `_value` tokens from the vault and transfers them to `_to`. ++MAY return a pro-rata ownership `_shares` value corresponding to `_value`,  if not MUST return `0`.+++#### totalHoldings+`function totalHoldings() public view returns (uint256)`++Returns the total amount of underlying tokens held/managed by the vault.+++#### balanceOfUnderlying+`function balanceOfUnderlying(address _owner) public view returns (uint256)`++Returns the total amount underlying tokens held in the vault for `_owner`.++#### underlying+`function underlying() public view returns (address)`++Returns the address of the token the vault uses for accounting, depositing, and withdrawing. ++SHOULD return a token implementing the ERC-20 standard.+++#### totalSupply++`function totalSupply() public view returns (uint256)`++Returns the total number of unredeemed vault shares in circulation.++OPTIONAL - This method is only needed for vaults that implement a pro-rata share mechanism for deposits.++#### balanceOf++`function balanceOf(address _owner) public view returns (uint256)`++Returns the total amount of vault shares the `_owner` currently has.++OPTIONAL - This method is only needed for vaults that implement a pro-rata share mechanism for deposits.++#### redeem

Given compound's mint/redeemUnderlying methods have been replaced by deposit/withdraw in this EIP, it might make sense to retain parallel structure, and replace redeem with withdrawShares.

I think this makes the method's use case a bit more clear at a glance, though redeem might have a nice ring to it... ¯_(ツ)_/¯

Joeysantoro

comment created time in 13 days

PullRequestReviewEvent

issue openedSwivel-Finance/gost

Swivel v3: Have `cancel` accept arrays

created time in 15 days

more